Entity constructor

  1. @JsonSerializable.new(includeIfNull: false)
const Entity({
  1. @Default.new('app.bsky.feed.post#entity') String $type,
  2. @TextSliceConverter() required TextSlice index,
  3. required String type,
  4. required String value,
  5. Map<String, dynamic>? $unknown,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory Entity({
  @Default('app.bsky.feed.post#entity') String $type,
  @TextSliceConverter() required TextSlice index,

  /// Expected values are 'mention' and 'link'.
  required String type,
  required String value,

  Map<String, dynamic>? $unknown,
}) = _Entity;