copyWith method

FloatyActionButton copyWith({
  1. Widget? icon,
  2. VoidCallback? onTap,
  3. double? size,
  4. Color? backgroundColor,
  5. Color? foregroundColor,
  6. double? elevation,
})

Returns a copy of this FloatyActionButton with the option to modify any of the properties.

If any parameter is not specified, the current value from the original object is retained.

Implementation

FloatyActionButton copyWith({
  Widget? icon,
  VoidCallback? onTap,
  double? size,
  Color? backgroundColor,
  Color? foregroundColor,
  double? elevation,
}) {
  return FloatyActionButton(
    icon: icon ?? this.icon,
    onTap: onTap ?? this.onTap,
    size: size ?? this.size,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    foregroundColor: foregroundColor ?? this.foregroundColor,
    elevation: elevation ?? this.elevation,
  );
}