13-04
This commit is contained in:
@@ -15,7 +15,7 @@ class PageB extends StatelessWidget {
|
||||
appBar: AppBar(
|
||||
title: const Text('B 界面'),
|
||||
backgroundColor: bgColor,
|
||||
|
||||
leading: BackButton(onPressed: _pop),
|
||||
),
|
||||
body: Center(
|
||||
child: ElevatedButton(
|
||||
@@ -29,4 +29,7 @@ class PageB extends StatelessWidget {
|
||||
router.value = ['/','a','b','c'];
|
||||
}
|
||||
|
||||
void _pop() {
|
||||
router.value = List.of(router.value)..removeLast();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user