apptomate_custom_image 0.0.1 copy "apptomate_custom_image: ^0.0.1" to clipboard
apptomate_custom_image: ^0.0.1 copied to clipboard

A Flutter widget for displaying images with support for both network and asset images, customizable placeholders, error widgets, and rounded corners.

CustomImage #

A Flutter widget for displaying images with support for both network and asset images, customizable placeholders, error widgets, and rounded corners.

Features #

  • Supports network and asset images
  • Customizable height, width, and border radius
  • Placeholder widget for loading states
  • Error widget for failed image loads
  • Adjustable image fit modes

Installation #

Copy and paste the CustomImage class into your Flutter project.

Usage #

CustomImage(
  imageUrl: "https://example.com/image.jpg",
  height: 150.0,
  width: 150.0,
  borderRadius: 10.0,
  fit: BoxFit.cover,
  isNetworkImage: true,
  placeHolder: Center(child: CircularProgressIndicator()),
  errorWidget: Center(child: Icon(Icons.broken_image, color: Colors.red)),
)

Example with Asset Image #

CustomImage(
  imageUrl: "assets/images/sample.png",
  height: 100.0,
  width: 100.0,
  isNetworkImage: false,
)

Properties #

Property Type Description
imageUrl String The URL or asset path of the image.
height double The height of the image.
width double The width of the image.
borderRadius double The border radius of the image.
fit BoxFit The BoxFit mode for the image.
isNetworkImage bool Determines whether the image is from a network or an asset.
placeHolder Widget? Widget to display while loading the image.
errorWidget Widget? Widget to display if the image fails to load.
0
likes
0
points
45
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter widget for displaying images with support for both network and asset images, customizable placeholders, error widgets, and rounded corners.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on apptomate_custom_image