Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
feat(libtokyo_flutter): add app and nav key
Browse files Browse the repository at this point in the history
  • Loading branch information
RossComputerGuy committed Jun 1, 2024
1 parent 86e7e0b commit 7c9b4c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/libtokyo_flutter/lib/widgets/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import 'package:flutter_localizations/flutter_localizations.dart' show GlobalCup
class TokyoApp extends StatefulWidget implements libtokyo.TokyoApp<Key, Widget, Route, BuildContext> {
const TokyoApp({
super.key,
this.appKey,
this.navigatorKey,
this.title = '',
this.initialRoute = '/',
this.theme,
Expand All @@ -28,6 +30,8 @@ class TokyoApp extends StatefulWidget implements libtokyo.TokyoApp<Key, Widget,
this.localeResolutionCallback,
});

final Key? appKey;
final GlobalKey<NavigatorState>? navigatorKey;
final libtokyo.ThemeData? theme;
final libtokyo.ColorScheme? colorScheme;
final libtokyo.ThemeData? darkTheme;
Expand Down Expand Up @@ -105,6 +109,8 @@ class _TokyoAppState extends State<TokyoApp> with libtokyo.TokyoAppState<Key, Wi
}

return MaterialApp(
key: widget.appKey,
navigatorKey: widget.navigatorKey,
color: convertColor(activeTheme.backgroundColor),
builder: (context, navigator) {
return Theme(
Expand Down

0 comments on commit 7c9b4c9

Please sign in to comment.