While navigating from one page to another after clicking material button, I'm getting the following error
Within each subtree for which heroes are to be animated (i.e. a PageRoute subtree), each Hero must have a unique non-null tag. In this case, multiple heroes had the following tag: <SnackBar Hero tag - Text("Data Saved")> Here is the subtree for one of the offending heroes: Hero
Here I'm using 3 material button, one is for save, cancel and delete.
I'm navigating in save button.
Asked
Active
Viewed 81 times
0
-
You should only used unique tag with navigator ```push``` and ```pop```. For ```pop``` you can pass arguments from previous screen widget constructor. – La Pyae Jan 09 '23 at 07:49
-
@LaPyae Please check this : https://stackoverflow.com/questions/51125024/there-are-multiple-heroes-that-share-the-same-tag-within-a-subtree – Rahul Variya Jan 09 '23 at 07:57
-
You have to give different hive tag while navigation – Rahul Variya Jan 09 '23 at 07:57
-
above link is not helping – Jan 09 '23 at 08:50
-
Link is working and I mean like that @rahulVFlutterAndroid. Thanks for ref. – La Pyae Jan 09 '23 at 08:54
-
@LaPyae Welcome, puted as answer – Rahul Variya Jan 09 '23 at 08:59
-
@Hinata are get your solution? – Rahul Variya Jan 09 '23 at 09:04
-
No Rahul, still getting the same error, can anyone share me your mail id or contact number so that I can explain what my problem is.... – Jan 09 '23 at 09:22
-
In the above link, the code is different and mine is different. – Jan 09 '23 at 09:26
-
variyarahul6677@gmail.com – Rahul Variya Jan 09 '23 at 09:42
-
found the solution – Jan 09 '23 at 12:11
-
please check your mail rahulVFlutterAndroid, I have sent you the code – Jan 09 '23 at 12:27