Flutter Animations
Divyanshu Bhargava
@divyanshub024
Who am I?
What is Animation?
- AnimatedAlign - AnimatedPositioned
- AnimatedContainer - AnimatedPositionedDirectional
- AnimatedDefaultTextStyle - AnimatedTheme
- AnimatedOpacity - AnimatedCrossFade
- AnimatedPadding - AnimatedSize
- AnimatedPhysicalModel - AnimatedSwitcher
AnimatedContainer
- Animated version of Container.
- The AnimatedContainer will automatically animate between the old and
new values of properties when they change
- Its child and descendants are not animated.
Navigation transition
To Push: Android
To Push: Android
To Push: iOS
Hero Animation
Hero widget
- Hero is a widget that flies between
screens.
- implemented using two Hero widgets
Canvas Animation
CustomPainter and CustomPaint
- CustomPainter Interface used by CustomPaint and
RenderCustomPaint.
- CustomPaint is a widget that provides a canvas on which to draw
during the paint phase.
- CustomPaint subclasses must implement the paint and shouldRepaint
methods
Crack the animation
Crack the animation
Physics based Animation
Spring Simulation
- A spring simulation.
- Models a particle attached to a spring that follows Hooke's law.
- “Hooke's law states that the force (F) needed to extend or compress a
spring by some distance x scales linearly with respect to that distance.”
- F = Kx
Bonus: Flare
Flare examples
What is Flare?
- Real assets.
- No rebuilding in code.
- Manipulate anything at runtime.
- Open source.
What’s Next?
Thank you
Divyanshu Bhargava
@divyanshub024