copyWith method
KeyboardButton
copyWith({
- String? text,
- int? iconCustomEmojiId,
- ButtonStyle? style,
- KeyboardButtonType? type,
- dynamic extra,
- int? clientId,
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
KeyboardButton copyWith({
String? text,
int? iconCustomEmojiId,
ButtonStyle? style,
KeyboardButtonType? type,
dynamic extra,
int? clientId,
}) => KeyboardButton(
text: text ?? this.text,
iconCustomEmojiId: iconCustomEmojiId ?? this.iconCustomEmojiId,
style: style ?? this.style,
type: type ?? this.type,
extra: extra ?? this.extra,
clientId: clientId ?? this.clientId,
);