ReactionCount class abstract

Represents a reaction added to a message along with the number of times it was added.

Available extensions
Annotations
  • @freezed

Constructors

ReactionCount({@JsonKey.new(name: 'type') required ReactionType type, @JsonKey.new(name: 'total_count') required int totalCount})
Creates a new instance of ReactionCount.
const
factory
ReactionCount.fromJson(Map<String, dynamic> json)
Creates a ReactionCount object from JSON object.
factory

Properties

copyWith → $ReactionCountCopyWith<ReactionCount>
Create a copy of ReactionCount 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
totalCount int
Number of times the reaction was added.
no setterinherited
type ReactionType
Type of the reaction.
no setterinherited

Methods

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

Available on ReactionCount, provided by the ReactionCountPatterns extension

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

Available on ReactionCount, provided by the ReactionCountPatterns extension

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

Available on ReactionCount, provided by the ReactionCountPatterns extension

A variant of map that fallback to returning orElse.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this ReactionCount to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

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