defaultStyleOf method

  1. @override
ButtonStyle defaultStyleOf(
  1. BuildContext context
)
override

Implementation

@override
ButtonStyle defaultStyleOf(BuildContext context) {
  assert(debugCheckHasFluentTheme(context));
  final theme = FluentTheme.of(context);
  return ButtonStyle(
    cursor: theme.inputMouseCursor,
    padding: ButtonState.all(const EdgeInsets.all(4.0)),
    backgroundColor: ButtonState.resolveWith((states) {
      return states.isDisabled
          ? ButtonThemeData.buttonColor(theme.brightness, states)
          : ButtonThemeData.uncheckedInputColor(theme, states);
    }),
    foregroundColor: ButtonState.resolveWith((states) {
      if (states.isDisabled) return theme.disabledColor;
    }),
    shape: ButtonState.all(RoundedRectangleBorder(
      borderRadius: BorderRadius.circular(2.0),
    )),
  );
}