diff --git a/packages/masamune/example/pubspec.lock b/packages/masamune/example/pubspec.lock index 05ae55f31..8e2eeef59 100644 --- a/packages/masamune/example/pubspec.lock +++ b/packages/masamune/example/pubspec.lock @@ -328,105 +328,105 @@ packages: name: katana url: "https://pub.dartlang.org" source: hosted - version: "0.15.10" + version: "0.15.10+1" katana_auth: dependency: transitive description: name: katana_auth url: "https://pub.dartlang.org" source: hosted - version: "1.1.1" + version: "1.1.2" katana_form: dependency: transitive description: name: katana_form url: "https://pub.dartlang.org" source: hosted - version: "1.2.5" + version: "1.2.6" katana_indicator: dependency: transitive description: name: katana_indicator url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.1.3" katana_listenables: dependency: transitive description: name: katana_listenables url: "https://pub.dartlang.org" source: hosted - version: "1.2.8" + version: "1.2.9" katana_listenables_annotation: dependency: transitive description: name: katana_listenables_annotation url: "https://pub.dartlang.org" source: hosted - version: "1.2.7" + version: "1.2.8" katana_localization: dependency: transitive description: name: katana_localization url: "https://pub.dartlang.org" source: hosted - version: "1.1.19" + version: "1.1.20" katana_localization_annotation: dependency: transitive description: name: katana_localization_annotation url: "https://pub.dartlang.org" source: hosted - version: "1.1.17" + version: "1.1.18" katana_model: dependency: transitive description: name: katana_model url: "https://pub.dartlang.org" source: hosted - version: "1.3.8" + version: "1.3.12" katana_router: dependency: transitive description: name: katana_router url: "https://pub.dartlang.org" source: hosted - version: "1.10.1" + version: "1.10.2" katana_router_annotation: dependency: transitive description: name: katana_router_annotation url: "https://pub.dartlang.org" source: hosted - version: "1.10.0" + version: "1.10.1" katana_scoped: dependency: transitive description: name: katana_scoped url: "https://pub.dartlang.org" source: hosted - version: "1.6.0" + version: "1.6.2" katana_shorten: dependency: transitive description: name: katana_shorten url: "https://pub.dartlang.org" source: hosted - version: "1.1.3" + version: "1.1.4" katana_theme: dependency: transitive description: name: katana_theme url: "https://pub.dartlang.org" source: hosted - version: "1.2.5" + version: "1.2.6" katana_theme_annotation: dependency: transitive description: name: katana_theme_annotation url: "https://pub.dartlang.org" source: hosted - version: "1.2.3" + version: "1.2.4" lints: dependency: transitive description: diff --git a/packages/masamune/lib/src/masamune_app.dart b/packages/masamune/lib/src/masamune_app.dart index 34bfcab92..c844841ce 100644 --- a/packages/masamune/lib/src/masamune_app.dart +++ b/packages/masamune/lib/src/masamune_app.dart @@ -5,6 +5,7 @@ class MasamuneApp extends StatelessWidget { const MasamuneApp({ super.key, this.appRef, + this.auth, this.localize, this.routerConfig, this.modelAdapter = const RuntimeModelAdapter(), @@ -27,6 +28,7 @@ class MasamuneApp extends StatelessWidget { }); final AppRef? appRef; + final AuthAdapter? auth; final AppThemeData? theme; final ModelAdapter? modelAdapter; final AppLocalizeBase? localize; @@ -50,15 +52,18 @@ class MasamuneApp extends StatelessWidget { @override Widget build(BuildContext context) { - return buildModelAdapter( + return buildAppAuth( context, - buildAppScoped( + buildModelAdapter( context, - buildAppTheme( + buildAppScoped( context, - buildAppLocalize( + buildAppTheme( context, - buildAppRouter(context), + buildAppLocalize( + context, + buildAppRouter(context), + ), ), ), ), @@ -85,6 +90,16 @@ class MasamuneApp extends StatelessWidget { return child; } + Widget buildAppAuth(BuildContext context, Widget child) { + if (auth != null) { + return AuthAdapterScope( + adapter: auth!, + child: child, + ); + } + return child; + } + Widget buildAppTheme(BuildContext context, Widget child) { if (theme != null) { return AppThemeScope( diff --git a/packages/masamune/pubspec.lock b/packages/masamune/pubspec.lock index 09ad7ad74..b010a0e90 100644 --- a/packages/masamune/pubspec.lock +++ b/packages/masamune/pubspec.lock @@ -153,105 +153,105 @@ packages: name: katana url: "https://pub.dartlang.org" source: hosted - version: "0.15.10" + version: "0.15.10+1" katana_auth: dependency: "direct main" description: name: katana_auth url: "https://pub.dartlang.org" source: hosted - version: "1.1.1" + version: "1.1.2" katana_form: dependency: "direct main" description: name: katana_form url: "https://pub.dartlang.org" source: hosted - version: "1.2.5" + version: "1.2.6" katana_indicator: dependency: "direct main" description: name: katana_indicator url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.1.3" katana_listenables: dependency: "direct main" description: name: katana_listenables url: "https://pub.dartlang.org" source: hosted - version: "1.2.8" + version: "1.2.9" katana_listenables_annotation: dependency: transitive description: name: katana_listenables_annotation url: "https://pub.dartlang.org" source: hosted - version: "1.2.7" + version: "1.2.8" katana_localization: dependency: "direct main" description: name: katana_localization url: "https://pub.dartlang.org" source: hosted - version: "1.1.19" + version: "1.1.20" katana_localization_annotation: dependency: transitive description: name: katana_localization_annotation url: "https://pub.dartlang.org" source: hosted - version: "1.1.17" + version: "1.1.18" katana_model: dependency: "direct main" description: name: katana_model url: "https://pub.dartlang.org" source: hosted - version: "1.3.8" + version: "1.3.12" katana_router: dependency: "direct main" description: name: katana_router url: "https://pub.dartlang.org" source: hosted - version: "1.10.1" + version: "1.10.2" katana_router_annotation: dependency: transitive description: name: katana_router_annotation url: "https://pub.dartlang.org" source: hosted - version: "1.10.0" + version: "1.10.1" katana_scoped: dependency: "direct main" description: name: katana_scoped url: "https://pub.dartlang.org" source: hosted - version: "1.6.0" + version: "1.6.2" katana_shorten: dependency: "direct main" description: name: katana_shorten url: "https://pub.dartlang.org" source: hosted - version: "1.1.3" + version: "1.1.4" katana_theme: dependency: "direct main" description: name: katana_theme url: "https://pub.dartlang.org" source: hosted - version: "1.2.5" + version: "1.2.6" katana_theme_annotation: dependency: transitive description: name: katana_theme_annotation url: "https://pub.dartlang.org" source: hosted - version: "1.2.3" + version: "1.2.4" masamune_annotation: dependency: "direct main" description: