StandardDurationField constructor

const StandardDurationField({
  1. Key? key,
  2. String inputFormat = 'HH:MM',
  3. dynamic onChanged(
    1. Duration value
    )?,
  4. Duration? initialValue,
  5. String? initialStringValue,
  6. dynamic onStringChanged(
    1. String value
    )?,
  7. FormFieldValidator<String>? validator,
  8. bool showLabelText = true,
  9. dynamic onEditingComplete()?,
  10. dynamic onFocusLost()?,
  11. bool enabled = true,
  12. bool autofocus = false,
  13. String? labelText,
  14. GestureTapCallback? onTap,
  15. Iterable<String>? autofillHints,
  16. InputDecoration? decoration,
  17. TextStyle? style,
  18. TextStyle? labelStyle,
  19. bool autoValidate = false,
})

Implementation

const StandardDurationField({
  super.key,
  this.inputFormat = 'HH:MM',
  this.onChanged,
  this.initialValue,
  this.initialStringValue,
  this.onStringChanged,
  this.validator,
  this.showLabelText = true,
  this.onEditingComplete,
  this.onFocusLost,
  this.enabled = true,
  this.autofocus = false,
  this.labelText,
  this.onTap,
  this.autofillHints,
  this.decoration,
  this.style,
  this.labelStyle,
  this.autoValidate = false,
}) : assert(((initialValue != null &&
              initialStringValue == null &&
              onChanged != null &&
              onStringChanged == null) ||
          (initialValue == null &&
              initialStringValue != null &&
              onChanged == null &&
              onStringChanged != null)));