File tree Expand file tree Collapse file tree 1 file changed +3
-23
lines changed
Expand file tree Collapse file tree 1 file changed +3
-23
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import 'package:mosquito_alert_app/utils/UserManager.dart';
22import 'package:mosquito_alert_app/utils/Utils.dart' ;
33
44import 'MyLocalizations.dart' ;
5+ import 'Application.dart' ;
56import 'package:flutter/material.dart' ;
67
78class MyLocalizationsDelegate extends LocalizationsDelegate <MyLocalizations > {
@@ -10,29 +11,8 @@ class MyLocalizationsDelegate extends LocalizationsDelegate<MyLocalizations> {
1011 const MyLocalizationsDelegate ({this .newLocale});
1112
1213 @override
13- bool isSupported (Locale locale) => [
14- 'bg' ,
15- 'ca' ,
16- 'de' ,
17- 'el' ,
18- 'en' ,
19- 'es' ,
20- 'fr' ,
21- 'hr' ,
22- 'hu' ,
23- 'it' ,
24- 'lb' ,
25- 'mk' ,
26- 'nl' ,
27- 'pt' ,
28- 'ro' ,
29- 'ru' ,
30- 'sl' ,
31- 'sq' ,
32- 'sr' ,
33- 'tr' ,
34- 'zh' ,
35- ].contains ('${locale .languageCode }' );
14+ bool isSupported (Locale locale) =>
15+ application.supportedLocales ().any ((l) => l.languageCode == locale.languageCode);
3616
3717 @override
3818 Future <MyLocalizations > load (Locale locale) async {
You can’t perform that action at this time.
0 commit comments