ViewerState class abstract

Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.

Available extensions
Annotations
  • @freezed

Constructors

ViewerState({@Default.new('app.bsky.actor.defs#viewerState') String $type, bool? muted, bool? mutedOnlyReposts, bool? mutedOnlyQuoteposts, @ListViewBasicConverter() ListViewBasic? mutedByList, bool? blockedBy, @AtUriConverter.new() AtUri? blocking, @ListViewBasicConverter() ListViewBasic? blockingByList, @AtUriConverter.new() AtUri? following, @AtUriConverter.new() AtUri? followedBy, @KnownFollowersConverter() KnownFollowers? knownFollowers, @ActivitySubscriptionConverter() ActivitySubscription? activitySubscription, Map<String, dynamic>? $unknown})
const
factory
ViewerState.fromJson(Map<String, Object?> json)
factory

Properties

$type → String
no setterinherited
$unknown → Map<String, dynamic>?
no setterinherited
activitySubscription → ActivitySubscription?
This property is present only in selected cases, as an optimization.
no setterinherited
blockedBy → bool?
no setterinherited
blocking → AtUri?
no setterinherited
blockingByList → ListViewBasic?
no setterinherited
copyWith → $ViewerStateCopyWith<ViewerState>
Create a copy of ViewerState with the given fields replaced by the non-null parameter values.
no setterinherited
followedBy → AtUri?
no setterinherited
following → AtUri?
no setterinherited
hasActivitySubscription → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
hasBlocking → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
hasBlockingByList → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
hasFollowedBy → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
hasFollowing → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
hashCode → int
The hash code for this object.
no setterinherited
hasKnownFollowers → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
hasMutedByList → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
hasNotActivitySubscription → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
hasNotBlocking → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
hasNotBlockingByList → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
hasNotFollowedBy → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
hasNotFollowing → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
hasNotKnownFollowers → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
hasNotMutedByList → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
isBlockedBy → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
isMuted → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
isMutedOnlyQuoteposts → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
isMutedOnlyReposts → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
isNotBlockedBy → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
isNotMuted → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
isNotMutedOnlyQuoteposts → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
isNotMutedOnlyReposts → bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
knownFollowers → KnownFollowers?
This property is present only in selected cases, as an optimization.
no setterinherited
muted → bool?
Whether the account is fully muted, directly or via a mutelist. False when the mute is scoped to specific kinds; see mutedOnlyReposts and mutedOnlyQuoteposts.
no setterinherited
mutedByList → ListViewBasic?
no setterinherited
mutedOnlyQuoteposts → bool?
Whether the account's quote posts are muted. Scoped mutes are exclusive with muted: this can be true while muted is false. If muted is true, this will be false.
no setterinherited
mutedOnlyReposts → bool?
Whether the account's reposts are muted. Scoped mutes are exclusive with muted: this can be true while muted is false. If muted is true, this will be false.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_ViewerState value)) → TResult

Available on ViewerState, provided by the ViewerStatePatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_ViewerState value)?) → TResult?

Available on ViewerState, provided by the ViewerStatePatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_ViewerState value)?, {required TResult orElse()}) → TResult

Available on ViewerState, provided by the ViewerStatePatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String $type, bool? muted, bool? mutedOnlyReposts, bool? mutedOnlyQuoteposts, ListViewBasic? mutedByList, bool? blockedBy, AtUri? blocking, ListViewBasic? blockingByList, AtUri? following, AtUri? followedBy, KnownFollowers? knownFollowers, ActivitySubscription? activitySubscription, Map<String, dynamic>? $unknown)?, {required TResult orElse()}) → TResult

Available on ViewerState, provided by the ViewerStatePatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes this ViewerState to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String $type, bool? muted, bool? mutedOnlyReposts, bool? mutedOnlyQuoteposts, ListViewBasic? mutedByList, bool? blockedBy, AtUri? blocking, ListViewBasic? blockingByList, AtUri? following, AtUri? followedBy, KnownFollowers? knownFollowers, ActivitySubscription? activitySubscription, Map<String, dynamic>? $unknown)) → TResult

Available on ViewerState, provided by the ViewerStatePatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String $type, bool? muted, bool? mutedOnlyReposts, bool? mutedOnlyQuoteposts, ListViewBasic? mutedByList, bool? blockedBy, AtUri? blocking, ListViewBasic? blockingByList, AtUri? following, AtUri? followedBy, KnownFollowers? knownFollowers, ActivitySubscription? activitySubscription, Map<String, dynamic>? $unknown)?) → TResult?

Available on ViewerState, provided by the ViewerStatePatterns extension

A variant of when that fallback to returning null

Operators

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

Static Methods

validate(Map<String, dynamic> object) → bool

Constants

knownProps → const List<String>