|
|
@ -28,104 +28,113 @@ class _UpdateDialog extends State<UpdateDialog> { |
|
|
|
return Material( |
|
|
|
return Material( |
|
|
|
type: MaterialType.transparency, |
|
|
|
type: MaterialType.transparency, |
|
|
|
child: Center( |
|
|
|
child: Center( |
|
|
|
child: Container( |
|
|
|
child: |
|
|
|
|
|
|
|
Container( |
|
|
|
width: MediaQuery.of(context).size.width - 80.w, |
|
|
|
width: MediaQuery.of(context).size.width - 80.w, |
|
|
|
// height: 216.h, |
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
decoration: BoxDecoration( |
|
|
|
color: Colors.white, |
|
|
|
color: Colors.transparent, |
|
|
|
borderRadius: BorderRadius.circular(8.r), |
|
|
|
borderRadius: BorderRadius.circular(8.r), |
|
|
|
), |
|
|
|
), |
|
|
|
child: Column( |
|
|
|
child: Column( |
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
Stack( |
|
|
|
width: double.infinity, |
|
|
|
alignment: Alignment.bottomCenter, |
|
|
|
// height: 110.h, |
|
|
|
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
|
|
|
padding: EdgeInsets.all(20), |
|
|
|
|
|
|
|
child: Column( |
|
|
|
|
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
Container( |
|
|
|
"发现新版本 v${widget.appUpdate.appLastVersion}", |
|
|
|
// height: 100.h, |
|
|
|
style: TextStyle( |
|
|
|
decoration: BoxDecoration( |
|
|
|
fontSize: 17.sp, |
|
|
|
color: Colors.white, |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
border: Border.all( |
|
|
|
color: Color(0xFF000000), |
|
|
|
color: Colors.white, |
|
|
|
|
|
|
|
width: 0, |
|
|
|
|
|
|
|
style: BorderStyle.solid |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
// borderRadius: BorderRadius.only( |
|
|
|
|
|
|
|
// topLeft: Radius.circular(8.r), |
|
|
|
|
|
|
|
// topRight: Radius.circular(8.r), |
|
|
|
|
|
|
|
// ), |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(height: 12.h,), |
|
|
|
), |
|
|
|
|
|
|
|
Image.asset( |
|
|
|
|
|
|
|
"assets/image/update.webp", |
|
|
|
|
|
|
|
width: MediaQuery.of(context).size.width - 80.w, |
|
|
|
|
|
|
|
fit:BoxFit.cover, |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Container( |
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
|
|
color: Colors.white, |
|
|
|
|
|
|
|
border: Border.all( |
|
|
|
|
|
|
|
color: Colors.white, |
|
|
|
|
|
|
|
width: 0, |
|
|
|
|
|
|
|
style: BorderStyle.solid |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
|
|
|
|
bottomLeft: Radius.circular(8.r), |
|
|
|
|
|
|
|
bottomRight: Radius.circular(8.r), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 14.w), |
|
|
|
|
|
|
|
child: Column( |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
SizedBox(height:32.h,), |
|
|
|
Text( |
|
|
|
Text( |
|
|
|
widget.appUpdate.appLastVersionExplain ?? "", |
|
|
|
widget.appUpdate.appLastVersionExplain ?? "", |
|
|
|
textAlign: TextAlign.center, |
|
|
|
textAlign: TextAlign.center, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 17.sp, |
|
|
|
fontSize: 17.sp, |
|
|
|
|
|
|
|
height: 1.2, |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
color: Color(0xFF333333), |
|
|
|
color: Color(0xFF333333), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
SizedBox(height: 57.h,), |
|
|
|
) |
|
|
|
InkWell( |
|
|
|
), |
|
|
|
|
|
|
|
Container( |
|
|
|
|
|
|
|
color: Color(0x1A000000), |
|
|
|
|
|
|
|
height: 1.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Container( |
|
|
|
|
|
|
|
height:55.h, |
|
|
|
|
|
|
|
child: Row( |
|
|
|
|
|
|
|
mainAxisSize: MainAxisSize.max, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
if(!AppUtils.versionCompare(widget.version,widget.appUpdate.appLastVersionUp)) |
|
|
|
|
|
|
|
Expanded( |
|
|
|
|
|
|
|
child: InkWell( |
|
|
|
|
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
doNotUpdate(); |
|
|
|
updateApp(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
child: Container( |
|
|
|
child: Container( |
|
|
|
width: double.infinity, |
|
|
|
width: double.infinity, |
|
|
|
// height: 90.h, |
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(27), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
margin: EdgeInsets.only(left: 14.w,right: 14.w,bottom: 8.h), |
|
|
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 11.h), |
|
|
|
alignment: Alignment.center, |
|
|
|
alignment: Alignment.center, |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
"下次再说", |
|
|
|
"立即更新", |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 17.sp, |
|
|
|
fontSize: 17.sp, |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
color: Color(0xFF8C8C8C), |
|
|
|
color: Color(0xFFFFFFFF), |
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
flex: 1, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
Container( |
|
|
|
if(!AppUtils.versionCompare(widget.version,widget.appUpdate.appLastVersionUp)) |
|
|
|
color: Color(0x1A000000), |
|
|
|
InkWell( |
|
|
|
width: 1.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Expanded( |
|
|
|
|
|
|
|
child: InkWell( |
|
|
|
|
|
|
|
onTap:() { |
|
|
|
onTap:() { |
|
|
|
updateApp(); |
|
|
|
doNotUpdate(); |
|
|
|
// Navigator.of(context).pop(); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
child: Container( |
|
|
|
child: Container( |
|
|
|
width: double.infinity, |
|
|
|
width: double.infinity, |
|
|
|
// height: 90.h, |
|
|
|
|
|
|
|
alignment: Alignment.center, |
|
|
|
alignment: Alignment.center, |
|
|
|
|
|
|
|
padding: EdgeInsets.only(top: 8.h,bottom: 15.h), |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
"立即更新", |
|
|
|
"以后再说", |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 17.sp, |
|
|
|
fontSize: 10.sp, |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
color: Color(0xFF32A060), |
|
|
|
color: Color(0xFF8C8C8C), |
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
flex: 1, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
),) |
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|