copyWith method
- ButtonTextTheme? textTheme,
- ButtonBarLayoutBehavior? layoutBehavior,
- double? minWidth,
- double? height,
- EdgeInsetsGeometry? padding,
- ShapeBorder? shape,
- bool? alignedDropdown,
- Color? buttonColor,
- Color? disabledColor,
- Color? focusColor,
- Color? hoverColor,
- Color? highlightColor,
- Color? splashColor,
- ColorScheme? colorScheme,
- MaterialTapTargetSize? materialTapTargetSize,
Creates a copy of this button theme data object with the matching fields replaced with the non-null parameter values.
Implementation
ButtonThemeData copyWith({
ButtonTextTheme? textTheme,
ButtonBarLayoutBehavior? layoutBehavior,
double? minWidth,
double? height,
EdgeInsetsGeometry? padding,
ShapeBorder? shape,
bool? alignedDropdown,
Color? buttonColor,
Color? disabledColor,
Color? focusColor,
Color? hoverColor,
Color? highlightColor,
Color? splashColor,
ColorScheme? colorScheme,
MaterialTapTargetSize? materialTapTargetSize,
}) {
return ButtonThemeData(
textTheme: textTheme ?? this.textTheme,
layoutBehavior: layoutBehavior ?? this.layoutBehavior,
minWidth: minWidth ?? this.minWidth,
height: height ?? this.height,
padding: padding ?? this.padding,
shape: shape ?? this.shape,
alignedDropdown: alignedDropdown ?? this.alignedDropdown,
buttonColor: buttonColor ?? _buttonColor,
disabledColor: disabledColor ?? _disabledColor,
focusColor: focusColor ?? _focusColor,
hoverColor: hoverColor ?? _hoverColor,
highlightColor: highlightColor ?? _highlightColor,
splashColor: splashColor ?? _splashColor,
colorScheme: colorScheme ?? this.colorScheme,
materialTapTargetSize: materialTapTargetSize ?? _materialTapTargetSize,
);
}