GSField.checkList constructor

GSField.checkList({
  1. Key? key,
  2. required String tag,
  3. required bool searchable,
  4. required List<CheckDataModel> items,
  5. required ValueChanged<CheckDataModel> callBack,
  6. RequiredCheckListEnum? requiredCheckListEnum,
  7. String? title,
  8. String? errorMessage,
  9. String? helpMessage,
  10. Widget? prefixWidget,
  11. bool? showTitle,
  12. GSFieldStatusEnum? status,
  13. int? weight,
  14. RegExp? validateRegEx,
  15. String? hint,
  16. Axis? scrollDirection,
  17. Widget? selectedIcon,
  18. Widget? unSelectedIcon,
  19. bool? scrollable,
  20. double? height,
  21. bool? showScrollBar,
  22. Color? scrollBarColor,
  23. String? searchHint,
  24. Icon? searchIcon,
  25. BoxDecoration? searchBoxDecoration,
})

Implementation

GSField.checkList({
  Key? key,
  required String tag,
  required bool searchable,
  required List<CheckDataModel> items,
  required ValueChanged<CheckDataModel> callBack,
  RequiredCheckListEnum? requiredCheckListEnum,
  String? title,
  String? errorMessage,
  String? helpMessage,
  Widget? prefixWidget,
  bool? showTitle,
  GSFieldStatusEnum? status,
  int? weight,
  RegExp? validateRegEx,
  String? hint,
  Axis? scrollDirection,
  Widget? selectedIcon,
  Widget? unSelectedIcon,
  bool? scrollable,
  double? height,
  bool? showScrollBar,
  Color? scrollBarColor,
  String? searchHint,
  Icon? searchIcon,
  BoxDecoration? searchBoxDecoration,
}) : super(key: key) {
  bool isRequired = false;
  if (requiredCheckListEnum != null && requiredCheckListEnum != RequiredCheckListEnum.none) {
    isRequired = true;
  }
  model = GSCheckBoxModel(
      type: GSFieldTypeEnum.checkList,
      tag: tag,
      showTitle: showTitle ?? true,
      title: title,
      errorMessage: errorMessage,
      helpMessage: helpMessage,
      required: isRequired,
      status: status,
      weight: weight,
      showScrollBar: showScrollBar,
      scrollBarColor: scrollBarColor,
      hint: hint,
      items: items,
      callBack: callBack,
      scrollDirection: scrollDirection,
      unSelectedIcon: unSelectedIcon,
      selectedIcon: selectedIcon,
      scrollable: scrollable ?? false,
      height: height,
      searchable: searchable,
      searchHint: searchHint,
      searchIcon: searchIcon,
      searchBoxDecoration: searchBoxDecoration,
      requiredCheckListEnum: requiredCheckListEnum);
}