AsyncDropDownFieldState<T> constructor

AsyncDropDownFieldState<T>(
  1. T value, {
  2. required Future<List<DropDownItemState<T>>> items,
  3. required String label,
  4. String? error,
  5. List<ValidationRule<T>> rules = const [],
})

Creates a new instance of AsyncDropDownFieldState.

  • value The initial value of the dropdown field (selected item).
  • items The list of individual item states within the dropdown (required).
  • label The label or name of the dropdown form field (required).
  • rules The list of validation rules to apply to the dropdown field (default is an empty list).

Implementation

AsyncDropDownFieldState(
  T value, {
  required this.items,
  required String label,
  String? error,
  List<ValidationRule<T>> rules = const [],
}) : super(
        value: value,
        label: label,
        error: error,
        rules: rules,
      );