DefaultAssetPickerViewerBuilderDelegate class

Inheritance

Constructors

DefaultAssetPickerViewerBuilderDelegate({required int currentIndex, required List<AssetEntity> previewAssets, AssetPickerProvider<AssetEntity, AssetPathEntity>? selectorProvider, required ThemeData themeData, AssetPickerViewerProvider<AssetEntity>? provider, List<AssetEntity>? selectedAssets, List<int>? previewThumbSize, SpecialPickerType? specialPickerType, int? maxAssets, bool shouldReversePreview = false, AssetSelectPredicate<AssetEntity>? selectPredicate})

Properties

bottomBarHeight double
Height for bottom bar widget. 底栏部件的高度
no setterinherited
bottomDetailHeight double
no setterinherited
bottomPreviewHeight double
Height for bottom preview widget. 底栏预览部件的高度
no setterinherited
currentAsset AssetEntity
Getter for the current asset. 当前资源的Getter
no setterinherited
currentIndex int
Current previewing index in assets. 当前查看的索引
getter/setter pairinherited
doubleTapAnimation Animation<double>?
Animation for double tap. 双击缩放的动画
getter/setter pairinherited
doubleTapAnimationController AnimationController
AnimationController for double tap animation. 双击缩放的动画控制器
latefinalinherited
doubleTapCurveAnimation Animation<double>
CurvedAnimation for double tap. 双击缩放的动画曲线
latefinalinherited
doubleTapListener VoidCallback
Callback for double tap. 双击缩放的回调
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
hasVideo bool
Whether there are videos in preview/selected assets. 当前正在预览或已选的资源是否有视频
no setter
isAppleOS bool
Whether the current platform is Apple OS. 当前平台是否为苹果系列系统
no setterinherited
isDisplayingDetail ValueNotifier<bool>
Whether detail widgets displayed. 详情部件是否显示
finalinherited
isSelectedPreviewing bool
Whether the viewer is under preview mode for selected assets. 当前是否处于查看已选中资源的模式
latefinalinherited
isWeChatMoment bool
Whether the SpecialPickerType.wechatMoment is enabled. 当前是否为微信朋友圈选择模式
no setter
maxAssets int?
Maximum count for asset selection. 资源选择的最大数量
finalinherited
pageController → ExtendedPageController
PageController for assets preview PageView. 查看图片资源的页面控制器
no setterinherited
pageStreamController StreamController<int>
StreamController for viewing page index update. 用于更新当前正在浏览的资源页码的流控制器
finalinherited
previewAssets List<AssetEntity>
Assets provided to preview. 提供预览的资源
finalinherited
previewingListController ScrollController
The ScrollController for the previewing assets list. 正在预览的资源的 ScrollController
finalinherited
previewThumbSize List<int>?
Thumb size for the preview of images in the viewer. 预览时图片的缩略图大小
final
provider AssetPickerViewerProvider<AssetEntity>?
ChangeNotifier for photo selector viewer. 资源预览器的状态保持
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedAssets List<AssetEntity>?
Selected assets. 已选的资源
finalinherited
selectedCount int
The length getter for selected assets currently. 当前选中的资源的长度获取
no setterinherited
selectedMaximumAssets bool
是否已经选择了最大数量的资源
no setterinherited
selectedNotifier ValueNotifier<int>
Construct a notifier to notify whether if a new asset is selected or unselected. 构造一个通知器,在新资源选中或取消选中时通知。
latefinalinherited
selectorProvider AssetPickerProvider<AssetEntity, AssetPathEntity>?
Provider for AssetPicker. 资源选择器的状态保持
finalinherited
selectPredicate AssetSelectPredicate<AssetEntity>?
Predicate whether an asset can be selected or unselected. 判断资源可否被选择
finalinherited
shouldReversePreview bool
Whether the preview sequence is reversed. 预览时顺序是否为反向
finalinherited
specialPickerType SpecialPickerType?
The current special picker type for the viewer. 当前特殊选择类型
final
themeData ThemeData
Theme for the viewer. 主题
finalinherited
viewerState AssetPickerViewerState<AssetEntity, AssetPathEntity>
The State for a viewer. 预览器的状态实例
latefinalinherited
vsync TickerProvider
The TickerProvider for animations. 用于动画的 TickerProvider
latefinalinherited

Methods

appBar(BuildContext context) Widget
AppBar widget. 顶栏部件
assetPageBuilder(BuildContext context, int index) Widget
Split page builder according to type of asset. 根据资源类型使用不同的构建页
override
bottomDetailBuilder(BuildContext context) Widget
Detail widget aligned to bottom. 底部信息部件
override
bottomDetailItemBuilder(BuildContext context, int index) Widget
Thumb item widgets in bottom detail. 底部信息栏单个资源缩略部件
override
build(BuildContext context) Widget
Yes, the build method. 没错,是它是它就是它,我们亲爱的 build 方法~
override
confirmButton(BuildContext context) Widget
It'll pop with AssetPickerProvider.selectedAssets when there are any assets were chosen. Then, the assets picker will pop too. 当有资源已选时,点击按钮将把已选资源通过路由返回。 资源选择器将识别并一同返回。
override
dispose() → void
Keep a dispose method to sync with State. 保留一个 dispose 方法与 State 同步。
inherited
failedItemBuilder(BuildContext context) Widget
The item widget when AssetEntity.thumbData load failed. 资源缩略数据加载失败时使用的部件
inherited
initStateAndTicker(AssetPickerViewerState<AssetEntity, AssetPathEntity> s, TickerProvider v) → void
Call when viewer is calling initState. 当预览器调用 initState 时注册 StateTickerProvider
inherited
momentVideoBackButton(BuildContext context) Widget
The back button when previewing video in SpecialPickerType.wechatMoment. 使用 SpecialPickerType.wechatMoment 预览视频时的返回按钮
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onChangingSelected(BuildContext context, AssetEntity asset, bool isSelected) Future<void>
inherited
previewWidgetLoadStateChanged(BuildContext context, ExtendedImageState state, {bool hasLoaded = false}) Widget
Common image load state changed callback with Widget. 图片加载状态的部件回调
inherited
selectAsset(AssetEntity entity) → void
inherited
selectButton(BuildContext context) Widget
Select button. 选择按钮
override
switchDisplayingDetail({bool? value}) → void
Method to switch isDisplayingDetail. 切换显示详情状态的方法
inherited
syncSelectedAssetsWhenPop() Future<bool>
Sync selected assets currently with asset picker provider. 在预览中当前已选的图片同步到选择器的状态
inherited
toString() String
A string representation of this object.
inherited
unSelectAsset(AssetEntity entity) → void
inherited
updateAnimation(ExtendedImageGestureState state) → void
Execute scale animation when double tap. 双击时执行缩放动画
inherited

Operators

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