Expanded(flex: 1, child: GestureDetector(
onTap: () {
Navigator.push(
context, MaterialPageRoute(builder: (context) => ResultPage()
));
},
child: Container(
alignment: Alignment.center,
color: Color(0XFFEB1555),
child: Text("CALCULATE", style: TextStyle(color: Colors.white,
fontSize: 24,
fontWeight: FontWeight.bold),),
),
))
Getting Exception :
════════ Exception caught by scheduler library ═════════════════════════════════════════════════════ The following assertion was thrown during a scheduler callback: There are multiple heroes that share the same tag within a subtree.
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: Here is the subtree for one of the offending heroes: .............................................................