搜索插件、代码仓与 APP 分类

animated_splash_screen 封面
插件详情v1.3.0

animated_splash_screen

以完全可自定义的方式创建动画启动画面的最简单方法。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1.1万
喜欢数
777
Pub 分数
150

安装插件

flutter pub add animated_splash_screen

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个 Flutter 包,可简化动画启动屏幕的创建,并提供完全自定义功能。它允许开发者使用动画、过渡效果和自定义小部件设计引人入胜的引导体验。该包支持 Android、iOS、Web、macOS、Windows 和 Linux 等多个平台,确保在各种设备上行为一致。设置简单,配置直观,非常适合需要精致首印象的应用程序。源代码开源且持续维护。

适合场景

  • 应用入门屏幕
  • 品牌介绍
  • 加载状态可视化
  • 自定义动画过渡
  • 跨平台启动画面

主要特点

  • 完全可自定义的动画
  • 对多个平台的支持
  • 与 Flutter 的轻松集成
  • 可配置的持续时间和延迟
  • 内置过渡效果
  • 开源且文档齐全

适合对象

  • 初学者Flutter开发者
  • 需要品牌启动画面的应用程序
  • 具有跨平台需求的项目
  • 想要快速设置的开发者
  • 面向用户界面的应用程序启动

使用建议

  • 需要了解基本的Flutter动画
  • 可能会略微增加初始构建大小
  • 动画复杂度应与性能目标相匹配
  • 不适用于静态启动画面
  • 最好与轻量内容一起使用

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Animated Splash Screen

Check it out at Pub.Dev

Do it your way

Assets image

ezgif com-video-to-gif (1)

Custom Widget

ezgif com-video-to-gif (4)

Url image

ezgif com-video-to-gif (3)

IconData

ezgif com-video-to-gif (2)

Or just change PageTransition and/or SplashTransition

ezgif com-video-to-gif (5)

Help Maintenance

I've been maintaining quite many repos these days and burning out slowly. If you could help me cheer up, buying me a cup of coffee will make my life really happy and get much energy out of it.

Buy Me A Coffee

Getting Started

To use is simple, just do this:

@override
  Widget build(BuildContext context) {
    return AnimatedSplashScreen(
      splash: 'images/splash.png',
      nextScreen: MainScreen(),
      splashTransition: SplashTransition.rotationTransition,
      pageTransitionType: PageTransitionType.scale,
    );
  }
Splash Parameter

Here, you can pass:

  • String with assets route;
  • String with your url Image, don't forget of pass tag like this "[n]www.my-url.com/my-image.png";
  • IconData;
  • Widget;
SplashTransition
enum SplashTransition {
  slideTransition,
  scaleTransition,
  rotationTransition,
  sizeTransition,
  fadeTransition,
  decoratedBoxTransition
}
PageTransitionType
enum PageTransitionType {
  fade,
  rightToLeft,
  leftToRight,
  upToDown,
  downToUp,
  scale,
  rotate,
  size,
  rightToLeftWithFade,
  leftToRightWithFade,
}
Others:
AnimatedSplashScreen({
    Curve curve = Curves.easeInCirc,
    Future Function() function, // Here you can make something before change of screen
    int duration = 2500,
    @required dynamic splash,
    @required Widget nextScreen,
    Color backgroundColor = Colors.white,
    Animatable customTween,
    bool centered = true,
    SplashTransition splashTransition = SplashTransition.fadeTransition,
    PageTransitionType pageTransitionType = PageTransitionType.downToUp,
 })

With Future Screen

Here you can do something that will return your next screen, ex:

AnimatedSplashScreen.withScreenFunction(
  splash: 'images/splash.png',
  screenFunction: () async{
    return MainScreen();
  },
  splashTransition: SplashTransition.rotationTransition,
  pageTransitionType: PageTransitionType.scale,
)

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目