format method Null safety

String format(
  1. [Map<String, Object>? namedParameters]
)

Returns a formatted message, treating '#' as a special placeholder.

It represents the number (plural_variable - offset).

The namedParameters either influence the formatting or are used as actual data. I.e. in call to fmt.format({'NUM_PEOPLE': 5, 'NAME': 'Angela'}), the map {'NUM_PEOPLE': 5, 'NAME': 'Angela'} holds parameters. NUM_PEOPLE parameter could mean 5 people, which could influence plural format, and NAME parameter is just a data to be printed out in proper position.

Implementation

String format([Map<String, Object>? namedParameters]) {
  return _format(false, namedParameters);
}