|
|
|
@ -83,6 +83,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
double offsetBtn = 0; |
|
|
|
|
double rota = 1.04; |
|
|
|
|
Image image; |
|
|
|
|
|
|
|
|
|
buildImageInfo(BuildContext context) async { |
|
|
|
|
image = Image.asset("assets/image/laoban.png"); |
|
|
|
|
double screenWidth = MediaQuery.of(this.context).size.width; |
|
|
|
@ -94,8 +95,7 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
if ((width / screenWidth) < rota) { |
|
|
|
|
rota = (screenWidth * 1.04) / width; |
|
|
|
|
} |
|
|
|
|
if (mounted) |
|
|
|
|
setState(() {}); |
|
|
|
|
if (mounted) setState(() {}); |
|
|
|
|
})); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -129,9 +129,9 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
changeAlpha = (changeAlpha > 255 ? 255 : changeAlpha); |
|
|
|
|
changeAlpha = (changeAlpha < 0 ? 0 : changeAlpha); |
|
|
|
|
alpha = (initAlpha + |
|
|
|
|
scrollController.offset / |
|
|
|
|
(height - chaHeight) * |
|
|
|
|
(255 - initAlpha)) |
|
|
|
|
scrollController.offset / |
|
|
|
|
(height - chaHeight) * |
|
|
|
|
(255 - initAlpha)) |
|
|
|
|
.toInt(); |
|
|
|
|
alpha = (alpha > 255 ? 255 : alpha); |
|
|
|
|
alpha = (alpha < 0 ? 0 : alpha); |
|
|
|
@ -308,8 +308,10 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
saveUserJson(value.data); |
|
|
|
|
eventBus.fire(EventType(3)); |
|
|
|
|
|
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
@ -379,10 +381,9 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Widget build(BuildContext context) { |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
buildImageInfo(this.context); |
|
|
|
|
} catch(ex) {} |
|
|
|
|
} catch (ex) {} |
|
|
|
|
|
|
|
|
|
if (animatedContainer != null && !animatedContainer.isAnimating) { |
|
|
|
|
animatedContainer.forward(); |
|
|
|
|