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

splash_view のカバー
パッケージ詳細v2.0.1

splash_view

スプラッシュビューは、アプリケーションが起動されたときにユーザーが最初に見る画面です。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
908
いいね数
79
Pub ポイント
150

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

flutter pub add splash_view

パッケージ概要

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

SplashViewは、アプリが起動する際に表示されるカスタマイズ可能なスプラッシュ画面を作成するために設計されたFlutterパッケージです。ロゴ、アニメーション、ブランドなどの紹介コンテンツをメインアプリインターフェースに移行する前に簡単に表示できます。このパッケージはAndroid、iOS、Web、macOS、Windows、Linuxなど複数のプラットフォームをサポートしており、デバイス間で一貫したユーザー体験を確保します。pub addコマンドによる最小限のセットアップで、開発者はプロフェッショナルな外観のスプラッシュ画面を簡単にアプリに統合できます。

用途

  • アプリオンボーディング画面
  • ブランディングの紹介
  • 初期の読み込み状態
  • アセットのプリロード
  • メインアプリへの移行
  • クロスプラットフォームのスプラッシュ画面

主な機能

  • クロスプラットフォーム対応
  • pub との簡単な統合
  • カスタマイズ可能な外観
  • アセットのプリロードをサポート
  • 設定可能な期間
  • シンプルな API

適している対象

  • 新しい Flutter プロジェクト
  • ブランドの一貫性が必要なアプリ
  • 迅速なスプラッシュ実装を求める開発者
  • マルチプラットフォームアプリケーション
  • 初期データ読み込み付きのアプリ
  • ミニマリスティックなUIデザイン

注意事項

  • スプラッシュの持続時間が長くなりすぎないようにしてください
  • 重要なアプリロジックのブロッキングを回避する
  • すべてのターゲットプラットフォームでテストする
  • アニメーションを過剰に使わないでください
  • アクセシビリティのニーズを検討する
  • アセットの読み込み完了を確認する

元の README

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

splash-view

chouhan-rahul buymeacoffee ko-fi paypal

Become a sponsor

sponsor

Splash View

A splash view is a short introduction to an application shown when it is launched. In the splash view, basic introductory information, such as the company logo, content, etc. is displayed at the moment the application load.

google apple

Here is an example of how to implement SplashView in a Flutter application. Recommended: Use splash view inside MaterialApp().

void main() {
  runApp(
    MaterialApp(
      home: SplashView(
        logo: FlutterLogo(),
        loading: CircularProgressIndicator(),
        done: Done(HomePage()),
      ),
    ),
  );
}

Properties of SplashView

Property Type Description
logo: Widget Logo of the splash view.
title: Widget Title of the splash view.
subtitle: Widget Subtitle of the splash view.
loadingIndicator: Widget Loading indicator of the splash view.
done: Done Redirect to the next page.
duration: Duration Duration of redirecting to the next page.
backgroundColor: Color Background color of the splash view.
backgroundImageDecoration: BackgroundImageDecoration Background image of the splash view.
gradient: Gradient Gradient background of the splash view.
bottomLoading: bool Show loading indicator on the bottom of the splash view.
showStatusBar: bool Show and hide app status/navigation bar on the splash view.

Redirecting to the next page

SplashView has a property called done, here you can use Done() widget to redirect to the next page.

SplashView(
  done: Done(HomePage()),
)

Redirecting to the next page with an animation effect

Done has two more properties which are used to redirect to the next page with an animation effect. animationDuration is used to set the duration of the animation and curve is used to set the animation curve.

SplashView(
  done: Done(
    HomePage(),
    animationDuration: Duration(seconds: 2),
    curve: Curves.easeInOut,
  ),
)

Properties of Done

Property Type Description
animationDuration: Duration The duration the transition going forwards.
curve: Curve A collection of common animation easing curves.

Background

There are three ways to set the background of the splash view.

Background Color

Background color can be set by backgroundColor property.

microsoft

SplashView(
  backgroundColor: Colors.red,
)

Gradient Color

Gradient color can be set by gradient property.

amazon

SplashView(
  gradient: LinearGradient(
    begin: Alignment.topCenter,
    end: Alignment.bottomCenter,
    colors: <Color>[Colors.green, Colors.blue]),
  ),
)

Background Image

Background image can be set by backgroundImageDecoration property.

gdev

SplashView(
  backgroundImageDecoration: BackgroundImageDecoration(
    image: AssetImage('images/larry-page.jpg'),
  ),
)

Properties of BackgroundImageDecoration

Property Type Description
image: ImageProvider Typically this will be an AssetImage or a NetworkImage
fit: BoxFit Fill the target box by distorting the source's aspect ratio.
colorFilter: ColorFilter A color filter is a function that takes two colors, and outputs one color.
opacity: double Used to set the filterQuality of the image.

Change the position of loading indicator

By default bottomLoading is false. You can change the position of loading indicator to the bottom by setting bottomLoading to true.

SplashView(
  bottomLoading: true,
)

Hide/Show status bar and navigation bar

By default showStatusBar is false. You can show status bar and navigation bar by setting showStatusBar to true.

SplashView(
  showStatusBar: true,
)

Report bugs or issues

You are welcome to open a ticket on github if any problems arise. New ideas are always welcome.

Copyright and License

Copyright © 2022 Rahul Chouhan. Licensed under the MIT LICENSE.

カテゴリー

ソースリポジトリ

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

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