2021-04-10 06:28:12 +02:00
|
|
|
import 'dart:typed_data';
|
|
|
|
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
|
|
|
|
class MediaStore {
|
|
|
|
static const exceptionCodePermissionError = "permissionError";
|
|
|
|
|
2021-04-30 17:09:46 +02:00
|
|
|
static Future<String> saveFileToDownload(
|
2021-07-23 22:05:57 +02:00
|
|
|
String fileName, Uint8List fileContent) async {
|
|
|
|
return (await _channel
|
|
|
|
.invokeMethod<String>("saveFileToDownload", <String, dynamic>{
|
|
|
|
"fileName": fileName,
|
|
|
|
"content": fileContent,
|
|
|
|
}))!;
|
|
|
|
}
|
2021-04-10 06:28:12 +02:00
|
|
|
|
|
|
|
static const _channel =
|
|
|
|
const MethodChannel("com.nkming.nc_photos/media_store");
|
|
|
|
}
|