SingleAssetPicker class

Inheritance

Constructors

SingleAssetPicker({Key? key, ValueChanged<ExtendedAssetEntity>? onChanged, bool enablePicker = true, PickerErrorCallback? errorCallback, List<PickerFromTypeConfig> fromRequestTypes = const [PickerFromTypeConfig(fromType: PickerFromType.assets, text: Text('图库选择'), requestType: RequestType.common), PickerFromTypeConfig(fromType: PickerFromType.camera, text: Text('相机拍摄'), requestType: RequestType.common), PickerFromTypeConfig(fromType: PickerFromType.cancel, text: Text('取消'), requestType: RequestType.common)], CameraPickerPageRoute<AssetEntity> pageRouteBuilderForCameraPicker(Widget picker)?, AssetPickerPageRouteBuilder<List<AssetEntity>>? pageRouteBuilderForAssetPicker, PickerFromTypeBuilder? fromTypesBuilder, FlAssetFileRenovate? renovate, FlAssetsPickerCheckPermission? checkPermission, PickerAssetEntryBuilderConfig config = const PickerAssetEntryBuilderConfig(), SinglePickerEntryBuilder? builder, ExtendedAssetEntity? initialData, bool allowDelete = true})
const

Properties

allowDelete bool
是否显示删除按钮
final
builder SinglePickerEntryBuilder?
资源渲染子元素自定义构造
final
checkPermission FlAssetsPickerCheckPermission?
获取权限
finalinherited
config PickerAssetEntryBuilderConfig
final
enablePicker bool
是否开启 资源选择
finalinherited
errorCallback PickerErrorCallback?
错误消息回调
finalinherited
fromRequestTypes List<PickerFromTypeConfig>
请求类型
finalinherited
fromTypesBuilder PickerFromTypeBuilder?
选择框 自定义
finalinherited
hashCode int
The hash code for this object.
no setterinherited
initialData ExtendedAssetEntity?
默认初始资源
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxCount int
最多选择几个资源
finalinherited
maxVideoCount int
最大选择视频数量
finalinherited
onChanged ValueChanged<ExtendedAssetEntity>?
资源选择变化
final
pageRouteBuilderForAssetPicker AssetPickerPageRouteBuilder<List<AssetEntity>>?
finalinherited
pageRouteBuilderForCameraPicker CameraPickerPageRoute<AssetEntity> Function(Widget picker)?
finalinherited
renovate FlAssetFileRenovate?
资源重新编辑
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useRootNavigator bool
finalinherited

Methods

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

convertFiles(File file, {AssetType assetsType = AssetType.image}) ExtendedAssetEntity?
paths 文件地址转换 ExtendedAssetModel 默认类型为 AssetType.image
convertPaths(String path, {AssetType assetsType = AssetType.image}) ExtendedAssetEntity?
paths 文件地址转换 List
convertUrl(String url, {AssetType assetsType = AssetType.image}) ExtendedAssetEntity?
url 地址转换 List