FileInput constructor

FileInput({
  1. String? label,
  2. String? name,
  3. String? accept,
  4. bool multiple = false,
  5. bool required = false,
  6. bool disabled = false,
  7. String? error,
  8. FormErrors? errors,
  9. String? helpText,
  10. String? className,
  11. Map<String, Object?> props = const {},
  12. Map<String, Object?> inputProps = const {},
  13. Map<String, Object?> style = const {},
  14. Map<String, Object?> inputStyle = const {},
  15. DartStyle? dartStyle,
  16. void onChanged(
    1. Object event
    )?,
})

Creates a file input field.

Implementation

FileInput({
  String? label,
  String? name,
  String? accept,
  bool multiple = false,
  bool required = false,
  bool disabled = false,
  String? error,
  FormErrors? errors,
  String? helpText,
  String? className,
  Map<String, Object?> props = const {},
  Map<String, Object?> inputProps = const {},
  Map<String, Object?> style = const {},
  Map<String, Object?> inputStyle = const {},
  DartStyle? dartStyle,
  void Function(Object event)? onChanged,
}) : super(
       label: label,
       name: name,
       type: 'file',
       required: required,
       disabled: disabled,
       error: error,
       errors: errors,
       helpText: helpText,
       className: className,
       props: props,
       inputProps: {
         ...inputProps,
         if (accept != null) 'accept': accept,
         if (multiple) 'multiple': true,
       },
       style: style,
       inputStyle: inputStyle,
       dartStyle: dartStyle,
       onChanged: onChanged,
     );