In the flutter web dart:io library is not supporting for conversion. Do we have any other way to convert the File to Base64 format in Flutter Web.
Asked
Active
Viewed 399 times
1
-
i am pretty sure you can use [base64](https://api.flutter.dev/flutter/dart-convert/base64-constant.html) top level constant – pskink Dec 31 '21 at 09:37
-
File type should convert to base 64 in web – Rahul Kavati Jan 03 '22 at 10:41
-
`final bytes = html.File(pickedFile.path.codeUnits, pickedFile.path); Uint8List b = Uint8List(bytes.toString().length); img64 = Base64Encoder().convert(b);` – Rahul Kavati Jan 03 '22 at 12:26