defaultStyleOf method

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

Implementation

@override
ButtonStyle defaultStyleOf(BuildContext context) {
  assert(debugCheckHasFluentTheme(context));
  final theme = FluentTheme.of(context);

  final def = ButtonStyle(
    backgroundColor: ButtonState.resolveWith((states) {
      return backgroundColor(theme, states);
    }),
    foregroundColor: ButtonState.resolveWith(
      (states) => foregroundColor(theme, states),
    ),
    shape: ButtonState.resolveWith((states) {
      return shapeBorder(theme, states);
    }),
  );

  return super.defaultStyleOf(context).merge(def) ?? def;
}