mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
settings page
This commit is contained in:
@@ -104,6 +104,18 @@ class _MyAppState extends State<MyApp> {
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
locale: () {
|
||||
var lang = appdata.settings['language'];
|
||||
if(lang == 'system') {
|
||||
return null;
|
||||
}
|
||||
return switch(lang) {
|
||||
'zh-CN' => const Locale('zh', 'CN'),
|
||||
'zh-TW' => const Locale('zh', 'TW'),
|
||||
'en-US' => const Locale('en'),
|
||||
_ => null
|
||||
};
|
||||
}(),
|
||||
supportedLocales: const [
|
||||
Locale('en'),
|
||||
Locale('zh', 'CN'),
|
||||
|
Reference in New Issue
Block a user