|
|
|
@ -289,7 +289,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
xgFlutterPlugin.bindWithIdentifier( |
|
|
|
|
identify: mobile, bindType: XGBindType.account); |
|
|
|
|
|
|
|
|
|
Navigator.of(context).pushNamedAndRemoveUntil('/router/main_page', (route) => false); |
|
|
|
|
Navigator.of(context) |
|
|
|
|
.pushNamedAndRemoveUntil('/router/main_page', (route) => false); |
|
|
|
|
} else { |
|
|
|
|
SmartDialog.showToast("${value.msg}", alignment: Alignment.center); |
|
|
|
|
} |
|
|
|
@ -365,11 +366,10 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
return AnimatedCrossFade( |
|
|
|
|
firstChild: Container( |
|
|
|
|
color: Colors.white, |
|
|
|
|
child: Platform.isAndroid |
|
|
|
|
? Container() |
|
|
|
|
: Container( |
|
|
|
|
// child: Image.asset("name"), |
|
|
|
|
), |
|
|
|
|
child: Image.asset( |
|
|
|
|
"assets/image/ic_splash_bg.png", |
|
|
|
|
fit: BoxFit.fill, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
layoutBuilder: (widgetFirst, keyFirst, widgetSecond, keySecond) { |
|
|
|
|
return Stack( |
|
|
|
@ -394,246 +394,245 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
], |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
secondChild: Scaffold( |
|
|
|
|
resizeToAvoidBottomInset: false, |
|
|
|
|
backgroundColor: Colors.white, |
|
|
|
|
body: GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode()); |
|
|
|
|
}, |
|
|
|
|
child: Stack( |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
height: MediaQuery.of(context).size.height * 0.78, |
|
|
|
|
child: Stack( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
children: [ |
|
|
|
|
PhotoView( |
|
|
|
|
imageProvider: AssetImage("assets/image/laoban.png"), |
|
|
|
|
initialScale: Platform.isAndroid ? 1.02 : 1.2, |
|
|
|
|
basePosition: alignmentProgress, |
|
|
|
|
), |
|
|
|
|
Positioned( |
|
|
|
|
top: 54.h, |
|
|
|
|
left: 28.w, |
|
|
|
|
child: Image.asset( |
|
|
|
|
"assets/image/icon_founder_text.png", |
|
|
|
|
width: 20.w, |
|
|
|
|
height: 200.h, |
|
|
|
|
), |
|
|
|
|
secondChild: uiPage(), |
|
|
|
|
firstCurve: Curves.easeInQuart, |
|
|
|
|
secondCurve: Curves.easeInQuart, |
|
|
|
|
crossFadeState: isShowLogin ? CrossFadeState.showSecond : CrossFadeState.showFirst, |
|
|
|
|
duration: Duration(milliseconds: Platform.isIOS ? 1000 : 1000), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget uiPage() { |
|
|
|
|
return Scaffold( |
|
|
|
|
resizeToAvoidBottomInset: false, |
|
|
|
|
backgroundColor: Colors.white, |
|
|
|
|
body: GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode()); |
|
|
|
|
}, |
|
|
|
|
child: Stack( |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
height: MediaQuery.of(context).size.height * 0.78, |
|
|
|
|
child: Stack( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
children: [ |
|
|
|
|
PhotoView( |
|
|
|
|
imageProvider: AssetImage("assets/image/laoban.png"), |
|
|
|
|
initialScale: Platform.isAndroid ? 1.02 : 1.15, |
|
|
|
|
basePosition: alignmentProgress, |
|
|
|
|
), |
|
|
|
|
Positioned( |
|
|
|
|
top: 54.h, |
|
|
|
|
left: 28.w, |
|
|
|
|
child: Image.asset( |
|
|
|
|
"assets/image/icon_founder_text.png", |
|
|
|
|
width: 20.w, |
|
|
|
|
height: 200.h, |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Color(0xFF32A060).withAlpha(changeAlpha), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Color(0xFF32A060).withAlpha(changeAlpha), |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
height: MediaQuery.of(context).size.height * 0.78, |
|
|
|
|
margin: EdgeInsets.only(top: 56.h), |
|
|
|
|
alignment: Alignment.topCenter, |
|
|
|
|
child: AspectRatio( |
|
|
|
|
aspectRatio: 1.1, |
|
|
|
|
child: Opacity( |
|
|
|
|
opacity: (changeAlpha) / 255, |
|
|
|
|
child: Container( |
|
|
|
|
child: Image.asset( |
|
|
|
|
"assets/image/icon_login_hide_bg.png", |
|
|
|
|
fit: BoxFit.cover, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
height: MediaQuery.of(context).size.height * 0.78, |
|
|
|
|
margin: EdgeInsets.only(top: 56.h), |
|
|
|
|
alignment: Alignment.topCenter, |
|
|
|
|
child: AspectRatio( |
|
|
|
|
aspectRatio: 1.1, |
|
|
|
|
child: Opacity( |
|
|
|
|
opacity: (changeAlpha) / 255, |
|
|
|
|
child: Container( |
|
|
|
|
child: Image.asset( |
|
|
|
|
"assets/image/icon_login_hide_bg.png", |
|
|
|
|
fit: BoxFit.cover, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Image.asset( |
|
|
|
|
"assets/image/icon_login_logo.png", |
|
|
|
|
width: 91.w, |
|
|
|
|
height: 91.h, |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 0.596.sh, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SingleChildScrollView( |
|
|
|
|
controller: scrollController, |
|
|
|
|
physics: PageScrollPhysics().applyTo(ClampingScrollPhysics()), |
|
|
|
|
child: SizedBox( |
|
|
|
|
height: MediaQuery.of(context).size.height * 1.47, |
|
|
|
|
child: Column( |
|
|
|
|
), |
|
|
|
|
Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Image.asset( |
|
|
|
|
"assets/image/icon_login_logo.png", |
|
|
|
|
width: 91.w, |
|
|
|
|
height: 91.h, |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: MediaQuery.of(context).size.height * 0.6244, |
|
|
|
|
height: 0.596.sh, |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
key: loginKey, |
|
|
|
|
child: Stack( |
|
|
|
|
children: [ |
|
|
|
|
Positioned( |
|
|
|
|
child: Container( |
|
|
|
|
child: Image.asset( |
|
|
|
|
"assets/image/icon_login_bg_webp.webp", |
|
|
|
|
width: MediaQuery.of(context).size.width, |
|
|
|
|
fit: BoxFit.cover, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SingleChildScrollView( |
|
|
|
|
controller: scrollController, |
|
|
|
|
physics: PageScrollPhysics().applyTo(ClampingScrollPhysics()), |
|
|
|
|
child: SizedBox( |
|
|
|
|
height: MediaQuery.of(context).size.height * 1.47, |
|
|
|
|
child: Column( |
|
|
|
|
children: [ |
|
|
|
|
SizedBox( |
|
|
|
|
height: MediaQuery.of(context).size.height * 0.6244, |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: Container( |
|
|
|
|
key: loginKey, |
|
|
|
|
child: Stack( |
|
|
|
|
children: [ |
|
|
|
|
Positioned( |
|
|
|
|
child: Container( |
|
|
|
|
child: Image.asset( |
|
|
|
|
"assets/image/icon_login_bg_webp.webp", |
|
|
|
|
width: MediaQuery.of(context).size.width, |
|
|
|
|
fit: BoxFit.cover, |
|
|
|
|
), |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
top: 0, |
|
|
|
|
), |
|
|
|
|
Positioned( |
|
|
|
|
top: |
|
|
|
|
MediaQuery.of(context).size.height * 0.1039, |
|
|
|
|
bottom: 0, |
|
|
|
|
child: Container( |
|
|
|
|
padding: |
|
|
|
|
EdgeInsets.symmetric(horizontal: 40.w), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: |
|
|
|
|
CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Opacity( |
|
|
|
|
opacity: (255 - changeAlpha) / 255, |
|
|
|
|
child: Text( |
|
|
|
|
"Hello,", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 23.sp, |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
), |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
top: 0, |
|
|
|
|
), |
|
|
|
|
Positioned( |
|
|
|
|
top: MediaQuery.of(context).size.height * 0.1039, |
|
|
|
|
bottom: 0, |
|
|
|
|
child: Container( |
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 40.w), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Opacity( |
|
|
|
|
opacity: (255 - changeAlpha) / 255, |
|
|
|
|
child: Text( |
|
|
|
|
"Hello,", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 23.sp, |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 8, |
|
|
|
|
), |
|
|
|
|
Opacity( |
|
|
|
|
opacity: (255 - changeAlpha) / 255, |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).login_splash, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 18.sp, |
|
|
|
|
fontWeight: FontWeight.w400, |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 8, |
|
|
|
|
), |
|
|
|
|
Opacity( |
|
|
|
|
opacity: (255 - changeAlpha) / 255, |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).login_splash, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 18.sp, |
|
|
|
|
fontWeight: FontWeight.w400, |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 20.h, |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: inputWidgets(), |
|
|
|
|
flex: 1, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 20.h, |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: inputWidgets(), |
|
|
|
|
flex: 1, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Positioned( |
|
|
|
|
child: InkWell( |
|
|
|
|
onTap: _login, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
padding: EdgeInsets.all(10.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
borderRadius: BorderRadius.circular(2), |
|
|
|
|
), |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).login, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 18.sp, |
|
|
|
|
fontWeight: FontWeight.w400, |
|
|
|
|
color: Colors.white), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Positioned( |
|
|
|
|
child: InkWell( |
|
|
|
|
onTap: _login, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
padding: EdgeInsets.all(10.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
borderRadius: BorderRadius.circular(2), |
|
|
|
|
), |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).login, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 18.sp, |
|
|
|
|
fontWeight: FontWeight.w400, |
|
|
|
|
color: Colors.white), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
bottom: 140.h - |
|
|
|
|
(50.h - |
|
|
|
|
(offsetBtn > 50.h |
|
|
|
|
? 50.h |
|
|
|
|
: offsetBtn < 0 |
|
|
|
|
? 0 |
|
|
|
|
: offsetBtn)), |
|
|
|
|
left: 40.w, |
|
|
|
|
right: 40.w, |
|
|
|
|
), |
|
|
|
|
Positioned( |
|
|
|
|
child: InkWell( |
|
|
|
|
onTap: () { |
|
|
|
|
print("11111"); |
|
|
|
|
if (widget.arguments != null) { |
|
|
|
|
Navigator.of(context).pop(); |
|
|
|
|
} else { |
|
|
|
|
Navigator.of(context) |
|
|
|
|
.popAndPushNamed('/router/main_page'); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
child: Visibility( |
|
|
|
|
visible: (changeAlpha / 255) > 0, |
|
|
|
|
child: Opacity( |
|
|
|
|
opacity: changeAlpha / 255, |
|
|
|
|
child: BorderText( |
|
|
|
|
padding: EdgeInsets.all(9.h), |
|
|
|
|
text: S.of(context).youkedenglu, |
|
|
|
|
fontSize: 18.sp, |
|
|
|
|
textColor: Color(0xFF32A060), |
|
|
|
|
borderColor: Color(0xFF32A060), |
|
|
|
|
borderWidth: 1.w, |
|
|
|
|
radius: 2, |
|
|
|
|
), |
|
|
|
|
bottom: 140.h - |
|
|
|
|
(50.h - |
|
|
|
|
(offsetBtn > 50.h |
|
|
|
|
? 50.h |
|
|
|
|
: offsetBtn < 0 |
|
|
|
|
? 0 |
|
|
|
|
: offsetBtn)), |
|
|
|
|
left: 40.w, |
|
|
|
|
right: 40.w, |
|
|
|
|
), |
|
|
|
|
Positioned( |
|
|
|
|
child: InkWell( |
|
|
|
|
onTap: () { |
|
|
|
|
print("11111"); |
|
|
|
|
if (widget.arguments != null) { |
|
|
|
|
Navigator.of(context).pop(); |
|
|
|
|
} else { |
|
|
|
|
Navigator.of(context).popAndPushNamed('/router/main_page'); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
child: Visibility( |
|
|
|
|
visible: (changeAlpha / 255) > 0, |
|
|
|
|
child: Opacity( |
|
|
|
|
opacity: changeAlpha / 255, |
|
|
|
|
child: BorderText( |
|
|
|
|
padding: EdgeInsets.all(9.h), |
|
|
|
|
text: S.of(context).youkedenglu, |
|
|
|
|
fontSize: 18.sp, |
|
|
|
|
textColor: Color(0xFF32A060), |
|
|
|
|
borderColor: Color(0xFF32A060), |
|
|
|
|
borderWidth: 1.w, |
|
|
|
|
radius: 2, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
bottom: 88.h, |
|
|
|
|
left: 40.w, |
|
|
|
|
right: 40.w, |
|
|
|
|
), |
|
|
|
|
Positioned( |
|
|
|
|
child: InkWell( |
|
|
|
|
onTap: scrollToTop, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
child: Opacity( |
|
|
|
|
opacity: (255 - changeAlpha) / 255, |
|
|
|
|
child: RotatedBox( |
|
|
|
|
quarterTurns: 3, |
|
|
|
|
child: Icon( |
|
|
|
|
Icons.keyboard_arrow_right, |
|
|
|
|
size: 44, |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
), |
|
|
|
|
bottom: 88.h, |
|
|
|
|
left: 40.w, |
|
|
|
|
right: 40.w, |
|
|
|
|
), |
|
|
|
|
Positioned( |
|
|
|
|
child: InkWell( |
|
|
|
|
onTap: scrollToTop, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
child: Opacity( |
|
|
|
|
opacity: (255 - changeAlpha) / 255, |
|
|
|
|
child: RotatedBox( |
|
|
|
|
quarterTurns: 3, |
|
|
|
|
child: Icon( |
|
|
|
|
Icons.keyboard_arrow_right, |
|
|
|
|
size: 44, |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
bottom: 33.h, |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
bottom: 33.h, |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
firstCurve: Curves.easeInOut, |
|
|
|
|
secondCurve: Curves.easeInOut, |
|
|
|
|
crossFadeState: |
|
|
|
|
isShowLogin ? CrossFadeState.showSecond : CrossFadeState.showFirst, |
|
|
|
|
duration: Duration(milliseconds: 1200), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|