M3EButtonGroup constructor

const M3EButtonGroup({
  1. Key? key,
  2. required List<M3EButtonGroupAction> actions,
  3. M3EButtonGroupType type = M3EButtonGroupType.standard,
  4. M3EButtonShape shape = M3EButtonShape.round,
  5. M3EButtonSize size = M3EButtonSize.sm,
  6. M3EButtonStyle style = M3EButtonStyle.filled,
  7. M3EButtonGroupDensity density = M3EButtonGroupDensity.regular,
  8. double? spacing,
  9. Axis direction = Axis.horizontal,
  10. int? selectedIndex,
  11. Set<int>? selectedIndices,
  12. ValueChanged<int?>? onSelectedIndexChanged,
  13. ValueChanged<Set<int>>? onSelectedIndicesChanged,
  14. bool multiSelect = false,
  15. bool selectionRequired = false,
  16. bool neighborSquish = true,
  17. double expandedRatio = 0.15,
  18. M3EHapticFeedback haptic = M3EHapticFeedback.none,
  19. bool enableFeedback = true,
  20. M3EButtonDecoration? decoration,
  21. String? semanticLabel,
  22. Clip clipBehavior = Clip.none,
  23. M3EButtonGroupOverflow overflow = M3EButtonGroupOverflow.scroll,
  24. Widget? overflowIcon,
  25. M3EOverflowPopupDecoration overflowPopupDecoration = const M3EOverflowPopupDecoration(),
  26. M3EOverflowBottomSheetDecoration overflowBottomSheetDecoration = const M3EOverflowBottomSheetDecoration(),
  27. M3EButtonGroupOverflowMenuStyle overflowMenuStyle = M3EButtonGroupOverflowMenuStyle.popup,
  28. M3EOverflowStrategy? overflowStrategy,
})

Creates a button group.

Implementation

const M3EButtonGroup({
  super.key,
  required this.actions,
  this.type = M3EButtonGroupType.standard,
  this.shape = M3EButtonShape.round,
  this.size = M3EButtonSize.sm,
  this.style = M3EButtonStyle.filled,
  this.density = M3EButtonGroupDensity.regular,
  this.spacing,
  this.direction = Axis.horizontal,
  this.selectedIndex,
  this.selectedIndices,
  this.onSelectedIndexChanged,
  this.onSelectedIndicesChanged,
  this.multiSelect = false,
  this.selectionRequired = false,
  this.neighborSquish = true,
  this.expandedRatio = 0.15,
  this.haptic = M3EHapticFeedback.none,
  this.enableFeedback = true,
  this.decoration,
  this.semanticLabel,
  this.clipBehavior = Clip.none,
  this.overflow = M3EButtonGroupOverflow.scroll,
  this.overflowIcon,
  this.overflowPopupDecoration = const M3EOverflowPopupDecoration(),
  this.overflowBottomSheetDecoration =
      const M3EOverflowBottomSheetDecoration(),
  this.overflowMenuStyle = M3EButtonGroupOverflowMenuStyle.popup,
  this.overflowStrategy,
});