translateBlock method

  1. @override
FutureOr<Map<String, String>?> translateBlock(
  1. Map<String, String> entries,
  2. IntlLocale fromLocale,
  3. IntlLocale toLocale,
  4. String fromLanguage,
  5. String toLanguage,
  6. bool confirm,
)
override

Translates an entries block. Called by translate.

Implementation

@override
FutureOr<Map<String, String>?> translateBlock(
    Map<String, String> entries,
    IntlLocale fromLocale,
    IntlLocale toLocale,
    String fromLanguage,
    String toLanguage,
    bool confirm) {
  var translation = entries.map((key, msg) =>
      MapEntry(key, translateEntry(fromLocale, toLocale, key, msg)));
  return translation;
}