imager 1.0.1 imager: ^1.0.1 copied to clipboard
Flutter package to conveniently work with image widgets which comes from network, local, file and memory
imager #
Flutter package to conveniently work with image widgets which comes from network, local, file and memory
Features #
- Load images from Network, Local, Memory and File sources (plus DecorationImage for Container widget)
- Cache network images using cached_network_image package
- Show svg pictures using flutter_svg package
- Ability to add decoration and make your image curved and use other shapes
- Web friendly
- Support Padding and Margin
- Mirror your image
- Circle image
- Choosing proper widget based on source type (eg. svg, png, gif,...)
- Occupy defined height and width before loading the image (to avoid flicker)
Usage #
- To use this plugin, add imager as a dependency in your pubspec.yaml file.
dependencies:
imager: ^lastVersion
- For network images, define your placeholder image
void main() {
Imager.placeholderPath = 'assets/placeholder.png';
runApp(const MyApp());
}
- Load your image using
Imager
utility class
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Imager.fromNetwork('https://docs.flutter.dev/assets/images/flutter-logo-sharing.png'),
),
);
}
}