fix(chat): use stock Navigator Back at every screen width
This commit is contained in:
@@ -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,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user