Label class abstract
Metadata tag on an atproto resource (eg, repo or record).
- Available extensions
- Annotations
-
- @freezed
Constructors
-
Label.new({@Default('com.atproto.label.defs#label') String $type, int? ver, required String src, required String uri, String? cid, required String val, bool? neg, required DateTime cts, DateTime? exp, Map<
String, dynamic> ? sig, Map<String, dynamic> ? $unknown}) -
constfactory
-
Label.fromJson(Map<
String, Object?> json) -
factory
Properties
- $type → String
-
no setterinherited
-
$unknown
→ Map<
String, dynamic> ? -
no setterinherited
- cid → String?
-
Optionally, CID specifying the specific version of 'uri' resource this label applies to.
no setterinherited
-
copyWith
→ $LabelCopyWith<
Label> -
Create a copy of Label
with the given fields replaced by the non-null parameter values.
no setterinherited
- cts → DateTime
-
Timestamp when this label was created.
no setterinherited
- exp → DateTime?
-
Timestamp at which this label expires (no longer applies).
no setterinherited
- hasCid → bool
-
Available on Label, provided by the LabelExtension extension
no setter - hasExp → bool
-
Available on Label, provided by the LabelExtension extension
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- hasNotCid → bool
-
Available on Label, provided by the LabelExtension extension
no setter - hasNotExp → bool
-
Available on Label, provided by the LabelExtension extension
no setter - hasNotSig → bool
-
Available on Label, provided by the LabelExtension extension
no setter - hasNotVer → bool
-
Available on Label, provided by the LabelExtension extension
no setter - hasSig → bool
-
Available on Label, provided by the LabelExtension extension
no setter - hasVer → bool
-
Available on Label, provided by the LabelExtension extension
no setter - isNeg → bool
-
Available on Label, provided by the LabelExtension extension
no setter - isNotNeg → bool
-
Available on Label, provided by the LabelExtension extension
no setter - neg → bool?
-
If true, this is a negation label, overwriting a previous label.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sig
→ Map<
String, dynamic> ? -
Signature of dag-cbor encoded label.
no setterinherited
- src → String
-
DID of the actor who created this label.
no setterinherited
- uri → String
-
AT URI of the record, repository (account), or other resource that this label applies to.
no setterinherited
- val → String
-
The short string name of the value or type of this label.
no setterinherited
- ver → int?
-
The AT Protocol version of the label object.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_Label value)) → TResult -
Available on Label, provided by the LabelPatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_Label value)?) → TResult? -
Available on Label, provided by the LabelPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_Label value)?, {required TResult orElse()}) → TResult -
Available on Label, provided by the LabelPatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(String $type, int? ver, String src, String uri, String? cid, String val, bool? neg, DateTime cts, DateTime? exp, Map< String, dynamic> ? sig, Map<String, dynamic> ? $unknown)?, {required TResult orElse()}) → TResult -
Available on Label, provided by the LabelPatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this Label to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String $type, int? ver, String src, String uri, String? cid, String val, bool? neg, DateTime cts, DateTime? exp, Map< String, dynamic> ? sig, Map<String, dynamic> ? $unknown)) → TResult -
Available on Label, provided by the LabelPatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String $type, int? ver, String src, String uri, String? cid, String val, bool? neg, DateTime cts, DateTime? exp, Map< String, dynamic> ? sig, Map<String, dynamic> ? $unknown)?) → TResult? -
Available on Label, provided by the LabelPatterns extension
A variant ofwhen
that fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
knownProps
→ const List<
String>