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.new({@Default('app.bsky.actor.defs#viewerState') String $type, bool? muted, @ListViewBasicConverter() ListViewBasic? mutedByList, bool? blockedBy, @AtUriConverter() AtUri? blocking, @ListViewBasicConverter() ListViewBasic? blockingByList, @AtUriConverter() AtUri? following, @AtUriConverter() 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
isNotBlockedBy bool

Available on ViewerState, provided by the ViewerStateExtension extension

no setter
isNotMuted 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?
no setterinherited
mutedByList ListViewBasic?
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, 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, 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, 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>