Url constructor

  1. @JsonSerializable(includeIfNull: false)
const Url({
  1. required int start,
  2. required int end,
  3. required String url,
  4. required String expandedUrl,
  5. required String displayUrl,
  6. String? unwoundUrl,
  7. String? mediaKey,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory Url({
  /// The start position (zero-based) of the recognized URL within the object.
  /// All start indices are inclusive.
  required int start,

  /// The end position (zero-based) of the recognized URL within the object.
  /// This end index is exclusive.
  required int end,

  /// The URL in the format posted by the user.
  required String url,

  /// The fully resolved URL.
  required String expandedUrl,

  /// The URL as displayed in the Twitter client.
  required String displayUrl,

  /// The full destination URL.
  String? unwoundUrl,

  /// The unique key to the media.
  String? mediaKey,
}) = _Url;