Pakete, Repositories und App-Kategorien suchen

Paketdetailsv0.2.2

your_splash

Eine Flutter-Implementierung des Splash-Screens. Unterstützt Android und iOS.

30-Tage-Downloads
28
Likes
7
Pub-Punkte
40

Paket installieren

flutter pub add your_splash

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

YourSplash ist ein Flutter-Paket, das eine einfache und effektive Implementierung eines Startbildschirms für Android und iOS bereitstellt. Es ermöglicht Entwicklern, während der App-Initialisierung einen anpassbaren Startbildschirm anzuzeigen, wodurch die Benutzererfahrung beim Start verbessert wird. Das Paket lässt sich nahtlos in Flutter-Projekte integrieren und unterstützt plattformspezifische Konfigurationen. Mit minimaler Einrichtung sorgt es für einen reibungslosen Übergang vom Startbildschirm zur Haupt-App-Oberfläche.

Anwendungsfälle

  • App-Onboarding-Bildschirme
  • Anzeige des initialen Ladezustands
  • Branding während des App-Launch
  • Ressourcen vor der Navigation vorladen
  • Glatte App-Start-Erfahrung

Hauptmerkmale

  • Plattformübergreifende Unterstützung (Android & iOS)
  • Einfache Integration mit Flutter
  • Anpassbare Splash-Ansicht
  • Automatischer Übergang zum Hauptbildschirm
  • Minimale Konfiguration erforderlich

Geeignet für

  • Neue Flutter-Projekte
  • Apps, die brandnahe Startbildschirme erfordern
  • Entwickler, die leichte Splash-Lösungen suchen
  • Projekte mit Asset-Vorladen benötigen
  • Einfache Implementierungen des Startbildschirms

Hinweise

  • Unterstützt keine Webplattform
  • Eingeschränkte Anpassungsmöglichkeiten jenseits der grundlegenden Gestaltung
  • Keine integrierten Animationssteuerungen
  • Beruht auf manueller Zeitsteuerung für den Übergang
  • Erforderliche ordnungsgemäße Vermögensverwaltung für beste Ergebnisse

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

your_splash

pub package license build codecov Say Thanks!

A Flutter implementation of splash screen. Supports Android and IOS.

Features

  • Supports splash screen with the Future callback
  • Supports splash screen with timer

Getting Started

To use this library, add your_splash as a dependency in your pubspec.yaml file:

dependencies:
  ...
  your_splash:

In your library add the following import:

import 'package:your_splash/your_splash.dart';
Constructors

This package comes with 2 kinds of splash screen actions:

  • FuturedSplashScreen
  • TimedSplashScreen

You can create a splash screen in two different ways:

  • by calling FuturedSplashScreen or TimedSplashScreen constructor and passing required arguments.
  • by calling SplashScreen.futured or SplashScreen.timed constructor respectively.

A FuturedSplashScreen requires next arguments:

Parameter Description
future This is your Future callback for delay
route This is a dynamic argument. Can be String name of route or PageRoute instance
body This is a body of your splash screen

A TimedSplashScreen requires next arguments:

Parameter Description
seconds This is a duration in seconds for how long your splash screen will be displayed
route This is a dynamic argument. Can be String name of route or PageRoute instance
body This is a body of your splash screen
Examples

Quick start example:

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: SplashScreen.timed(
        seconds: 3,
        route: MaterialPageRoute(builder: (_) => Home()),
        body: Scaffold(
          body: InkWell(
            child: Container(
              decoration: const BoxDecoration(
                image: DecorationImage(
                  fit: BoxFit.cover,
                  image: NetworkImage('https://bit.ly/3hD5Tj8'),
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Home screen!"),
      ),
      body: Center(
        child: Text(
          "Welcome!",
          style: TextStyle(fontWeight: FontWeight.bold, fontSize: 40.0),
        ),
      ),
    );
  }
}

How can I animate transition between the splash screen and navigation page?

Overview

route: PageRouteBuilder(
  pageBuilder: (context, animation, secondaryAnimation) => Home(),
  transitionDuration: Duration(seconds: 1),
  transitionsBuilder: (_, animation, secAnim, child) {
    var tween = Tween(begin: 0.0, end: 1.0).chain(
      CurveTween(curve: Curves.easeInOutCirc),
    );
    return FadeTransition(
        opacity: animation.drive(tween), child: child);
  },

You can see all examples here

Kategorien

Quell-Repository

Projekte, die dieses Paket verwenden

Noch keine Daten verfügbar.