FloatyActionButton constructor

FloatyActionButton({
  1. required Widget icon,
  2. required VoidCallback onTap,
  3. double? size = 50,
  4. Color? backgroundColor,
  5. Color? foregroundColor,
  6. Object? heroTag,
  7. String? tooltip,
  8. Color? focusColor,
  9. Color? hoverColor,
  10. Color? splashColor,
  11. MouseCursor? mouseCursor,
  12. bool mini = false,
  13. ShapeBorder? shape,
  14. Clip clipBehavior = Clip.none,
  15. bool isExtended = false,
  16. FocusNode? focusNode,
  17. bool autofocus = false,
  18. MaterialTapTargetSize? materialTapTargetSize,
  19. bool? enableFeedback,
  20. double? extendedIconLabelSpacing,
  21. EdgeInsetsGeometry? extendedPadding,
  22. TextStyle? extendedTextStyle,
})

Creates a FloatyActionButton with the given widget, onTap, and optional customization options for size, background color, and foreground color.

The icon can be any widget (such as Icon or Text) to provide flexibility.

Implementation

FloatyActionButton({
  required this.icon,
  required this.onTap,
  this.size = 50,
  this.backgroundColor,
  this.foregroundColor,
  this.heroTag,
  this.tooltip,
  this.focusColor,
  this.hoverColor,
  this.splashColor,
  this.mouseCursor,
  this.mini = false,
  this.shape,
  this.clipBehavior = Clip.none,
  this.isExtended = false,
  this.focusNode,
  this.autofocus = false,
  this.materialTapTargetSize,
  this.enableFeedback,
  this.extendedIconLabelSpacing,
  this.extendedPadding,
  this.extendedTextStyle,
});