Button.outline constructor

const Button.outline({
  1. Key? key,
  2. WidgetStatesController? statesController,
  3. Widget? leading,
  4. Widget? trailing,
  5. double? leadingGap,
  6. double? trailingGap,
  7. required Widget child,
  8. VoidCallback? onPressed,
  9. FocusNode? focusNode,
  10. AlignmentGeometry? alignment,
  11. bool? enabled,
  12. AbstractButtonStyle style = ButtonVariance.outline,
  13. bool disableTransition = false,
  14. ValueChanged<bool>? onFocus,
  15. ValueChanged<bool>? onHover,
  16. bool disableHoverEffect = false,
  17. bool? enableFeedback,
  18. GestureTapDownCallback? onTapDown,
  19. GestureTapUpCallback? onTapUp,
  20. GestureTapCancelCallback? onTapCancel,
  21. GestureTapDownCallback? onSecondaryTapDown,
  22. GestureTapUpCallback? onSecondaryTapUp,
  23. GestureTapCancelCallback? onSecondaryTapCancel,
  24. GestureTapDownCallback? onTertiaryTapDown,
  25. GestureTapUpCallback? onTertiaryTapUp,
  26. GestureTapCancelCallback? onTertiaryTapCancel,
  27. GestureLongPressStartCallback? onLongPressStart,
  28. GestureLongPressUpCallback? onLongPressUp,
  29. GestureLongPressMoveUpdateCallback? onLongPressMoveUpdate,
  30. GestureLongPressEndCallback? onLongPressEnd,
  31. GestureLongPressUpCallback? onSecondaryLongPress,
  32. GestureLongPressUpCallback? onTertiaryLongPress,
  33. AlignmentGeometry? marginAlignment,
  34. bool disableFocusOutline = false,
})

Creates an outline button with a border and transparent background.

Outline buttons feature a visible border and transparent background, providing a minimal yet distinct appearance. They're ideal for secondary actions that need to stand out more than ghost buttons but less than filled buttons. The outline style works well in layouts where visual hierarchy matters.

Example:

Button.outline(
  onPressed: () => showMore(),
  child: Text('Learn More'),
);

Implementation

const Button.outline({
  super.key,
  this.statesController,
  this.leading,
  this.trailing,
  this.leadingGap,
  this.trailingGap,
  required this.child,
  this.onPressed,
  this.focusNode,
  this.alignment,
  this.enabled,
  this.style = ButtonVariance.outline,
  this.disableTransition = false,
  this.onFocus,
  this.onHover,
  this.disableHoverEffect = false,
  this.enableFeedback,
  this.onTapDown,
  this.onTapUp,
  this.onTapCancel,
  this.onSecondaryTapDown,
  this.onSecondaryTapUp,
  this.onSecondaryTapCancel,
  this.onTertiaryTapDown,
  this.onTertiaryTapUp,
  this.onTertiaryTapCancel,
  this.onLongPressStart,
  this.onLongPressUp,
  this.onLongPressMoveUpdate,
  this.onLongPressEnd,
  this.onSecondaryLongPress,
  this.onTertiaryLongPress,
  this.marginAlignment,
  this.disableFocusOutline = false,
});