storeDoc function

Future<File?> storeDoc(
  1. Uint8List imgBytes,
  2. String name
)

Implementation

Future<File?> storeDoc(Uint8List imgBytes, String name) async {
  // Write the file
  try {
    var file = await localFile(name, "jaman");
    file = await file.writeAsBytes(imgBytes); //u good?
    return file;
  } catch (e) {
    debugPrint("!!! failed to store image: " + e.toString());
    return null;
  }
}