another_flutter_splash_screen 1.0.0
another_flutter_splash_screen: ^1.0.0 copied to clipboard
A flutter package that provides easy way to implement splash screen in your app. Also provides curated demos in the repo.
Splash screens made simple #
Features #
Getting started #
Add another_flutter_splash_screen to your pubspec.yaml file and start implementing splash screen easily.
Installation #
You just need to add another_flutter_splash_screen
as a dependency in your pubspec.yaml file.
dependencies:
another_flutter_splash_screen: ^1.0.0
Usage #
You just need to import another_flutter_splash_screen
.
import 'package:another_flutter_splash_screen/another_flutter_splash_screen.dart';
A splash screen with gif. #
FlutterSplashScreen(
duration: const Duration(milliseconds: 3515),
onInit: () async {
debugPrint("onInit 1");
await Future.delayed(const Duration(milliseconds: 2000));
debugPrint("onInit 2");
},
onEnd: () async {
debugPrint("onEnd 1");
debugPrint("onEnd 2");
},
splashScreenBody: SizedBox(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: Center(
child: SizedBox(
width: 269,
height: 474,
child: Image.asset('assets/example.gif'),
),
),
),
nextScreen: const MyHomePage(),
);
A splash screen with fade in animation. #
FlutterSplashScreen(
setStateCallback: () {
setState(
() {
opacity = 1;
},
);
},
backgroundColor: Colors.white,
splashScreenBody: SizedBox(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
child: Center(
child: AnimatedOpacity(
opacity: opacity,
onEnd: () {
debugPrint("Animation End");
},
duration: const Duration(milliseconds: 2000),
child: SizedBox(
height: 200,
width: 200,
child: Image.asset("assets/dart_bird.png"),
),
),
),
),
nextScreen: const MyHomePage(),
);
Additional information #
We will be more than happy for your contributions.
Please contribute to another_flutter_splash_screen this github repo.