copyWith method

TooltipTheme copyWith({
  1. ValueGetter<double?>? surfaceOpacity,
  2. ValueGetter<double?>? surfaceBlur,
  3. ValueGetter<EdgeInsetsGeometry?>? padding,
  4. ValueGetter<Color?>? backgroundColor,
  5. ValueGetter<BorderRadiusGeometry?>? borderRadius,
})

Creates a copy of this theme but with the given fields replaced.

Implementation

TooltipTheme copyWith({
  ValueGetter<double?>? surfaceOpacity,
  ValueGetter<double?>? surfaceBlur,
  ValueGetter<EdgeInsetsGeometry?>? padding,
  ValueGetter<Color?>? backgroundColor,
  ValueGetter<BorderRadiusGeometry?>? borderRadius,
}) {
  return TooltipTheme(
    surfaceOpacity:
        surfaceOpacity == null ? this.surfaceOpacity : surfaceOpacity(),
    surfaceBlur: surfaceBlur == null ? this.surfaceBlur : surfaceBlur(),
    padding: padding == null ? this.padding : padding(),
    backgroundColor:
        backgroundColor == null ? this.backgroundColor : backgroundColor(),
    borderRadius: borderRadius == null ? this.borderRadius : borderRadius(),
  );
}