MessageLookupByLibrary class
This provides an abstract class for messages looked up in generated code. Each locale will have a separate subclass of this class with its set of messages. See generate_localized.dart.
Constructors
Properties
- localeName → String
-
Subclasses should override this to return their locale, e.g. 'en_US'
read-only
-
messages
→ Map<
String, dynamic> -
Subclasses should override this to return a list of their message
implementations. In this class these are functions, but subclasses may
implement them differently.
read-only
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
evaluateMessage(
dynamic translation, List args) → String - Evaluate the translated message and return the translated string.
-
lookupMessage(
String message_str, String locale, String name, List args, String meaning, { MessageIfAbsent ifAbsent }) → String -
Return the localized version of a message. We are passed the original
version of the message, which consists of a
message_str
that will be translated, and which may be interpolated based on one or more variables, adesc
providing a description of usage for themessage_str
, and a map ofexamples
for each data element to be substituted into the message. [...] -
toString(
) → String -
Returns a string representation of this object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
Operators
-
operator [](
String messageName) → dynamic - Return our message with the given name
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited
Static Methods
-
simpleMessage(
dynamic translatedString) → dynamic - Return a function that returns the given string. An optimization for dart2js, used from the generated code.