パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.2.2

your_splash

スプラッシュスクリーンのFlutter実装。AndroidとiOSをサポートしています。

30日間ダウンロード
28
いいね数
7
Pub ポイント
40

パッケージをインストール

flutter pub add your_splash

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

YourSplashは、AndroidおよびiOSプラットフォーム向けにシンプルかつ効果的なスプラッシュスクリーンの実装を提供するFlutterパッケージです。アプリの初期化中にカスタマイズ可能なスプラッシュスクリーンを表示できるため、起動時のユーザー体験が向上します。このパッケージはFlutterプロジェクトにスムーズに統合され、プラットフォーム固有の設定をサポートしています。最小限の設定で、スプラッシュ画面からメインアプリインターフェースへの滑らかな遷移を保証します。

用途

  • アプリオンボーディング画面
  • 初期の読み込み状態の表示
  • アプリリリース時のブランディング
  • ナビゲーション前にアセットをプリロードする
  • スムーズなアプリ起動体験

主な機能

  • クロスプラットフォーム対応(AndroidおよびiOS)
  • Flutterとの簡単な統合
  • カスタマイズ可能なスプラッシュ表示
  • メイン画面への自動遷移
  • 最小構成が必要

適している対象

  • 新しい Flutter プロジェクト
  • ブランドスプラッシュスクリーンを必要とするアプリ
  • 軽量なスプラッシュソリューションを求める開発者
  • アセットプリロードが必要なプロジェクト
  • シンプルな起動画面の実装

注意事項

  • Webプラットフォームをサポートしていません
  • 基本的なスタイリングを超えるカスタマイズは限られている
  • 組み込みのアニメーションコントロールなし
  • 遷移に手動タイミングに依存しています
  • 最良の結果を得るためには適切な資産管理が必要です

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

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

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。