File tree Expand file tree Collapse file tree 4 files changed +19
-2
lines changed
Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1+ ## 1.2.3
2+
3+ * Forvard animation on items count changed in ` AutoAnimatedList `
4+
15## 1.2.2
26
37* Fixed dispose in ` AutoAnimatedIconButton `
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ packages:
1414 path: ".."
1515 relative: true
1616 source: path
17- version: "1.2.2 "
17+ version: "1.2.3 "
1818 boolean_selector:
1919 dependency: transitive
2020 description:
Original file line number Diff line number Diff line change @@ -329,6 +329,11 @@ class AutoAnimatedListState extends State<AutoAnimatedList>
329329 @override
330330 void initState () {
331331 super .initState ();
332+ init ();
333+ }
334+
335+ void init () {
336+ _itemsCount = 0 ;
332337 Future .delayed (widget.delay, () {
333338 _timer = Timer .periodic (widget.showItemInterval, (Timer timer) {
334339 if (_itemsCount == widget.itemCount || ! mounted) {
@@ -342,6 +347,14 @@ class AutoAnimatedListState extends State<AutoAnimatedList>
342347 });
343348 }
344349
350+ @override
351+ void didUpdateWidget (AutoAnimatedList oldWidget) {
352+ super .didUpdateWidget (oldWidget);
353+ if (oldWidget.itemCount != widget.itemCount) {
354+ init ();
355+ }
356+ }
357+
345358 @override
346359 void dispose () {
347360 _timer? .cancel ();
Original file line number Diff line number Diff line change 11name : auto_animated
22description : Widgets starting auto play animation when mounted. It is already possible to animate the list and icons.
3- version : 1.2.2
3+ version : 1.2.3
44author : Serge Shkurko <sergeshkurko@outlook.com>
55homepage : https://github.com/rbcprolabs/flutter_plugins/tree/master/packages/auto_animated
66
You can’t perform that action at this time.
0 commit comments