Hero Animation Create beautiful transitions between screens the with the Hero widget

This lesson is available for PRO members or as a single course purchase. Sign-in and choose a plan below.

Hero Animation Example

file_type_dartlang topics.dart
class TopicScreen extends StatelessWidget {
  final Topic topic;
  TopicScreen({this.topic});

  @override
  Widget build(BuildContext context) {
    return Scaffold(

        /// ...

      body: ListView(children: [
        Hero(
          tag: topic.img,
          child: Image.asset('assets/covers/${topic.img}',
              width: MediaQuery.of(context).size.width),
        ),

        /// ...
      ]),
    );
  }
}

Questions?

Ask questions via GitHub below OR chat on Slack #questions