LocalizedValue<T> constructor

const LocalizedValue<T>([
  1. Iterable<LocalizedLocaleValue<T>> defaultValue = const []
])

Class for storing translation data.

It consists of a pair of Locale and the corresponding T for the translation.

LocalizedValue.fromJson can be used to convert String and T pairs from Json. In that case, the key must be a string delimited by _, such as ja_JP.

Obtains the translation of Locale specified in value.

翻訳データを保存するためのクラス。

Localeとその翻訳に対応するTのペアで構成されます。

LocalizedValue.fromJsonを利用することでStringTのペアのJsonからの変換が可能です。 その場合、キーはja_JPのように_で区切られた文字列である必要があります。

valueで指定したLocaleの翻訳を取得します。

Implementation

const LocalizedValue(
    [Iterable<LocalizedLocaleValue<T>> defaultValue = const []])
    : _list = defaultValue;