feat(home): expose extension country settings and isolate regional caches

This commit is contained in:
zarzet committed 2026-10-18 03:11:33 +07:00
1 parent 2455cabced
commit 1a6dc7366e
11 files changed
+606 -21

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
import 'package:flutter/widgets.dart';
import 'package:spotiflac_android/l10n/l10n.dart';
String extensionCountryName(BuildContext context, String code) {
final l10n = context.l10n;
return switch (code.toUpperCase()) {
'US' => l10n.regionCountryUS,
'GB' => l10n.regionCountryGB,
'FR' => l10n.regionCountryFR,
'DE' => l10n.regionCountryDE,
'IT' => l10n.regionCountryIT,
'ES' => l10n.regionCountryES,
'JP' => l10n.regionCountryJP,
'KR' => l10n.regionCountryKR,
'IN' => l10n.regionCountryIN,
'ID' => l10n.regionCountryID,
'BR' => l10n.regionCountryBR,
'MX' => l10n.regionCountryMX,
'AU' => l10n.regionCountryAU,
'CA' => l10n.regionCountryCA,
'XK' => l10n.regionCountryXK,
_ => code.toUpperCase(),
};
}