simple_splashscreen 0.1.3
simple_splashscreen: ^0.1.3 copied to clipboard

Simple way to create your splash screen. Now, one can just add dependency in pubspec file, import and use it.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:simple_splashscreen/simple_splashscreen.dart';
void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Simple_splashscreen(
      context: context,
      gotoWidget: HomeScreen(),
      splashscreenWidget: SplashScreen(),
      timerInSeconds: 5,
    );
  }
}

//Splash Screen
class SplashScreen extends StatefulWidget {
  @override
  _SplashScreenState createState() => _SplashScreenState();
}
class _SplashScreenState extends State<SplashScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Text('Splash Screen !'),
      ),
    );
  }
}



//Go to Screen
class HomeScreen extends StatefulWidget {
  @override
  _HomeScreenState createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Text(
          'Home Scerrn !',
        ),
      ),
    );
  }
}
6
likes
90
pub points
67%
popularity

Simple way to create your splash screen. Now, one can just add dependency in pubspec file, import and use it.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on simple_splashscreen