Relationship constructor

  1. @JsonSerializable(includeIfNull: false)
const Relationship({
  1. @Default(appBskyGraphDefsRelationship) @JsonKey(name: r'$type') String $type,
  2. required String did,
  3. @AtUriConverter() AtUri? following,
  4. @AtUriConverter() AtUri? followedBy,
  5. @JsonKey(name: r'$unknown') Map<String, dynamic>? $unknown,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory Relationship({
  /// The unique namespace for this lex object.
  ///
  /// `app.bsky.graph.defs#relationship`
  @Default(appBskyGraphDefsRelationship)
  @JsonKey(name: r'$type')
  String $type,
  required String did,

  /// if the actor follows this DID, this is the AT-URI of the follow
  /// record
  @AtUriConverter() AtUri? following,

  /// if the actor is followed by this DID, contains the AT-URI of the
  /// follow record
  @AtUriConverter() AtUri? followedBy,

  /// Contains unknown objects not defined in Lexicon.
  @JsonKey(name: r'$unknown') Map<String, dynamic>? $unknown,
}) = _Relationship;