fix(chat): use stock Navigator Back at every screen width

This commit is contained in:
2026-10-24 12:36:17 +01:00
parent 0ecd4a8487
commit f22afabd94
16 changed files with 262 additions and 53 deletions
+2 -12
View File
@@ -111,8 +111,6 @@ class _DetailPageState extends State<_DetailPage> {
super.dispose();
}
void _back() => Navigator.of(context).maybePop();
@override
Widget build(BuildContext context) {
final body = ShellBarScope(
@@ -129,11 +127,7 @@ class _DetailPageState extends State<_DetailPage> {
if (usesCupertinoHost(context)) {
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
leading: CupertinoNavigationBarBackButton(
key: const ValueKey('shell.back'),
onPressed: _back,
),
automaticallyImplyLeading: false,
automaticallyImplyLeading: true,
middle: Text(title),
trailing: actions.isEmpty
? null
@@ -144,11 +138,7 @@ class _DetailPageState extends State<_DetailPage> {
}
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
leading: BackButton(
key: const ValueKey('shell.back'),
onPressed: _back,
),
automaticallyImplyLeading: true,
title: Text(title),
actions: actions,
),