getMessage method
Gets the localized string for the specified message. If the message is
missing, this method returns an empty string (''). If the format of the
getMessage()
call is wrong - for example, messageName is not a string
or the substitutions array has more than 9 elements - this method
returns undefined
.
messageName
The name of the message, as specified in the messages.json
file.
substitutions
Up to 9 substitution strings, if the message requires
any.
returns
Message localized for current locale.
Implementation
String getMessage(
String messageName,
Object? substitutions,
GetMessageOptions? options,
) {
return $js.chrome.i18n.getMessage(
messageName,
substitutions?.jsify(),
options?.toJS,
);
}