flutter_image_converter 0.1.0
flutter_image_converter: ^0.1.0 copied to clipboard
Ultimative converter between Dart & Flutter images: ui, widgets, package image, ImageProvider, raw bytes, Base64 string. You no longer have to worry about writing code to convert images in different f [...]
Flutter Image Converter #

Converts Dart & Flutter images: ui, widgets, package image, ImageProvider, bytes, and base64 string. You no longer have to worry about writing code to convert images in different formats. Works in any direction as extensions. The easy-to-use and well-tested package. Feel free to use it in your awesome project.
Share some ❤️ and star repo to support the project.
Usage #
Raw bytes from File to Flutter Widget #
File('1.jpg').widgetImage
Supports all formats from the package image.
Package Image to Flutter Widget #
Image(...).widgetImage
ImageProvider to raw bytes #
AssetImage('nature.webp').uint8List
Supports all ImageProviders: assets, files, memory, network, etc.
See folders example and test for more use cases.
Available Converters #
import 'dart:ui' as ui;
import 'package:flutter/widgets.dart' as widget;
import 'package:image/image.dart' as image;
| extension name | image.Image | ui.Image | widget.Image | ImageProvider | Base64String | Uint8List | ||
|---|---|---|---|---|---|---|---|---|
| image.Image | imageImage |
✅ | ✅ | ✅ | ✅ | ✅ | ||
| ui.Image | uiImage |
✅ | ✅ | ✅ | ✅ | ✅ | ||
| widget.Image | widgetImage |
✅ | ✅ | ✅ | ✅ | ✅ | ||
| ImageProvider | imageProvider |
✅ | ✅ | ✅ | ✅ | ✅ | ||
| Base64String | base64String |
✅ | ✅ | ✅ | ✅ | ✅ | ||
| Uint8List | uint8List |
✅ | ✅ | ✅ | ✅ | ✅ |
Screenshots #

Welcome #
Requests and suggestions are warmly welcome.
This package is open-source, stable and well-tested. Development happens on GitHub. Feel free to report issues or create a pull-request there.
General questions are best asked on StackOverflow.
TODO #
- Explane
Image,ImageProvider, etc. 1 - Extensions for transform images to any formats?
Created with ❤️