copyWith method

OutlinedButton copyWith({
  1. Key? key,
  2. void onPressed()?,
  3. void onLongPress()?,
  4. void onHover(
    1. bool
    )?,
  5. void onFocusChange(
    1. bool
    )?,
  6. ButtonStyle? style,
  7. FocusNode? focusNode,
  8. bool? autofocus,
  9. Clip? clipBehavior,
  10. Widget? child,
})

Implementation

OutlinedButton copyWith({
  Key? key,
  void Function()? onPressed,
  void Function()? onLongPress,
  void Function(bool)? onHover,
  void Function(bool)? onFocusChange,
  ButtonStyle? style,
  FocusNode? focusNode,
  bool? autofocus,
  Clip? clipBehavior,
  Widget? child,
}) {
  return OutlinedButton(
    key: key ?? this.key,
    onPressed: onPressed ?? this.onPressed,
    onLongPress: onLongPress ?? this.onLongPress,
    onHover: onHover ?? this.onHover,
    onFocusChange: onFocusChange ?? this.onFocusChange,
    style: style ?? this.style,
    focusNode: focusNode ?? this.focusNode,
    autofocus: autofocus ?? this.autofocus,
    clipBehavior: clipBehavior ?? this.clipBehavior,
    child: child ?? this.child!,
  );
}