MessageFormat constructor Null safety

MessageFormat(
  1. String pattern,
  2. {String locale = 'en'}
)

Create a MessageFormat for the ICU message string pattern. It does parameter substitutions in a locale-aware way. The syntax is similar to the one used by ICU and is described in the grammar above.

Implementation

MessageFormat(String pattern, {String locale = 'en'})
    : _locale = locale,
      _pattern = pattern,
      _numberFormat = NumberFormat.decimalPattern(locale);