BsDropdown constructor

const BsDropdown({
  1. Key? key,
  2. String? label,
  3. Widget? toggle,
  4. Widget toggleBuilder(
    1. BuildContext context,
    2. VoidCallback toggleMenu,
    3. bool isOpen
    )?,
  5. required BsDropdownMenu menu,
  6. BsDropdownDirection direction = .down,
  7. BsDropdownAlignment alignment = .start,
  8. BsDropdownAutoClose autoClose = .always,
  9. BsButtonVariant toggleVariant = .primary,
  10. BsButtonSize toggleSize = .md,
  11. bool showCaret = true,
  12. bool disabled = false,
  13. bool outline = false,
})

Creates a BsDropdown widget.

Implementation

const BsDropdown({
  super.key,
  this.label,
  this.toggle,
  this.toggleBuilder,
  required this.menu,
  this.direction = .down,
  this.alignment = .start,
  this.autoClose = .always,
  this.toggleVariant = .primary,
  this.toggleSize = .md,
  this.showCaret = true,
  this.disabled = false,
  this.outline = false,
}) : assert(toggle != null || toggleBuilder != null || label != null,
          'Either toggle, toggleBuilder, or label must be provided');