GrockDirectSelectionMenu constructor

const GrockDirectSelectionMenu({
  1. Key? key,
  2. Widget? child,
  3. int? value,
  4. dynamic onChanged(
    1. int index
    )?,
  5. required List<Widget> items,
  6. IconData icon = Icons.menu,
  7. Color? backgroundColor = Colors.black,
  8. double backgroundColorOpacity = 0.4,
  9. bool isItemCenter = true,
  10. String? hintText,
  11. Color? iconColor,
  12. double? iconSize,
  13. TextStyle? valueStyle,
  14. Alignment? alignment = Alignment.bottomCenter,
  15. EdgeInsetsGeometry? padding,
  16. Color? color,
  17. Widget? centerItem,
  18. Decoration? decoration,
  19. Decoration? foregroundDecoration,
  20. double? width,
  21. double? height,
  22. BoxConstraints? constraints,
  23. EdgeInsetsGeometry? margin,
  24. double itemExtent = 50.0,
  25. double centerItemOpacity = 0.3,
  26. GrockDirectionPressStyle pressStyle = GrockDirectionPressStyle.swipe,
})

Implementation

const GrockDirectSelectionMenu({
  super.key,
  this.child,
  this.value,
  this.onChanged,
  required this.items,
  this.icon = Icons.menu,
  this.backgroundColor = Colors.black,
  this.backgroundColorOpacity = 0.4,
  this.isItemCenter = true,
  this.hintText,
  this.iconColor,
  this.iconSize,
  this.valueStyle,
  this.alignment = Alignment.bottomCenter,
  this.padding,
  this.color,
  this.centerItem,
  this.decoration,
  this.foregroundDecoration,
  this.width,
  this.height,
  this.constraints,
  this.margin,
  this.itemExtent = 50.0,
  this.centerItemOpacity = 0.3,
  this.pressStyle = GrockDirectionPressStyle.swipe,
})  : assert(backgroundColorOpacity >= 0 && backgroundColorOpacity <= 1,
          "The backgroundColorOpacity value must be at least 0, and at most 1 (backgroundColorOpacity değeri en az 0, en fazla 1 olmalıdır)"),
      assert(centerItemOpacity >= 0 && centerItemOpacity <= 1,
          "The centerItemOpacity value must be at least 0, and at most 1 (centerItemOpacity değeri en az 0, en fazla 1 olmalıdır)");