i created a listview in which i used the gero widget i have wrapped all the hero widgets and listview widgets in material but still I get this error and when i click the listtile it works properly but when I come to the second page I am not able to go back
homepage:
body: Material(
child: ListView(
children: [
Hero(
tag: nyc_img,
child: ListTile(
leading: Image.network(
nyc_img,
height: 100,
width: 100,
),
title: Text("New York City"),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => NYCpage()),
);
},
),
),
],
),
second page:
body: Center(
child: Material(
type: MaterialType.transparency,
child: Hero(
tag: nyc_img,
child: Image.network(nyc_img),
),
),
),