From 9a6d4f5a9781eb44ea2eea756e77eb669fb3c6aa Mon Sep 17 00:00:00 2001 From: nkhanh44 Date: Tue, 8 Aug 2023 16:10:04 +0700 Subject: [PATCH] [#5] Remove BoxConstraint --- lib/screens/splash/splash.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/screens/splash/splash.dart b/lib/screens/splash/splash.dart index c0d26d9..c9304ae 100644 --- a/lib/screens/splash/splash.dart +++ b/lib/screens/splash/splash.dart @@ -19,9 +19,7 @@ class SplashScreenState extends State { void _delayedLogoVisibility() async { await Future.delayed(const Duration(seconds: 1)); - setState(() { - _isLogoVisible = true; - }); + setState(() => _isLogoVisible = true); } @override @@ -36,14 +34,14 @@ class SplashScreenState extends State { Assets.images.splashBackground.path, fit: BoxFit.cover, ), - _buildAnimatedLogo(constraints), + _buildAnimatedLogo(), ], ); }), ); } - Widget _buildAnimatedLogo(BoxConstraints constraints) { + Widget _buildAnimatedLogo() { return AnimatedOpacity( opacity: _isLogoVisible ? 1.0 : 0.0, duration: const Duration(milliseconds: 500),