ImageWithStyle constructor

const ImageWithStyle({
  1. Key? key,
  2. required ImageProvider<Object> image,
  3. ImageStyle style = const ImageStyle(),
  4. bool gapless = false,
})

Creates an ImageWithStyle widget to render a styled image from a provider.

The required image specifies the source (e.g., BlurHashImage, NetworkImage). style configures display properties like fit and color blending. gapless enables continuous playback for animated or sequential images, default false.

Initialization builds the Image widget with all style params, defaulting alignment to center for balanced presentation.

Implementation

const ImageWithStyle(
    {super.key,
    required this.image,
    this.style = const ImageStyle(),
    this.gapless = false});