|
|
@ -289,7 +289,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { |
|
|
|
xgFlutterPlugin.bindWithIdentifier( |
|
|
|
xgFlutterPlugin.bindWithIdentifier( |
|
|
|
identify: mobile, bindType: XGBindType.account); |
|
|
|
identify: mobile, bindType: XGBindType.account); |
|
|
|
|
|
|
|
|
|
|
|
Navigator.of(context).pushNamedAndRemoveUntil('/router/main_page', (route) => false); |
|
|
|
Navigator.of(context) |
|
|
|
|
|
|
|
.pushNamedAndRemoveUntil('/router/main_page', (route) => false); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
SmartDialog.showToast("${value.msg}", alignment: Alignment.center); |
|
|
|
SmartDialog.showToast("${value.msg}", alignment: Alignment.center); |
|
|
|
} |
|
|
|
} |
|
|
@ -362,6 +363,45 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { |
|
|
|
if (!animatedContainer.isAnimating) { |
|
|
|
if (!animatedContainer.isAnimating) { |
|
|
|
animatedContainer.forward(); |
|
|
|
animatedContainer.forward(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return AnimatedCrossFade( |
|
|
|
|
|
|
|
firstChild: Container( |
|
|
|
|
|
|
|
child: Image.asset( |
|
|
|
|
|
|
|
"assets/image/ic_splash_bg.png", |
|
|
|
|
|
|
|
fit: BoxFit.fill, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
layoutBuilder: (widgetFirst, keyFirst, widgetSecond, keySecond) { |
|
|
|
|
|
|
|
return Stack( |
|
|
|
|
|
|
|
clipBehavior: Clip.none, |
|
|
|
|
|
|
|
children: <Widget>[ |
|
|
|
|
|
|
|
Positioned( |
|
|
|
|
|
|
|
key: keySecond, |
|
|
|
|
|
|
|
left: 0.0, |
|
|
|
|
|
|
|
top: 0.0, |
|
|
|
|
|
|
|
right: 0.0, |
|
|
|
|
|
|
|
bottom: 0.0, |
|
|
|
|
|
|
|
child: widgetSecond, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Positioned( |
|
|
|
|
|
|
|
key: keyFirst, |
|
|
|
|
|
|
|
left: 0.0, |
|
|
|
|
|
|
|
top: 0.0, |
|
|
|
|
|
|
|
right: 0.0, |
|
|
|
|
|
|
|
bottom: 0.0, |
|
|
|
|
|
|
|
child: widgetFirst, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
secondChild: uiPage(), |
|
|
|
|
|
|
|
firstCurve: Curves.easeInOut, |
|
|
|
|
|
|
|
secondCurve: Curves.easeInOut, |
|
|
|
|
|
|
|
crossFadeState: isShowLogin ? CrossFadeState.showSecond : CrossFadeState.showFirst, |
|
|
|
|
|
|
|
duration: Duration(milliseconds: 200), |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Widget uiPage() { |
|
|
|
return Scaffold( |
|
|
|
return Scaffold( |
|
|
|
resizeToAvoidBottomInset: false, |
|
|
|
resizeToAvoidBottomInset: false, |
|
|
|
backgroundColor: Colors.white, |
|
|
|
backgroundColor: Colors.white, |
|
|
@ -378,7 +418,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
PhotoView( |
|
|
|
PhotoView( |
|
|
|
imageProvider: AssetImage("assets/image/laoban.png"), |
|
|
|
imageProvider: AssetImage("assets/image/laoban.png"), |
|
|
|
initialScale: Platform.isAndroid ? 1.02 : 1.2, |
|
|
|
initialScale: Platform.isAndroid ? 1.02 : 1.15, |
|
|
|
basePosition: alignmentProgress, |
|
|
|
basePosition: alignmentProgress, |
|
|
|
), |
|
|
|
), |
|
|
|
Positioned( |
|
|
|
Positioned( |
|
|
@ -457,16 +497,13 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { |
|
|
|
top: 0, |
|
|
|
top: 0, |
|
|
|
), |
|
|
|
), |
|
|
|
Positioned( |
|
|
|
Positioned( |
|
|
|
top: |
|
|
|
top: MediaQuery.of(context).size.height * 0.1039, |
|
|
|
MediaQuery.of(context).size.height * 0.1039, |
|
|
|
|
|
|
|
bottom: 0, |
|
|
|
bottom: 0, |
|
|
|
child: Container( |
|
|
|
child: Container( |
|
|
|
padding: |
|
|
|
padding: EdgeInsets.symmetric(horizontal: 40.w), |
|
|
|
EdgeInsets.symmetric(horizontal: 40.w), |
|
|
|
|
|
|
|
child: Column( |
|
|
|
child: Column( |
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
crossAxisAlignment: |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
CrossAxisAlignment.start, |
|
|
|
|
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
Opacity( |
|
|
|
Opacity( |
|
|
|
opacity: (255 - changeAlpha) / 255, |
|
|
|
opacity: (255 - changeAlpha) / 255, |
|
|
@ -535,8 +572,8 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { |
|
|
|
(offsetBtn > 50.h |
|
|
|
(offsetBtn > 50.h |
|
|
|
? 50.h |
|
|
|
? 50.h |
|
|
|
: offsetBtn < 0 |
|
|
|
: offsetBtn < 0 |
|
|
|
? 0 |
|
|
|
? 0 |
|
|
|
: offsetBtn)), |
|
|
|
: offsetBtn)), |
|
|
|
left: 40.w, |
|
|
|
left: 40.w, |
|
|
|
right: 40.w, |
|
|
|
right: 40.w, |
|
|
|
), |
|
|
|
), |
|
|
@ -547,8 +584,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { |
|
|
|
if (widget.arguments != null) { |
|
|
|
if (widget.arguments != null) { |
|
|
|
Navigator.of(context).pop(); |
|
|
|
Navigator.of(context).pop(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
Navigator.of(context) |
|
|
|
Navigator.of(context).popAndPushNamed('/router/main_page'); |
|
|
|
.popAndPushNamed('/router/main_page'); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
child: Visibility( |
|
|
|
child: Visibility( |
|
|
@ -596,45 +632,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
)/*AnimatedCrossFade( |
|
|
|
); |
|
|
|
firstChild: Container( |
|
|
|
|
|
|
|
color: Colors.white, |
|
|
|
|
|
|
|
child: Platform.isAndroid |
|
|
|
|
|
|
|
? Container() |
|
|
|
|
|
|
|
: Container( |
|
|
|
|
|
|
|
// child: Image.asset("name"), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
layoutBuilder: (widgetFirst, keyFirst, widgetSecond, keySecond) { |
|
|
|
|
|
|
|
return Stack( |
|
|
|
|
|
|
|
clipBehavior: Clip.none, |
|
|
|
|
|
|
|
children: <Widget>[ |
|
|
|
|
|
|
|
Positioned( |
|
|
|
|
|
|
|
key: keySecond, |
|
|
|
|
|
|
|
left: 0.0, |
|
|
|
|
|
|
|
top: 0.0, |
|
|
|
|
|
|
|
right: 0.0, |
|
|
|
|
|
|
|
bottom: 0.0, |
|
|
|
|
|
|
|
child: widgetSecond, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Positioned( |
|
|
|
|
|
|
|
key: keyFirst, |
|
|
|
|
|
|
|
left: 0.0, |
|
|
|
|
|
|
|
top: 0.0, |
|
|
|
|
|
|
|
right: 0.0, |
|
|
|
|
|
|
|
bottom: 0.0, |
|
|
|
|
|
|
|
child: widgetFirst, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
secondChild: , |
|
|
|
|
|
|
|
firstCurve: Curves.easeInOut, |
|
|
|
|
|
|
|
secondCurve: Curves.easeInOut, |
|
|
|
|
|
|
|
crossFadeState: |
|
|
|
|
|
|
|
isShowLogin ? CrossFadeState.showSecond : CrossFadeState.showFirst, |
|
|
|
|
|
|
|
duration: Duration(milliseconds: 500), |
|
|
|
|
|
|
|
)*/; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool isShowLogin = false; |
|
|
|
bool isShowLogin = false; |
|
|
|