#animation
#flutter
#fluttertutorialforbeginners
#fluttertutorials
#flutterTutorialBangla
#learnwithmotaleb
#flutterKids
#flutterappdevelopment
#AnimatedBuilder
A general-purpose widget for building animations.
AnimatedBuilder is useful for more complex widgets that wish to include an animation as part of a larger build function. To use AnimatedBuilder, construct the widget and pass it a builder function.
For simple cases without additional state, consider using AnimatedWidget.
Despite the name, AnimatedBuilder is not limited to Animations, any subtype of Listenable (such as ChangeNotifier or ValueNotifier) can be used to trigger rebuilds. Although they have identical implementations, if an Animation is not being listened to, consider using a ListenableBuilder for better readability.
Performance optimizations
If the builder function contains a subtree that does not depend on the animation passed to the constructor, it's more efficient to build that subtree once instead of rebuilding it on every animation tick.
If a pre-built subtree is passed as the child parameter, the AnimatedBuilder will pass it back to the builder function so that it can be incorporated into the build.
Follow Facebook Community: / 427533327933322
Follow Facebook: / learnwithmotaleb
Follow GitHub: https://github.com/learnwithmotaleb
Follow Website: https://www.learnwithmotaleb.com/
Follow Linkedin: / abdul-motaleb-345744172
E-mail: [email protected]
Phone/WhatsApp: +8801701577479