copyWith method

GetInlineQueryResults copyWith({
  1. int? botUserId,
  2. int? chatId,
  3. Location? userLocation()?,
  4. String? query,
  5. String? offset,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

GetInlineQueryResults copyWith({
  int? botUserId,
  int? chatId,
  Location? Function()? userLocation,
  String? query,
  String? offset,
}) =>
    GetInlineQueryResults(
      botUserId: botUserId ?? this.botUserId,
      chatId: chatId ?? this.chatId,
      userLocation: userLocation != null ? userLocation() : this.userLocation,
      query: query ?? this.query,
      offset: offset ?? this.offset,
    );