RoomPreferences class abstract
The current user's private preferences for a room: notification mute, pin-to-top, and hide-from-list.
These are per-user and never visible to other members. Returned by ChatRoomsApi.patchPreferences as the merged server-side state after a partial update, and embedded in RoomDetail for the room info panel.
- Available extensions
- Annotations
-
- @freezed
Constructors
- RoomPreferences({@Default.new(false) bool muted, @Default.new(false) bool pinned, DateTime? muteUntil})
-
constfactory
Properties
-
copyWith
→ $RoomPreferencesCopyWith<
RoomPreferences> -
Create a copy of RoomPreferences
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
Whether the room is hidden (WhatsApp-style "archive") from the list.
no setterinherited
- muted → bool
-
Whether room notifications are silenced. For a timed mute this is
trueuntilmuteUntilpasses; the backend derives it server-side.no setterinherited - muteUntil → DateTime?
-
When a timed mute expires (UTC).
nullmeans a permanent mute (whenmutedistrue) or no mute at all (whenmutedisfalse).no setterinherited - pinned → bool
-
Whether the room is pinned to the top of the room list.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_RoomPreferences value)) → TResult -
Available on RoomPreferences, provided by the RoomPreferencesPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_RoomPreferences value)?) → TResult? -
Available on RoomPreferences, provided by the RoomPreferencesPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_RoomPreferences value)?, {required TResult orElse()}) → TResult -
Available on RoomPreferences, provided by the RoomPreferencesPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(bool muted, bool pinned, DateTime? muteUntil)?, {required TResult orElse()}) → TResult -
Available on RoomPreferences, provided by the RoomPreferencesPatterns 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.
inherited
-
when<
TResult extends Object?> (TResult $default(bool muted, bool pinned, DateTime? muteUntil)) → TResult -
Available on RoomPreferences, provided by the RoomPreferencesPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(bool muted, bool pinned, DateTime? muteUntil)?) → TResult? -
Available on RoomPreferences, provided by the RoomPreferencesPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited