import 'dart:typed_data'; import 'package:flutter/services.dart'; class MediaStore { static const exceptionCodePermissionError = "permissionError"; static Future saveFileToDownload( String fileName, Uint8List fileContent) async { return (await _channel .invokeMethod("saveFileToDownload", { "fileName": fileName, "content": fileContent, }))!; } static Future copyFileToDownload( String toFileName, String fromFilePath) async { return (await _channel .invokeMethod("copyFileToDownload", { "toFileName": toFileName, "fromFilePath": fromFilePath, }))!; } static const _channel = MethodChannel("com.nkming.nc_photos/media_store"); }