ReactionType class sealed
This object describes the type of a reaction. It can be one of
ReactionTypeEmoji
ReactionTypeCustomEmoji
ReactionTypePaid
- Annotations
-
- @Freezed(fromJson: true, toJson: true, unionKey: 'type', unionValueCase: FreezedUnionCase.snake)
Constructors
- ReactionType.customEmoji({@JsonKey(name: 'type') @Default(ReactionTypeType.customEmoji) ReactionTypeType type, @JsonKey(name: 'custom_emoji_id') required String customEmojiId})
-
Custom emoji reaction
constfactory
- ReactionType.emoji({@Default(ReactionTypeType.emoji) ReactionTypeType type, @JsonKey(name: 'emoji') required String emoji})
-
Regular emoji reaction
constfactory
-
ReactionType.fromJson(Map<
String, Object?> json) -
factory
- ReactionType.paid({@JsonKey(name: 'type') @Default(ReactionTypeType.paid) ReactionTypeType type})
-
Paid reaction
constfactory
Properties
-
copyWith
→ $ReactionTypeCopyWith<
ReactionType> -
Create a copy of ReactionType
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → ReactionTypeType
-
Type of the reaction, must be "emoji"
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this ReactionType to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited