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

GitHub 儲存庫jaumard/rive_splash_screen

rive_splash_screen

用於擁有 Rive 動畫的啟動畫面的協助者

rive_splash_screen 專案封面
星標
12
分支
4
最近推送(UTC)
2022年6月15日
專案狀態
未封存

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

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

Jimmy Aumard GitHub avatar
GitHub 作者

Jimmy Aumard ↗

Open source enthousiaste !

Thonon-les-Bains, France官方網站 ↗
語言DartRubyObjective-CShellJava

此儲存庫發佈的套件

使用的依賴

依賴清單 3 項

  • rive_loading>=0.1.3 <1.0.0
  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}

如何選擇適合專案的儲存庫?

先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。

  1. 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
  2. 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
  3. 使用前在 GitHub 確認 README、授權條款與 Issues。

來源與維護

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗