Skip to content

Commit 667242f

Browse files
committed
feat(localization): add UiKitLocalizations to localizationsDelegates
- Add UiKitLocalizations.localizationsDelegates to the existing AppLocalizations.localizationsDelegates for dark mode toggle buttons in iOS. - Implemented in three MaterialApp widgets within the _AppViewState class.
1 parent ca782bb commit 667242f

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

lib/app/view/app.dart

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,10 @@ class _AppViewState extends State<_AppView> {
238238
fontFamily: null,
239239
),
240240
themeMode: state.themeMode,
241-
localizationsDelegates: AppLocalizations.localizationsDelegates,
241+
localizationsDelegates: const [
242+
...AppLocalizations.localizationsDelegates,
243+
...UiKitLocalizations.localizationsDelegates,
244+
],
242245
supportedLocales: AppLocalizations.supportedLocales,
243246
locale: state.locale,
244247
home: const MaintenancePage(),
@@ -262,7 +265,10 @@ class _AppViewState extends State<_AppView> {
262265
fontFamily: null,
263266
),
264267
themeMode: state.themeMode,
265-
localizationsDelegates: AppLocalizations.localizationsDelegates,
268+
localizationsDelegates: const [
269+
...AppLocalizations.localizationsDelegates,
270+
...UiKitLocalizations.localizationsDelegates,
271+
],
266272
supportedLocales: AppLocalizations.supportedLocales,
267273
locale: state.locale,
268274
home: const UpdateRequiredPage(),
@@ -289,7 +295,10 @@ class _AppViewState extends State<_AppView> {
289295
fontFamily: null,
290296
),
291297
themeMode: state.themeMode,
292-
localizationsDelegates: AppLocalizations.localizationsDelegates,
298+
localizationsDelegates: const [
299+
...AppLocalizations.localizationsDelegates,
300+
...UiKitLocalizations.localizationsDelegates,
301+
],
293302
supportedLocales: AppLocalizations.supportedLocales,
294303
locale: state.locale,
295304
home: const StatusPage(),

0 commit comments

Comments
 (0)