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');
hybridfileimage(file, width: 50, height: 50),
hybridassetimage('assets/my_image.svg', width: 50, height: 50),
hybridnetworkimage('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 ��
Comments are closed.