I18nKey class abstract

Available extensions
Annotations
  • @freezed

Constructors

I18nKey({required String id, required String code, double? progress, @Default.new([]) List<I18nTranslation> translations, @TimestampConverter() required DateTime createdAt, required Employee createdBy, @TimestampConverter() required DateTime updatedAt, required Employee updatedBy})
const
factory
I18nKey.fromJson(Map<String, dynamic> json)
factory

Properties

code String
code defines the key code. This code is used to identify the key in the application.
no setterinherited
copyWith → $I18nKeyCopyWith<I18nKey>
Create a copy of I18nKey with the given fields replaced by the non-null parameter values.
no setterinherited
createdAt DateTime
createdAt defines when the key was created.
no setterinherited
createdBy Employee
createdBy defines who created the key.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
id defines the key id. This ID is UUIDv4 format
no setterinherited
progress double?
progress defines the key progress. This is a number between 0 and 1.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
translations List<I18nTranslation>
translations defines the translations for the key.
no setterinherited
updatedAt DateTime
updatedAt defines when the key was updated.
no setterinherited
updatedBy Employee
updatedBy defines who updated the key.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_I18nKey value)) → TResult

Available on I18nKey, provided by the I18nKeyPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_I18nKey value)?) → TResult?

Available on I18nKey, provided by the I18nKeyPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_I18nKey value)?, {required TResult orElse()}) → TResult

Available on I18nKey, provided by the I18nKeyPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String id, String code, double? progress, List<I18nTranslation> translations, DateTime createdAt, Employee createdBy, DateTime updatedAt, Employee updatedBy)?, {required TResult orElse()}) → TResult

Available on I18nKey, provided by the I18nKeyPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this I18nKey to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String id, String code, double? progress, List<I18nTranslation> translations, DateTime createdAt, Employee createdBy, DateTime updatedAt, Employee updatedBy)) → TResult

Available on I18nKey, provided by the I18nKeyPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String id, String code, double? progress, List<I18nTranslation> translations, DateTime createdAt, Employee createdBy, DateTime updatedAt, Employee updatedBy)?) → TResult?

Available on I18nKey, provided by the I18nKeyPatterns extension

A variant of when that fallback to returning null

Operators

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