extended_image library

Classes

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.
CancellationToken
CancellationTokenSource
Client
The interface for HTTP clients that take care of maintaining persistent connections across multiple requests to the same server.
CropAspectRatios
EditActionDetails
EditorConfig
EditorCropLayerPainter
ExtendedAssetBundleImageKey
ExtendedAssetImageProvider
ExtendedExactAssetImageProvider
ExtendedFileImageProvider
ExtendedImage
extended image base on official
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
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.
GestureAnimation
GestureConfig
GestureDetails
GesturePageView
HttpClientHelper
MultipartFile
A file to be uploaded as part of a MultipartRequest.
MultipartRequest
A multipart/form-data request.
Request
An HTTP request where the entire request body is known in advance.
RetryHelper
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.

Extensions

DoubleExtension on double
Returns a value indicating whether two instances of Double represent the same value.
HeadersWithSplitValues on BaseResponse
RectExtension on Rect

Constants

cacheImageFolderName → const String
minGesturePageDelta → const double
minMagnitude → const double
velocity → const double

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

Functions

cachedImageExists(String url, {String? cacheKey}) Future<bool>
Check if the image exists in cache
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
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
CanScaleImage = bool Function(GestureDetails? details)
Whether should scale image
CanScrollPage = bool Function(GestureDetails? gestureDetails)
Whether we can scroll page
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
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.
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
OnSlidingPage = void Function(ExtendedImageSlidePageState state)
Call on sliding page
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

Exceptions / Errors

ClientException
An exception caused by an error in a pkg/http client.
OperationCanceledError