imagewidget library

Classes

AssetLottie
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
BytesLoader
An interface that can be implemented to support decoding vector graphic binary assets from different byte sources.
ByteStream
A stream of chunks of bytes representing a single piece of data.
Cache
The cache for decoded SVGs.
CancellationToken
CancellationTokenSource
Client
The interface for HTTP clients that take care of maintaining persistent connections across multiple requests to the same server.
ColorMapper
A class that transforms from one color to another during SVG parsing.
CropAspectRatios
DefaultSvgTheme
The SVG theme to apply to descendant SvgPicture widgets which don't have explicit theme values.
DropShadow
EditActionDetails
EditorConfig
EditorCropLayerPainter
ExtendedAssetBundleImageKey
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
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.
FileLottie
FrameRate
GestureAnimation
GestureConfig
GestureDetails
GesturePageView
HeroWidget
make hero better when slide out
HttpClientHelper
ImageInfoData
ImageListsWidget
ImageWidget
ImageZoom
Lottie
A widget to display a loaded LottieComposition. The controller property allows to specify a custom AnimationController that will drive the animation. If controller is null, the animation will play automatically and the behavior could be adjusted with the properties animate, repeat and reverse.
LottieBuilder
A widget that displays a Lottie animation.
LottieCache
LottieComposition
LottieDelegates
LottieDrawable
LottieFontStyle
LottieImageAsset
LottieOptions
LottieProvider
Marker
MemoryLottie
MultipartFile
A file to be uploaded as part of a MultipartRequest.
MultipartRequest
A multipart/form-data request.
NetworkLottie
PictureInfo
The deocded result of a vector graphics asset.
PictureProvider
Deprecated class, will be removed, does not do anything.
RawLottie
A widget that displays a LottieDrawable directly.
RenderCache
Request
An HTTP request where the entire request body is known in advance.
RetryHelper
Skeleton
SlidePage
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.
Svg
A utility class for decoding SVG data to a DrawableRoot or a PictureInfo.
SvgAssetLoader
A BytesLoader that decodes and parses an SVG asset in an isolate and creates a vector_graphics binary representation.
SvgBytesLoader
A BytesLoader that decodes and parses a UTF-8 encoded SVG string from a Uint8List in an isolate and creates a vector_graphics binary representation.
SvgCacheKey
A SvgTheme aware cache key.
SvgFileLoader
A BytesLoader that decodes SVG data from a file in an isolate and creates a vector_graphics binary representation.
SvgImage
SvgLoader<T>
A BytesLoader that parses a SVG data in an isolate and creates a vector_graphics binary representation.
SvgNetworkLoader
A BytesLoader that decodes and parses a UTF-8 encoded SVG string the network in an isolate and creates a vector_graphics binary representation.
SvgPicture
A widget that will parse SVG data for rendering on screen.
SvgStringLoader
A BytesLoader that parses an SVG string in an isolate and creates a vector_graphics binary representation.
SvgTheme
A theme used when decoding an SVG picture.
ValueDelegate<T>
VectorGraphicUtilities
Utility functionality for interaction with vector graphic assets.

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
vg → const VectorGraphicUtilities
The VectorGraphicUtilities instance.

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
svg Svg
Instance for Svg's utility methods, which can produce a DrawableRoot or PictureInfo from String or Uint8List.
final

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
getFile(String source) → dynamic
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
DoubleClickAnimationListener = void Function()
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
ErrorWidgetBuilder = Widget? Function()
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
LottieDecoder = Future<LottieComposition?> Function(List<int> bytes)
A function that knows how to transform a list of bytes to a LottieComposition
LottieImageProviderFactory = ImageProvider<Object>? Function(LottieImageAsset)
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