🐛 Fix No CupertinoLocalizations found
This commit is contained in:
parent
a564e4ee0a
commit
4af64ae89b
@ -38,9 +38,7 @@ void main() async {
|
||||
path: 'assets/i18n',
|
||||
fallbackLocale: Locale('en', 'US'),
|
||||
useFallbackTranslations: true,
|
||||
child: Overlay(
|
||||
initialEntries: [OverlayEntry(builder: (_) => IslandApp())],
|
||||
),
|
||||
child: IslandApp(),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -70,12 +68,21 @@ class IslandApp extends HookConsumerWidget {
|
||||
themeMode: ThemeMode.system,
|
||||
routerConfig: _appRouter.config(),
|
||||
supportedLocales: context.supportedLocales,
|
||||
localizationsDelegates: [...context.localizationDelegates],
|
||||
localizationsDelegates: [
|
||||
...context.localizationDelegates,
|
||||
], // this contains the cupertino one
|
||||
locale: context.locale,
|
||||
builder: (context, child) {
|
||||
return WindowScaffold(
|
||||
return Overlay(
|
||||
initialEntries: [
|
||||
OverlayEntry(
|
||||
builder:
|
||||
(_) => WindowScaffold(
|
||||
router: _appRouter,
|
||||
child: child ?? const SizedBox.shrink(),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user