CustomPicker constructor

const CustomPicker({
  1. Key? key,
  2. required List<int> selected,
  3. required ValueChanged<List<int>> onChanged,
  4. ValueChanged<List<int>>? handleChange,
  5. VoidCallback? onCancel,
  6. double verticalOffset = 0,
  7. bool below = true,
  8. required List<List> list,
  9. List<bool>? optionLoop,
  10. EdgeInsetsGeometry contentPadding = const EdgeInsets.all(0),
  11. double popupHeight = 400,
  12. Color divColor = const Color(0xFFB9B6B6),
  13. List<int>? wtList,
  14. BoxDecoration widDecoration = const BoxDecoration(),
  15. List<BoxDecoration> childDecoration = const [],
  16. double widHeight = 40,
  17. bool yesNo = false,
  18. EdgeInsets? popUpMargin,
  19. Color? popUpSelColor,
  20. Decoration? popUpDecoration,
  21. List<TextStyle>? popUpTextStyle,
  22. List<TextStyle>? widTextStyle,
})

Implementation

const CustomPicker({
  Key? key,
  required this.selected,
  required this.onChanged,
  this.handleChange,
  this.onCancel,
  this.verticalOffset = 0,
  this.below = true,
  required this.list,
  this.optionLoop,
  this.contentPadding = const EdgeInsets.all(0),
  this.popupHeight = 400,
  this.divColor = const Color(0xFFB9B6B6),
  this.wtList,
  this.widDecoration = const BoxDecoration(),
  this.childDecoration = const [],
  this.widHeight = 40,
  this.yesNo = false,
  this.popUpMargin,
  this.popUpSelColor,
  this.popUpDecoration,
  this.popUpTextStyle,
  this.widTextStyle,
}) : assert((list.length == selected.length &&
              selected.length == childDecoration.length) ||
          (list.length == selected.length &&
              (childDecoration == null || childDecoration.length == 0)));