MessageSource class abstract

Interface for resolving messages, with support for parameterization and internationalization.

This is the main interface that applications will use to retrieve localized messages. It provides a clean API for message resolution with placeholder substitution and locale fallback support.

Example usage:

final messageSource = ConfigurableMessageSource();

// Get a simple message
final greeting = messageSource.getMessage('greeting');

// Get a message with parameters
final welcome = messageSource.getMessage('welcome', args: ['John']);

// Get a message for a specific locale
final bonjour = messageSource.getMessage('greeting', locale: Locale('fr'));
Implementers

Constructors

MessageSource()

Properties

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

Methods

getMessage(String code, {List<Object>? args, Locale? locale, String? defaultMessage}) String
Retrieve a message for the given code.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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