DefaultAssetPickerBuilderDelegate class

Inheritance

Constructors

DefaultAssetPickerBuilderDelegate({required DefaultAssetPickerProvider provider, int gridCount = 4, Color? themeColor, AssetsPickerTextDelegate? textDelegate, ThemeData? pickerTheme, SpecialItemPosition specialItemPosition = SpecialItemPosition.none, WidgetBuilder? specialItemBuilder, IndicatorBuilder? loadingIndicatorBuilder, bool allowSpecialItemWhenEmpty = false, int gridThumbSize = Constants.defaultGridThumbSize, List<int>? previewThumbSize, SpecialPickerType? specialPickerType})

Properties

allowSpecialItemWhenEmpty bool
Whether the special item will display or not when assets is empty. 当没有资源时是否显示自定义item
finalinherited
appBarItemHeight double
Item's height in app bar. 顶栏内各个组件的统一高度
no setterinherited
appleOSBlurRadius double
Blur radius in Apple OS layout mode. 苹果系列系统布局方式下的模糊度
no setterinherited
bottomActionBarHeight double
Height for bottom action bar. 底部操作栏的高度
no setterinherited
gridCount int
Assets count for the picker. 资源网格数
finalinherited
gridScrollController ScrollController
The ScrollController for the preview grid.
finalinherited
gridThumbSize int
Thumbnail size in the grid. 预览时网络的缩略图大小
final
hashCode int
The hash code for this object.
no setterinherited
isAppleOS bool
Whether the current platform is Apple OS. 当前平台是否苹果系列系统 (iOS & MacOS)
no setterinherited
isPreviewEnabled bool
Whether the preview of assets is enabled. 资源的预览是否启用
no setter
isSingleAssetMode bool
Whether the picker is under the single asset mode. 选择器是否为单选模式
no setterinherited
isWeChatMoment bool
Whether the SpecialPickerType.wechatMoment is enabled. 当前是否为微信朋友圈选择模式
no setter
itemSpacing double
Space between assets item widget. 资源部件之间的间隔
no setterinherited
loadingIndicatorBuilder IndicatorBuilder?
Indicates the loading status for the builder. 指示目前加载的状态
finalinherited
overlayStyle SystemUiOverlayStyle
Return a system ui overlay style according to the brightness of the theme data. 根据主题返回状态栏的明暗样式
no setterinherited
pickerTheme ThemeData?
Theme for the picker. 选择器的主题
finalinherited
previewThumbSize List<int>?
Preview thumbnail size in the viewer. 预览时图片的缩略图大小
final
provider AssetPickerProvider<AssetEntity, AssetPathEntity>
ChangeNotifier for asset picker. 资源选择器状态保持
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
specialItemBuilder WidgetBuilder?
The widget builder for the the special item. 自定义item的构造方法
finalinherited
specialItemPosition SpecialItemPosition
Allow users set a special item in the picker with several positions. 允许用户在选择器中添加一个自定义item,并指定位置
finalinherited
specialPickerType SpecialPickerType?
The current special picker type for the picker. 当前特殊选择类型
final
switchingPathCurve Curve
Curve when triggering path switching. 切换路径时的动画曲线
no setter
switchingPathDuration Duration
Duration when triggering path switching. 切换路径时的动画时长
no setter
theme ThemeData
ThemeData for the picker. 选择器使用的主题
no setterinherited
themeColor Color
Main color for the picker. 选择器的主题色
finalinherited

Methods

androidLayout(BuildContext context) Widget
Layout for Android devices. Android设备的选择器布局
override
appBar(BuildContext context) PreferredSizeWidget
Custom app bar for the picker. 选择器自定义的顶栏
override
appleOSLayout(BuildContext context) Widget
Layout for Apple OS devices. 苹果系列设备的选择器布局
override
assetGridItemBuilder(BuildContext context, int index, List<AssetEntity> currentAssets) Widget
There're several conditions within this builder:
override
assetsGridBuilder(BuildContext context) Widget
The main grid view builder for assets. 主要的资源查看网格部件
inherited
assetsGridItemCount(BuildContext context, List<AssetEntity> currentAssets) int
The function which return items count for the assets' grid. 为资源列表提供内容数量计算的方法
override
audioIndicator(BuildContext context, AssetEntity asset) Widget
Audio asset type indicator. 音频类型资源指示
override
audioItemBuilder(BuildContext context, int index, AssetEntity asset) Widget
The item builder for audio type of asset. 音频资源的部件构建
override
backButton(BuildContext context) Widget
Back button. 返回按钮
inherited
bottomActionBar(BuildContext context) Widget
Action bar widget aligned to bottom. 底部操作栏部件
inherited
build(BuildContext context) Widget
Yes, the build method. 没错,是它是它就是它,我们亲爱的 build 方法~
inherited
confirmButton(BuildContext context) Widget
It'll pop with AssetPickerProvider.selectedAssets when there are any assets were chosen. 当有资源已选时,点击按钮将把已选资源通过路由返回。
override
failedItemBuilder(BuildContext context) Widget
Item widgets when the thumb data load failed. 资源缩略数据加载失败时使用的部件
inherited
findChildIndexBuilder(String id, List<AssetEntity> currentAssets) int
Indicates how would the grid found a reusable RenderObject through id. 为 Grid 布局指示如何找到可复用的 RenderObject
override
gifIndicator(BuildContext context, AssetEntity asset) Widget
GIF image type indicator. GIF类型图片指示
inherited
imageAndVideoItemBuilder(BuildContext context, int index, AssetEntity asset) Widget
The item builder for images and video type of asset. 图片和视频资源的部件构建
override
loadingIndicator(BuildContext context) Widget
Loading indicator. 加载指示器
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pathEntityListBackdrop(BuildContext context) Widget
While the picker is switching path, this will displayed. If the user tapped on it, it'll collapse the list widget.
override
pathEntityListWidget(BuildContext context) Widget
List widget for path entities. 路径选择列表组件
override
pathEntitySelector(BuildContext context) Widget
Path entity select widget builder. 路径选择部件构建
override
pathEntityWidget({required BuildContext context, required Map<AssetPathEntity, Uint8List?> list, required int index, bool isAudio = false}) Widget
Item widgets for path entity selector. 路径单独条目选择组件
override
previewButton(BuildContext context) Widget
Preview button to preview selected assets. 预览已选资源的按钮
override
selectedBackdrop(BuildContext context, int index, AssetEntity asset) Widget
Animated backdrop widget for items. 部件选中时的动画遮罩部件
override
selectIndicator(BuildContext context, AssetEntity asset) Widget
Indicator for assets selected status. 资源是否已选的指示器
override
toString() String
A string representation of this object.
inherited
videoIndicator(BuildContext context, AssetEntity asset) Widget
Videos often contains various of color in the cover, so in order to keep the content visible in most cases, the color of the indicator has been set to Colors.white.
override

Operators

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