AssetPickerBuilderDelegate<A, P> class abstract

The delegate to build the whole picker's components.

By extending the delegate, you can customize every components on you own. Delegate requires two generic types:

Implementers

Constructors

AssetPickerBuilderDelegate({required AssetPickerProvider<A, P> provider, int gridCount = 4, Color? themeColor, AssetsPickerTextDelegate? textDelegate, ThemeData? pickerTheme, SpecialItemPosition specialItemPosition = SpecialItemPosition.none, WidgetBuilder? specialItemBuilder, IndicatorBuilder? loadingIndicatorBuilder, bool allowSpecialItemWhenEmpty = false})

Properties

allowSpecialItemWhenEmpty bool
Whether the special item will display or not when assets is empty. 当没有资源时是否显示自定义item
final
appBarItemHeight double
Item's height in app bar. 顶栏内各个组件的统一高度
no setter
appleOSBlurRadius double
Blur radius in Apple OS layout mode. 苹果系列系统布局方式下的模糊度
no setter
bottomActionBarHeight double
Height for bottom action bar. 底部操作栏的高度
no setter
gridCount int
Assets count for the picker. 资源网格数
final
gridScrollController ScrollController
The ScrollController for the preview grid.
final
hashCode int
The hash code for this object.
no setterinherited
isAppleOS bool
Whether the current platform is Apple OS. 当前平台是否苹果系列系统 (iOS & MacOS)
no setter
isSingleAssetMode bool
Whether the picker is under the single asset mode. 选择器是否为单选模式
no setter
itemSpacing double
Space between assets item widget. 资源部件之间的间隔
no setter
loadingIndicatorBuilder IndicatorBuilder?
Indicates the loading status for the builder. 指示目前加载的状态
final
overlayStyle SystemUiOverlayStyle
Return a system ui overlay style according to the brightness of the theme data. 根据主题返回状态栏的明暗样式
no setter
pickerTheme ThemeData?
Theme for the picker. 选择器的主题
final
provider AssetPickerProvider<A, P>
ChangeNotifier for asset picker. 资源选择器状态保持
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
specialItemBuilder WidgetBuilder?
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
theme ThemeData
ThemeData for the picker. 选择器使用的主题
no setter
themeColor Color
Main color for the picker. 选择器的主题色
final

Methods

androidLayout(BuildContext context) Widget
Layout for Android devices. Android设备的选择器布局
appBar(BuildContext context) PreferredSizeWidget
Custom app bar for the picker. 选择器自定义的顶栏
appleOSLayout(BuildContext context) Widget
Layout for Apple OS devices. 苹果系列设备的选择器布局
assetGridItemBuilder(BuildContext context, int index, List<A> currentAssets) Widget
The item builder for the assets' grid. 资源列表项的构建
assetsGridBuilder(BuildContext context) Widget
The main grid view builder for assets. 主要的资源查看网格部件
assetsGridItemCount(BuildContext context, List<A> currentAssets) int
The function which return items count for the assets' grid. 为资源列表提供内容数量计算的方法
audioIndicator(BuildContext context, A asset) Widget
Audio asset type indicator. 音频类型资源指示
audioItemBuilder(BuildContext context, int index, A asset) Widget
The item builder for audio type of asset. 音频资源的部件构建
backButton(BuildContext context) Widget
Back button. 返回按钮
bottomActionBar(BuildContext context) Widget
Action bar widget aligned to bottom. 底部操作栏部件
build(BuildContext context) Widget
Yes, the build method. 没错,是它是它就是它,我们亲爱的 build 方法~
confirmButton(BuildContext context) Widget
Confirm button. 确认按钮
failedItemBuilder(BuildContext context) Widget
Item widgets when the thumb data load failed. 资源缩略数据加载失败时使用的部件
findChildIndexBuilder(String id, List<A> currentAssets) int?
Indicates how would the grid found a reusable RenderObject through id. 为 Grid 布局指示如何找到可复用的 RenderObject
gifIndicator(BuildContext context, A asset) Widget
GIF image type indicator. GIF类型图片指示
imageAndVideoItemBuilder(BuildContext context, int index, A asset) Widget
The item builder for images and video type of asset. 图片和视频资源的部件构建
loadingIndicator(BuildContext context) Widget
Loading indicator. 加载指示器
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pathEntityListBackdrop(BuildContext context) Widget
A backdrop widget behind the pathEntityListWidget. 在 pathEntityListWidget 后面的遮罩层
pathEntityListWidget(BuildContext context) Widget
List widget for path entities. 路径选择列表组件
pathEntitySelector(BuildContext context) Widget
Path entity select widget builder. 路径选择部件构建
pathEntityWidget({required BuildContext context, required Map<P, Uint8List?> list, required int index, bool isAudio = false}) Widget
Item widgets for path entity selector. 路径单独条目选择组件
previewButton(BuildContext context) Widget
Preview button to preview selected assets. 预览已选资源的按钮
selectedBackdrop(BuildContext context, int index, A asset) Widget
Animated backdrop widget for items. 部件选中时的动画遮罩部件
selectIndicator(BuildContext context, A asset) Widget
Indicator for assets selected status. 资源是否已选的指示器
toString() String
A string representation of this object.
inherited
videoIndicator(BuildContext context, A asset) Widget
Video asset type indicator. 视频类型资源指示

Operators

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