nc-photos/lib/mobile/android/media_store.dart

20 lines
513 B
Dart
Raw Normal View History

2021-04-10 06:28:12 +02:00
import 'dart:typed_data';
import 'package:flutter/services.dart';
class MediaStore {
static const exceptionCodePermissionError = "permissionError";
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");
}