ChosenInlineResult constructor

const ChosenInlineResult({
  1. @JsonKey(name: 'result_id') required String resultId,
  2. @JsonKey(name: 'from') required User from,
  3. @JsonKey(name: 'location') Location? location,
  4. @JsonKey(name: 'inline_message_id') String? inlineMessageId,
  5. @JsonKey(name: 'query') required String query,
})

Creates a new ChosenInlineResult object.

Implementation

const factory ChosenInlineResult({
  /// The unique identifier for the result that was chosen
  @JsonKey(name: 'result_id') required String resultId,

  /// The user that chose the result
  @JsonKey(name: 'from') required User from,

  /// Optional. Sender location, only for bots that require user location
  @JsonKey(name: 'location') Location? location,

  /// Optional. Identifier of the sent inline message. Available only if there
  /// is an inline keyboard attached to the message. Will be also received in
  /// callback queries and can be used to edit the message.
  @JsonKey(name: 'inline_message_id') String? inlineMessageId,

  /// The query that was used to obtain the result
  @JsonKey(name: 'query') required String query,
}) = _ChosenInlineResult;