CustomSelector constructor

const CustomSelector({
  1. Key? key,
  2. required Future future,
  3. Widget? leading,
  4. required ValueSetter onSelect,
  5. required String label,
  6. bool showUpperLabel = true,
  7. bool showValueOnSide = true,
  8. double fontSize = 16,
  9. double valueFontSize = 14,
  10. double headerFontSize = 18,
  11. double listItemFontSize = 16,
  12. required String itemDisplayProperty(
    1. dynamic
    ),
  13. String itemImageProperty(
    1. dynamic
    )?,
  14. Color? labelColor,
  15. bool imageHasTint = false,
  16. Color? headerStartColor,
  17. Color? headerEndColor,
  18. Color? primaryColor,
  19. Color? headerTitleColor,
  20. Color? backgroundColor,
  21. Color? bottomsheetBackground,
  22. Color? borderColor,
  23. double? borderRadius,
  24. Color? dividerColor,
  25. Widget? header,
  26. VoidCallback? onAdd,
  27. double marginBottom = SizeConfig.sidePadding,
  28. dynamic defaultItem,
})

Implementation

const CustomSelector({
  super.key,
  required this.future,
  this.leading,
  required this.onSelect,
  required this.label,
  this.showUpperLabel = true,
  this.showValueOnSide = true,
  this.fontSize = 16,
  this.valueFontSize = 14,
  this.headerFontSize = 18,
  this.listItemFontSize = 16,
  required this.itemDisplayProperty,
  this.itemImageProperty,
  this.labelColor, // Now nullable
  this.imageHasTint = false,
  this.headerStartColor, // Now nullable
  this.headerEndColor, // Now nullable
  this.primaryColor, // Now nullable
  this.headerTitleColor, // Now nullable
  this.backgroundColor, // Now nullable
  this.bottomsheetBackground, // Now nullable
  this.borderColor, // Now nullable
  this.borderRadius,
  this.dividerColor, // Now nullable
  this.header,
  this.onAdd,
  this.marginBottom = SizeConfig.sidePadding,
  this.defaultItem,
});