Member class

The class that contains the information about the user membership in a channel

Annotations
  • @JsonSerializable()

Constructors

Member({User? user, DateTime? inviteAcceptedAt, DateTime? inviteRejectedAt, bool invited = false, String? role, String? channelRole, String? userId, bool isModerator = false, DateTime? createdAt, DateTime? updatedAt, bool banned = false, DateTime? banExpires, bool shadowBanned = false})
Constructor used for json serialization
Member.fromJson(Map<String, dynamic> json)
Create a new instance from a json
factory

Properties

banExpires DateTime?
The date at which the ban will expire.
final
banned bool
True if the member is banned from the channel
final
channelRole String?
The role of this member in the channel
final
createdAt DateTime
The date of creation
final
hashCode int
The hash code for this object.
no setterinherited
inviteAcceptedAt DateTime?
The date in which the user accepted the invite to the channel
final
invited bool
True if the user has been invited to the channel
final
inviteRejectedAt DateTime?
The date in which the user rejected the invite to the channel
final
isModerator bool
True if the user is a moderator of the channel
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
role String?
The role of the user in the channel
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowBanned bool
True if the member is shadow banned from the channel
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
updatedAt DateTime
The last date of update
final
user User?
The interested user
final
userId String?
The id of the interested user
final

Methods

copyWith({User? user, DateTime? inviteAcceptedAt, DateTime? inviteRejectedAt, bool? invited, String? role, String? channelRole, String? userId, bool? isModerator, DateTime? createdAt, DateTime? updatedAt, bool? banned, DateTime? banExpires, bool? shadowBanned}) Member
Creates a copy of Member with specified attributes overridden.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serialize to json
toString() String
A string representation of this object.
inherited

Operators

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