Message class

Annotations
  • @freezed

Constructors

Message({required MessageId? id, required String? body, required String? type, required int? t, required String? notifyName, required String? from, required String? to, @JsonKey(defaultValue: false) required bool isNewMsg, @JsonKey(defaultValue: false) required bool star, @JsonKey(defaultValue: false) required bool kicNotified, @JsonKey(defaultValue: false) required bool recvFresh, @JsonKey(defaultValue: false) required bool isFromTemplate, @JsonKey(defaultValue: false) required bool pollInvalidated, @JsonKey(defaultValue: false) required bool broadcast, @JsonKey(defaultValue: false) required bool isForwarded, @JsonKey(defaultValue: false) required bool hasReaction, @JsonKey(defaultValue: false) required bool ephemeralOutOfSync, @JsonKey(defaultValue: false) required bool productHeaderImageRejected, required int? lastPlaybackProgress, @JsonKey(defaultValue: false) required bool isDynamicReplyButtonMsg, @JsonKey(defaultValue: false) required bool isMdHistoryMsg, required int? stickerSentTs, @JsonKey(defaultValue: false) required bool requiresDirectConnection, @JsonKey(defaultValue: false) required bool pttForwardedFeaturesEnabled, required String? caption})
const
factory
Message.fromJson(Map<String, dynamic> json)
factory

Properties

body String?
no setterinherited
broadcast bool
no setterinherited
caption String?
no setterinherited
copyWith → $MessageCopyWith<Message>
Create a copy of Message with the given fields replaced by the non-null parameter values.
no setterinherited
ephemeralOutOfSync bool
no setterinherited
from String?
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasReaction bool
no setterinherited
id MessageId?
no setterinherited
isDynamicReplyButtonMsg bool
no setterinherited
isForwarded bool
no setterinherited
isFromTemplate bool
no setterinherited
isMdHistoryMsg bool
no setterinherited
isNewMsg bool
no setterinherited
kicNotified bool
no setterinherited
lastPlaybackProgress int?
no setterinherited
notifyName String?
no setterinherited
pollInvalidated bool
no setterinherited
productHeaderImageRejected bool
no setterinherited
pttForwardedFeaturesEnabled bool
no setterinherited
recvFresh bool
no setterinherited
requiresDirectConnection bool
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
star bool
no setterinherited
stickerSentTs int?
no setterinherited
t int?
no setterinherited
to String?
no setterinherited
type String?
no setterinherited

Methods

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

Operators

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

Static Methods

parse(dynamic data) List<Message>
Because Mobile platforms returns data as list and desktop returns as map , so to unify the data