A command line app that will convert an image into a Uint8List which can be consumed by a Flutter app using the MemoryImage
, Image.memory
, or FadeInImage.memoryNetwork
classes.
In your terminal:
pub global activate memory_image_converter
This command-line tool takes two arguments:
- The name of the variable you wish to define
- The path to the image you wish to convert
pub global run memory_image_converter myImage test.png
pub global run memory_image_converter myImage test.png > my_image.dart
memory_image_converter myImage test.png > my_image.dart