extended_image
library
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, {Object? body, Encoding? encoding})
→ Future<Response>
-
Sends an HTTP DELETE request with the given headers to the given URL.
-
get(Uri url, {})
→ 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
-
head(Uri url, {})
→ Future<Response>
-
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, {Object? body, Encoding? encoding})
→ Future<Response>
-
Sends an HTTP PATCH request with the given headers and body to the given
URL.
-
post(Uri url, {Object? body, Encoding? encoding})
→ Future<Response>
-
Sends an HTTP POST request with the given headers and body to the given URL.
-
put(Uri url, {Object? body, Encoding? encoding})
→ Future<Response>
-
Sends an HTTP PUT request with the given headers and body to the given URL.
-
read(Uri url, {})
→ 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, {})
→ 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