ButtonStyle.from constructor
ButtonStyle.from({
- Color? foregroundColor,
- Color? disabledForegroundColor,
- Color? backgroundColor,
- Color? disabledBackgroundColor,
- TextStyle? textStyle,
- OutlinedBorder? shape,
- EdgeInsetsGeometry? padding,
- Size? minimumSize,
- Size? fixedSize,
- Size? maximumSize,
- double? iconSize,
- VisualDensity? visualDensity,
- TapTargetSize? tapTargetSize,
- ButtonLayerBuilder? backgroundBuilder,
- PressLook? pressLook,
- bool? ringStandsOff,
Leaves an unset disabled color to the theme and the defaults.
Implementation
factory ButtonStyle.from({
Color? foregroundColor,
Color? disabledForegroundColor,
Color? backgroundColor,
Color? disabledBackgroundColor,
TextStyle? textStyle,
OutlinedBorder? shape,
EdgeInsetsGeometry? padding,
Size? minimumSize,
Size? fixedSize,
Size? maximumSize,
double? iconSize,
VisualDensity? visualDensity,
TapTargetSize? tapTargetSize,
ButtonLayerBuilder? backgroundBuilder,
PressLook? pressLook,
bool? ringStandsOff,
}) => ButtonStyle(
foregroundColor: _byEnabled(foregroundColor, disabledForegroundColor),
backgroundColor: _byEnabled(backgroundColor, disabledBackgroundColor),
textStyle: textStyle,
shape: shape,
padding: padding,
minimumSize: minimumSize,
fixedSize: fixedSize,
maximumSize: maximumSize,
iconSize: iconSize,
visualDensity: visualDensity,
tapTargetSize: tapTargetSize,
backgroundBuilder: backgroundBuilder,
pressLook: pressLook,
ringStandsOff: ringStandsOff,
);