copyWith method

  1. @override
TxTipThemeData copyWith({
  1. TextStyle? textStyle,
  2. Color? backgroundColor,
  3. Color? foregroundColor,
  4. EdgeInsetsGeometry? padding,
  5. BorderRadius? borderRadius,
  6. VisualDensity? visualDensity,
})
override

创建此对象的副本,但将给定字段替换为新值。

Implementation

@override
TxTipThemeData copyWith({
  TextStyle? textStyle,
  Color? backgroundColor,
  Color? foregroundColor,
  EdgeInsetsGeometry? padding,
  BorderRadius? borderRadius,
  VisualDensity? visualDensity,
}) {
  return TxTipThemeData(
    textStyle: textStyle ?? this.textStyle,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    foregroundColor: foregroundColor ?? this.foregroundColor,
    padding: padding ?? this.padding,
    borderRadius: borderRadius ?? this.borderRadius,
    visualDensity: visualDensity ?? this.visualDensity,
  );
}