refactor: update back navigation to prioritize popping the route stack before defaulting to home
This commit is contained in:
@@ -154,7 +154,13 @@ class AgentNetworkScreen extends ConsumerWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () => context.go('/home'),
|
||||
onTap: () {
|
||||
if (Navigator.of(context).canPop()) {
|
||||
Navigator.of(context).pop();
|
||||
} else {
|
||||
context.go('/home');
|
||||
}
|
||||
},
|
||||
child: const Icon(
|
||||
Icons.arrow_back_ios_new_rounded,
|
||||
size: 18,
|
||||
|
||||
Reference in New Issue
Block a user