This commit is contained in:
toly
2023-10-19 21:51:44 +08:00
parent 75690361b3
commit d518b3c58a
44 changed files with 1496 additions and 10 deletions

View File

@@ -13,6 +13,7 @@ class PageA extends StatelessWidget {
appBar: AppBar(
title: const Text('A 界面'),
backgroundColor: bgColor,
leading: BackButton(onPressed: _pop),
),
body: Center(
child: ElevatedButton(
@@ -26,4 +27,7 @@ class PageA extends StatelessWidget {
router.value = ['/', 'a', 'b'];
}
void _pop() {
router.value = List.of(router.value)..removeLast();
}
}

View File

@@ -14,9 +14,7 @@ class PageC extends StatelessWidget {
appBar: AppBar(
title: const Text('C 界面'),
backgroundColor: bgColor,
leading: BackButton(
onPressed: _pop,
),
leading: BackButton(onPressed: _pop),
),
body: Center(
child: Text('到达终点'),