hybrid_image 1.0.0 hybrid_image: ^1.0.0 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:
HybridImage.asset()
HybridImage.network()
HybridImage.file()
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,
width: 50,
height: 50,
),
HybridImage.asset(
'assets/my_image.svg',
width: 50,
height: 50,
),
HybridImage.network(
'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 :)