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

套件詳情v0.1.1

rive_splash_screen

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

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
229
喜歡數
59
Pub 分數
140

安裝套件

flutter pub add rive_splash_screen

套件介紹

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

一個 Flutter 套件,讓開發者能在應用程式初始化期間顯示帶有 Rive 動畫的啟動畫面。它簡化了在啟動過程中整合流暢、互動式動畫的過程,確保使用者獲得精緻的體驗。該套件會處理載入邏輯,並在初始化工作完成後順暢地完成過渡。它支援多種平台,包括行動裝置、網頁和桌面端,非常適合需要視覺吸引力強的引導體驗的應用程式。

適用情境

  • 帶有動畫啟動畫面的應用程式引導
  • 加載狀態可視化
  • 品牌互動動畫
  • 延遲初始化處理
  • 跨平台啟動畫面

主要特色

  • Rive 動畫支援
  • 初始化後自動過渡
  • 多平台相容性
  • 簡單的設定,程式碼量最少
  • 可自訂的加載時間

適合對象

  • 尋求動畫啟動畫面的開發者
  • 具有複雜初始化過程的應用程式
  • 強調視覺設計的專案
  • 使用 Rive 進行動畫的團隊
  • 跨平台應用程式

使用建議

  • 需要 Rive 檔案資源
  • 如果動畫較大,可能會影響初始載入時間
  • 需要正確的初始化邏輯
  • 超出基本轉換之外的自訂功能有限
  • 取決於 Rive 運行時效能

原始 README

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

rive_splash_screen

pub package

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

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.riv',
    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.riv',
    onSuccess: (data) {
      //data is the optional data returned by until callback function
      Navigator.of(context).pushReplacement(PageRouteBuilder(pageBuilder: (_,__,___) => MyHomePage(title: 'Flutter Demo Home Page')));
    },
    onError: (err, stack) {
      //error throw by until callback function
    },
    loopAnimation: '1',
    until: () => Future.delayed(Duration(seconds: 1)),
    endAnimation: '1',
),
API

name : path/name of the Rive 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 Rive animation, by default it take the all place available

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

alignment: alignment of the Rive 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 項

  • rive_loading>=0.1.3 <1.0.0

原始碼儲存庫

使用此套件的專案

暫無相關資料。