v2.0.0
animated
一個非常簡單(但功能強大)的 Flutter 隱式動畫庫。
31喜歡 8550近 30 天下載130Pub 分數
AndroidiOSWebmacOSWindowsLinux
一個非常簡單(但功能強大)的 Flutter 隱式動畫庫。
以下為英文專案原文快照,最新內容請造訪 GitHub。
Animated is a very simple (yet powerful) implicit animation library made for Flutter.
Its goal is to be able to create a smooth animation between two values when an AnimatedContainer is not enough.
@override
Widget build(BuildContext context) {
return Animated(
value: 1.2,
curve: Curves.easeInOut,
duration: Duration(milliseconds: 300),
builder: (context, child, animation) => Transform.scale(
scale: animation.value,
child: child,
),
child: Container(
width: 40,
height: 40,
color: Colors.red,
),
);
}
In this example, whenever the value changes, the builder function will be called at each frame, from the old value to the new one.
Any widget that is not modified by the animation should be moved to the child property for optimization.
依賴清單 2 項
{"sdk":"flutter"}{"sdk":"flutter"}先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗