img library Null safety

animation demonstrating the example appEasily paint mirror-tiling images for seamless edge-to-edge textures from any source.

Defines Repeat, an expansion on ImageRepeat that enables mirroring,
as well as the Widgets, extensions, and methods to support it.

A Repeat provides value over an ImageRepeat as it defines three
additional tiling methods that invlove mirroring alternating tiles to
create a seamless edge-to-edge texture from a single image. Listing | API Doc | GitHub

API References: Repeat | ImageToo | ImageDecorationToo | paintImageToo() | InkImg

Provides the ImageToo stateless widget and several named constructors
for easily rendering images from a variety of sources.

Also available is the DecorationImageToo class for displaying an image as
a Decoration instead of as a Widget.

Shorthands: Img, DecorationImg

An InkImg will create an Ink.image-like decoration for a Material
that is capable of using the new Repeat modes and also renders
ink splashes over top of itself.

Finally, consider the String to seamless texture methods in StringToTexture. Also:

Along with ImageToo, a new RawImageToo and RenderImageToo had to be provided.

DecorationImageToo necessitated the DecorationImagePainterToo class.

These exist because RenderImageToo and DecorationImagePainterToo needed
to be forked from their vanilla Flutter counterparts in order to accommodate
a modified paintImage method called, predictably, paintImageToo that
handles the new Repeat values.


The painter for a DecorationImageToo.
An image to show in a BoxDecoration which supports the Repeat rendering modes including Repeat.mirror.
A shorthand wrapper for DecorationImageToo.
A StatefulWidget that renders an image according to a swath of optional properties. Several constructors are provided for painting an image from a variety of sources.
A shorthand wrapper for ImageToo.
A convenience widget for drawing images and other decorations on Material widgets, so that InkWell and InkResponse splashes will render over them.


Provides toSeamlessTexture that considers this Uin8List as bytes that describe an image and returns an ImageToo widget.
Provides toSeamlessTexture that considers this File as a file that leads to an image and returns an ImageToo widget.
Provides toSeamlessTexture that considers this String as a URL that leads to an image and returns an ImageToo widget.
This is default behavior.


debugFlushLastFrameImageSizeInfo() → void
Flushes inter-frame tracking of image size information from paintImage.
paintImageToo({required Canvas canvas, required Rect rect, required Image image, String? debugImageLabel, double scale = 1.0, ColorFilter? colorFilter, BoxFit? fit, Alignment alignment =, Rect? centerSlice, Repeat repeat = Repeat.noRepeat, Offset mirrorOffset =, bool flipHorizontally = false, bool invertColors = false, FilterQuality filterQuality = FilterQuality.low, bool isAntiAlias = false}) → void
Paints an image into the given rectangle on the canvas.


How to paint any portions of a box not covered by an image.