Language-specific LocalizationDelegates (#12645)

This commit is contained in:
Hans Muller
2017-10-20 10:45:28 -07:00
committed by GitHub
parent a554401e79
commit 796c5439f6
9 changed files with 152 additions and 8 deletions

View File

@@ -26,6 +26,9 @@ class _StocksLocalizationsDelegate extends LocalizationsDelegate<StockStrings> {
@override
Future<StockStrings> load(Locale locale) => StockStrings.load(locale);
@override
bool isSupported(Locale locale) => locale.languageCode == 'es' || locale.languageCode == 'en';
@override
bool shouldReload(_StocksLocalizationsDelegate old) => false;
}