I have a standard ElevatedButton action:
ElevatedButton(
onPressed: () => myPolicySet.serialize(),
child: const Text('serialize'),
),
I also want it to navigate to a new page:
ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const DiagramAppTwo()),
},
child: const Text('serialize'),
),
Is this possible? if so, how should I do it?