v1.3.0animated_splash_screen
以完全可自定义的方式创建动画启动画面的最简单方法。
777喜欢 1.1万近 30 天下载150Pub 分数
AndroidiOSWebmacOSWindowsLinux
以完全可自定义的方式创建动画启动画面的最简单方法。
以下为英文项目原文快照,最新内容请访问 GitHub。
Check it out at Pub.Dev
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.
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,
);
}
Here, you can pass:
enum SplashTransition {
slideTransition,
scaleTransition,
rotationTransition,
sizeTransition,
fadeTransition,
decoratedBoxTransition
}
enum PageTransitionType {
fade,
rightToLeft,
leftToRight,
upToDown,
downToUp,
scale,
rotate,
size,
rightToLeftWithFade,
leftToRightWithFade,
}
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,
})
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,
)
依赖清单 4 项
{"sdk":"flutter"}^2.0.9^1.9.0{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗