v1.0.1yoda
Flutter 小部件,可將任何類型的子小部件切分成矩陣狀的磚塊,並以多種方式動畫顯示。目前支援爆炸、漩渦和碎屑效果。
57喜歡 33近 30 天下載130Pub 分數
AndroidiOSWebmacOSWindowsLinux
Flutter 小部件,可將任何類型的子小部件切分成磚塊矩陣,並以多種方式動畫顯示。目前支援爆炸、漩渦和雪花效果。可在所有平台運行。
{"sdk":"flutter"}{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
Flutter widget that let's you slice any kind of child widget in a matrix of tiles and animate them with different kind of ways. Currently with Explode, Vortex and Flakes. Works on all platforms.
Screenshot
If you need to control the animation status:
late YodaController _yodaControllerExplode;
@override
void initState() {
super.initState();
_yodaControllerExplode = YodaController()
..addStatusListener((status) {
if (status == AnimationStatus.completed) {
_yodaControllerExplode.reset();
}
});
}
YodaController accepts start() and reset() methods. Note: calling those methods will not work when a setState() is called at the same time.
Yoda(
yodaEffect: YodaEffect.Explosion,
controller: _yodaControllerExplode,
duration: Duration(milliseconds: 2500),
animParameters: AnimParameters(
yodaBarrier: YodaBarrier(bottom: true, left: true, right: true),
fractionalCenter: Offset(0.5, 1.0),
hTiles: 20,
vTiles: 20,
effectPower: 0.2,
blurPower: 5,
gravity: 0.1,
randomness: 30,
),
startWhenTapped: true,
child: SizedBox(
width: 250,
height: 180,
child: Image.asset('assets/dash.png', fit: BoxFit.fill)
)
)