ButtonThemeData.standard constructor
ButtonThemeData.standard(
- ThemeData style
Implementation
factory ButtonThemeData.standard(ThemeData style) {
return ButtonThemeData(
animationDuration: style.fastAnimationDuration,
animationCurve: style.animationCurve,
cursor: style.inputMouseCursor,
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 8),
margin: EdgeInsets.all(4),
decoration: (state) => BoxDecoration(
borderRadius: BorderRadius.circular(2),
color: buttonColor(style, state),
),
scaleFactor: 0.95,
textStyle: (state) =>
style.typography.body?.copyWith(
color: state.isDisabled ? Colors.grey[100] : null,
) ??
TextStyle(),
);
}