FilledButton.tonal constructor

const FilledButton.tonal(
  1. {Key? key,
  2. required VoidCallback? onPressed,
  3. VoidCallback? onLongPress,
  4. ValueChanged<bool>? onHover,
  5. ValueChanged<bool>? onFocusChange,
  6. ButtonStyle? style,
  7. FocusNode? focusNode,
  8. bool autofocus = false,
  9. Clip clipBehavior = Clip.none,
  10. MaterialStatesController? statesController,
  11. required Widget? child}
)

Create a tonal variant of FilledButton.

A filled tonal button is an alternative middle ground between FilledButton and OutlinedButton. They’re useful in contexts where a lower-priority button requires slightly more emphasis than an outline would give, such as "Next" in an onboarding flow.

Implementation

const FilledButton.tonal({
  super.key,
  required super.onPressed,
  super.onLongPress,
  super.onHover,
  super.onFocusChange,
  super.style,
  super.focusNode,
  super.autofocus = false,
  super.clipBehavior = Clip.none,
  super.statesController,
  required super.child,
}) : _variant = _FilledButtonVariant.tonal;