fl_assets_picker library

Classes

AdvancedCustomFilter
The advanced custom filter.
AndroidMediaColumns
A class that contains the names of the columns used in the custom filter.
AndroidPermission
The permission for android.
ArabicAssetPickerTextDelegate
AssetPickerTextDelegate implements with Arabic. الترجمة العربية
AssetBuilder
AssetDeleteIcon
AssetEntity
The abstraction of assets (images/videos/audios). It represents a series of fields MediaStore on Android and the PHAsset object on iOS/macOS.
AssetEntityGridItemBuilder
AssetEntityGridItemWidgetState
AssetEntityImage
A widget that displays an AssetEntity image.
AssetEntityImageProvider
The ImageProvider that handles AssetEntity.
AssetPathEntity
The abstraction of albums and folders. It represent a bucket in the MediaStore on Android, and the PHAssetCollection object on iOS/macOS.
AssetPicker<Asset, Path>
AssetPickerAppBar
A custom app bar. 自定义的顶栏
AssetPickerAppBarWrapper
Wrapper for AssetPickerAppBar. Avoid elevation covered by body. 顶栏封装。防止内容块层级高于顶栏导致遮挡阴影。
AssetPickerBuilderDelegate<Asset, Path>
The delegate to build the whole picker's components.
AssetPickerConfig
AssetPickerDelegate
AssetPickerPageRoute<T>
Built a slide page transition for the picker. 为选择器构造一个上下进出的页面过渡动画
AssetPickerProvider<Asset, Path>
Helps the assets picker to manage Paths and Assets.
AssetPickerState<Asset, Path>
AssetPickerTextDelegate
Text delegate that controls text in widgets. 控制部件中的文字实现
AssetPickerViewer<Asset, Path>
AssetPickerViewerBuilderDelegate<Asset, Path>
AssetPickerViewerProvider<A>
ChangeNotifier for assets picker viewer. 资源选择查看器的 provider model.
AssetPickerViewerState<Asset, Path>
AssetPickIcon
AssetsPickerController
AssetsPickerEntryConfig
BaseClient
The abstract base class for an HTTP client.
BaseRequest
The base class for HTTP requests.
BaseResponse
The base class for HTTP responses.
BaseResponseWithUrl
A BaseResponse with a url field.
Boundary
extended_image_gesture_utils.dart create by zmtzawqlp on 2019/4/3
ByteStream
A stream of chunks of bytes representing a single piece of data.
CameraController
Controls a device camera.
CameraDescription
Properties of a camera device.
CameraFocusPoint
CameraFocusPointPainter
A CustomPaint that draws the exposure point with four arcs and one circle. 包含了四条弧及一个圆的曝光点绘制。
CameraImage
A single complete image buffer from the platform camera.
CameraPicker
The camera picker widget. 拍照选择器。
CameraPickerConfig
Configurations for the CameraPicker. CameraPicker 的配置项
CameraPickerPageRoute<T>
Built a slide page transition for the picker. 为选择器构造一个上下进出的页面过渡动画
CameraPickerState
CameraPickerTextDelegate
Text delegate implemented with Chinese. 中文文字实现
CameraPickerViewer
CameraPickerViewerState
CameraPreview
A widget showing a live camera preview.
CameraValue
The state of a CameraController.
CancellationToken
CancellationTokenSource
Caption
A representation of a single caption.
Client
The interface for HTTP clients that take care of maintaining persistent connections across multiple requests to the same server.
ClosedCaption
Widget for displaying closed captions on top of a video.
ClosedCaptionFile
A structured representation of a parsed closed caption file.
ColumnUtils
Utility functions for working with the CustomColumns class.
ColumnWhereCondition
The where condition item.
CommonSortPathDelegate
Common sort path delegate. 常用的路径排序实现
CropAspectRatios
CupertinoControls
CustomColumns
A class that contains the names of the columns used in the custom filter.
CustomFilter
Full custom filter.
DarwinColumns
A class that contains the names of the columns of the iOS/macOS platform.
DateColumnWhereCondition
The where condition item for date type.
DateTimeCond
A class that specifies the date and time constraints for queried assets.
DefaultAssetPickerBuilderDelegate
DefaultAssetPickerProvider
The default implementation of the AssetPickerProvider for the picker. The Asset is AssetEntity, and the Path is AssetPathEntity.
DefaultAssetPickerViewerBuilderDelegate
DurationConstraint
A class that specifies the duration constraints for queried assets.
DurationRange
Describes a discrete segment of time within a video using a start and end Duration.
EditActionDetails
EditorConfig
EditorCropLayerPainter
EnglishAssetPickerTextDelegate
AssetPickerTextDelegate implements with English. English Localization
EnglishCameraPickerTextDelegate
Text delegate implements with English.
ExtendedAssetBundleImageKey
ExtendedAssetEntity<T>
ExtendedAssetImageProvider
ExtendedExactAssetImageProvider
ExtendedFileImageProvider
ExtendedImage
extended image base on official Image
ExtendedImageBorderPainter
ExtendedImageCropLayerPainter
ExtendedImageEditor
create by zmtzawqlp on 2019/8/22
ExtendedImageEditorState
ExtendedImageGesture
scale idea from https://github.com/flutter/flutter/blob/master/examples/layers/widgets/gestures.dart zoom image
ExtendedImageGesturePageView
page view to support gesture for image
ExtendedImageGesturePageViewState
ExtendedImageGestureState
ExtendedImageSlidePage
ExtendedImageSlidePageHandler
create by zmtzawqlp on 2019/6/14
ExtendedImageSlidePageHandlerState
ExtendedImageSlidePageState
ExtendedImageWithAssetsPicker
ExtendedMemoryImageProvider
ExtendedNetworkImageProvider
NetworkImage
ExtendedPageController
ExtendedRawImage
A widget that displays a dart:ui.Image directly.
ExtendedRenderImage
ExtendedRenderSliverFillViewport
A sliver that contains multiple box children that each fill the viewport.
ExtendedResizeImage
Instructs Flutter to decode the image at the specified dimensions instead of at its native size.
ExtendedSliverFillViewport
A sliver that contains multiple box children that each fills the viewport.
FilterOption
A series of filter options for AssetType when querying assets.
FilterOptionGroup
A collection of filtering and sorting options for querying assets.
FlAssetsPicker
FlPreviewAssets
FlVideoPlayer
A Video Player with Material and Cupertino skins.
FlVideoPlayerController
The FlVideoPlayerController is used to configure and drive the FlVideoPlayer Player Widgets. It provides methods to control playback, such as pause and play, as well as methods that control the visual appearance of the player, such as enterFullScreen or exitFullScreen.
FlVideoPlayerControllerProvider
FlVideoPlayerProgressColors
FlVideoPlayerWithAssetsPicker
FrenchAssetPickerTextDelegate
AssetPickerTextDelegate implements with French. Délégué texte français
GermanAssetPickerTextDelegate
AssetPickerTextDelegate implementiert mit der deutschen Übersetzung. Deutsche Textimplementierung.
GestureAnimation
GestureConfig
GestureDetails
GesturePageView
HebrewAssetPickerTextDelegate
AssetPickerTextDelegate implements with Hebrew. תרגום בשפה העברית
HttpClientHelper
ImageFormat
Describes how pixels are represented in an image.
JapaneseAssetPickerTextDelegate
AssetPickerTextDelegate implements with Japanese. 日本語の TextDelegate
KoreanAssetPickerTextDelegate
AssetPickerTextDelegate implements with Korean. 한국어 현지화
LatLng
Represents a geographical location as a latitude-longitude pair.
MaterialControls
MultiAssetPicker
MultipartFile
A file to be uploaded as part of a MultipartRequest.
MultipartRequest
A multipart/form-data request.
NotifyManager
The manager for receiving notifications when assets change.
Optional<T>
A value that might be absent.
OrderByItem
The order by item.
OrderOption
A class that specifies the ordering criteria for queried assets.
PathWrapper<Path>
A wrapper that holds Path with it's nullable (late initialize) fields.
PermissionRequestOption
See PermissionState.
PhotoCachingManager
The cache manager that helps to create/remove caches with specified assets.
PhotoManager
The core manager of this package, providing methods for accessing and managing assets.
PhotoManagerPlugin
The plugin class is the core class that call channel's methods.
PickerFromTypeItem
PickerWrapBuilderConfig
Plane
A single color plane of image data.
PMDarwinPathFilter
{@template PM.darwin_path_filter}
PMFilter
The base class of all the filters.
PMPathFilter
For filter the AssetPathEntity.
PMProgressHandler
Manages the progress of asset downloads from cloud storage services, such as iCloud.
PMProgressState
A state class that contains progress of the current downloading and state to indicate the request state of the asset.
Request
An HTTP request where the entire request body is known in advance.
RequestType
The request type when requesting paths.
RetryHelper
RussianAssetPickerTextDelegate
AssetPickerTextDelegate implements with Russian. Локализация на русский язык.
SingleAssetPicker
SizeConstraint
A class that specifies the size constraints for queried images.
SortPathDelegate<Path>
@{template wechat_assets_picker.delegates.SortPathDelegate} Delegate to sort asset path entities. 用于资源路径排序的实现 @{endtemplate}
SqlCustomFilter
The sql custom filter.
StreamedRequest
An HTTP request where the request body is sent asynchronously after the connection has been established and the headers have been sent.
StreamedResponse
An HTTP response where the response body is received asynchronously after the headers have been received.
SubRipCaptionFile
Represents a ClosedCaptionFile, parsed from the SubRip file format. See: https://en.wikipedia.org/wiki/SubRip
Subtitle
Subtitles
TextWhereCondition
The where condition item for text.
ThumbnailOption
The options used when requesting thumbnails.
ThumbnailSize
The dimensions of the thumbnail data for an AssetEntity.
TurkishAssetPickerTextDelegate
AssetPickerTextDelegate implements with Turkish Türkçe Yerelleştirme
VideoPlayer
Widget that displays the video controlled by controller.
VideoPlayerController
Controls a platform video player, and provides updates when the state is changing.
VideoPlayerOptions
VideoPlayerOptions can be optionally used to set additional player settings
VideoPlayerValue
The duration, current position, buffering state, error state and settings of a VideoPlayerController.
VideoProgressColors
Used to configure the VideoProgressIndicator widget's colors for how it describes the video's status.
VideoProgressIndicator
Displays the play/buffering status of the video controlled by controller.
VideoScrubber
A scrubber to control VideoPlayerControllers
VietnameseAssetPickerTextDelegate
AssetPickerTextDelegate implements with Vietnamese. Dịch tiếng Việt
VietnameseCameraPickerTextDelegate
Text delegate implemented with Vietnamese. Dịch tiếng Việt
WakelockPlus
Class providing all wakelock functionality using static members.
WakelockPlusLinuxPlugin
The Linux implementation of the WakelockPlusPlatformInterface.
WakelockPlusMacOSPlugin
The macOS implementation of the WakelockPlusPlatformInterface.
WakelockPlusWindowsPlugin
The Windows implementation of the WakelockPlusPlatformInterface.
WebVTTCaptionFile
Represents a ClosedCaptionFile, parsed from the WebVTT file format. See: https://en.wikipedia.org/wiki/WebVTT
WhereConditionGroup
The group of WhereConditionItem and WhereConditionGroup.
WhereConditionItem
{@template PM.column_where_condition}
WhereItem
Where item class
XFile
A CrossFile is a cross-platform, simplified File abstraction.

Enums

ActionType
AssetType
The type of the asset.
BaseFilterType
The type of the filter.
CameraLensDirection
The direction the camera is facing.
CameraPickerViewType
Two types for the viewer: image and video. 两种预览类型:图片和视频
DataSourceType
The way in which the video was originally loaded.
DeliveryMode
Enumeration for PHImageRequestOptionsDeliveryMode on iOS/macOS.
ExposureMode
The possible exposure modes that can be set for a camera.
ExtendedImageMode
FlashMode
The possible flash modes that can be set for a camera
FlVideoDragProgressEvent
FlVideoTapEvent
FocusMode
The possible focus modes that can be set for a camera.
ImageCroppingQuality
ImageFileType
Common file types for images.
ImageFormatGroup
Group of image formats that are comparable across Android and iOS platforms.
InitCropRectType
InitialAlignment
init image rect with alignment when initialScale > 1.0 see https://github.com/fluttercandies/extended_image/issues/66
IosAccessLevel
The app’s level of access to the user’s photo library.
LoadState
LogicalType
The logical operator used in the CustomFilter.
OrderOptionType
An enumeration of possible options for sorting asset lists.
PermissionState
Information about app’s authorization to access the user’s photo library.
PickerFromType
PMDarwinAssetCollectionSubtype
See document: https://developer.apple.com/documentation/photokit/phassetcollectionsubtype
PMDarwinAssetCollectionType
The type of PHAssetCollection.
PMRequestState
Indicate the current state when an asset is loading with PMProgressHandler.
ResizeContentMode
Fitting an image’s aspect ratio to a requested size on iOS/macOS.
ResizeMode
Specifies how to resize the requested image on iOS/macOS.
ResolutionPreset
Affect the quality of video recording and image capture:
SlideAxis
SlideType
SpecialImageType
An enumeration of special image types.
SpecialItemPosition
Provide an item slot for custom widget insertion. 提供一个自定义位置供特殊item放入资源列表中。
SpecialPickerType
Provide some special picker types to integrate un-common pick pattern. 提供一些特殊的选择器类型以整合非常规的选择行为。
ThumbnailFormat
Which format the thumbnail should be, generally support JPG and PNG.
VideoFormat
The file format of the given video.

Properties

imageCaches Map<String, ImageCache>
The imageCaches to store custom ImageCache
getter/setter pair
rawImageDataMap Map<ExtendedImageProvider, Uint8List>
The cached raw image data
getter/setter pair
wakelockPlusPlatformInstance ↔ WakelockPlusPlatformInterface
The WakelockPlusPlatformInterface that is used by WakelockPlus.
getter/setter pair

Functions

assetPickerTextDelegateFromLocale(Locale? locale) AssetPickerTextDelegate
Obtain the text delegate from the given locale.
availableCameras() Future<List<CameraDescription>>
Completes with a list of available cameras.
cachedImageExists(String url, {String? cacheKey}) Future<bool>
Check if the image exists in cache
cameraPickerTextDelegateFromLocale(Locale? locale) CameraPickerTextDelegate
Obtain the text delegate from the given locale.
clampScale(double scale, double min, double max) double
clearDiskCachedImage(String url, {String? cacheKey}) Future<bool>
Clear the disk cache image then return if it succeed.
clearDiskCachedImages({Duration? duration}) Future<bool>
Clear the disk cache directory then return if it succeed.
clearGestureDetailsCache() → void
clear the gesture details
clearMemoryImageCache([String? name]) → void
clear all of image in memory
defaultEditorMaskColorHandler(BuildContext context, bool pointerDown) Color
defaultSlideEndHandler({Offset offset = Offset.zero, Size pageSize = const Size(100, 100), SlideAxis pageGestureAxis = SlideAxis.both}) bool
defaultSlidePageBackgroundHandler({Offset offset = Offset.zero, Size pageSize = const Size(100, 100), required Color color, SlideAxis pageGestureAxis = SlideAxis.both}) Color
ExtendedImageGesturePage
defaultSlideScaleHandler({Offset offset = Offset.zero, Size pageSize = const Size(100, 100), SlideAxis pageGestureAxis = SlideAxis.both}) double
delete(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP DELETE request with the given headers to the given URL.
get(Uri url, {Map<String, String>? headers}) Future<Response>
Sends an HTTP GET request with the given headers to the given URL.
getCachedImageFile(String url, {String? cacheKey}) Future<File?>
Get the local file of the cached image
getCachedImageFilePath(String url, {String? cacheKey}) Future<String?>
Get the local file path of the cached image
getCachedSizeBytes() Future<int>
Get total size of cached image
getDestinationRect({required Rect rect, required Size inputSize, double scale = 1.0, BoxFit? fit, Alignment alignment = Alignment.center, Rect? centerSlice, bool flipHorizontally = false}) Rect
getMemoryImageCache([String? name]) ImageCache?
get ImageCache
getNetworkImageData(String url, {bool useCache = true, StreamController<ImageChunkEvent>? chunkEvents}) Future<Uint8List?>
get network image data from cached
Sends an HTTP HEAD request with the given headers to the given URL.
keyToMd5(String key) String
get md5 from key
paintExtendedImage({required Canvas canvas, required Rect rect, required Image image, String? debugImageLabel, double scale = 1.0, double opacity = 1.0, ColorFilter? colorFilter, BoxFit? fit, Alignment alignment = Alignment.center, Rect? centerSlice, ImageRepeat repeat = ImageRepeat.noRepeat, bool flipHorizontally = false, bool invertColors = false, FilterQuality filterQuality = FilterQuality.low, Rect? customSourceRect, BeforePaintImage? beforePaintImage, AfterPaintImage? afterPaintImage, GestureDetails? gestureDetails, EditActionDetails? editActionDetails, bool isAntiAlias = false, EdgeInsets layoutInsets = EdgeInsets.zero}) → void
Paints an image into the given rectangle on the canvas.
patch(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP PATCH request with the given headers and body to the given URL.
post(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP POST request with the given headers and body to the given URL.
put(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP PUT request with the given headers and body to the given URL.
read(Uri url, {Map<String, String>? headers}) Future<String>
Sends an HTTP GET request with the given headers to the given URL and returns a Future that completes to the body of the response as a String.
readBytes(Uri url, {Map<String, String>? headers}) Future<Uint8List>
Sends an HTTP GET request with the given headers to the given URL and returns a Future that completes to the body of the response as a list of bytes.
rotateOffset(Offset input, Offset center, double angle) Offset
rotateRect(Rect rect, Offset center, double angle) Rect
roundAfter(double number, int position) double
runWithClient<R>(R body(), Client clientFactory(), {ZoneSpecification? zoneSpecification}) → R
Runs body in its own Zone with the Client returned by clientFactory set as the default Client.
typeOf<T>() Type
get type from T

Typedefs

AfterPaintImage = void Function(Canvas canvas, Rect rect, Image image, Paint paint)
Call after paint image
AssetPickerPageRouteBuilder<T> = AssetPickerPageRoute<T> Function(Widget picker)
Build AssetPickerPageRoute with the given generic type. 构建匹配泛型的 AssetPickerPageRoute
AssetSelectPredicate<Asset> = FutureOr<bool> Function(BuildContext context, Asset asset, bool isSelected)
Predicate whether an asset can be selected or unselected. 判断资源可否被选择。
BeforePaintImage = bool Function(Canvas canvas, Rect rect, Image image, Paint paint)
rect is render size if return true, it will not paint original image,
BuildGestureImage = Widget Function(GestureDetails gestureDetails)
Build Gesture Image
CameraErrorHandler = void Function(Object error, StackTrace? stackTrace)
The error handler when any error occurred during the picking process. 拍摄照片过程中的自定义错误处理
CanScaleImage = bool Function(GestureDetails? details)
Whether should scale image
CanScrollPage = bool Function(GestureDetails? gestureDetails)
Whether we can scroll page
DeletionConfirmation = Future<bool> Function(ExtendedAssetEntity entity)
DoubleTap = void Function(ExtendedImageGestureState state)
Double tap call back
EditActionDetailsIsChanged = void Function(EditActionDetails? details)
Call when EditActionDetails is changed
EditorMaskColorHandler = Color Function(BuildContext context, bool pointerDown)
Get editor mask color base on pointerDown
EntitySaveCallback = FutureOr Function(BuildContext context, CameraPickerViewType viewType, File file)
The callback type define for saving entity in the viewer. 在查看器中保存图片时的回调
ExtendedImageLoadStateBuilder = Widget Function(ExtendedImageState)
FlAssetFileRenovate<T> = Future<T> Function(AssetEntity entity)
FlAssetsPickerCheckPermission = Future<bool> Function(PickerFromType fromType)
FlAssetsPickerErrorCallback = void Function(String erroe)
FlPreviewAssetsBuilder = Widget Function(BuildContext context, List<ExtendedAssetEntity> entitys)
FlPreviewAssetsModalPopupBuilder = void Function(BuildContext context, Widget previewAssets)
FlVideoControlsErrorBuilder = Widget Function(BuildContext context, String errorMessage)
FlVideoControlsProgressDrag = void Function(FlVideoDragProgressEvent event, Duration duration)
FlVideoControlsTap = void Function(FlVideoTapEvent event, FlVideoPlayerController controller)
FlVideoPlayerRoutePageBuilder = Widget Function(BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, FlVideoPlayerControllerProvider controllerProvider)
ForegroundBuilder = Widget Function(BuildContext context, CameraController? controller)
Build the foreground/overlay widget with the given CameraValue. 根据给定的 CameraValue 构建自定义的前景 widget
GestureDetailsIsChanged = void Function(GestureDetails? details)
Call when GestureDetails is changed
GestureOffsetAnimationCallBack = void Function(Offset offset)
Animation call back for inertia drag
GestureScaleAnimationCallBack = void Function(double scale)
Animation call back for scale
HeroBuilderForSlidingPage = Widget Function(Widget widget)
Build Hero only for sliding page the transform of sliding page must be working on Hero so that Hero animation wouldn't be strange when pop page
ImageBuilderForGesture = Widget Function(Widget image)
Build image for gesture, we can handle custom Widget about gesture
InitDestinationRect = void Function(Rect initialDestinationRect)
Return initial destination rect
InitEditorConfigHandler = EditorConfig? Function(ExtendedImageState? state)
Init GestureConfig when image is ready.
InitGestureConfigHandler = GestureConfig Function(ExtendedImageState state)
Init GestureConfig when image is ready.
LimitedPermissionOverlayPredicate = bool Function(PermissionState permissionState)
Predicate whether the limited permission overlay should be displayed. 判断有限的权限情况下是否展示提示页面。
LoadingIndicatorBuilder = Widget Function(BuildContext context, bool isAssetsEmpty)
Build the loading indicator with the given isAssetsEmpty. 根据给定的 isAssetsEmpty 构建加载指示器。
LoadStateChanged = Widget? Function(ExtendedImageState state)
extended_image_typedef.dart create by zmtzawqlp on 2019/4/3
MergeEditRect = Rect Function(Rect editRect)
Return merged editRect rect
MultiPickerEntryBuilder = Widget Function(ExtendedAssetEntity entry, int index)
onLatestImageAvailable = void Function(CameraImage image)
Signature for a callback receiving the a camera image.
OnSlidingPage = void Function(ExtendedImageSlidePageState state)
Call on sliding page
PathNameBuilder<Path> = String Function(Path path)
Build customized path name. 构建自定义路径名称。
PermisstionRequestOption = PermissionRequestOption
PickerErrorCallback = void Function(String msg)
PickerFromTypeBuilder = Widget Function(BuildContext context, List<PickerFromTypeItem> fromTypes)
PickerIconBuilder = Widget Function()
PickerWrapBuilder = Widget Function(List<Widget>)
PositionAndAllBuilder = Widget Function(String position, String all)
PositionBuilder = Widget Function(String postion)
PreviewTransformBuilder = Widget? Function(BuildContext context, CameraController controller, Widget child)
Build the transformed widget with the given CameraController. 根据给定的 CameraController 构建自定义的变换 widget
RemainingBuilder = Widget Function(String remaining)
SinglePickerEntryBuilder = Widget Function(ExtendedAssetEntity entry)
SlideEndHandler = bool? Function(Offset offset, {ScaleEndDetails details, ExtendedImageSlidePageState state})
if return true ,pop page else reset page state
SlideOffsetHandler = Offset? Function(Offset offset, {ExtendedImageSlidePageState state})
customize offset of page when slide page
SlidePageBackgroundHandler = Color Function(Offset offset, Size pageSize)
Build page background when slide page
SlideScaleHandler = double? Function(Offset offset, {ExtendedImageSlidePageState state})
Customize scale of page when slide page
SpecialItemBuilder<Path> = Widget? Function(BuildContext context, Path? path, int length)
Build the special item with the given path and assets length. 根据给定的目录和资源数量构建特殊 item。
SubtitlesBuilder = Widget Function(BuildContext context, String subtitle)
XFileCapturedCallback = bool Function(XFile, CameraPickerViewType)
The callback type definition when the XFile is captured by the camera. 拍摄文件生成后的回调

Exceptions / Errors

CameraException
This is thrown when the plugin reports an error.
ClientException
An exception caused by an error in a pkg/http client.
OperationCanceledError