LiteFilePicker constructor
LiteFilePicker({
- required String name,
- Key? key,
- AutovalidateMode? autovalidateMode,
- int maxFiles = 1,
- ViewBuilder? viewBuilder,
- LiteFormValueDeserializer? initialValueDeserializer,
- Object? initialValue,
- LiteFormValueSerializer serializer = nonConvertingValueConvertor,
- List<
LiteValidator> ? validators, - String? hintText,
- String? label,
- DropSelectorType dropSelectorType = DropSelectorType.adaptive,
- TextStyle? errorStyle,
- double paddingTop = 0.0,
- double paddingBottom = 0.0,
- double paddingLeft = 0.0,
- double paddingRight = 0.0,
- double? aspectRatio,
- BoxConstraints? constraints,
- double width = 110.0,
- double height = 70.0,
- CameraDevice preferredCameraDevice = CameraDevice.rear,
- double? maxHeight,
- double? maxWidth,
- EdgeInsets? margin,
- int? imageQuality,
- BoxDecoration? decoration,
- EdgeInsets? smoothErrorPadding = const EdgeInsets.only(top: 6.0),
- ValueChanged<
Object?> ? onChanged, - double imageSpacing = 1.0,
- bool requestFullMetadata = false,
- bool allowVideo = true,
- bool allowImages = true,
- FocusNode? focusNode,
- List<
FileSource> sources = const [FileSource.camera, FileSource.gallery, FileSource.fileExplorer], - List<
String> ? allowedExtensions, - FileType? fileType,
Implementation
LiteFilePicker({
required this.name,
Key? key,
this.autovalidateMode,
this.maxFiles = 1,
this.viewBuilder,
this.initialValueDeserializer,
this.initialValue,
this.serializer = nonConvertingValueConvertor,
this.validators,
this.hintText,
this.label,
this.dropSelectorType = DropSelectorType.adaptive,
this.errorStyle,
this.paddingTop = 0.0,
this.paddingBottom = 0.0,
this.paddingLeft = 0.0,
this.paddingRight = 0.0,
this.aspectRatio,
this.constraints,
this.width = 110.0,
this.height = 70.0,
this.preferredCameraDevice = CameraDevice.rear,
this.maxHeight,
this.maxWidth,
this.margin,
this.imageQuality,
this.decoration,
this.menuItemBuilder,
this.smoothErrorPadding = const EdgeInsets.only(
top: 6.0,
),
this.onChanged,
this.imageSpacing = 1.0,
this.menuButtonHeight = 54.0,
this.requestFullMetadata = false,
this.allowVideo = true,
this.allowImages = true,
this.focusNode,
this.sources = const [
FileSource.camera,
FileSource.gallery,
FileSource.fileExplorer,
],
this.allowedExtensions,
this.fileType,
// this.allowedExtensions = const [
// 'jpg',
// 'jpeg',
// 'pdf',
// 'doc',
// 'bmp',
// 'png',
// 'gif',
// 'mp4',
// 'mov',
// 'avi',
// 'webp',
// 'tif',
// ],
}) : assert(sources.isNotEmpty),
super(key: key ?? Key(name));