Tag constructor

  1. @JsonSerializable(includeIfNull: false)
const Tag({
  1. required String name,
  2. required String url,
  3. @JsonKey(name: 'history') List<UsageStatistics>? usageHistory,
  4. @JsonKey(name: 'following') bool? isFollowing,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory Tag({
  /// The value of the hashtag after the # sign.
  required String name,

  /// A link to the hashtag on the instance.
  required String url,

  /// Usage history for given days (typically the past week).
  @JsonKey(name: 'history') List<UsageStatistics>? usageHistory,

  /// Whether the current token’s authorized user is following this tag.
  @JsonKey(name: 'following') bool? isFollowing,
}) = _Tag;