diff --git a/lib/main.dart b/lib/main.dart index 31f2d4b..bd357ea 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -20,10 +20,9 @@ class MyApp extends StatelessWidget { final GoRouter _router = GoRouter( routes: [ GoRoute( - path: routePathSplashScreen, - builder: (BuildContext context, GoRouterState state) => - const SplashScreen() - ), + path: routePathSplashScreen, + builder: (BuildContext context, GoRouterState state) => + const SplashScreen()), ], ); diff --git a/lib/screens/splash/splash.dart b/lib/screens/splash/splash.dart index 545ef5f..2a8aaef 100644 --- a/lib/screens/splash/splash.dart +++ b/lib/screens/splash/splash.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:survey_flutter/gen/assets.gen.dart'; + class SplashScreen extends StatefulWidget { const SplashScreen({Key? key}) : super(key: key); @@ -9,7 +10,7 @@ class SplashScreen extends StatefulWidget { class SplashScreenState extends State { bool _isLogoVisible = false; - bool _shouldStartAnimate = false; + bool _shouldStartAnimation = false; @override void initState() { @@ -46,7 +47,7 @@ class SplashScreenState extends State { Widget _buildAnimatedLogo(BoxConstraints constraints) { return AnimatedPositioned( duration: const Duration(seconds: 1), - top: _shouldStartAnimate ? 153.0 : constraints.maxHeight / 2.0, + top: _shouldStartAnimation ? 153.0 : constraints.maxHeight / 2.0, child: AnimatedOpacity( opacity: _isLogoVisible ? 1.0 : 0.0, duration: const Duration(milliseconds: 500), @@ -55,7 +56,7 @@ class SplashScreenState extends State { ), onEnd: () { setState(() { - _shouldStartAnimate = true; + _shouldStartAnimation = true; }); }, ),