general_image

Last updated:

0 purchases

general_image Image
general_image Images
Add to Cart

Description:

general image

This Flutter package provides a simple way to show images from the Internet or from assets. It supports both PNG and SVG images.
Features #

Show images from the Internet with a single line of code:

GeneralNetworkImage(url: "url",height: 50, width: 50,matchTextDirection: true,)
copied to clipboard

Show images from assets with a single line of code:

GeneralImageAssets(path: "assets_path",width: 50,height: 50,color: Colors.red,matchTextDirection: true,boxFit: BoxFit.contain,)
copied to clipboard

Cache images to improve performance
Support for both PNG and SVG images in one line

Getting started #
To use the GeneralImage package, simply import it into your project:
import 'package:general_image/general_image.dart';
copied to clipboard
Usage #
If you want to show the image, in case of "svg" or "png" use this code:
GeneralNetworkImage(
url: "url",
height: 50, width: 50,
matchTextDirection: true,
boxFit: BoxFit.fill,
color: Colors.green,
failWidget:Icon(Icons.error) ),
copied to clipboard
If you want to show the image from your assets, in case of "svg" or "png" use this code:
GeneralImageAssets(
path: "path",
width: 50,height: 50,
color: Colors.red,
matchTextDirection: true,
boxFit: BoxFit.contain,)
copied to clipboard
the package takes the following parameters:


url: The URL of the image.


height: The height of the image in pixels.


width: The width of the image in pixels.


matchTextDirection: support RTL.


color:The color of the image.


boxFit:The way in which the image should be scaled to fit the available space.


Plugins #

shimmer: link

cached_network_image: link

flutter_svg: link


Conclusion #
The GeneralImage package provides a simple way to show images from the Internet or from assets. It supports both PNG and SVG images, and it caches images to improve performance.
Author #

Hassan Hallak
[email protected]

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.