FabGroup constructor

const FabGroup({
  1. Key? key,
  2. required Widget child,
  3. Widget? leading,
  4. required List<Widget> children(
    1. BuildContext
    ),
  5. bool horizontal = false,
})

Creates a FabGroup widget.

The child parameter is required and specifies the content of the main button. The children parameter is required and provides the buttons to display when opened.

Example:

FabGroup(
  child: Icon(Icons.add),
  horizontal: true,
  children: (context) => [
    Fab(
      child: Icon(Icons.person_add),
      onPressed: () => addContact(),
    ),
    Fab(
      child: Icon(Icons.photo_camera),
      onPressed: () => takePhoto(),
    ),
  ],
)

Implementation

const FabGroup(
    {super.key,
    required this.child,
    this.leading,
    required this.children,
    this.horizontal = false});