ButtonGroupItemData constructor

const ButtonGroupItemData({
  1. String? label,
  2. IconData? icon,
  3. String? iconAsset,
  4. double? iconSize,
  5. String? tooltip,
  6. VoidCallback? onPressed,
  7. bool autofocus = false,
})

Implementation

const ButtonGroupItemData({
  this.label,
  this.icon,
  this.iconAsset,
  this.iconSize,
  String? tooltip,
  this.onPressed,
  this.autofocus = false,
})  : tooltip = tooltip ?? label,
      assert(
        label != null || icon != null || iconAsset != null,
        'At least one of icon, iconAsset, or label must be specified.',
      ),
      assert(
        icon == null || iconAsset == null,
        'Only one of icon and iconAsset may be specified.',
      );