From f76e51fea4cbce0d4fdc9fb226ff025ca00327d3 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Wed, 1 Nov 2023 17:40:14 -0700 Subject: [PATCH] wip ZulipApp.navigatorObservers; TODO perh make some existing tests use it --- lib/widgets/app.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/widgets/app.dart b/lib/widgets/app.dart index fb350e9738c..c1228d6341f 100644 --- a/lib/widgets/app.dart +++ b/lib/widgets/app.dart @@ -11,7 +11,11 @@ import 'recent_dm_conversations.dart'; import 'store.dart'; class ZulipApp extends StatelessWidget { - const ZulipApp({super.key}); + const ZulipApp({super.key, this.navigatorObservers}); + + /// A list to pass through to [MaterialApp.navigatorObservers]. + /// Useful in tests. + final List? navigatorObservers; @override Widget build(BuildContext context) { @@ -50,6 +54,7 @@ class ZulipApp extends StatelessWidget { localizationsDelegates: ZulipLocalizations.localizationsDelegates, supportedLocales: ZulipLocalizations.supportedLocales, theme: theme, + navigatorObservers: navigatorObservers ?? const [], builder: (BuildContext context, Widget? child) { GlobalLocalizations.zulipLocalizations = ZulipLocalizations.of(context); return child!;