I am having trouble on converting Uint8List image to File on flutter web since dart:io is not supported on the web, i need it to be file in order to upload it to FirebaseStorage, is there any workaround for this ? thankyou
I am having trouble on converting Uint8List image to File on flutter web since dart:io is not supported on the web, i need it to be file in order to upload it to FirebaseStorage, is there any workaround for this ? thankyou
Since dart:io isn't avalible on web, you can use the universal_io package.
Add it to your pubspec.yaml.
import 'package:universal_io/io.dart';
File createFileFromBytes(Uint8List bytes) => File.fromRawPath(bytes);