MLocalized class

Text looked up from the platform's own string resources, so the OS picks the device language.

A widget renders outside the Flutter engine, so Dart's localization stack is not available to it. Declare the text under strings: in mosaic.yaml and reference it here:

strings:
  en: { trending: "TRENDING NOW" }
  ar: { trending: "الأكثر تداولاً" }
MText(MLocalized('trending'))

Becomes Localizable.strings on iOS and values-<locale>/strings.xml on Android — real platform resources, selected by the system. Unlike MBind this is resolved at render time from the bundle, not from stored data, so it needs no app involvement at all.

Constructors

MLocalized(String key)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
key String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited