PlaceData constructor

  1. @JsonSerializable(includeIfNull: false)
const PlaceData({
  1. required String id,
  2. required String fullName,
  3. String? name,
  4. PlaceType? placeType,
  5. @JsonKey(name: 'country') String? countryName,
  6. @JsonKey(name: 'country_code') Country? country,
  7. PlaceGeo? geo,
  8. List<String>? containedWithin,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory PlaceData({
  /// The unique identifier of the expanded place, if this is a point of
  /// interest tagged in the Tweet.
  ///
  /// ## How It Can Be Used
  ///
  /// - Use this to programmatically retrieve a place.
  required String id,

  /// A longer-form detailed place name.
  ///
  /// ## How It Can Be Used
  ///
  /// - Classify a Tweet by a specific place name.
  required String fullName,

  /// The short name of this place.
  ///
  /// ## How It Can Be Used
  ///
  /// - Classify a Tweet by a specific place name
  String? name,

  /// Specified the particular type of information represented by this place
  /// information, such as a city name, or a point of interest.
  ///
  /// ## How It Can Be Used
  ///
  /// - Classify a Tweet by a specific type of place.
  PlaceType? placeType,

  /// The full-length name of the country this place belongs to.
  ///
  /// ## How It Can Be Used
  ///
  /// - Classify a Tweet by country name.
  @JsonKey(name: 'country') String? countryName,

  /// The ISO Alpha-2 country code this place belongs to.
  ///
  /// ## How It Can Be Used
  ///
  /// - Classify a Tweet by country code.
  @JsonKey(name: 'country_code') Country? country,

  /// Contains place details in GeoJSON format.
  PlaceGeo? geo,

  /// Returns the identifiers of known places that contain the referenced
  /// place.
  List<String>? containedWithin,
}) = _PlaceData;