flutter_image_converter 0.2.0 copy "flutter_image_converter: ^0.2.0" to clipboard
flutter_image_converter: ^0.2.0 copied to clipboard

Ultimative converter between Dart & Flutter images: ui, widgets, package image, ImageProvider, raw bytes, Base64 string. Works in any direction.

Flutter Image Converter #

Cover - FlutterImageConverter

GitHub License Pub Package Code Size Publisher

Build Status Pull Requests Issues Pub Score

Well-tested and easy-to-use Dart & Flutter image transformer package: ui, widgets, image, ImageProvider, bytes, and base64 string. Works in any direction as extension. You no longer have to worry about writing code to convert images in different formats. 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

Can detect all formats from the package image.

ImageProvider to UI Image #

await AssetImage('1.jpg').uiImage

Package Image to Flutter Widget #

Image(...).widgetImage

ImageProvider to PNG raw bytes #

AssetImage('nature.webp').pngUint8List

Any formatted raw bytes to Widget Image #

bytes.widgetImage

File to PNG raw bytes #

File('nature.webp').pngUint8List

Supports the image providers:

  • AssetImage
  • FileImage
  • MemoryImage
  • NetworkImage
  • any providers from pub.dev inherited from ImageProvider

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 Uint8List
image.Image imageImage
ui.Image uiImage
widget.Image widgetImage
ImageProvider imageProvider
Uint8List uint8List

Screenshots #

Thanks #

While working on projects, I meet people who make the project better with their outsider and professional view. I want to write down their names here..... and I'd be happy to add your name as well.

eibaan

Welcome to Inspiration #

Requests and suggestions are warmly welcome.

Contributions are what make the open-source community such a great place to learn, create, and be inspired.

If this is your first contribution, I'll leave you with some of the best links I've found: they will help you get started or/and become even more efficient.

The package FlutterImageConverter is open-source, stable and well-tested. Development happens on GitHub. Feel free to report issues or create a pull-request there.

TODO (perhaps) #

Once you start using the FlutterImageConverter, it will become easy to choose the functionality to contribute. But if you already get everything you need from this package but have some free time, let me write here what I have planned:

  • Explane Image, ImageProvider, etc. 1
  • Detect formats provided instantiateImageCodec.
  • Transform images to any formats?

It's just a habit of mine: writing down ideas that come to mind while working on a project. I confess that I rarely return to these notes. But now, hopefully, even if you don't have an idea yet, these notes will help you choose the suitable feature and become a contributor to the open-source community.

Created with ❤️

3
likes
0
pub points
79%
popularity

Publisher

verified publishersyrokomskyi.com

Ultimative converter between Dart & Flutter images: ui, widgets, package image, ImageProvider, raw bytes, Base64 string. Works in any direction.

Repository (GitHub)
View/report issues

Topics

#converter #image #widget #ui #bytes

License

unknown (LICENSE)

Dependencies

flutter, image

More

Packages that depend on flutter_image_converter