LazyLocaleData constructor

LazyLocaleData(
  1. LocaleDataReader _reader,
  2. Function _creationFunction,
  3. List<String> availableLocales
)

The constructor. The _reader specifies where the data comes from. The _creationFunction creates the appropriate data type from the remote data (which typically comes in as a Map). The keys lists the set of remotely available locale names so we know which things can be fetched without having to check remotely.

Implementation

LazyLocaleData(this._reader, this._creationFunction, this.availableLocales)
    : map = {},
      availableLocaleSet = Set.from(availableLocales);