Label constructor

  1. @jsonSerializable
const Label({
  1. int? ver,
  2. required String src,
  3. required String uri,
  4. String? cid,
  5. @JsonKey(name: 'val') required String value,
  6. @JsonKey(name: 'neg') @Default(false) bool isNegate,
  7. @JsonKey(name: 'cts') required DateTime createdAt,
  8. DateTime? exp,
  9. List<int>? sig,
})

Implementation

@jsonSerializable
const factory Label({
  /// The AT Protocol version of the label object."
  int? ver,

  /// DID of the actor who created this label.
  required String src,

  /// AT URI of the record, repository (account),
  /// or other resource which this label applies to.
  required String uri,

  /// Optionally, CID specifying the specific version of 'uri'
  /// resource this label applies to.
  String? cid,

  /// The short string name of the value or type of this label.
  @JsonKey(name: 'val') required String value,

  /// If true, this is a negation label, overwriting a previous label.
  @JsonKey(name: 'neg') @Default(false) bool isNegate,

  /// Timestamp when this label was created.
  @JsonKey(name: 'cts') required DateTime createdAt,

  /// Timestamp at which this label expires (no longer applies).
  DateTime? exp,

  /// Signature of dag-cbor encoded label.
  List<int>? sig,
}) = _Label;