AssetPickerConfig class
Constructors
-
AssetPickerConfig({List<
AssetEntity> ? selectedAssets, int maxAssets = defaultMaxAssetsCount, int pageSize = defaultAssetsPerPage, ThumbnailSize gridThumbnailSize = defaultAssetGridPreviewSize, ThumbnailSize pathThumbnailSize = defaultPathThumbnailSize, ThumbnailSize? previewThumbnailSize, RequestType requestType = RequestType.common, SpecialPickerType? specialPickerType, bool keepScrollOffset = false, SortPathDelegate<AssetPathEntity> ? sortPathDelegate, bool sortPathsByModifiedDate = false, PMFilter? filterOptions, int gridCount = 4, Color? themeColor, ThemeData? pickerTheme, AssetPickerTextDelegate? textDelegate, SpecialItemPosition specialItemPosition = SpecialItemPosition.none, SpecialItemBuilder<AssetPathEntity> ? specialItemBuilder, LoadingIndicatorBuilder? loadingIndicatorBuilder, AssetSelectPredicate<AssetEntity> ? selectPredicate, bool? shouldRevertGrid, LimitedPermissionOverlayPredicate? limitedPermissionOverlayPredicate, PathNameBuilder<AssetPathEntity> ? pathNameBuilder, AssetsChangeCallback<AssetPathEntity> ? assetsChangeCallback, AssetsChangeRefreshPredicate<AssetPathEntity> ? assetsChangeRefreshPredicate, bool shouldAutoplayPreview = false}) -
const
Properties
-
assetsChangeCallback
→ AssetsChangeCallback<
AssetPathEntity> ? -
The callback that will be called when the system notifies assets changes.
当系统通知资源变化时将调用的回调。
final
-
assetsChangeRefreshPredicate
→ AssetsChangeRefreshPredicate<
AssetPathEntity> ? -
Whether assets changing should call refresh with the given
call
and the current selectedpath
. 判断资源变化是否根据call
和当前选中的path
进行更新。final - filterOptions → PMFilter?
-
Filter options for the picker.
选择器的筛选条件
final
- gridCount → int
-
Assets count for the picker.
资源网格数
final
- gridThumbnailSize → ThumbnailSize
-
Thumbnail size in the grid.
预览时网络的缩略图大小
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- keepScrollOffset → bool
-
Whether the picker should save the scroll offset between pushes and pops.
选择器是否可以从同样的位置开始选择
final
- limitedPermissionOverlayPredicate → LimitedPermissionOverlayPredicate?
-
Predicate whether the limited permission overlay should be displayed.
判断有限的权限情况下是否展示提示页面。
final
- loadingIndicatorBuilder → LoadingIndicatorBuilder?
-
Indicates the loading status for the builder.
指示目前加载的状态
final
- maxAssets → int
-
Maximum count for asset selection.
资源选择的最大数量
final
- pageSize → int
-
Assets should be loaded per page.
资源选择的最大数量
final
-
pathNameBuilder
→ PathNameBuilder<
AssetPathEntity> ? -
Build customized path name.
构建自定义路径名称。
final
- pathThumbnailSize → ThumbnailSize
-
Thumbnail size for path selector.
路径选择器中缩略图的大小
final
- pickerTheme → ThemeData?
-
Theme for the picker.
选择器的主题
final
- previewThumbnailSize → ThumbnailSize?
-
Preview thumbnail size in the viewer.
预览时图片的缩略图大小
final
- requestType → RequestType
-
Request assets type.
请求的资源类型
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selectedAssets
→ List<
AssetEntity> ? -
Selected assets.
已选中的资源
final
-
selectPredicate
→ AssetSelectPredicate<
AssetEntity> ? -
Predicate whether an asset can be selected or unselected.
判断资源可否被选择。
final
- shouldAutoplayPreview → bool
-
Whether the preview should auto play.
预览是否自动播放
final
- shouldRevertGrid → bool?
-
Whether the assets grid should revert.
判断资源网格是否需要倒序排列
final
-
sortPathDelegate
→ SortPathDelegate<
AssetPathEntity> ? -
@{macro wechat_assets_picker.delegates.SortPathDelegate}
final
- sortPathsByModifiedDate → bool
-
Whether to allow sort delegates to sort paths with
FilterOptionGroup.containsPathModified.
是否结合 FilterOptionGroup.containsPathModified 进行路径排序
final
-
specialItemBuilder
→ SpecialItemBuilder<
AssetPathEntity> ? -
The widget builder for the the special item.
自定义item的构造方法
final
- specialItemPosition → SpecialItemPosition
-
Allow users set a special item in the picker with several positions.
允许用户在选择器中添加一个自定义item,并指定位置
final
- specialPickerType → SpecialPickerType?
-
The current special picker type for the picker.
当前特殊选择类型
final
- textDelegate → AssetPickerTextDelegate?
-
final
- themeColor → Color?
-
Main color for the picker.
选择器的主题色
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited