copyWith method

AnswerInlineQuery copyWith({
  1. int? inlineQueryId,
  2. bool? isPersonal,
  3. InlineQueryResultsButton? button()?,
  4. List<InputInlineQueryResult>? results,
  5. int? cacheTime,
  6. String? nextOffset,
})

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

Implementation

AnswerInlineQuery copyWith({
  int? inlineQueryId,
  bool? isPersonal,
  InlineQueryResultsButton? Function()? button,
  List<InputInlineQueryResult>? results,
  int? cacheTime,
  String? nextOffset,
}) => AnswerInlineQuery(
  inlineQueryId: inlineQueryId ?? this.inlineQueryId,
  isPersonal: isPersonal ?? this.isPersonal,
  button: button != null ? button() : this.button,
  results: results ?? this.results,
  cacheTime: cacheTime ?? this.cacheTime,
  nextOffset: nextOffset ?? this.nextOffset,
);