Flutter: Animated Gradients with Custom Hooks
When faced with the task of coming up with a re-usable "Animated Gradient"
widget, I faced one problem, a gradient isn't actually a widget - I can't go and
make an AnimatedWidget that I can use inside a BoxDecoration in my UI somewhere.
What I wanted was an actual gradient that simply took care of its own state
management... not a widget, stateful or otherwise.
Enter hooks
Since discovering hooks for flutter [https://pub.dev/packages/flutter_hooks],
I've become a huge fan, I'm making heavy use
widget, I faced one problem, a gradient isn't actually a widget - I can't go and
make an AnimatedWidget that I can use inside a BoxDecoration in my UI somewhere.
What I wanted was an actual gradient that simply took care of its own state
management... not a widget, stateful or otherwise.
Enter hooks
Since discovering hooks for flutter [https://pub.dev/packages/flutter_hooks],
I've become a huge fan, I'm making heavy use
Published on Sun, June 16th 2019