FloatyActionButton constructor

FloatyActionButton({
  1. required Widget icon,
  2. required VoidCallback onTap,
  3. double? size = 50,
  4. Color? backgroundColor,
  5. Color? foregroundColor,
  6. double? elevation,
})

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.elevation,
});