Skip to content
pubscout

flutter_splash_screen

4.0.0, released 8 months ago by an unverified publisher

A splash screen API for Flutter which can programmatically hide and show the splash screen.

WASM-ready
$ flutter pub add flutter_splash_screen
Source repository

What it does

Provides an API to programmatically show and hide the native splash screen on Android and iOS. It allows developers to control when the splash screen is dismissed from within their Flutter code.

AI-written summary of version 4.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to keep the native splash screen visible while performing asynchronous initialization tasks in Flutter.
  • You want programmatic control over hiding and showing the splash screen on both Android and iOS.

Skip it when

  • You only need a static splash screen configuration handled completely by native tools without programmatic dismissal.
  • You are using a more modern splash screen package that supports the native Android 12+ splash screen API out of the box.

Strengths

  • Works on both Android and iOS.
  • Simple API with straightforward show and hide methods.

Weaknesses

  • Requires manual configuration in native Android (MainActivity and layout files) and iOS files.
  • Relies on older native embedding approaches which may require extra configuration on newer Android versions.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
0

Requires modifying MainActivity.kt and creating launch_screen.xml on Android, and customizing LaunchScreen.storyboard on iOS.

import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_splash_screen/flutter_splash_screen.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    hideScreen();
  }

  Future<void> hideScreen() async {
    Future.delayed(Duration(milliseconds: 1800), () {
      FlutterSplashScreen.hide();
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: Scaffold(body: Center(child: Text('Home'))));
  }
}

Alternatives

Packages that do the same job and could replace flutter_splash_screen.