multi_type_image_loader

Creator: coderz1093

Last updated:

0 purchases

multi_type_image_loader Image
multi_type_image_loader Images
Add to Cart

Description:

multi type image loader

MultiTypeImageLoader #
A Flutter package to load and display images from various sources including asset files, network links, memory, files, SVGs, and Lottie animations, with support for directional flipping based on text direction.
Features #

Load images from different sources:

Assets
Network links
Memory
Files
SVG
Lottie animations


Support for directional flipping based on text direction (RTL/LTR).
Customizable image properties like height, width, fit, and more.
Optional tap handling with onTap callback.
Customizable error widget for handling image load failures.

Installation #
Add this to your package's pubspec.yaml file:
dependencies:
multi_type_image_loader: ^1.0.0
copied to clipboard

Then, install the package using the following command:
-flutter pub get

Usage #
Import it
import 'package:multi_type_image_loader/multi_type_image_loader.dart';
copied to clipboard
Parameters #

image: The image source (String for asset/link/file, Uint8List for memory).
imageType: The type of image source (Asset, Link, Memory, File, SVG, Lottie).
fit: How the image should be inscribed into the space allocated for it.
height, width: The height and width of the image.
imageBytes: The bytes of the image when imageType is ImageType.memory.
onTap: Callback function to handle taps on the image.
isDirectionRequired: Flag to indicate whether directional flipping is required. (defaults to true)
errorWidget: Widget to display in case of image load failure.

Example Usage #
DirectionImage(
image: 'path/to/image.jpg',
imageType: ImageType.asset,
fit: BoxFit.cover,
onTap: () => print('Image tapped!'),
errorWidget: Icon(Icons.error),
),
copied to clipboard
DirectionImage(
image: '[invalid URL removed]',
imageType: ImageType.link,
height: 200,
width: 300,
),
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.