|
|
@ -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); |
|
|
|
} |
|
|
|
} |
|
|
@ -365,10 +366,9 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { |
|
|
|
return AnimatedCrossFade( |
|
|
|
return AnimatedCrossFade( |
|
|
|
firstChild: Container( |
|
|
|
firstChild: Container( |
|
|
|
color: Colors.white, |
|
|
|
color: Colors.white, |
|
|
|
child: Platform.isAndroid |
|
|
|
child: Image.asset( |
|
|
|
? Container() |
|
|
|
"assets/image/ic_splash_bg.png", |
|
|
|
: Container( |
|
|
|
fit: BoxFit.fill, |
|
|
|
// child: Image.asset("name"), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
layoutBuilder: (widgetFirst, keyFirst, widgetSecond, keySecond) { |
|
|
|
layoutBuilder: (widgetFirst, keyFirst, widgetSecond, keySecond) { |
|
|
@ -394,7 +394,16 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { |
|
|
|
], |
|
|
|
], |
|
|
|
); |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|
secondChild: Scaffold( |
|
|
|
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, |
|
|
|
resizeToAvoidBottomInset: false, |
|
|
|
backgroundColor: Colors.white, |
|
|
|
backgroundColor: Colors.white, |
|
|
|
body: GestureDetector( |
|
|
|
body: GestureDetector( |
|
|
@ -410,7 +419,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( |
|
|
@ -489,16 +498,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, |
|
|
@ -579,8 +585,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( |
|
|
@ -628,12 +633,6 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
firstCurve: Curves.easeInOut, |
|
|
|
|
|
|
|
secondCurve: Curves.easeInOut, |
|
|
|
|
|
|
|
crossFadeState: |
|
|
|
|
|
|
|
isShowLogin ? CrossFadeState.showSecond : CrossFadeState.showFirst, |
|
|
|
|
|
|
|
duration: Duration(milliseconds: 1200), |
|
|
|
|
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|