filePicker<T> static method

TFormField<List<TFile>> filePicker<T>(
  1. TFieldProp<List<TFile>> prop,
  2. String? label, {
  3. String? tag,
  4. String? placeholder,
  5. String? helperText,
  6. String? info,
  7. bool isRequired = false,
  8. bool disabled = false,
  9. bool autoFocus = false,
  10. bool clearable = false,
  11. TFilePickerTheme? theme,
  12. FocusNode? focusNode,
  13. VoidCallback? onTap,
  14. List<String? Function(List<TFile>?)>? rules,
  15. bool allowMultiple = false,
  16. List<String>? allowedExtensions,
  17. TFileType fileType = TFileType.any,
  18. bool isGalleryMode = false,
})

Implementation

static TFormField<List<TFile>> filePicker<T>(
  TFieldProp<List<TFile>> prop,
  String? label, {
  String? tag,
  String? placeholder,
  String? helperText,
  String? info,
  bool isRequired = false,
  bool disabled = false,
  bool autoFocus = false,
  bool clearable = false,
  TFilePickerTheme? theme,
  FocusNode? focusNode,
  VoidCallback? onTap,
  List<String? Function(List<TFile>?)>? rules,
  bool allowMultiple = false,
  List<String>? allowedExtensions,
  TFileType fileType = TFileType.any,
  bool isGalleryMode = false,
}) {
  return TFormField<List<TFile>>(
    prop: prop,
    builder: (onValueChanged) => TFilePicker(
      label: label,
      tag: tag,
      placeholder: placeholder,
      helperText: helperText,
      info: info,
      isRequired: isRequired,
      disabled: disabled,
      autoFocus: autoFocus,
      clearable: clearable,
      theme: theme,
      focusNode: focusNode,
      onTap: onTap,
      rules: rules,
      allowMultiple: allowMultiple,
      allowedExtensions: allowedExtensions,
      fileType: fileType,
      isGalleryMode: isGalleryMode,
      value: prop.value,
      valueNotifier: prop.valueNotifier,
      onValueChanged: onValueChanged,
    ),
  );
}