copyWith method

SavePreparedKeyboardButton copyWith({
  1. int? userId,
  2. KeyboardButton? button,
})

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

Implementation

SavePreparedKeyboardButton copyWith({int? userId, KeyboardButton? button}) =>
    SavePreparedKeyboardButton(
      userId: userId ?? this.userId,
      button: button ?? this.button,
    );