Fab constructor
const
Fab({
- Key? key,
- required Widget child,
- Widget? leading,
- VoidCallback? onPressed,
- double threshold = 350,
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,
this.threshold = 350,
this.menu = const [],
});