KnownListPurpose enum

Overview

The object representing knownValues defined in Lexicon as an Enum.

Although the knownValues defined in Lexicon are not technically Enums, it is very useful to be able to treat these fields as type safe Enums.

Usage

Get JSON compatible value

// JSON compatible value.
final value = KnownListPurpose.something.value;

Convert to UListPurpose

final union = KnownListPurpose.something.toUnion();
Inheritance
Available extensions

Values

modlist → const KnownListPurpose

A list of actors to apply an aggregate moderation action (mute/block) on.

const KnownListPurpose('app.bsky.graph.defs#modlist')
curatelist → const KnownListPurpose

A list of actors used for curation purposes such as list feeds or interaction gating.

const KnownListPurpose('app.bsky.graph.defs#curatelist')
referencelist → const KnownListPurpose

A list of actors used for only for reference purposes such as within a starter pack.

const KnownListPurpose('app.bsky.graph.defs#referencelist')

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
isCuratelist bool

Available on KnownListPurpose, provided by the $KnownListPurposeExtension extension

Returns true if this value is curatelist, otherwise false.
no setter
isModlist bool

Available on KnownListPurpose, provided by the $KnownListPurposeExtension extension

Returns true if this value is modlist, otherwise false.
no setter
isNotCuratelist bool

Available on KnownListPurpose, provided by the $KnownListPurposeExtension extension

Returns true if this value is not curatelist, otherwise false.
no setter
isNotModlist bool

Available on KnownListPurpose, provided by the $KnownListPurposeExtension extension

Returns true if this value is not modlist, otherwise false.
no setter
isNotReferencelist bool

Available on KnownListPurpose, provided by the $KnownListPurposeExtension extension

Returns true if this value is not referencelist, otherwise false.
no setter
isReferencelist bool

Available on KnownListPurpose, provided by the $KnownListPurposeExtension extension

Returns true if this value is referencelist, otherwise false.
no setter
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
JSON value based on lexicon.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
toUnion() UListPurpose

Available on KnownListPurpose, provided by the $KnownListPurposeExtension extension

Returns this value as UListPurpose.

Operators

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

Static Methods

valueOf(String? value) KnownListPurpose?
Returns KnownListPurpose associated with value, otherwise null.

Constants

values → const List<KnownListPurpose>
A constant List of the values in this enum, in order of their declaration.