搜尋套件、儲存庫與 APP 分類

套件詳情v4.0.0

flare_splash_screen

在應用程式初始化工作完成之前,用於帶有 Flare 動畫的啟動畫面的輔助工具

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
666
喜歡數
228
Pub 分數
140

安裝套件

flutter pub add flare_splash_screen

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個 Flutter 套件,可使用 Flare 動畫實現啟動畫面,保持螢幕活躍狀態,直到完成關鍵的應用初始化任務。它與 Flare 的動畫向量圖形無縫整合,在啟動期間提供流暢、輕量的動畫效果。此套件專為希望在背景工作完成後才讓應用準備就緒,同時透過引人入勝的視覺效果提升引導體驗的開發者設計。

適用情境

  • 帶有動畫啟動畫面的應用程式引導
  • 延遲初始化並帶有視覺反饋
  • 品牌互動動畫
  • 跨平台啟動畫面
  • 加載狀態可視化
  • 平滑過渡到主應用

主要特色

  • 耀斑動畫支援
  • 自動初始化延遲處理
  • 可自訂的持續時間和回調
  • 跨平台相容性
  • 與現有 Flutter 應用的簡單整合
  • 可設定的動畫開始和結束觸發器

適合對象

  • 使用Flare動畫的開發者
  • 需要品牌啟動畫面的應用程式
  • 具有異步初始化的專案
  • 注重用戶體驗的團隊
  • Flutter 應用針對多個平台
  • 注重設計的移動和網絡應用程式

使用建議

  • 需要 Flare 檔案 (.json)
  • 僅限基於Flare的動畫
  • 可能會增加初始套件大小
  • 需要適當的生命周期管理
  • 不適用於靜態啟動畫面
  • 依賴於 Flare 運行時庫

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

flare_splash_screen

pub package

Facilitator for having a Splash screen with a Flare animation until some work has been done for the initialization of the app

If you're using Rive instead of Flare please use rive_splash_screen

Usage

Navigation

The splash screen will show the animation and push the new route you gave once it's finish, by default it does a fade animation but you can customize it by using transitionsBuilder

SplashScreen.navigate(
    name: 'intro.flr',
    next: (_) => MyHomePage(title: 'Flutter Demo Home Page'),
    until: () => Future.delayed(Duration(seconds: 5)),
    startAnimation: '1',
),
Callback

The splash screen will show the animation and call the onFinished callback when it's finish.

SplashScreen.callback(
    name: 'intro.flr',    
    onFinished: () {
      Navigator.of(context).pushReplacement(PageRouteBuilder(pageBuilder: (_,__,___) => MyHomePage(title: 'Flutter Demo Home Page')));
    },
    loopAnimation: '1',
    until: () => Future.delayed(Duration(seconds: 1)),
    endAnimation: '1',
),
API

name : path/name of the flare animation

next : screen to show once animation is finished as widget builder

loopAnimation: animation name to run, default same as first param

startAnimation: animation name to run once before going into loop

endAnimation: animation name to run once until is complete

until: callback that return a future to process your initialization

isLoading: alternative to until if you want to manage loading state with a boolean

height: force the height of the flare animation, by default it take the all place available

width: force the width of the flare animation, by default it take the all place available

alignment: alignment of the flare animation, center by default

transitionsBuilder transition to apply when showing next

Available animation mode
Only one animation

Basically you have one animation to show and then just need to stay at last frame. In order to do that only specify the startAnimation

Start and loop animation

Your animation have an intro and a loop state, in order to do that only specify the startAnimation and loopAnimation

End and loop animation

Your animation have a finish and a loop state, in order to do that only specify the endAnimation and loopAnimation

Start and end animation

Your animation have an intro and a finish that should stay on the last frame, in order to do that only startAnimation and endAnimation

Start, end and loop animation

Your animation have an intro, a finish and a loop state, in order to do that specify the startAnimation, endAnimation and loopAnimation

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。