An interface representing a translated object.
The Translated interface is used to represent objects that have
translations. The interface defines a required parameter translations
which is a list of objects that implement the TranslatedName interface.
The T
type parameter is used to specify the type of the translations. The
translations can be any objects that implement the TranslatedName
interface.
Example usage:
class TranslatedObject implements Translated<TranslatedName> {
const TranslatedObject({required this.translations});
final List<TranslatedName> translations;
}
In this example, the TranslatedObject
class implements the Translated
interface with a TranslatedName
type parameter for the translations. The
class defines a property translations
which is a list of objects
representing the translated names of the country. The Translated
interface
is used to ensure that the TranslatedObject
class has the required
translations.
- Implementers
- Available Extensions
Constructors
-
Translated({required List<
T> translations}) -
Creates a new instance of the Translated object.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
translations
→ List<
T> -
A list of TranslatedName objects representing the translations, with
different languages, country and script codes.
final
Methods
-
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