MaterialButtonData constructor

const MaterialButtonData({
  1. bool isEnabled = true,
  2. VoidCallback? onPressed,
  3. VoidCallback? onLongPress,
  4. MouseCursor? mouseCursor,
  5. FocusNode? focusNode,
  6. bool autofocus = kDefaultAutofocus,
  7. Widget? child,
  8. Key? widgetKey,
  9. ValueChanged<bool>? onHover,
  10. ValueChanged<bool>? onFocusChange,
  11. ButtonStyle? style,
  12. Clip? clipBehavior,
  13. WidgetStatesController? statesController,
  14. bool? isSemanticButton,
  15. Widget? icon,
  16. Widget? label,
  17. IconAlignment? iconAlignment,
})

child and (icon, label) are mutually exclusive. They are used to indicate the calling for the different variant of the button. child is used for the normal button-constructors (useNormalConstructor). (icon, label) are used for the .icon-constructors (useNormalConstructor).
When useNormalConstructor is true, iconAlignment will be ignored. When useIconConstructor is true, mouseCursor will be ignored. isSemanticButton seems to be only available for TextButton.

Implementation

const MaterialButtonData({
  super.isEnabled,
  super.onPressed,
  super.onLongPress,
  super.mouseCursor,
  super.focusNode,
  super.autofocus,
  super.child,
  super.widgetKey,
  this.onHover,
  this.onFocusChange,
  this.style,
  this.clipBehavior,
  this.statesController,
  this.isSemanticButton,
  this.icon,
  this.label,
  this.iconAlignment,
});