LiteFilePicker class

Inheritance

Constructors

LiteFilePicker({required String name, Key? key, AutovalidateMode? autovalidateMode, int maxFiles = 1, ViewBuilder? viewBuilder, LiteFormValueSerializer? initialValueDeserializer, Object? initialValue, LiteFormValueSerializer serializer = nonConvertingValueConvertor, List<LiteValidator>? validators, String? hintText, String? label, LiteDropSelectorViewType dropSelectorType = LiteDropSelectorViewType.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, DropSelectorItemIconBuilder? menuItemBuilder, EdgeInsets? smoothErrorPadding = const EdgeInsets.only(top: 6.0), double imageSpacing = 1.0, double menuButtonHeight = 54.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})

Properties

allowedExtensions → List<String>?
allowedExtensions files extensions accepted by file picker this will make sense only if you add FileSource.fileExplorer to sources
final
allowImages → bool
allowImages if false, and allowVideo is true, it will allow only videos to be attached from gallery
final
allowVideo → bool
allowVideo if true and sources contains FileSource.gallery select videos
final
aspectRatio → double?
final
autovalidateMode → AutovalidateMode?
final
constraints → BoxConstraints?
final
decoration → BoxDecoration?
final
dropSelectorType → LiteDropSelectorViewType
final
errorStyle → TextStyle?
final
focusNode → FocusNode?
final
hashCode → int
The hash code for this object.
no setterinherited
height → double
final
hintText → String?
final
imageQuality → int?
final
imageSpacing → double
imageSpacing the gap size between images in a multiselector
final
initialValue → Object?
final
initialValueDeserializer → LiteFormValueSerializer?
Allows you to convert initial value to a proper data type or format before using it. E.g. you have a iso8601 format but you need to have a DateTime object to work with in a date picker. Use initialValueDeserializer to convert iso8601 value to a DateTime like so: initialValueDeserializer: (value) => DateTime.parse(value); and you will get a DateTime as an initial value. You can use any custom conversions you want
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label → String?
final
margin → EdgeInsets?
final
maxFiles → int
maxFiles the maximum number of image a user can attach
final
maxHeight → double?
final
maxWidth → double?
final
final
final
name → String
final
paddingBottom → double
final
paddingLeft → double
final
paddingRight → double
final
paddingTop → double
final
preferredCameraDevice → CameraDevice
preferredCameraDevice makes sense if you pass ImageSource.camera in the list of sources and the camera is supported by your device
final
requestFullMetadata → bool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serializer → LiteFormValueSerializer
Allows you to prepare the data for some general usage like sending it to an api endpoint. E.g. you have a Date Picker which returns a DateTime object but you need to send it to a backend in a iso8601 string format. Just pass the serializer like this: serializer: (value) => value.toIso8601String() And it will always store this date as a string in a form map which you can easily send wherever you need
final
smoothErrorPadding → EdgeInsets?
final
sources → List<FileSource>
final
validators → List<LiteValidator>?
final
viewBuilder → ViewBuilder?
viewBuilder builds a completely custom view for the image picker
final
width → double
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<LiteFilePicker>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited