FlAssetsPicker class abstract

Inheritance
Implementers

Constructors

FlAssetsPicker({Key? key, FlAssetFileRenovate? renovate, required int maxVideoCount, required int maxCount, required List<PickerFromTypeConfig> fromRequestTypes, bool enablePicker = true, PickerErrorCallback? errorCallback, PickerFromTypeBuilder? fromTypesBuilder, CameraPickerPageRoute<AssetEntity> pageRouteBuilderForCameraPicker(Widget picker)?, AssetPickerPageRouteBuilder<List<AssetEntity>>? pageRouteBuilderForAssetPicker, FlAssetsPickerCheckPermission? checkPermission})
const

Properties

checkPermission FlAssetsPickerCheckPermission?
获取权限
final
enablePicker bool
是否开启 资源选择
final
errorCallback PickerErrorCallback?
错误消息回调
final
fromRequestTypes List<PickerFromTypeConfig>
请求类型
final
fromTypesBuilder PickerFromTypeBuilder?
选择框 自定义
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxCount int
最多选择几个资源
final
maxVideoCount int
最大选择视频数量
final
pageRouteBuilderForAssetPicker AssetPickerPageRouteBuilder<List<AssetEntity>>?
final
pageRouteBuilderForCameraPicker CameraPickerPageRoute<AssetEntity> Function(Widget picker)?
final
renovate FlAssetFileRenovate?
资源重新编辑
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useRootNavigator bool
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
Creates the mutable state for this widget at a given location in the tree.
inherited
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}) 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

Static Methods

showPickerAssets(BuildContext context, {bool useRootNavigator = true, bool mounted = true, FlAssetsPickerCheckPermission? checkPermission, Key? key, AssetPickerConfig pickerConfig = const AssetPickerConfig(), AssetPickerPageRouteBuilder<List<AssetEntity>>? pageRouteBuilder}) Future<List<AssetEntity>?>
选择图片
showPickerAssetsWithDelegate<Asset, Path, PickerProvider extends AssetPickerProvider<Asset, Path>>(BuildContext context, {Key? key, bool mounted = true, FlAssetsPickerCheckPermission? checkPermission, required AssetPickerBuilderDelegate<Asset, Path> delegate, bool useRootNavigator = true, AssetPickerPageRouteBuilder<List<Asset>>? pageRouteBuilder}) Future<List<Asset>?>
选择图片
showPickerFromCamera(BuildContext context, {bool useRootNavigator = true, bool mounted = true, FlAssetsPickerCheckPermission? checkPermission, CameraPickerConfig pickerConfig = const CameraPickerConfig(), CameraPickerPageRoute<AssetEntity> pageRouteBuilder(Widget picker)?}) Future<AssetEntity?>
通过相机拍照
showPickerFromType(BuildContext context, List<PickerFromTypeConfig> fromTypes, {PickerFromTypeBuilder? fromTypesBuilder}) Future<PickerFromTypeConfig?>
show 选择弹窗
showPickerWithFormType(BuildContext context, {bool mounted = true, List<PickerFromTypeConfig> fromTypes = const [PickerFromTypeConfig(fromType: PickerFromType.assets, text: Text('图库选择'), requestType: RequestType.image), PickerFromTypeConfig(fromType: PickerFromType.camera, text: Text('相机拍摄'), requestType: RequestType.image), PickerFromTypeConfig(fromType: PickerFromType.cancel, text: Text('取消', style: TextStyle(color: Colors.red)))], PickerFromTypeBuilder? fromTypesBuilder, PickerFromType? pickerFromType, FlAssetsPickerCheckPermission? checkPermission, AssetPickerConfig? assetPickerConfig, AssetPickerPageRouteBuilder<List<AssetEntity>>? pageRouteBuilderForAssetPicker, CameraPickerConfig? cameraPickerConfig, CameraPickerPageRoute<AssetEntity> pageRouteBuilderForCameraPicker(Widget picker)?, FlAssetsPickerErrorCallback? errorCallback, FlAssetFileRenovate? renovate, int maxBytes = 167772160}) Future<ExtendedAssetEntity?>
选择图片或者视频