hybrid_image 0.0.7 hybrid_image: ^0.0.7 copied to clipboard
This package wraps the flutter_svg package and the Flutter SDK image constructors. The package picks the right Image constructor based on extension
Hybrid Image #
Wraps flutter_svg and the Flutter SDK image providers and picks the right widget based on the file extension
Features #
As of right now it's possible to use three widgets:
HybridAssetImage
HybridNetworkImage
HybridFileImage
Memory image isn't supported as of right now, because it's not possible to distinct between svg images and regular images
Getting started #
Since it's a wrapper for flutter_svg and the normal image constructors, there's not special usage to be mentioned. Pick the right widget for your use case whether it's network, asset or file.
Usage #
final file = File('your/path.png');
HybridImage.file(
file: file,
width: 50,
height: 50,
),
HybridImage.asset(
assetPath: 'assets/my_image.svg',
width: 50,
height: 50,
),
HybridImage.network(
imageUrl: 'https://my.website.com/this_image.jpg',
width: 50,
height: 50,
),
Additional information #
This package has been made for convenience, if you have any good additions feel free to open a pull request on Github :)