opt.: l10n

This commit is contained in:
lollipopkit
2024-05-16 17:25:38 +08:00
parent ba4abcecfb
commit 9eb16f4703
9 changed files with 70 additions and 25 deletions

View File

@@ -63,7 +63,7 @@ class _HomePageState extends State<HomePage>
@override
void didChangeDependencies() {
super.didChangeDependencies();
l10n = S.of(context)!;
l10n = AppLocalizations.of(context)!;
_isLandscape.value =
MediaQuery.of(context).orientation == Orientation.landscape;
}

View File

@@ -532,7 +532,7 @@ class _SettingPageState extends State<SettingPage> {
onTap: () async {
final selected = await context.showPickSingleDialog(
title: l10n.language,
items: S.supportedLocales,
items: AppLocalizations.supportedLocales,
name: (p0) => p0.code,
initial: _setting.locale.fetch().toLocale,
);