load method

  1. @override
Future<LL> load(
  1. Locale locale
)
override

MUST be synchronous.

A delegate that returns a real Future makes Localizations render an empty box and call deferFirstFrame() — a blank app until it resolves, which is precisely the failure this SDK exists to prevent.

Implementation

@override
Future<LL> load(Locale locale) {
  final String code = languageTagOf(locale);
  return SynchronousFuture<LL>(LL._(client, locale, code, direction));
}