mapLanguages method

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

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

Implementation

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