InputField<T> constructor

const InputField<T>(
  1. {Key key,
  2. bool autosave,
  3. bool autovalidate,
  4. InputDecoration decoration,
  5. bool enabled,
  6. T initialValue,
  7. Map<String, dynamic> map,
  8. ValueSetter<T> onChanged,
  9. ValueSetter<T> onSaved,
  10. String path,
  11. List<InputValidator> validators,
  12. bool wantKeepAlive: false}
)

Creates a single form field.

The builder argument must not be null.

Implementation

const InputField({
  Key key,
  this.autosave,
  this.autovalidate,
  this.decoration,
  this.enabled,
  this.initialValue,
  this.map,
  this.onChanged,
  this.onSaved,
  this.path,
  this.validators,
  this.wantKeepAlive = false,
})  : assert(
          (path != null) ||
              (onChanged != null) ||
              (onSaved != null) ||
              ((enabled != null) && (enabled == false)),
          'If path is null then onChanged is required'
          ' or the field must always be disabled'),
      assert(wantKeepAlive != null),
      super(key: key);