FluentButton constructor

const FluentButton({
  1. Key? key,
  2. required Widget? child,
  3. VoidCallback? onPressed,
  4. FluentButtonAppearance appearance = FluentButtonAppearance.secondary,
  5. FluentButtonSize size = FluentButtonSize.medium,
  6. FluentButtonShape shape = FluentButtonShape.rounded,
  7. FluentButtonIconPosition iconPosition = FluentButtonIconPosition.before,
  8. Widget? icon,
  9. FluentButtonStyle? style,
  10. FocusNode? focusNode,
  11. bool autofocus = false,
  12. String? semanticLabel,
})

Creates a button with an optional icon and a child label.

Implementation

const FluentButton({
  super.key,
  required this.child,
  this.onPressed,
  this.appearance = FluentButtonAppearance.secondary,
  this.size = FluentButtonSize.medium,
  this.shape = FluentButtonShape.rounded,
  this.iconPosition = FluentButtonIconPosition.before,
  this.icon,
  this.style,
  this.focusNode,
  this.autofocus = false,
  this.semanticLabel,
});