FancyFab constructor

const FancyFab({
  1. Key? key,
  2. bool? isEnabled,
  3. required VoidCallback? onPressed,
  4. required Widget child,
  5. bool isLoading = false,
  6. Widget? loadingLabel,
  7. Widget? loadingIndicator,
  8. Color? backgroundColor,
  9. ShapeBorder? shape,
})

Creates a circular FloatingActionButton.

Use isEnabled to avoid ternary statements for onPressed — you can disable the button with:

  • isEnabled: false or
  • onPressed: null

child and isLoading must not be null.

Implementation

const FancyFab({
  super.key,
  super.isEnabled,
  required super.onPressed,
  required super.child,
  super.isLoading,
  Widget? loadingLabel,
  super.loadingIndicator,
  this.backgroundColor,
  this.shape,
})  : reverseChildren = false,
      super(
        loadingChild: loadingLabel,
      );