I'm trying navigate from one screen to another, when I click but I get error.
I'm already finding some error fixing from internet and other, but still error.
This is my code :
_buildCard(String title, String rating, String imgPath) {
return Padding(
padding: EdgeInsets.all(10.0),
child: InkWell(
onTap: () {
Navigator.of(context)
.push(MaterialPageRoute(builder: (context) => DetailPage()));
},
buildIcon(String imgPath1, String iconName, String titleIcon) {
return Padding(
padding: EdgeInsets.only(left: 10.0, right: 10.0, top: 10.0),
child: InkWell(
onTap: () {
BuildContext context;
Navigator.of(context).push(MaterialPageRoute(
builder: (context) =>
DetailsIcon(heroTag: imgPath1, iconName: iconName)));
},
and this my error
I/flutter ( 5378): Another exception was thrown: There are multiple heroes that share the same tag within a subtree.