FButton.icon constructor

FButton.icon({
  1. required VoidCallback? onPress,
  2. required Widget child,
  3. FButtonStyle style = Variant.outline,
  4. VoidCallback? onLongPress,
  5. bool autofocus = false,
  6. FocusNode? focusNode,
  7. ValueChanged<bool>? onFocusChange,
  8. Key? key,
})

Creates a FButton that contains only an icon.

child is wrapped in FIconStyle, and therefore works with FIcons.

Implementation

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