ChatUser class abstract
A chat platform user with profile information and role.
Equality is id-based so user collections (Set<ChatUser>, lookup
maps) deduplicate by id regardless of churn in the profile fields.
- Available extensions
- Annotations
-
- @Freezed.new(equal: false)
Constructors
Properties
- active → bool
-
no setterinherited
- avatarUrl → String?
-
no setterinherited
- bio → String?
-
no setterinherited
- configuration → UserConfiguration?
-
no setterinherited
-
copyWith
→ $ChatUserCopyWith<
ChatUser> -
Create a copy of ChatUser
with the given fields replaced by the non-null parameter values.
no setterinherited
-
custom
→ Map<
String, dynamic> ? -
no setterinherited
- displayName → String?
-
no setterinherited
- email → String?
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
no setterinherited
- role → UserRole
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_ChatUser value)) → TResult -
Available on ChatUser, provided by the ChatUserPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_ChatUser value)?) → TResult? -
Available on ChatUser, provided by the ChatUserPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_ChatUser value)?, {required TResult orElse()}) → TResult -
Available on ChatUser, provided by the ChatUserPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String id, String? displayName, String? avatarUrl, String? bio, String? email, UserRole role, bool active, Map< String, dynamic> ? custom, UserConfiguration? configuration)?, {required TResult orElse()}) → TResult -
Available on ChatUser, provided by the ChatUserPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
when<
TResult extends Object?> (TResult $default(String id, String? displayName, String? avatarUrl, String? bio, String? email, UserRole role, bool active, Map< String, dynamic> ? custom, UserConfiguration? configuration)) → TResult -
Available on ChatUser, provided by the ChatUserPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String id, String? displayName, String? avatarUrl, String? bio, String? email, UserRole role, bool active, Map< String, dynamic> ? custom, UserConfiguration? configuration)?) → TResult? -
Available on ChatUser, provided by the ChatUserPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override