Hero Animation Example
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),
),
/// ...
]),
);
}
}