LocalizedText class final
A piece of catalog prose in every language the catalog publishes.
The catalog is read by three consumers with different audiences: the site (flocks.live, which serves a route per component in both languages), a future MCP server, and the package's own documentation. Making the language a type rather than a convention is what keeps a component from shipping half-translated: the constructor cannot be satisfied with one language, so there is no state in which a field exists in PT and is simply missing in EN.
Translation happens at the string level, not at the field level — an English sentence may be rewritten with a different rhythm and a different argument than its Portuguese counterpart, as long as both say the same thing.
Constructors
- LocalizedText({required String en, required String pt})
-
Creates a LocalizedText.
const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> - Serializes to the format consumed by the site and the MCP server.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited