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

A unique and customizable splash screen package for Flutter applications.


# unique_splash_screen

A highly customizable and easy-to-use Flutter package for creating beautiful splash screens.  
Control various aspects of your splash screen, including logo, title, subtitle, loading indicator, background, and navigation to the next screen.

---

## ✨ Features

✅ **Customizable Content**  
Easily set your `logo`, `title`, `subtitle`, and `loadingIndicator` widgets.

✅ **Flexible Backgrounds**  
Supports `backgroundColor`, gradient backgrounds, or `backgroundImageDecoration`.

✅ **Control Layout**  
Position your loading indicator using `bottomLoading`.

✅ **Status Bar Control**  
Toggle visibility of the app's status and navigation bars with `showStatusBar`.

✅ **Animated Transitions**  
Define custom page transitions to your next screen using the `Done` class.

✅ **Configurable Duration**  
Set how long the splash screen should be displayed with `duration`.

---

## 📦 Installation

Add the following to your `pubspec.yaml`:

```yaml
dependencies:
  unique_splash_screen: ^latest_version # Replace with actual latest version

Then run:

flutter pub get

🚀 Usage #

Import the package:

import 'package:unique_splash_screen/unique_splash_screen.dart';

✅ Minimal Example #

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

void main() {
  runApp(
    MaterialApp(
      home: SplashScreen(
        logo: const FlutterLogo(size: 150),
        loadingIndicator: const CircularProgressIndicator(color: Colors.blue),
        backgroundColor: Colors.white,
        duration: const Duration(seconds: 3),
        done: Done(const HomePage()),
      ),
    ),
  );
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Home Page')),
      body: const Center(child: Text('Welcome to your app!')),
    );
  }
}

🧩 Full Customization Example #

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Unique Flash Screen Demo',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: SplashScreen(
        logo: Image.asset('assets/app_logo.png', width: 100, height: 100),
        title: const Text(
          'Welcome to My App',
          style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold, color: Colors.white),
        ),
        subtitle: const Text(
          'Loading amazing content...',
          style: TextStyle(fontSize: 16, color: Colors.white70),
        ),
        loadingIndicator: const CircularProgressIndicator(color: Colors.white),
        backgroundColor: Colors.deepPurple,
        // gradient: LinearGradient(
        //   colors: [Colors.purple, Colors.blue],
        //   begin: Alignment.topLeft,
        //   end: Alignment.bottomRight,
        // ),
        // backgroundImageDecoration: const BackgroundImageDecoration(
        //   image: AssetImage('assets/background_splash.jpg'),
        //   fit: BoxFit.cover,
        // ),
        duration: const Duration(seconds: 4),
        bottomLoading: true,
        showStatusBar: false,
        done: Done(
          const MyHomePage(title: 'Home Page'),
          animationDuration: Duration(milliseconds: 800),
          curve: Curves.easeIn,
        ),
      ),
    );
  }
}

class MyHomePage extends StatelessWidget {
  final String title;
  const MyHomePage({super.key, required this.title});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(title)),
      body: const Center(child: Text('You have successfully navigated from the splash screen!')),
    );
  }
}

🛠️ Customization Options #

Property Type Description
logo Widget? Logo widget to display
title Widget? Title text or widget
subtitle Widget? Subtitle text or widget
loadingIndicator Widget? Loading indicator (default: CircularProgressIndicator)
backgroundColor Color? Splash background color
gradient Gradient? Gradient background (overrides backgroundColor)
backgroundImageDecoration BackgroundImageDecoration? Background image (overrides color & gradient)
duration Duration Splash screen duration (default: 3 seconds)
bottomLoading bool If true, positions loading indicator at the bottom (default: false)
showStatusBar bool Controls status/navigation bar visibility (default: false/hidden)
done Done The next screen and transition animation

🔁 Done Class #

Use Done to control transition animation to your next screen.

done: Done(
  NextPage(),
  animationDuration: Duration(milliseconds: 800),
  curve: Curves.easeOut,
)

👨‍💻 Contributing #

Feel free to contribute! Open issues, suggest features, or submit PRs.


👤 Author #

Md. Rahul Reza 🌐 rahulreza.com 📧 contact@rahulreza.com


📄 License #

MIT License


---
1
likes
160
points
25
downloads

Publisher

verified publisherrahulreza.com

Weekly Downloads

A unique and customizable splash screen package for Flutter applications.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on unique_splash_screen