Animate opacity with AnimatedOpacity widget – Initialize a state variable for the animated property

class _FadeInDemoState extends State<FadeInDemo> {

 double opacity = 0;

 @override

 Widget build(BuildContext context) {

  return ListView(children: <Widget>[

   // …

   AnimatedOpacity(

    opacity: opacity,

    child: const Column(

Leave a comment

Your email address will not be published. Required fields are marked *