A small splashscreen used as intro for flutter applications easily with a lot of customizations ❤️🥳

Overview

Splash Screen

  • A splashscreen package to be used for an intro for any flutter application easily with a lot of customization

Currently Supported by awesome DPLYR

image (alt)

  • DPLYR is a new generation of cloud platforms and aims to help developers in their road with open source contributions, and at the end we can say thanks.

Screenshots

screenshot description (alt)

Usage

Example

To use this package :

  dependencies:
    flutter:
      sdk: flutter
    splashscreen:

How to use

new SplashScreen.timer(
  seconds: 14,
  navigateAfterSeconds: new AfterSplash(),
  title: new Text('Welcome In SplashScreen'),
  image: new Image.asset('screenshot.png'),
  backgroundColor: Colors.white,
  styleTextUnderTheLoader: new TextStyle(),
  photoSize: 100.0,
  loaderColor: Colors.red
);

Example

As time based...

import 'package:flutter/material.dart';
import 'package:splashscreen/splashscreen.dart';

void main() {
  runApp(MaterialApp(home: MyApp()));
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return SplashScreen.timer(
      seconds: 14,
      navigateAfterSeconds: AfterSplash(),
      title: Text(
        'Welcome In SplashScreen',
        style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0),
      ),
      image: Image.network(
        'https://flutter.io/images/catalog-widget-placeholder.png',
      ),
      backgroundColor: Colors.white,
      loaderColor: Colors.red,
    );
  }
}

class AfterSplash extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Welcome In SplashScreen Package'),
        automaticallyImplyLeading: false,
      ),
      body: Center(
        child: Text(
          'Succeeded!',
          style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30.0),
        ),
      ),
    );
  }
}

As future based...

import 'package:flutter/material.dart';
import 'package:splashscreen/splashscreen.dart';

void main() {
  runApp(MaterialApp(home: MyApp()));
}

Future<Widget> loadFromFuture() async {
  // <fetch data from server. ex. login>
  return AfterSplash();
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return SplashScreen.future(
      navigateAfterFuture: loadFromFuture(),
      navigateAfterSeconds: AfterSplash(),
      title: Text(
        'Welcome In SplashScreen',
        style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0),
      ),
      image: Image.network(
        'https://flutter.io/images/catalog-widget-placeholder.png',
      ),
      backgroundColor: Colors.white,
      loaderColor: Colors.red,
    );
  }
}

class AfterSplash extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Welcome In SplashScreen Package'),
        automaticallyImplyLeading: false,
      ),
      body: Center(
        child: Text(
          'Succeeded!',
          style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30.0),
        ),
      ),
    );
  }
}

Animate the main image with the hero animation

The main image has this tag attached to it splashscreenImage. Add it to whatever page you'll navigate to. This will animate the main Image to the same image you put in another page

Adding a custom page tranistion

You can use the pageRoute to do just this. Here's an example

import 'package:flutter/material.dart';
import 'package:splashscreen/splashscreen.dart';

void main() {
  runApp(MaterialApp(home: MyApp()));
}

Route _createRoute() {
  return PageRouteBuilder(
    pageBuilder: (context, animation, secondaryAnimation) => AfterSplash(),
    transitionsBuilder: (context, animation, secondaryAnimation, child) {
      var begin = Offset(0.0, 1.0);
      var end = Offset.zero;
      var curve = Curves.ease;
      var tween = Tween(begin: begin, end: end).chain(CurveTween(curve: curve));
      return SlideTransition(
        position: animation.drive(tween),
        child: child,
      );
    },
  );
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return SplashScreen.timer(
      seconds: 14,
      navigateAfterSeconds: AfterSplash(),
      title: Text(
        'Welcome In SplashScreen',
        style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0),
      ),
      image: Image.network(
        'https://flutter.io/images/catalog-widget-placeholder.png',
      ),
      backgroundColor: Colors.white,
      loaderColor: Colors.red,
      pageRoute: _createRoute(),
    );
  }
}

class AfterSplash extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Welcome In SplashScreen Package'),
        automaticallyImplyLeading: false,
      ),
      body: Center(
        child: Text(
          'Succeeded!',
          style: TextStyle(fontWeight: FontWeight.bold, fontSize: 30.0),
        ),
      ),
    );
  }
}

All Supported Projects by DPLYR

  • Splash Screen - Flutter
    a flutter package created to show simple splashscreen

  • In App Call Alert - Flutter
    a flutter package created to show call alert with sound

  • File Manager
    a php project created to manage machines/servers through ftp servers

  • Countries Js
    a javascript project created for retrieving country details with flexibility.

  • Block temp mails
    a javascript api to prevent temporary emails from signing up on your website. Super easy to use

  • Disposable Emails List
    a python script to generate the temporary and spam doamins to prevent them and you can block them through this API Block temp mails

  • Basic CRM
    A crm that is developed with Node Js for entreprenurs who need a basic CRM with text replacment feature

  • Basic Finance
    A finance that is developed with Node Js

About DPLYR

DPLYR is a SaaS tool that helps developers just like you to deploy their web apps more easily. It supports deploying Node.js apps with MongoDB, MySQL or PostgreSQL databases all for free. Go now to www.dplyr.dev and create a free account.

Created by Karim Mohamed

Comments
  • Null-Safety support

    Null-Safety support

    Is your feature request related to a problem? Please describe. No dart null-safety support which prevents us from migrating to null-safety

    Describe the solution you'd like Add dart null-safety support

    Describe alternatives you've considered Copy your code and implement null-safety inside our project

    Additional context NA

    opened by kuromukira 8
  • Splash Screen is not supported with nullsafety

    Splash Screen is not supported with nullsafety

    When I am trying to implement splash screen in my code with null safety. Then it shows - package: splashscreen is not supported with null safety. Flutter version: 2.2.0 Framework • revision b22742018b Engine • revision a9d88a4d18 Tools • Dart 2.13.0 splash scree

    opened by Ankit-jailwal 7
  • Invalid argument(s): widget.routeName must be a String beginning with forward slash (/)

    Invalid argument(s): widget.routeName must be a String beginning with forward slash (/)

    It has been working well but after the update you made, it is giving an error.

    Here is my code

    class WelcomeScreen extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'WKS', home: Scaffold( backgroundColor: kAccentLight, body: SafeArea( child: SplashScreen( seconds: 4, navigateAfterSeconds: App(), title: new Text('Title', style: TextStyle(fontSize: 36, color: kAmber400, fontWeight: FontWeight.bold), ), backgroundColor: kAccent, styleTextUnderTheLoader: new TextStyle(), loaderColor: kBrown900, ), ), ) ); } }

    opened by Nkurayijahubert 6
  • No MediaQuery widget ancestor found

    No MediaQuery widget ancestor found

    I have tried to use the basic example from pub.dev but I am getting this error:

    ======== Exception caught by widgets library =======================================================
    The following assertion was thrown building SplashScreen(state: _SplashScreenState#179cb):
    No MediaQuery widget ancestor found.
    
    Scaffold widgets require a MediaQuery widget ancestor.
    The specific widget that could not find a MediaQuery ancestor was: Scaffold
      dirty
      state: ScaffoldState#1979d(lifecycle state: initialized, tickers: tracking 2 tickers)
    The ownership chain for the affected widget is: "Scaffold ← SplashScreen ← MyApp ← [root]"
    
    No MediaQuery ancestor could be found starting from the context that was passed to MediaQuery.of(). This can happen because you have not added a WidgetsApp, CupertinoApp, or MaterialApp widget (those widgets introduce a MediaQuery), or it can happen if the context you use comes from a widget above those widgets.
    
    The relevant error-causing widget was: 
      SplashScreen file:///G:/TAMIR/Desktop/Ghinbli%20app/Ghibli-fun/lib/main.dart:29:13
    When the exception was thrown, this was the stack: 
    #0      debugCheckHasMediaQuery.<anonymous closure> (package:flutter/src/widgets/debug.dart:218:7)
    #1      debugCheckHasMediaQuery (package:flutter/src/widgets/debug.dart:233:4)
    #2      MediaQuery.of (package:flutter/src/widgets/media_query.dart:820:12)
    #3      ScaffoldState.didChangeDependencies (package:flutter/src/material/scaffold.dart:2775:50)
    #4      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4843:11)
    ...
    ====================================================================================================
    
    

    My code (taken from the library readme example page):

    import 'package:flutter/material.dart';
    import 'package:splashscreen/splashscreen.dart';
    
    void main() {
      runApp(MyApp());
    }
    
    class MyApp extends StatefulWidget {
      @override
      _MyAppState createState() => new _MyAppState();
    }
    
    class _MyAppState extends State<MyApp> {
      @override
      Widget build(BuildContext context) {
        return  SplashScreen(
          seconds: 14,
          navigateAfterSeconds: new AfterSplash(),
          title:  Text('Welcome In SplashScreen', style:  TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0),
          ),
          image:  Image.network(
              'https://flutter.io/images/catalog-widget-placeholder.png'),
          backgroundColor: Colors.white,
          loaderColor: Colors.red,
        );
      }
    }
    
    

    I am getting this error while using:

    • Nexus 5 API emulator
    • Os is windows 10

    Widget test fails with No MediaQuery widget found is the closest thing I could find searching for this problem but it didn't solve my problem.

    opened by Tamir198 4
  • Error while executing code

    Error while executing code

    Please find below the error message that I have received when I used the example file

    Invalid argument(s): widget.routeName must be a String beginning with forward slash (/)

    The relevant error-causing widget was: LeviSplash file:///Users/**/Desktop/Flutter/*/lib/main.dart:7:13 When the exception was thrown, this was the stack: #0 _SplashScreenState.initState (package:splashscreen/splashscreen.dart:86:7) #1 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4765:58) #2 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4601:5) #3 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14) #4 Element.updateChild (package:flutter/src/widgets/framework.dart:3324:20)

    What should i do ?


    Describe the bug A clear and concise description of what the bug is.

    To Reproduce Steps to reproduce the behavior:

    1. Go to '...'
    2. Click on '....'
    3. Scroll down to '....'
    4. See error

    Expected behavior A clear and concise description of what you expected to happen.

    Screenshots If applicable, add screenshots to help explain your problem.

    Desktop (please complete the following information):

    • OS: [e.g. iOS]
    • Browser [e.g. chrome, safari]
    • Version [e.g. 22]

    Smartphone (please complete the following information):

    • Device: [e.g. iPhone6]
    • OS: [e.g. iOS8.1]
    • Browser [e.g. stock browser, safari]
    • Version [e.g. 22]

    Additional context Add any other context about the problem here.

    opened by johnfriend 4
  • How I set an asset image as background?

    How I set an asset image as background?

    class _WelcomePageState extends State { @override Widget build(BuildContext context) { return SplashScreen( seconds: 25, navigateAfterSeconds: HomePage(), title: Text('Ace Squad', style: TextStyle( fontWeight: FontWeight.bold, fontSize: 30.0 ),), image: Image.asset("images/skull.png", height: 250.0, width: 250.0 ), imageBackground: , //backgroundColor: Colors.black, styleTextUnderTheLoader: TextStyle(), photoSize: 100.0, onClick: ()=>print("Flutter Egypt"), loaderColor: Colors.white
    ); } }

    opened by mhsampaio 4
  • how to fill splash screen image to screen??

    how to fill splash screen image to screen??

    Is there any way to compleately fill hight width with certain image ?? photoSize currently takes an integer and its hard to provide specific data for filling an image to splash screen.

    opened by TusharAswal 4
  • Option to disable loader

    Option to disable loader

    Hi, It's possible to add an option to disable the loader ? Like :

    new SplashScreen(
            seconds: 3,
            navigateAfterSeconds: new HomeScreen(),
            title: new Text('Welcome In SplashScreen'),
            useLoader: false // remove the loader
    )
    
    opened by EmilienLeroy 3
  • [PR] Close the splashscreen programmatically

    [PR] Close the splashscreen programmatically

    There are certain use cases, when the splash screen should stay until the app is actually ready e.g. load DB, settings, connect to the backend and etc. In such cases, the splash screen should be removed from the app, once everything is ready and this moment might vary on different devices. Hence instead of seconds property, it would be nice to have a method e.g. hide, which hides the splash screen programmatically. In case such method exists, please let me know, otherwise, I believe it would be worthwhile to have it implemented.

    opened by angel1st 3
  •  Can't return a value from a void function

    Can't return a value from a void function

    I am having an issue as shown below.

    compiler message: file:///Users/niyazitoros/.pub-cache/hosted/pub.dartlang.org/splashscreen-1.1.0/lib/splashscreen.dart:49:40: Warning: Can't return a value from a void function.
    compiler message:           return **Navigator.of(context).pushReplacementNamed(widget.navigateAfterSeconds);**
    compiler message:                                        ^
    compiler message: file:///Users/niyazitoros/.pub-cache/hosted/pub.dartlang.org/splashscreen-1.1.0/lib/splashscreen.dart:51:40: Warning: Can't return a value from a void function.
    compiler message:           r### eturn Navigator.of(context).pushReplacement(new MaterialPageRoute(builder: (BuildContext context) => widget.navigateAfterSeconds));
    compiler message:  
    

    Niyazis-MBP:capital_splash niyazitoros$ dart --version Dart VM version: 2.0.0-dev.69.5 (Tue Jul 31 15:05:14 2018 +0200) on "macos_x64"

    Niyazis-MBP:capital_splash niyazitoros$ flutter --version Flutter 0.8.2 • channel beta • https://github.com/flutter/flutter.git Framework • revision 5ab9e70727 (3 weeks ago) • 2018-09-07 12:33:05 -0700 Engine • revision 58a1894a1c

    opened by NTMS2017 3
  • Fix: wrong assumption on routeName

    Fix: wrong assumption on routeName

    Current assumption always validates to true. I guess the initial intention was to throw an error if a route does not start with a forward slash. fixes #50

    opened by fezu54 2
  • Splash in landscape mode

    Splash in landscape mode

    Hi guys, I hope you're alright.

    First of all, thanks for making this package available, it helps a lot when creating splashes for apps.

    I sent a message to Johannes on Youtube (https://www.youtube.com/watch?v=8ME8Czqc-Oc&lc) a while ago asking if it was possible to configure splash in landscape mode, however he told me that the package doesn't allow this configuration yet.

    So, what do you think about implementing this functionality in the package? Could you do this?

    opened by lucasfv1 0
  • doc: dependency version + package version added

    doc: dependency version + package version added

    This PR is to make the package version visible on the main documentation page. In the setup of the package, the version was missing, and also the version is added in this PR. Closes #68

    opened by sachin-dahal 0
  • Navigate after seconds function

    Navigate after seconds function

    I was using Getx as a route manager and it was necessary to use a function instead of an object, then I created this attribute which is a function to navigate after the splash is over.

    opened by gfb-47 1
  • Adding custom loader widget.

    Adding custom loader widget.

    The issue #66 "Custom loader widgets" suggest the functionality of using a custom loader widget instead of using the default circular. I added the functionality and I would like to receive your opinion and to be notified if changes are needed.

    opened by dmorales414 0
Owner
DPLYR
DPLYR
My flutter (android, ios) UI design examples 🎈 - user profile UIs, food order ui, splashscreen, mask widget usage, settings page ui

Flutter UI Design Examples ?? This repository contains the flutter ui designs I designed while learning. Doctor Appointment App UI Packages in use: fl

Aleyna Eser 23 Nov 14, 2022
Unloc customizations of the Permission plugin for Flutter. This plugin provides an API to request and check permissions.

Flutter Permission handler Plugin A permissions plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check perm

Unloc 1 Nov 26, 2020
👑 The lightweight design pattern for small management applications.

Store Pattern ?? The lightweight design pattern for small management applications. Features | Structure | Install | Usage | Documents | Technologies |

UITers 71 Sep 26, 2022
A dart package which provides a lot of helpers functions for easy development.

more_functions A dart package which provides a lot of helpers functions for easy development. Installation Add this to your packages pubspec.yaml file

Talat El Beick 0 Dec 5, 2021
This is tool to create 3D Models which can be used in Flutter Applications. Tool is developed completely using Flutter.

three_d_model_tool A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you start

Shubham Yeole 2 Nov 8, 2022
😎 UI commonly used in mobile applications.

flutter_ui_jumble This repository is a collection of commonly used UIs for mobile applications. Screens it contains ?? Sign In screen ?? Touch Id scre

Ken Minami 51 Dec 28, 2022
A most easily usable cookie management library in Dart. With SweetCookieJar, you can easily manage cookie on your application.

A most easily usable cookie management library in Dart! 1. About 1.1. Introduction 1.1.1. Install Library 1.1.2. Import It 1.1.3. Use SweetCookieJar 1

Kato Shinya 9 Oct 27, 2022
A most easily usable cache management library in Dart. With CacheStorage, you can easily manage cache on your application.

A most easily usable cache management library in Dart! 1. About 1.1. Introduction 1.1.1. Install Library 1.1.2. Import It 1.1.3. Use CacheStorage 1.2.

Kato Shinya 1 Dec 13, 2021
A most easily usable RESAS API wrapper in Dart. With this library, you can easily integrate your application with the RESAS API.

A most easily usable RESAS API wrapper library in Dart! 1. About 1.1. What Is RESAS? 1.2. Introduction 1.2.1. Install Library 1.2.2. Import It 1.2.3.

Kato Shinya 2 Apr 7, 2022
Flutter pos - A mobile POS written in Flutter, suitable for small cafe/restaurant, fully offline

Simple-POS A mobile POS written in Flutter, suitable for small cafe/restaurant,

Muhammed Basil E 7 Nov 2, 2022
flutter demo + small changes

demo3 A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this is

null 0 Nov 23, 2021
This is a set of small projects focused solely on the development of the graphical interface with Flutter

My Flutter Projects Flutter apps with cool design and animations Social Media Youtube Facebook Twitter Getting Started This project is a starting poin

Kevin Melendez 500 Dec 19, 2022
⚖️ A Flutter Architecture for small/medium/large/big large scale using Provider as State Management with Get It!

Flutter Provider Architecture Mobile Application Developed in Flutter. Running on both mobile platforms, Android ?? & iOS ?? . About this app This app

Samuel Matias 82 Jan 4, 2023
Valorant Guide app: a small demo application to demonstrate Flutter application tech-stacks

Valorant Guide Design Design by: Malik Abimanyu App Valorant Guide app is a smal

Ümit Duran 41 Sep 30, 2022
A small library support load infinite for ListView - GridView on Flutter.

Paging A Flutter package that supports pagination(load infinite) for ListView, GridView Demo DataSource PageKeyedDataSource To create a PagingListView

Đặng Ngọc Đức 32 Dec 4, 2022
BubbleShowcase is a small but power flutter package that allows you to highlight specific parts of your app to explain them to the user or to showcase your app new features.

BubbleShowcase BubbleShowcase is a small but powerful flutter package that allows you to highlight specific parts of your app (to explain them to the

Hugo Delaunay 38 Oct 26, 2022
A small ExpenseTracker App Built With Flutter

flutter_04_expenseTracker Expense tracker app created with help of udemy course section 4 How a new Flutter Dev can benifit This app was created for e

Abdul Raheem 0 Feb 18, 2022