From 19209764f7899036d0f2c9b15da331f28ad875a7 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Mon, 7 Mar 2022 18:45:32 +0800 Subject: [PATCH] =?UTF-8?q?ui=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/mine/personal_page.dart | 256 ++++++++++++++++++++++++------------ 1 file changed, 174 insertions(+), 82 deletions(-) diff --git a/lib/mine/personal_page.dart b/lib/mine/personal_page.dart index fae93819..05b62e0a 100644 --- a/lib/mine/personal_page.dart +++ b/lib/mine/personal_page.dart @@ -303,93 +303,179 @@ class _PersonalPage extends State with WidgetsBindingObserver { mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Stack( - alignment: Alignment.bottomLeft, - children: [ - Container( - height: 286, - color: Color(0xFFFFFFFF), - child: Stack( - alignment: Alignment.bottomRight, - children: [ - Stack( - children: [ - Positioned( - child: Container( - color: Colors.black, - child: Opacity( - opacity: 0.9, - child: MImage( - memberInfor?.background ?? "", - width: double.infinity, - height: 260.h, - fit: BoxFit.cover, - errorSrc: - "assets/image/default_1.png", - fadeSrc: - "assets/image/default_1.png", - )))), - Container( - margin: EdgeInsets.only( - top: 50.h, left: 16.w, right: 16.w), - decoration: BoxDecoration( - color: Colors.transparent, - ), - child: Column( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: - CrossAxisAlignment.center, - children: [ - GestureDetector( - child: Image.asset( - "assets/image/integral_return.png", - width: 24, - height: 24, - ), - onTap: () { - Navigator.of(context).pop(); - }, - ), - ], - ), + Container( + height: 260, + color: Color(0xFFFFFFFF), + // color: Colors.red, + child: + Stack( + // alignment: Alignment.bottomLeft, + children: [ + Positioned( + top:0, + left: 0, + bottom: 36, + right: 0, + child:Stack( + children: [ + Container( + color: Colors.black, + child: Opacity( + opacity: 0.9, + child: MImage( + memberInfor?.background ?? "", + width: double.infinity, + height: 260.h, + fit: BoxFit.cover, + errorSrc: + "assets/image/default_1.png", + fadeSrc: + "assets/image/default_1.png", + ))), + Container( + margin: EdgeInsets.only( + top: 50.h, left: 16.w, right: 16.w), + decoration: BoxDecoration( + color: Colors.transparent, ), - ], - ), - if(memberId == "0") - Positioned( - bottom: 49.h, - right: 16.w, - child:GestureDetector( - onTap: (){ - showImagePicker(); - }, - child:Container( - padding: EdgeInsets.only(left: 2, right: 2), - width: 59.w, - height: 21.h, - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: Color(0x80000000), + child: Column( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + GestureDetector( + child: Image.asset( + "assets/image/integral_return.png", + width: 24, + height: 24, + ), + onTap: () { + Navigator.of(context).pop(); + }, ), - child: Text( - "更换背景", - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, - color: Color(0xFFFFFFFF), + ], + ), + ), + if(memberId == "0") + Positioned( + bottom: 9, + right: 16.w, + child:GestureDetector( + onTap: (){ + showImagePicker(); + }, + child:Container( + padding: EdgeInsets.only(left: 2, right: 2), + width: 59.w, + height: 23.h, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(2), + color: Color(0x80000000), + ), + child: Text( + "更换背景", + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + color: Color(0xFFFFFFFF), + ), ), ), ), ), - ), - ], + ], + ), ), - ), - homeInfo(), - ], + // Positioned( + // top:0, + // left: 0, + // bottom: 0, + // right: 0, + // child:Stack( + // alignment: Alignment.bottomRight, + // children: [ + // Stack( + // children: [ + // Positioned( + // child: Container( + // color: Colors.black, + // child: Opacity( + // opacity: 0.9, + // child: MImage( + // memberInfor?.background ?? "", + // width: double.infinity, + // height: 260.h, + // fit: BoxFit.cover, + // errorSrc: + // "assets/image/default_1.png", + // fadeSrc: + // "assets/image/default_1.png", + // )))), + // Container( + // margin: EdgeInsets.only( + // top: 50.h, left: 16.w, right: 16.w), + // decoration: BoxDecoration( + // color: Colors.transparent, + // ), + // child: Column( + // mainAxisAlignment: + // MainAxisAlignment.spaceBetween, + // crossAxisAlignment: + // CrossAxisAlignment.center, + // children: [ + // GestureDetector( + // child: Image.asset( + // "assets/image/integral_return.png", + // width: 24, + // height: 24, + // ), + // onTap: () { + // Navigator.of(context).pop(); + // }, + // ), + // ], + // ), + // ), + // ], + // ), + // if(memberId == "0") + // Positioned( + // bottom: 49.h, + // right: 16.w, + // child:GestureDetector( + // onTap: (){ + // showImagePicker(); + // }, + // child:Container( + // padding: EdgeInsets.only(left: 2, right: 2), + // width: 59.w, + // height: 23.h, + // alignment: Alignment.center, + // decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(2), + // color: Color(0x80000000), + // ), + // child: Text( + // "更换背景", + // overflow: TextOverflow.ellipsis, + // style: TextStyle( + // fontSize: 12.sp, + // fontWeight: MyFontWeight.regular, + // color: Color(0xFFFFFFFF), + // ), + // ), + // ), + // ), + // ), + // ], + // ), + // ), + homeInfo(), + ], + ), ), Container( color: Color(0xFFFFFFFF), @@ -610,7 +696,12 @@ class _PersonalPage extends State with WidgetsBindingObserver { } Widget homeInfo() { - return Container( + return Positioned( + top: 0, + bottom: 5, + left: 0, + right: 0, + child: Container( padding: EdgeInsets.only( left: 16, right: 16, @@ -667,6 +758,7 @@ class _PersonalPage extends State with WidgetsBindingObserver { }); }, child: Container( + height: 23, padding: EdgeInsets.only(left: 6, right: 6, bottom: 2, top: 2), alignment: Alignment.center, decoration: BoxDecoration( @@ -688,7 +780,7 @@ class _PersonalPage extends State with WidgetsBindingObserver { ), ) ], - ),); + ),)); } Widget dynamicList() {