DropdownFormFieldCustom<T> constructor
const
DropdownFormFieldCustom<T> ({
- Key? key,
- required List<
T?> items, - required Widget itemBuilder(
- T? item
- VoidCallback? onTapItem,
- void onTapDropdown(
- List<
T?> items
- List<
- void onLongpressDropdown(
- List<
T?> items
- List<
- AutovalidateMode? autoValidateMode,
- T? selectedItem,
- String? validator(
- T? value
- void onChanged(
- T? value
- void onSaved(
- T? value
- bool isExpanded = true,
- Widget selectedItemBuilder(
- BuildContext context,
- T? value
- TextStyle? textStyle,
- TextStyle? labelTextStyle,
- double? itemHeight,
- String labelText = 'Label Text',
- String hintText = 'Hint Text',
- String? prefixText,
- String? suffixText,
- EdgeInsetsGeometry? padding,
- Widget? hint,
- Widget? suffixIcon,
- Widget? prefixIcon,
- BorderType borderType = BorderType.outline,
- BorderSide borderSide = const BorderSide(),
- BorderRadius borderRadius = const BorderRadius.only(topLeft: Radius.circular(4.0), topRight: Radius.circular(4.0), bottomLeft: Radius.circular(4.0), bottomRight: Radius.circular(4.0)),
- Color? borderColor,
Implementation
const DropdownFormFieldCustom({
Key? key,
required this.items,
required this.itemBuilder,
this.onTapItem,
this.onTapDropdown,
this.onLongpressDropdown,
this.autoValidateMode,
this.selectedItem,
this.validator,
this.onChanged,
this.onSaved,
this.isExpanded = true,
this.selectedItemBuilder,
this.textStyle,
this.labelTextStyle,
this.itemHeight,
this.labelText = 'Label Text',
this.hintText = 'Hint Text',
this.prefixText,
this.suffixText,
this.padding,
this.hint,
this.suffixIcon,
this.prefixIcon,
this.borderType = BorderType.outline,
this.borderSide = const BorderSide(),
this.borderRadius = const BorderRadius.only(
topLeft: Radius.circular(4.0),
topRight: Radius.circular(4.0),
bottomLeft: Radius.circular(4.0),
bottomRight: Radius.circular(4.0),
),
this.borderColor,
}) : super(key: key);