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

源码仓库

使用此插件的项目

暂无相关数据。