Skip to content
pubscout

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.

WASM-ready
$ flutter pub add flutter_image_converter
Source repository

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.

Works with

Packages commonly used together with flutter_image_converter: ones it builds on, ones built on it, and its own family.