storeImageMobile function

Future<String?> storeImageMobile(
  1. String key,
  2. Uint8List bytes
)

Implementation

Future<String?> storeImageMobile(String key, Uint8List bytes) async {
  final dir = await getApplicationDocumentsDirectory();
  final file = io.File('${dir.path}/$key');
  await file.writeAsBytes(bytes);
  return file.path;
}