Skip to content

Commit

Permalink
finishing feature
Browse files Browse the repository at this point in the history
  • Loading branch information
coala jedi master committed Mar 18, 2021
1 parent 6cdfa20 commit a7e5e9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return FutureBuilder(
// Replace the 3 second delay with your initialization code:
future: Future.delayed(Duration(seconds: 3)),
future: Future.delayed(Duration(seconds: 4)),
builder: (context, AsyncSnapshot snapshot) {
// Show splash screen while waiting for app resources to load:
if (snapshot.connectionState == ConnectionState.waiting) {
Expand All @@ -39,16 +39,16 @@ class Splash extends StatelessWidget {
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Image.asset(
'splash.png',
'assets/splash.png',
frameBuilder: (BuildContext context, Widget child, int? frame,
bool? wasSynchronouslyLoaded) {
return AnimatedAlign(
alignment: frame == null ? Alignment.center : Alignment.topCenter,
duration: const Duration(milliseconds: 1800),
duration: const Duration(milliseconds: 2000),
curve: Curves.easeOut,
child: AnimatedOpacity(
opacity: frame == null ? 0 : 1,
duration: const Duration(milliseconds: 1800),
duration: const Duration(milliseconds: 2000),
curve: Curves.easeOut,
child: child,
),
Expand Down
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ dev_dependencies:

flutter:
uses-material-design: true
assets:
- assets/

flutter_native_splash:
# This package generates native code to customize Flutter's default white native splash screen
Expand Down

0 comments on commit a7e5e9e

Please sign in to comment.