FancyFab constructor
const
FancyFab({
- Key? key,
- bool? isEnabled,
- required VoidCallback? onPressed,
- required Widget child,
- bool isLoading = false,
- Widget? loadingLabel,
- Widget? loadingIndicator,
- Color? backgroundColor,
- ShapeBorder? shape,
Creates a circular FloatingActionButton.
Use isEnabled
to avoid ternary statements for onPressed
— you can
disable the button with:
isEnabled: false
oronPressed: null
child
and isLoading
must not be null.
Implementation
const FancyFab({
Key? key,
bool? isEnabled,
required VoidCallback? onPressed,
required Widget child,
bool isLoading = false,
Widget? loadingLabel,
Widget? loadingIndicator,
this.backgroundColor,
this.shape,
}) : reverseChildren = false,
super(
key: key,
isEnabled: isEnabled,
onPressed: onPressed,
child: child,
isLoading: isLoading,
loadingIndicator: loadingIndicator,
loadingChild: loadingLabel,
);