InputMediaLocation constructor

const InputMediaLocation({
  1. @JsonKey.new(name: 'type') @Default.new(InputMediaType.location) InputMediaType type,
  2. @JsonKey.new(name: 'latitude') required double latitude,
  3. @JsonKey.new(name: 'longitude') required double longitude,
  4. @JsonKey.new(name: 'horizontal_accuracy') double? horizontalAccuracy,
})

Creates a new InputMediaLocation object.

Implementation

const factory InputMediaLocation({
  /// Type of the media, must be location
  @JsonKey(name: 'type')
  @Default(InputMediaType.location)
  final InputMediaType type,

  /// Latitude of the location
  @JsonKey(name: 'latitude') required final double latitude,

  /// Longitude of the location
  @JsonKey(name: 'longitude') required final double longitude,

  /// Optional. The radius of uncertainty for the location, measured in meters; 0-1500
  @JsonKey(name: 'horizontal_accuracy') final double? horizontalAccuracy,
}) = _InputMediaLocation;