搜索插件、代码仓与 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

源码仓库

使用此插件的项目

暂无相关数据。