fix pushAndRemoveUntil demo

This commit is contained in:
toly
2024-01-11 14:58:25 +08:00
parent 74f9c288ab
commit 2a69cb706b

View File

@@ -60,14 +60,14 @@ class HomePage extends StatelessWidget {
), ),
body: Center( body: Center(
child: ElevatedButton( child: ElevatedButton(
onPressed: ()=>toPageB(context), onPressed: ()=>toPageA(context),
child: const Text('Push A'), child: const Text('Push A'),
), ),
), ),
); );
} }
void toPageB(BuildContext context){ void toPageA(BuildContext context){
Navigator.of(context).pushNamed('/a'); Navigator.of(context).pushNamed('/a');
} }
} }