提交 726b0bca authored 作者: yueweilu's avatar yueweilu

添加 必要const

上级 00a35c97
...@@ -144,7 +144,7 @@ class BookInfoPage extends StatelessWidget { ...@@ -144,7 +144,7 @@ class BookInfoPage extends StatelessWidget {
children: [ children: [
StarScore( StarScore(
score: num, score: num,
star: Star( star: const Star(
fillColor: Colours.cE2, fillColor: Colours.cE2,
size: 12, size: 12,
emptyColor: Colours.cE2, emptyColor: Colours.cE2,
......
...@@ -3,7 +3,6 @@ library forget_pwd; ...@@ -3,7 +3,6 @@ library forget_pwd;
import 'dart:async'; import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
......
...@@ -23,10 +23,10 @@ class _HomePageState extends State<HomePage> { ...@@ -23,10 +23,10 @@ class _HomePageState extends State<HomePage> {
}, },
child: Container( child: Container(
color: Colors.cyan, color: Colors.cyan,
child: Text('read_web'),
height: 40, height: 40,
// width: double.infinity, // width: double.infinity,
alignment: Alignment.center, alignment: Alignment.center,
child: const Text('read_web'),
), ),
), ),
GestureDetector( GestureDetector(
...@@ -35,10 +35,10 @@ class _HomePageState extends State<HomePage> { ...@@ -35,10 +35,10 @@ class _HomePageState extends State<HomePage> {
}, },
child: Container( child: Container(
color: Colors.indigo, color: Colors.indigo,
child: Text('关于我们'),
height: 40, height: 40,
width: double.infinity, width: double.infinity,
alignment: Alignment.center, alignment: Alignment.center,
child: const Text('关于我们'),
), ),
) )
......
...@@ -14,34 +14,32 @@ class _TestPageState extends State<TestPage> with AutomaticKeepAliveClientMixin ...@@ -14,34 +14,32 @@ class _TestPageState extends State<TestPage> with AutomaticKeepAliveClientMixin
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text('分类'), title: const Text('分类'),
bottom: PreferredSize( bottom: PreferredSize(
preferredSize: Size.fromHeight(48.w), preferredSize: Size.fromHeight(48.w),
child: Container( child: Row(
child: Row( children: [
children: [ // TabBar放在左侧
// TabBar放在左侧 const Expanded(
Expanded( child: TabBar(
child: TabBar( tabs: [
tabs: [ Tab(text: 'Tab 1'),
Tab(text: 'Tab 1'), Tab(text: 'Tab 2'),
Tab(text: 'Tab 2'), Tab(text: 'Tab 3'),
Tab(text: 'Tab 3'), Tab(text: 'Tab 4'),
Tab(text: 'Tab 4'), Tab(text: 'Tab 5'),
Tab(text: 'Tab 5'), ],
],
),
), ),
),
// 筛选按钮放在右侧 // 筛选按钮放在右侧
IconButton( IconButton(
icon: Icon(Icons.filter_list), icon: const Icon(Icons.filter_list),
onPressed: () { onPressed: () {
// 处理筛选按钮点击事件 // 处理筛选按钮点击事件
}, },
), ),
], ],
),
), ),
) )
), ),
......
...@@ -76,31 +76,28 @@ class _LibraryPageState extends State<LibraryPage> { ...@@ -76,31 +76,28 @@ class _LibraryPageState extends State<LibraryPage> {
], ],
), ),
controller.filterLabels.isEmpty?const SizedBox():_buildLabel(), controller.filterLabels.isEmpty?const SizedBox():_buildLabel(),
Container( Expanded(
// color: Colors.red, child: CustomPullScrollView(
child: Expanded( controller: controller.refreshController,
child: CustomPullScrollView( onRefresh: controller.onRefresh,
controller: controller.refreshController, onLoading: controller.onLoading,
onRefresh: controller.onRefresh, child: SingleChildScrollView(
onLoading: controller.onLoading, child: Column(
child: SingleChildScrollView( mainAxisSize: MainAxisSize.max,
child: Column( children: [
mainAxisSize: MainAxisSize.max, controller.ads.isNotEmpty?Container(
children: [ color: Colors.transparent,
controller.ads.isNotEmpty?Container( padding: EdgeInsets.symmetric(horizontal: 10.w),
color: Colors.transparent, child: BuildBanner(
padding: EdgeInsets.symmetric(horizontal: 10.w), items:controller.ads,
child: BuildBanner( onTap:(adModel){
items:controller.ads, context.pushNamed(Routes.adDetail,extra: adModel);
onTap:(adModel){ } ,
context.pushNamed(Routes.adDetail,extra: adModel); )
} , ):const SizedBox(),
)
):const SizedBox(),
LibraryContentPage(controller: controller,) LibraryContentPage(controller: controller,)
], ],
),
), ),
), ),
), ),
...@@ -109,7 +106,7 @@ class _LibraryPageState extends State<LibraryPage> { ...@@ -109,7 +106,7 @@ class _LibraryPageState extends State<LibraryPage> {
), ),
Visibility( Visibility(
visible: controller.show, visible: controller.show,
child: Container( child: SizedBox(
height: double.infinity, height: double.infinity,
child: FilterPage( child: FilterPage(
controller: controller, controller: controller,
...@@ -151,7 +148,7 @@ class _LibraryPageState extends State<LibraryPage> { ...@@ -151,7 +148,7 @@ class _LibraryPageState extends State<LibraryPage> {
} }
Widget _buildCategory(){ Widget _buildCategory(){
return Container( return SizedBox(
height: 38.w, height: 38.w,
child: GetBuilder<LibraryController>( child: GetBuilder<LibraryController>(
init: LibraryController(context), init: LibraryController(context),
......
...@@ -53,7 +53,6 @@ class _LoginPageState extends State<LoginPage> { ...@@ -53,7 +53,6 @@ class _LoginPageState extends State<LoginPage> {
autovalidateMode: AutovalidateMode.always, autovalidateMode: AutovalidateMode.always,
onChanged: (){ onChanged: (){
setState(() { setState(() {
print('++++++++++++++++');
}); });
}, },
key: _formKey, key: _formKey,
...@@ -65,7 +64,7 @@ class _LoginPageState extends State<LoginPage> { ...@@ -65,7 +64,7 @@ class _LoginPageState extends State<LoginPage> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
SizedBox(height: 120.w,), SizedBox(height: 120.w,),
Container( SizedBox(
width: 180.w, width: 180.w,
height: 42.w, height: 42.w,
// color: Colors.cyan, // color: Colors.cyan,
...@@ -174,7 +173,6 @@ class _LoginPageState extends State<LoginPage> { ...@@ -174,7 +173,6 @@ class _LoginPageState extends State<LoginPage> {
text: '立即登录', text: '立即登录',
isEnabled: controller.enable, isEnabled: controller.enable,
onPressed: () { onPressed: () {
print('11111111111111111');
controller.onLogin(context); controller.onLogin(context);
// context.goNamed(Routes.order); // context.goNamed(Routes.order);
}, },
......
...@@ -13,62 +13,60 @@ class BuildRead extends StatelessWidget { ...@@ -13,62 +13,60 @@ class BuildRead extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Stack(
child: Stack( children: [
children: [ SizedBox(
Container( width: double.infinity,
width: double.infinity, child: Image.asset(
child: Image.asset( 'assets/images/read_bg.png',fit: BoxFit.contain,
'assets/images/read_bg.png',fit: BoxFit.contain, width: double.infinity,
width: double.infinity, // height: 96,
// height: 96, )
) ),
), Positioned(
Positioned( // top: 10.w,
// top: 10.w, left: 0,
left: 0, right: 0,
right: 0, top: 0,
top: 0, bottom: 0,
bottom: 0, child: Container(
child: Container( padding: EdgeInsets.symmetric(vertical: 16.5.w,horizontal: 8),
padding: EdgeInsets.symmetric(vertical: 16.5.w,horizontal: 8), color: Colors.transparent,
color: Colors.transparent, // decoration: BoxDecoration(
// decoration: BoxDecoration( // borderRadius: BorderRadius.circular(8),
// borderRadius: BorderRadius.circular(8), // color: Colors.transparent,
// color: Colors.transparent, // boxShadow: [
// boxShadow: [ // BoxShadow(
// BoxShadow( // color: const Color(0xFFC7C7C7).withOpacity(0.5),
// color: const Color(0xFFC7C7C7).withOpacity(0.5), // offset: const Offset(3, 0),
// offset: const Offset(3, 0), // blurRadius: 10.w,
// blurRadius: 10.w, // spreadRadius: 0.w,
// spreadRadius: 0.w, // ),
// ), // ],
// ], // ),
// ), child: Row(
child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: items.map((model){
children: items.map((model){ return Expanded(
return Expanded( child: GestureDetector(
child: GestureDetector( behavior: HitTestBehavior.opaque,
behavior: HitTestBehavior.opaque, onTap: (){
onTap: (){ if (onTap !=null) onTap!(model);
if (onTap !=null) onTap!(model); },
}, child: Column(
child: Column( mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, children: [
children: [ Text(model.value,style: TextStyle(fontSize: 18.w,height: 1.5.w,fontWeight: Fonts.medium,color: Colours.c3),),
Text(model.value,style: TextStyle(fontSize: 18.w,height: 1.5.w,fontWeight: Fonts.medium,color: Colours.c3),), Text(model.name,style: TextStyle(fontSize: 13.w,height:1.5.w,color: Colours.c6))
Text(model.name,style: TextStyle(fontSize: 13.w,height:1.5.w,color: Colours.c6)) ],
],
),
), ),
); ),
}).toList(), );
), }).toList(),
), ),
) ),
], )
), ],
); );
} }
} }
...@@ -39,7 +39,6 @@ class PayCouponController extends GetxController with GetSingleTickerProviderSta ...@@ -39,7 +39,6 @@ class PayCouponController extends GetxController with GetSingleTickerProviderSta
price: payController.originalPrice.toString() price: payController.originalPrice.toString()
); );
for(CouponModel model in result.list!) { for(CouponModel model in result.list!) {
print('================================${tag}');
model.type = num.parse(tag); model.type = num.parse(tag);
} }
...@@ -59,7 +58,6 @@ class PayCouponController extends GetxController with GetSingleTickerProviderSta ...@@ -59,7 +58,6 @@ class PayCouponController extends GetxController with GetSingleTickerProviderSta
refreshController.finishRefresh(IndicatorResult.success); refreshController.finishRefresh(IndicatorResult.success);
refreshController.resetFooter(); refreshController.resetFooter();
} catch (error) { } catch (error) {
print('--------------------------------$error');
refreshController.finishRefresh(IndicatorResult.fail); refreshController.finishRefresh(IndicatorResult.fail);
} }
} }
......
...@@ -81,7 +81,7 @@ class _ReadCategoryPageState extends State<ReadCategoryPage> { ...@@ -81,7 +81,7 @@ class _ReadCategoryPageState extends State<ReadCategoryPage> {
}, },
child: Container( child: Container(
margin: EdgeInsets.only(right: 15.w), margin: EdgeInsets.only(right: 15.w),
child: Text('取消'), child: const Text('取消'),
) )
):const SizedBox(), ):const SizedBox(),
], ],
......
...@@ -82,7 +82,7 @@ class _ReadDiscussPageState extends State<ReadDiscussPage> { ...@@ -82,7 +82,7 @@ class _ReadDiscussPageState extends State<ReadDiscussPage> {
}, },
child: Container( child: Container(
margin: EdgeInsets.only(right: 15.w), margin: EdgeInsets.only(right: 15.w),
child: Text('取消'), child: const Text('取消'),
) )
):const SizedBox(), ):const SizedBox(),
], ],
......
...@@ -122,59 +122,56 @@ class _ReadInputDiscussState extends State<ReadInputDiscuss> { ...@@ -122,59 +122,56 @@ class _ReadInputDiscussState extends State<ReadInputDiscuss> {
itemCount: widget.controller.discussInputImages.length, itemCount: widget.controller.discussInputImages.length,
), ),
), ),
Container( MediaQuery.removePadding(
// color: Colors.red, context: context,
child: MediaQuery.removePadding( removeTop: true,
context: context, child: ListView.builder(
removeTop: true, physics: const NeverScrollableScrollPhysics(),
child: ListView.builder( shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(), itemBuilder: (BuildContext context, int index){
shrinkWrap: true, AudioModel audioModel= widget.controller.discussInputAudios[index];
itemBuilder: (BuildContext context, int index){ return Container(
AudioModel audioModel= widget.controller.discussInputAudios[index]; // height: 20.w,
return Container( margin: EdgeInsets.only(right: 130.w,),
// height: 20.w, child: Stack(
margin: EdgeInsets.only(right: 130.w,), children: [
child: Stack( Container(
children: [ decoration: BoxDecoration(
Container( borderRadius: BorderRadius.circular(10.w),
decoration: BoxDecoration( color: Colors.white,
borderRadius: BorderRadius.circular(10.w),
color: Colors.white,
),
padding: EdgeInsets.only(right:20.w,left: 10.w),
margin: EdgeInsets.only(top: 10.w,right: 10.w),
height: 20,
child: Row(
// mainAxisSize: MainAxisSize.min,
mainAxisAlignment:MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap:(){
widget.controller.playAudio(audioModel);
},
child: Image.asset('assets/images/audio.png')
),
Text('${audioModel.currentDuration}/${audioModel.duration}',style: TextStyle(fontSize: 10.w,height: 1.4,color: Colours.c9),)
],
),
), ),
Positioned( padding: EdgeInsets.only(right:20.w,left: 10.w),
right: 6, margin: EdgeInsets.only(top: 10.w,right: 10.w),
top: 6, height: 20,
child: GestureDetector( child: Row(
onTap: (){ // mainAxisSize: MainAxisSize.min,
widget.controller.delAudio(audioModel); mainAxisAlignment:MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
onTap:(){
widget.controller.playAudio(audioModel);
}, },
child: Image.asset('assets/images/media_del.png',width: 12.w,height: 12.w,) child: Image.asset('assets/images/audio.png')
) ),
) Text('${audioModel.currentDuration}/${audioModel.duration}',style: TextStyle(fontSize: 10.w,height: 1.4,color: Colours.c9),)
], ],
), ),
); ),
}, Positioned(
itemCount: widget.controller.discussInputAudios.length, right: 6,
), top: 6,
child: GestureDetector(
onTap: (){
widget.controller.delAudio(audioModel);
},
child: Image.asset('assets/images/media_del.png',width: 12.w,height: 12.w,)
)
)
],
),
);
},
itemCount: widget.controller.discussInputAudios.length,
), ),
) )
], ],
......
...@@ -82,7 +82,7 @@ class _ReadNotePageState extends State<ReadNotePage> { ...@@ -82,7 +82,7 @@ class _ReadNotePageState extends State<ReadNotePage> {
}, },
child: Container( child: Container(
margin: EdgeInsets.only(right: 15.w), margin: EdgeInsets.only(right: 15.w),
child: Text('取消'), child: const Text('取消'),
) )
):const SizedBox(), ):const SizedBox(),
], ],
......
...@@ -40,7 +40,7 @@ class _SplashPageState extends State<SplashPage> { ...@@ -40,7 +40,7 @@ class _SplashPageState extends State<SplashPage> {
return Scaffold( return Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,
// appBar: AppBar(), // appBar: AppBar(),
body: Container( body: SizedBox(
height: double.infinity, height: double.infinity,
width: double.infinity, width: double.infinity,
child: Image.asset('assets/images/splash.png',fit: BoxFit.cover,), child: Image.asset('assets/images/splash.png',fit: BoxFit.cover,),
......
...@@ -59,9 +59,9 @@ class HomeCard extends StatelessWidget { ...@@ -59,9 +59,9 @@ class HomeCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.start, // mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Text('名称',textAlign: TextAlign.start,), const Text('名称',textAlign: TextAlign.start,),
SizedBox(height: 20.w,), SizedBox(height: 20.w,),
Text( const Text(
'描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述', '描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述',
maxLines: 3, maxLines: 3,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
......
...@@ -53,7 +53,7 @@ class _StudyReportPageState extends State<StudyReportPage> { ...@@ -53,7 +53,7 @@ class _StudyReportPageState extends State<StudyReportPage> {
children: [ children: [
Row( Row(
children: [ children: [
Container( SizedBox(
width: 26.w, width: 26.w,
height: 26.w, height: 26.w,
// color: Colors.cyan, // color: Colors.cyan,
...@@ -99,7 +99,7 @@ class _StudyReportPageState extends State<StudyReportPage> { ...@@ -99,7 +99,7 @@ class _StudyReportPageState extends State<StudyReportPage> {
children: [ children: [
Row( Row(
children: [ children: [
Container( SizedBox(
width: 26.w, width: 26.w,
height: 26.w, height: 26.w,
child: Image.asset('assets/images/report_study.png',fit: BoxFit.cover,) child: Image.asset('assets/images/report_study.png',fit: BoxFit.cover,)
...@@ -147,7 +147,7 @@ class _StudyReportPageState extends State<StudyReportPage> { ...@@ -147,7 +147,7 @@ class _StudyReportPageState extends State<StudyReportPage> {
children: [ children: [
Row( Row(
children: [ children: [
Container( SizedBox(
width: 26.w, width: 26.w,
height: 26.w, height: 26.w,
child: Image.asset('assets/images/report_test.png',fit: BoxFit.cover,) child: Image.asset('assets/images/report_test.png',fit: BoxFit.cover,)
...@@ -214,7 +214,7 @@ class _StudyReportPageState extends State<StudyReportPage> { ...@@ -214,7 +214,7 @@ class _StudyReportPageState extends State<StudyReportPage> {
children: [ children: [
Row( Row(
children: [ children: [
Container( SizedBox(
width: 26.w, width: 26.w,
height: 26.w, height: 26.w,
// color: Colors.cyan, // color: Colors.cyan,
......
...@@ -11,12 +11,10 @@ class BuildCard extends StatelessWidget { ...@@ -11,12 +11,10 @@ class BuildCard extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Stack( return Stack(
children: [ children: [
Container( Image.asset(
child: Image.asset( 'assets/images/report_bg.png',
'assets/images/report_bg.png', width: double.infinity,
width: double.infinity, fit: BoxFit.contain,
fit: BoxFit.contain,
),
), ),
Positioned( Positioned(
left: 0, left: 0,
......
...@@ -56,7 +56,7 @@ class _AboutPageState extends State<AboutPage> { ...@@ -56,7 +56,7 @@ class _AboutPageState extends State<AboutPage> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
GestureDetector( GestureDetector(
child: Text('《用户协议》',textAlign: TextAlign.right,style: TextStyle(fontSize: 10.w,color: Color(0xFF2A82D9)),), child: Text('《用户协议》',textAlign: TextAlign.right,style: TextStyle(fontSize: 10.w,color: const Color(0xFF2A82D9)),),
onTap: (){ onTap: (){
context.pushNamed(Routes.terms,queryParameters: {'url':'$kServerUrl$kUserAgreement','title':'用户协议'}); context.pushNamed(Routes.terms,queryParameters: {'url':'$kServerUrl$kUserAgreement','title':'用户协议'});
}, },
...@@ -65,7 +65,7 @@ class _AboutPageState extends State<AboutPage> { ...@@ -65,7 +65,7 @@ class _AboutPageState extends State<AboutPage> {
Container(width: 1.w,height: 10.w,color: const Color(0xFFC8C8C8),), Container(width: 1.w,height: 10.w,color: const Color(0xFFC8C8C8),),
Gaps.vGaps15, Gaps.vGaps15,
GestureDetector( GestureDetector(
child: Text('《隐私协议》',textAlign: TextAlign.left,style: TextStyle(fontSize: 10.w,color: Color(0xFF2A82D9))), child: Text('《隐私协议》',textAlign: TextAlign.left,style: TextStyle(fontSize: 10.w,color: const Color(0xFF2A82D9))),
onTap:(){ onTap:(){
context.pushNamed(Routes.terms,queryParameters: {'url':'$kServerUrl$kUserPriAgreement','title':'隐私政策'}); context.pushNamed(Routes.terms,queryParameters: {'url':'$kServerUrl$kUserPriAgreement','title':'隐私政策'});
} , } ,
......
...@@ -18,29 +18,27 @@ class BuildCell extends StatelessWidget { ...@@ -18,29 +18,27 @@ class BuildCell extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Container( Row(
child: Row( children: [
children: [ Container(
Container( width: 27.w,
width: 27.w, height: 27.w,
height: 27.w, decoration: BoxDecoration(
decoration: BoxDecoration( borderRadius: BorderRadius.circular(13.5.w),
borderRadius: BorderRadius.circular(13.5.w), color: Colors.cyan,
color: Colors.cyan,
),
), ),
Gaps.hGaps10, ),
Column( Gaps.hGaps10,
crossAxisAlignment: CrossAxisAlignment.start, Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Gaps.vGaps15, children: [
Text(model.remarks??'',style: TextStyle(color: Colours.c3,fontSize: 14.w,height: 1.6,fontWeight: Fonts.medium),), Gaps.vGaps15,
Text(model.createTime??'',style: TextStyle(color: Colours.c9,fontSize: 10.w,height: 1.6,)), Text(model.remarks??'',style: TextStyle(color: Colours.c3,fontSize: 14.w,height: 1.6,fontWeight: Fonts.medium),),
Gaps.vGaps15, Text(model.createTime??'',style: TextStyle(color: Colours.c9,fontSize: 10.w,height: 1.6,)),
], Gaps.vGaps15,
) ],
], )
), ],
), ),
Text(model.options == 1?'+${model.numbers}':'-${model.numbers}',style: TextStyle(fontSize: 17.w,fontWeight: Fonts.medium,color: model.options == 1?AppTheme.primary:Colours.c3),) Text(model.options == 1?'+${model.numbers}':'-${model.numbers}',style: TextStyle(fontSize: 17.w,fontWeight: Fonts.medium,color: model.options == 1?AppTheme.primary:Colours.c3),)
], ],
......
...@@ -22,32 +22,29 @@ class _CoinRechargePageState extends State<CoinRechargePage> with AutomaticKeepA ...@@ -22,32 +22,29 @@ class _CoinRechargePageState extends State<CoinRechargePage> with AutomaticKeepA
padding: EdgeInsets.symmetric(vertical: 17.w), padding: EdgeInsets.symmetric(vertical: 17.w),
width: double.infinity, width: double.infinity,
margin: EdgeInsets.fromLTRB(10.w, 0.w, 10.w, 0.w), margin: EdgeInsets.fromLTRB(10.w, 0.w, 10.w, 0.w),
child: Container( child: Stack(
// color: Colors.red, children: [
child:Stack( const Row(
children: [ mainAxisAlignment: MainAxisAlignment.center,
const Row( children: [
mainAxisAlignment: MainAxisAlignment.center, Text('紫荆币充值',textAlign:TextAlign.center),
children: [ ],
Text('紫荆币充值',textAlign:TextAlign.center), ),
], Positioned(
), right: 0.w,
Positioned( top: 0.w,
right: 0.w, child: GestureDetector(
top: 0.w, onTap: (){
child: GestureDetector( context.pop();
onTap: (){ },
context.pop(); child: SizedBox(
}, width: 20.w,
child: SizedBox( height: 20.w,
width: 20.w, child: Image.asset('assets/images/close.png'),
height: 20.w,
child: Image.asset('assets/images/close.png'),
),
), ),
) ),
], )
) ],
), ),
), ),
Container( Container(
...@@ -75,7 +72,7 @@ class _CoinRechargePageState extends State<CoinRechargePage> with AutomaticKeepA ...@@ -75,7 +72,7 @@ class _CoinRechargePageState extends State<CoinRechargePage> with AutomaticKeepA
child: RichText(text: TextSpan( child: RichText(text: TextSpan(
children: [ children: [
TextSpan(text: '充值即代表同意',style: TextStyle(fontSize: 13.w,height: 1.5,color: Colours.c9)), TextSpan(text: '充值即代表同意',style: TextStyle(fontSize: 13.w,height: 1.5,color: Colours.c9)),
TextSpan(text: '《用户充值协议》',style: TextStyle(fontSize: 13.w,height: 1.5,color: Color(0xFF2A82D9))), TextSpan(text: '《用户充值协议》',style: TextStyle(fontSize: 13.w,height: 1.5,color: const Color(0xFF2A82D9))),
] ]
)), )),
), ),
......
...@@ -8,7 +8,7 @@ class BuildItem extends StatelessWidget { ...@@ -8,7 +8,7 @@ class BuildItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ColorFiltered( return ColorFiltered(
colorFilter: ColorFilter.mode(Colors.transparent, BlendMode.saturation), colorFilter: const ColorFilter.mode(Colors.transparent, BlendMode.saturation),
child: Container( child: Container(
margin: EdgeInsets.only(left: 10.w, top: 10.w, right: 5.w), margin: EdgeInsets.only(left: 10.w, top: 10.w, right: 5.w),
child: Stack( child: Stack(
......
...@@ -46,7 +46,7 @@ class _UserDiscussDesPageState extends State<UserDiscussDesPage> { ...@@ -46,7 +46,7 @@ class _UserDiscussDesPageState extends State<UserDiscussDesPage> {
), ),
child: Column(children: [ child: Column(children: [
ClipRRect( ClipRRect(
borderRadius:BorderRadius.only(topLeft: Radius.circular(5.w),topRight: Radius.circular(5)), borderRadius:BorderRadius.only(topLeft: Radius.circular(5.w),topRight: const Radius.circular(5)),
child: Container( child: Container(
width: double.infinity, width: double.infinity,
color: Colors.white, color: Colors.white,
......
...@@ -133,7 +133,7 @@ class _BuildDiscussState extends State<BuildDiscuss> { ...@@ -133,7 +133,7 @@ class _BuildDiscussState extends State<BuildDiscuss> {
margin: EdgeInsets.only(top: 10.w), margin: EdgeInsets.only(top: 10.w),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(17.5.w), borderRadius: BorderRadius.circular(17.5.w),
child: Container( child: SizedBox(
width: 35.w, width: 35.w,
height: 35.w, height: 35.w,
child: CustomImage.network(url: model.personPic??'',placeholder: Image.asset('assets/images/user_default_icon.png'),), child: CustomImage.network(url: model.personPic??'',placeholder: Image.asset('assets/images/user_default_icon.png'),),
...@@ -224,7 +224,7 @@ class _BuildDiscussState extends State<BuildDiscuss> { ...@@ -224,7 +224,7 @@ class _BuildDiscussState extends State<BuildDiscuss> {
widget.userDiscussDesController?.setDiscussModel(model); widget.userDiscussDesController?.setDiscussModel(model);
widget.userDiscussDesController?.setFatherDiscussModel(fatherModel); widget.userDiscussDesController?.setFatherDiscussModel(fatherModel);
}, },
child: Container( child: SizedBox(
height: 25.w, height: 25.w,
width: 15.w, width: 15.w,
// color: Colors.yellow, // color: Colors.yellow,
......
...@@ -25,7 +25,7 @@ class _UserGenderPageState extends State<UserGenderPage> { ...@@ -25,7 +25,7 @@ class _UserGenderPageState extends State<UserGenderPage> {
builder: (controller) => Scaffold( builder: (controller) => Scaffold(
appBar: CustomAppBar( appBar: CustomAppBar(
title: const Text('设置性别'), title: const Text('设置性别'),
actions: [], actions: const [],
), ),
body: Container( body: Container(
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
......
...@@ -11,9 +11,7 @@ class UserInfoController extends GetxController { ...@@ -11,9 +11,7 @@ class UserInfoController extends GetxController {
}) async { }) async {
// String result = await CommonAPI.upload(path:path,fileTypes: 'user'); // String result = await CommonAPI.upload(path:path,fileTypes: 'user');
OssTool tool = OssTool('zxts-user-file'); OssTool tool = OssTool('zxts-user-file');
print('------path--------------------------$path');
final response = await tool.putObjectFile(path); final response = await tool.putObjectFile(path);
print('------response--------------------------${response.realUri}');
_changeInfo(response.realUri.toString()); _changeInfo(response.realUri.toString());
} }
......
...@@ -96,7 +96,6 @@ class _UserNickPageState extends State<UserNickPage> { ...@@ -96,7 +96,6 @@ class _UserNickPageState extends State<UserNickPage> {
onTap: () { onTap: () {
// 处理点击事件,可以执行任意操作 // 处理点击事件,可以执行任意操作
_textFieldController.clear(); _textFieldController.clear();
print('Image Clicked!');
}, },
child: Image( child: Image(
image: const AssetImage('assets/images/del.png'), image: const AssetImage('assets/images/del.png'),
......
...@@ -37,7 +37,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinAwaitingPage> { ...@@ -37,7 +37,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinAwaitingPage> {
return Scaffold( return Scaffold(
appBar: CustomAppBar( appBar: CustomAppBar(
title: const Text('待支付'), title: const Text('待支付'),
actions: [], actions: const [],
), ),
body: Column( body: Column(
children: [ children: [
......
...@@ -37,7 +37,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCancelPage> { ...@@ -37,7 +37,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCancelPage> {
return Scaffold( return Scaffold(
appBar: CustomAppBar( appBar: CustomAppBar(
title: const Text('已取消'), title: const Text('已取消'),
actions: [], actions: const [],
), ),
body: Column( body: Column(
children: [ children: [
......
...@@ -37,7 +37,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCompletedPage> { ...@@ -37,7 +37,7 @@ class _UserOrderCoinAwaitingState extends State<UserOrderCoinCompletedPage> {
return Scaffold( return Scaffold(
appBar: CustomAppBar( appBar: CustomAppBar(
title: const Text('已完成'), title: const Text('已完成'),
actions: [], actions: const [],
), ),
body: Column( body: Column(
children: [ children: [
......
...@@ -24,7 +24,7 @@ class _UserOrderCompletedState extends State<UserOrderCompletedPage> { ...@@ -24,7 +24,7 @@ class _UserOrderCompletedState extends State<UserOrderCompletedPage> {
builder: (controller) => Scaffold( builder: (controller) => Scaffold(
appBar: CustomAppBar( appBar: CustomAppBar(
title: const Text('已完成'), title: const Text('已完成'),
actions: [], actions: const [],
), ),
body: Container( body: Container(
width: double.infinity, width: double.infinity,
...@@ -73,7 +73,7 @@ class _UserOrderCompletedState extends State<UserOrderCompletedPage> { ...@@ -73,7 +73,7 @@ class _UserOrderCompletedState extends State<UserOrderCompletedPage> {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, // 下面的Text靠左 CrossAxisAlignment.start, // 下面的Text靠左
children: [ children: [
Container( SizedBox(
height: 47.5.w, height: 47.5.w,
child: Text( child: Text(
controller.model.bookList==null?'': controller.model.bookList==null?'':
...@@ -206,7 +206,7 @@ class _UserOrderCompletedState extends State<UserOrderCompletedPage> { ...@@ -206,7 +206,7 @@ class _UserOrderCompletedState extends State<UserOrderCompletedPage> {
child: Align( child: Align(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: Padding( child: Padding(
padding: EdgeInsets.only(right: 15.2), padding: EdgeInsets.only(right: 15.2.w),
child: Container( child: Container(
height: 23.w, height: 23.w,
width: 60.w, width: 60.w,
......
...@@ -17,7 +17,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> { ...@@ -17,7 +17,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
builder: (controller) => Scaffold( builder: (controller) => Scaffold(
appBar: CustomAppBar( appBar: CustomAppBar(
title: const Text('已退款'), title: const Text('已退款'),
actions: [], actions: const [],
), ),
body:Column(children: [ body:Column(children: [
Container( Container(
...@@ -67,7 +67,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> { ...@@ -67,7 +67,7 @@ class _UserOrderRefundedState extends State<UserOrderRefundedPage> {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, // 下面的Text靠左 CrossAxisAlignment.start, // 下面的Text靠左
children: [ children: [
Container( SizedBox(
height: 62.5.w, height: 62.5.w,
child: Text( child: Text(
controller.model?.bookList?[0].name??'', controller.model?.bookList?[0].name??'',
......
...@@ -3,7 +3,7 @@ part of utils; ...@@ -3,7 +3,7 @@ part of utils;
class EncryptUtil { class EncryptUtil {
/// md5 加密 /// md5 加密
static String encodeMd5(String data) { static String encodeMd5(String data) {
var content = Utf8Encoder().convert(data); var content = const Utf8Encoder().convert(data);
var digest = md5.convert(content); var digest = md5.convert(content);
return hex.encode(digest.bytes); return hex.encode(digest.bytes);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论