Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 1.81 KB

handle_animations.md

File metadata and controls

23 lines (18 loc) · 1.81 KB

Animations

Sample1 Sample2 Sample3
How?

We handle all animations Implicitly, This is power of the ImplicitlyAnimatedWidget, just like AnimatedContainer. It means you don't need to do anything, just change any value and the animation is handled under the hood, if you are curious about it, check the source code, reading the source code is the best way to learn things.

Duration

we added an optional argument in the FlChart class called swapAnimationDuration, this is a Duration class that you can set the duration of the animation. the default value is 150 ms, you can change it to fit your requirements.

LineChart(
  swapAnimationDuration: Duration(milliseconds: 150),
  LineChartData(
    isShowingMainData ? sampleData1() : sampleData2(),
  ),
)
How to disable

If you want to disable animation, I you should set the duration 0.