Skip to content

Commit

Permalink
wip ZulipApp.navigatorObservers; TODO perh make some existing tests u…
Browse files Browse the repository at this point in the history
…se it
  • Loading branch information
gnprice committed Nov 2, 2023
1 parent bc6be67 commit f76e51f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/widgets/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<NavigatorObserver>? navigatorObservers;

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -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!;
Expand Down

0 comments on commit f76e51f

Please sign in to comment.