nc-photos/app/lib/mobile/android/share.dart

25 lines
760 B
Dart
Raw Normal View History

import 'package:flutter/services.dart';
class Share {
static Future<void> shareItems(
2021-07-23 22:05:57 +02:00
List<String> fileUris, List<String?> mimeTypes) =>
_channel.invokeMethod("shareItems", <String, dynamic>{
"fileUris": fileUris,
"mimeTypes": mimeTypes,
});
static Future<void> shareText(String text, String? mimeType) =>
_channel.invokeMethod("shareText", <String, dynamic>{
"text": text,
"mimeType": mimeType,
});
static Future<void> shareAsAttachData(String fileUri, String? mimeType) =>
_channel.invokeMethod("shareAsAttachData", <String, dynamic>{
"fileUri": fileUri,
"mimeType": mimeType,
});
2021-09-15 08:58:06 +02:00
static const _channel = MethodChannel("com.nkming.nc_photos/share");
}