FButton.icon constructor

FButton.icon({
  1. required VoidCallback? onPress,
  2. required Widget child,
  3. FBaseButtonStyle style = Variant.outline,
  4. VoidCallback? onLongPress,
  5. bool autofocus = false,
  6. FocusNode? focusNode,
  7. ValueChanged<bool>? onFocusChange,
  8. ValueChanged<bool>? onHoverChange,
  9. ValueChanged<Set<WidgetState>>? onStateChange,
  10. bool selected = false,
  11. Key? key,
})

Creates a FButton that contains only an icon.

child is wrapped in IconThemeData.

Implementation

FButton.icon({
  required this.onPress,
  required Widget child,
  this.style = Variant.outline,
  this.onLongPress,
  this.autofocus = false,
  this.focusNode,
  this.onFocusChange,
  this.onHoverChange,
  this.onStateChange,
  this.selected = false,
  super.key,
}) : child = IconContent(child: child);