TranslatedMessage class

This represents a message and its translation. We assume that the translation has some identifier that allows us to figure out the original message it corresponds to, and that it may want to transform the translated text in some way, e.g. to turn whatever format the translation uses for variables into a Dart string interpolation. Specific translation mechanisms are expected to subclass this.

Constructors

TranslatedMessage(String id, Message translated)

Properties

hashCode int
The hash code for this object. [...]
read-only, override
id String
The identifier for this message. In the simplest case, this is the name parameter from the Intl.message call, but it can be any identifier that this program and the output of the translation can agree on as identifying a message.
final
message → Message
read-only
originalMessage ↔ MainMessage
For backward compatibility, we still have the originalMessage API.
read / write
originalMessages List<MainMessage>
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
translated → Message
Our translated version of all the originalMessages.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

operator ==(dynamic x) bool
The equality operator. [...]
override