animated_splash 0.0.1 copy "animated_splash: ^0.0.1" to clipboard
animated_splash: ^0.0.1 copied to clipboard

outdated

A light weight package for flutter apps, that easily shows a splash screen with a nice fade animation, for a specific amount of time, also it executes peace of code that needs to be run while the spla [...]

Splash Screen #

Using the package #

environment:
  sdk: ">=2.1.0 <3.0.0"

Add dependency in pubspec.yaml

dependencies:
  animated_splash: ^0.0.1

Things to do #

  1. Get a logo for your app
  2. Prepare what to execute while the splash screen is shown (initializing your db, shared preferences, firebase...etc)
  3. Screen to be shown after splash screen
  4. Duration of Splash Screen

Import the package

import 'package:animated_splash/animated_splash.dart';

Create an object of Function that gets executed while splash screen is shown

Function duringSplash = () {
  //Write your code here
  ...
};

Inside your main function, use home as SplashScreen(_), the parameters are as follows:

imagePath: Path to your app-logo/image home: Screen to be shown after splash duringSplash: the function you have written above duration: duration of splash screen in milliseconds

runApp(MaterialApp(
  home: SplashScreen(
      imagePath: 'your_logo_path',
      home: YourHomeScreen(),
      duringSplash: duringSplash,
      duration: 2500),
));

Demo #

ProgressDialog Demo
192
likes
20
pub points
85%
popularity

Publisher

unverified uploader

A light weight package for flutter apps, that easily shows a splash screen with a nice fade animation, for a specific amount of time, also it executes peace of code that needs to be run while the splash screen is shown.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on animated_splash