closing property

dynamic get closing

Constant string used in generateMainImportFile as the end of the file.

Implementation

get closing => """
  default:\n      return null;
}
}

/// User programs should call this before using [localeName] for messages.
Future<bool> initializeMessages(String localeName) async {
final availableLocale = Intl.verifiedLocale(
  localeName,
  (locale) => _deferredLibraries[locale] != null,
  onFailure: (_) => null);
if (availableLocale == null) {
  return Future.value(false);
}
final lib = _deferredLibraries[availableLocale];
await (lib == null ? Future.value(false) : lib());
initializeInternalMessageLookup(() => CompositeMessageLookup());
messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor);
return Future.value(true);
}

bool _messagesExistFor(String locale) {
try {
  return _findExact(locale) != null;
} catch (e) {
  return false;
}
}

MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {
final actualLocale = Intl.verifiedLocale(locale, _messagesExistFor,
    onFailure: (_) => null);
if (actualLocale == null) return null;
return _findExact(actualLocale);
}
""";