BannedUser class

Contains information about a User that was banned from a Channel or App.

Annotations
  • @JsonSerializable.new()

Constructors

BannedUser({required User user, User? bannedBy, ChannelModel? channel, DateTime? createdAt, DateTime? expires, bool shadow = false, String? reason})
Creates a new instance of BannedUser
const
BannedUser.fromJson(Map<String, dynamic> json)
Create a new instance from a json
factory

Properties

bannedBy User?
User that banned the user.
final
channel ChannelModel?
Channel where the user was banned.
final
createdAt DateTime?
Timestamp when the user was banned.
final
expires DateTime?
Timestamp when the user will be unbanned.
final
hashCode int
The hash code for this object.
no setterinherited
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
reason String?
Reason for the ban.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadow bool
Whether the user is a shadow banned user.
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
user User
Banned user.
final

Methods

copyWith({User? user, User? bannedBy, ChannelModel? channel, DateTime? createdAt, DateTime? expires, bool? shadow, String? reason}) BannedUser
Returns a copy of this object with the given fields updated.
getComparableField(String sortKey) → ComparableField?
Gets a comparable field value for the given sortKey.
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