mapTranslations method

LocalizedString mapTranslations(
  1. Translation transform(
    1. String?,
    2. Translation
    )
)

Returns a new LocalizedString after applying the transform function to each translation.

Implementation

LocalizedString mapTranslations(
        Translation Function(String?, Translation) transform) =>
    copy(
        translations: translations.map((language, translation) =>
            MapEntry(language, transform(language, translation))));