flutter_image_converter
0.4.1, released 2 years ago by syrokomskyi.com
Converts between Flutter and Dart image types, including ImageProvider, ui.Image, widget.Image, and raw bytes.
What it does
Provides extension methods that transform image data between common Flutter/Dart representations. It supports all formats recognized by the image package and works on all platforms, including web.
AI-written summary of version 0.4.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to display an image from a Uint8List or convert an ImageProvider to raw bytes
- You want to convert a widget.Image to a ui.Image for custom painting
- You need to support multiple image formats without writing custom decoding logic
Skip it when
- You only need basic image loading or caching
- You require high-performance, low-level image manipulation beyond conversion
Strengths
- All-in-one conversion for ImageProvider, ui.Image, widget.Image, and bytes
- Web platform support added in 0.4.0
- Well‑tested and documented with example code
Weaknesses
- File handling is excluded in 0.4.0
- May add runtime overhead for large images
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
```dart
import 'package:flutter_image_converter/flutter_image_converter.dart';
// Convert an AssetImage to a ui.Image
final uiImage = await AssetImage('assets/pic.png').uiImage;
// Convert raw bytes to a widget.Image
final widgetImage = Uint8List.fromList([/* bytes */]).widgetImage;
```Alternatives
Packages that do the same job and could replace flutter_image_converter.
- image_cropper
A Flutter plugin for Android, iOS and Web supports cropping images
84Compare - fc_native_image_resize
A Flutter plugin to resize images via native APIs.
69Compare - platform_image_converter
Cross‑platform image format conversion and resizing using native APIs
75Compare - simple_native_image_compress
Native image compression library supporting Windows, Linux, Android, iOS, and macOS.
48Compare
Works with
Packages commonly used together with flutter_image_converter: ones it builds on, ones built on it, and its own family.