Fab constructor
const
Fab({
- Key? key,
- required Widget child,
- Widget? leading,
- VoidCallback? onPressed,
Creates a Fab widget.
The child
parameter is required and specifies the content of the button.
The onPressed
parameter is optional and specifies the callback when the button is pressed.
Example:
Fab(
child: Icon(Icons.add),
onPressed: () => print("FAB pressed"),
)
Implementation
const Fab({super.key, required this.child, this.leading, this.onPressed});