flutter_simple_image_utils
library
Functions
-
convertImageAssetToString(String imagePath)
→ Future<String>
-
This function converts an image asset into a base 64 encoded
string. The imagePath parameter is the path to something in your
assets folder, for example "assets/images/profile.jpg".
-
convertImageFileToString(XFile image)
→ Future<String>
-
This function converts an image file into a base 64 encoded
string. The image parameter is a cross-platfrom file. It is treated
as a list of bytes. This is useful if you are using tools
like crop to get a new image and then having to save the image
as a string.
-
convertUiImageToString(Image image)
→ Future<String?>
-
This function converts a ui Image to a base 64 encoded string.
The image parameter is a ui.Image, such as what the crop tool
will give you after cropping an image. This is useful if you have
to save the ui.Image to storage (such as with Hive)