提交 93fc8b4a authored 作者: yueweilu's avatar yueweilu

我的界面微调

上级 cba59872
...@@ -71,19 +71,25 @@ class _MinePageState extends State<MinePage> { ...@@ -71,19 +71,25 @@ class _MinePageState extends State<MinePage> {
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
BuildUser(userInfo:controller.userInfo,onTap: () async{ Container(
final result = await context.pushNamed(Routes.userInfo,extra: controller.userInfo); margin: EdgeInsets.symmetric(horizontal: 10.w),
if (result == true){ child: BuildUser(userInfo:controller.userInfo,onTap: () async{
controller.getInfo(); final result = await context.pushNamed(Routes.userInfo,extra: controller.userInfo);
} if (result == true){
},), controller.getInfo();
}
},),
),
Gaps.vGaps10, Gaps.vGaps10,
BuildRead(items: controller.reads,onTap: (ReadModel model) async{ Container(
final result = await context.pushNamed(model.link??''); margin: EdgeInsets.symmetric(horizontal: 2.2.w),
if (result == true){ child: BuildRead(items: controller.reads,onTap: (ReadModel model) async{
controller.getInfo(); final result = await context.pushNamed(model.link??'');
} if (result == true){
}), controller.getInfo();
}
}),
),
controller.ads.isNotEmpty?Gaps.vGaps10:const SizedBox(), controller.ads.isNotEmpty?Gaps.vGaps10:const SizedBox(),
controller.ads.isNotEmpty? controller.ads.isNotEmpty?
Container( Container(
......
...@@ -37,30 +37,33 @@ class BuildAccount extends StatelessWidget { ...@@ -37,30 +37,33 @@ class BuildAccount extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: items.map((model){ children: items.map((model){
return GestureDetector( return Expanded(
onTap: (){ child: GestureDetector(
if (model.link != null){ onTap: (){
context.pushNamed(model.link!); if (model.link != null){
if (onTap !=null) onTap; context.pushNamed(model.link!);
} if (onTap !=null) onTap;
}, }
child: Column( },
children: [ child: Column(
SizedBox( children: [
width: 25.w, SizedBox(
height: 25.w, width: 25.w,
// color: Colors.green, height: 25.w,
child: Image.asset(model.icon!), // color: Colors.green,
), child: Image.asset(model.icon!),
Gaps.vGaps5, ),
Text(model.name,style: TextStyle(fontSize:12.w,height: 1.6.w,color: Colours.c9),), Gaps.vGaps5,
items.indexOf(model) == 0?Row( Text(model.name,style: TextStyle(fontSize:12.w,height: 1.6.w,color: Colours.c9),),
children: [ items.indexOf(model) == 0?Row(
Text(model.value.toString(),style: TextStyle(fontSize: 16.w,height: 1.6,fontWeight: Fonts.medium,color: AppTheme.primary,),), mainAxisAlignment: MainAxisAlignment.center,
Text('张',style: TextStyle(fontSize: 12.w,height:1.6.w,color: Colours.c3),) children: [
], Text(model.value.toString(),style: TextStyle(fontSize: 16.w,height: 1.6,fontWeight: Fonts.medium,color: AppTheme.primary,),),
):Text(model.value.toString(),style: TextStyle(fontSize: 16.w,height:1.6.w,color: Colours.c3),) Text('张',style: TextStyle(fontSize: 12.w,height:1.6.w,color: Colours.c3),)
], ],
):Text(model.value.toString(),style: TextStyle(fontSize: 16.w,height:1.6.w,color: Colours.c3),)
],
),
), ),
); );
} ).toList(), } ).toList(),
......
...@@ -13,7 +13,7 @@ class BuildRead extends StatelessWidget { ...@@ -13,7 +13,7 @@ class BuildRead extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GestureDetector( return Container(
child: Stack( child: Stack(
children: [ children: [
Container( Container(
...@@ -29,7 +29,7 @@ class BuildRead extends StatelessWidget { ...@@ -29,7 +29,7 @@ class BuildRead extends StatelessWidget {
left: 0, left: 0,
right: 0, right: 0,
child: Container( child: Container(
padding: EdgeInsets.symmetric(vertical: 16.5.w), 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),
...@@ -46,24 +46,26 @@ class BuildRead extends StatelessWidget { ...@@ -46,24 +46,26 @@ class BuildRead extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: items.map((model){ children: items.map((model){
return GestureDetector( return Expanded(
behavior: HitTestBehavior.opaque, child: GestureDetector(
onTap: (){ behavior: HitTestBehavior.opaque,
if (model.link != null){ onTap: (){
if (model.link != Routes.love){ if (model.link != null){
context.pushNamed(model.link!); if (model.link != Routes.love){
context.pushNamed(model.link!);
}
else{
if (onTap !=null) onTap!(model);
}
} }
else{ },
if (onTap !=null) onTap!(model); child: Column(
} children: [
} Text(model.value,style: TextStyle(fontSize: 18.w,height: 1.6.w,fontWeight: Fonts.medium,color: Colours.c3),),
}, Gaps.vGaps5,
child: Column( Text(model.name,style: TextStyle(fontSize: 13.w,height:1.6.w,color: Colours.c6))
children: [ ],
Text(model.value,style: TextStyle(fontSize: 18.w,height: 1.6.w,fontWeight: Fonts.medium,color: Colours.c3),), ),
Gaps.vGaps5,
Text(model.name,style: TextStyle(fontSize: 13.w,height:1.6.w,color: Colours.c6))
],
), ),
); );
}).toList(), }).toList(),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论