copyWith method Null safety

FloatingActionButtonThemeData copyWith(
  1. {Color? foregroundColor,
  2. Color? backgroundColor,
  3. Color? focusColor,
  4. Color? hoverColor,
  5. Color? splashColor,
  6. double? elevation,
  7. double? focusElevation,
  8. double? hoverElevation,
  9. double? disabledElevation,
  10. double? highlightElevation,
  11. ShapeBorder? shape,
  12. bool? enableFeedback,
  13. double? iconSize,
  14. BoxConstraints? sizeConstraints,
  15. BoxConstraints? smallSizeConstraints,
  16. BoxConstraints? largeSizeConstraints,
  17. BoxConstraints? extendedSizeConstraints,
  18. double? extendedIconLabelSpacing,
  19. EdgeInsetsGeometry? extendedPadding,
  20. TextStyle? extendedTextStyle,
  21. MaterialStateProperty<MouseCursor?>? mouseCursor}
)

Creates a copy of this object with the given fields replaced with the new values.

Implementation

FloatingActionButtonThemeData copyWith({
  Color? foregroundColor,
  Color? backgroundColor,
  Color? focusColor,
  Color? hoverColor,
  Color? splashColor,
  double? elevation,
  double? focusElevation,
  double? hoverElevation,
  double? disabledElevation,
  double? highlightElevation,
  ShapeBorder? shape,
  bool? enableFeedback,
  double? iconSize,
  BoxConstraints? sizeConstraints,
  BoxConstraints? smallSizeConstraints,
  BoxConstraints? largeSizeConstraints,
  BoxConstraints? extendedSizeConstraints,
  double? extendedIconLabelSpacing,
  EdgeInsetsGeometry? extendedPadding,
  TextStyle? extendedTextStyle,
  MaterialStateProperty<MouseCursor?>? mouseCursor,
}) {
  return FloatingActionButtonThemeData(
    foregroundColor: foregroundColor ?? this.foregroundColor,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    focusColor: focusColor ?? this.focusColor,
    hoverColor: hoverColor ?? this.hoverColor,
    splashColor: splashColor ?? this.splashColor,
    elevation: elevation ?? this.elevation,
    focusElevation: focusElevation ?? this.focusElevation,
    hoverElevation: hoverElevation ?? this.hoverElevation,
    disabledElevation: disabledElevation ?? this.disabledElevation,
    highlightElevation: highlightElevation ?? this.highlightElevation,
    shape: shape ?? this.shape,
    enableFeedback: enableFeedback ?? this.enableFeedback,
    iconSize: iconSize ?? this.iconSize,
    sizeConstraints: sizeConstraints ?? this.sizeConstraints,
    smallSizeConstraints: smallSizeConstraints ?? this.smallSizeConstraints,
    largeSizeConstraints: largeSizeConstraints ?? this.largeSizeConstraints,
    extendedSizeConstraints: extendedSizeConstraints ?? this.extendedSizeConstraints,
    extendedIconLabelSpacing: extendedIconLabelSpacing ?? this.extendedIconLabelSpacing,
    extendedPadding: extendedPadding ?? this.extendedPadding,
    extendedTextStyle: extendedTextStyle ?? this.extendedTextStyle,
    mouseCursor: mouseCursor ?? this.mouseCursor,
  );
}