CustomSingleSearchSelect<T> constructor

CustomSingleSearchSelect<T>({
  1. Key? key,
  2. required List<T> items,
  3. required String title,
  4. required void onSelect(
    1. dynamic value
    ),
  5. double? dialogWidth,
  6. double? dialogHeight,
  7. InputDecoration? decoration,
  8. InputDecoration? searchDecoration,
  9. T? valueSelected,
  10. Color selectedItemColor = Colors.redAccent,
  11. String? cancelText,
  12. Color? cancelBackgroundColor,
  13. TextStyle? cancelTextStyle,
  14. TextStyle? titleTextStyle,
  15. Color? itemBackgroundColor,
  16. Color? titleBackgroundColor,
  17. Color? separatorColor,
  18. double? separatorHeight,
  19. TextStyle? itemTextStyle,
  20. TextStyle? searchStyle,
  21. bool? isBarrierDismissible,
  22. TextStyle? selectedItemTextStyle,
})

Implementation

CustomSingleSearchSelect(
    {super.key,
    required this.items,
    required this.title,
    required this.onSelect,
    this.dialogWidth,
    this.dialogHeight,
    this.decoration,
    this.searchDecoration,
    this.valueSelected,
    this.selectedItemColor = Colors.redAccent,
    this.cancelText,
    this.cancelBackgroundColor,
    this.cancelTextStyle,
    this.titleTextStyle,
    this.itemBackgroundColor,
    this.titleBackgroundColor,
    this.separatorColor,
    this.separatorHeight,
    this.itemTextStyle,
    this.searchStyle,
    this.isBarrierDismissible,
    this.selectedItemTextStyle})
    : super(
          initialValue: valueSelected,
          builder: (FormFieldState<T> state) {
            CustomSingleSearchSelectView<T> field =
                CustomSingleSearchSelectView<T>(
              title: title,
              items: items,
              width: dialogWidth,
              height: dialogHeight,
              onSelect: onSelect,
              decoration: decoration,
              searchDecoration: searchDecoration,
              initialValue: valueSelected,
              selectedItemColor: selectedItemColor,
              cancelText: cancelText,
              cancelBackgroundColor: cancelBackgroundColor,
              cancelTextStyle: cancelTextStyle,
              titleTextStyle: titleTextStyle,
              itemBackgroundColor: itemBackgroundColor,
              titleBackgroundColor: titleBackgroundColor,
              separatorColor: separatorColor,
              separatorHeight: separatorHeight,
              itemTextStyle: itemTextStyle,
              searchStyle: searchStyle,
              isBarrierDismissible: isBarrierDismissible!,
              selectedItemTextStyle: selectedItemTextStyle,
              state: state,
            );
            return CustomSingleSearchSelectView<T>._withState(field, state);
          });