toSeamlessColumn method

ImageToo toSeamlessColumn(
  1. {double? width,
  2. double? height,
  3. double scale = 1.0,
  4. Offset offset = Offset.zero,
  5. Color? color,
  6. BlendMode? blendMode,
  7. FilterQuality quality = FilterQuality.low,
  8. bool isAntiAlias = false,
  9. bool isAsset = false,
  10. AssetBundle? bundle,
  11. String? package}
)

A method that considers this String as a URL that leads to an image and returns an ImageToo widget. This is default behavior.

If isAsset is passed true, the returning ImageToo expects this String to be the path to a direct asset image. In this scenario, further employ bundle or package if necessary.

The repeat property on this returned widget is set to Repeat.mirrorY which has the effect of creating a seamless, edge-to-edge vertical texture from any image that will fill the space of the widget.

Some images fare better than others as far as the quality of the output. Most will appear kaleidoscopic at worst and magical at best.

Still, condiering how few images out there are designed to support edge-to-edge tiling with a simple Repeat.repeat mode, this functionality broadly expands the versatility of using any image as a texture.

  • color is mixed with the image using blendMode.
  • Larger scale values render the image smaller.
  • Max x and y components for offset are equal to the resolution of the image and act to shift the texture's edges/translation.

Implementation

ImageToo toSeamlessColumn({
  double? width,
  double? height,
  double scale = 1.0,
  Offset offset = Offset.zero,
  Color? color,
  BlendMode? blendMode,
  FilterQuality quality = FilterQuality.low,
  bool isAntiAlias = false,
  bool isAsset = false,
  AssetBundle? bundle,
  String? package,
}) =>
    isAsset
        ? ImageToo.asset(
            this,
            width: width,
            height: height,
            scale: scale,
            repeat: Repeat.mirrorY,
            mirrorOffset: offset,
            color: color,
            colorBlendMode: blendMode,
            filterQuality: quality,
            isAntiAlias: isAntiAlias,
            bundle: bundle,
            package: package,
          )
        : ImageToo.network(
            this,
            width: width,
            height: height,
            scale: scale,
            repeat: Repeat.mirrorY,
            mirrorOffset: offset,
            color: color,
            colorBlendMode: blendMode,
            filterQuality: quality,
            isAntiAlias: isAntiAlias,
          );