DefaultAssetPickerViewerBuilderDelegate class
- Inheritance
-
- Object
- AssetPickerViewerBuilderDelegate<
AssetEntity, AssetPathEntity> - DefaultAssetPickerViewerBuilderDelegate
Constructors
-
DefaultAssetPickerViewerBuilderDelegate({required int currentIndex, required List<
AssetEntity> previewAssets, required ThemeData themeData, AssetPickerProvider<AssetEntity, AssetPathEntity> ? selectorProvider, AssetPickerViewerProvider<AssetEntity> ? provider, List<AssetEntity> ? selectedAssets, ThumbnailSize? previewThumbnailSize, 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.
双击缩放的动画控制器
getter/setter pairinherited
-
doubleTapCurveAnimation
↔ Animation<
double> -
CurvedAnimation for double tap.
双击缩放的动画曲线
getter/setter pairinherited
- 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
- previewThumbnailSize → ThumbnailSize?
-
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
- semanticsTextDelegate → AssetPickerTextDelegate
-
no setterinherited
- shouldReversePreview → bool
-
Whether the preview sequence is reversed.
预览时顺序是否为反向
finalinherited
- specialPickerType → SpecialPickerType?
-
The current special picker type for the viewer.
当前特殊选择类型
final
- textDelegate → AssetPickerTextDelegate
-
no setterinherited
- themeData → ThemeData
-
Theme for the viewer.
主题
finalinherited
-
viewerState
↔ AssetPickerViewerState<
AssetEntity, AssetPathEntity> -
The State for a viewer.
预览器的状态实例
getter/setter pairinherited
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
-
didUpdateViewer(
covariant AssetPickerViewerState< AssetEntity, AssetPathEntity> state, covariant AssetPickerViewer<AssetEntity, AssetPathEntity> oldWidget, covariant AssetPickerViewer<AssetEntity, AssetPathEntity> newWidget) → void -
Call when the viewer is calling State.didUpdateWidget.
当预览器调用 State.didUpdateWidget 时操作 State。
inherited
-
dispose(
) → void -
Keep a dispose method to sync with State.
保留一个 dispose 方法与 State 同步。
inherited
-
failedItemBuilder(
BuildContext context) → Widget -
The item widget when AssetEntity.thumbnailData load failed.
资源缩略数据加载失败时使用的部件
inherited
-
initAnimations(
covariant AssetPickerViewerState< AssetEntity, AssetPathEntity> state) → void -
Initialize animations related to the zooming preview.
为缩放预览初始化动画
inherited
-
initStateAndTicker(
covariant AssetPickerViewerState< AssetEntity, AssetPathEntity> state, TickerProvider v) → void -
Call when viewer is calling State.initState.
当预览器调用 State.initState 时注册 State。
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< bool> -
inherited
-
ordinalSortKey(
double value) → OrdinalSortKey -
Produce OrdinalSortKey with the fixed name.
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