MihrButtonBase constructor

const MihrButtonBase({
  1. required VoidCallback? onPressed,
  2. required Widget child,
  3. Key? key,
  4. VoidCallback? onLongPress,
  5. ValueChanged<bool>? onHover,
  6. ValueChanged<bool>? onFocusChange,
  7. ButtonStyle? style,
  8. ButtonStyle styleBuilder(
    1. ButtonStyle resolved
    )?,
  9. FocusNode? focusNode,
  10. bool autofocus = false,
  11. WidgetStatesController? statesController,
  12. Widget? leadingIcon,
  13. Widget? trailingIcon,
  14. String? tooltip,
})

Creates a Mihr button with the given callbacks and content.

Implementation

const MihrButtonBase({
  required this.onPressed,
  required this.child,
  super.key,
  this.onLongPress,
  this.onHover,
  this.onFocusChange,
  this.style,
  this.styleBuilder,
  this.focusNode,
  this.autofocus = false,
  this.statesController,
  this.leadingIcon,
  this.trailingIcon,
  this.tooltip,
}) : assert(
        style == null || styleBuilder == null,
        'Cannot set both style and styleBuilder on a Mihr button.',
      );