nc-photos/app/lib/mobile/android/share.dart
2022-04-06 02:37:58 +08:00

19 lines
557 B
Dart

import 'package:flutter/services.dart';
class Share {
static Future<void> shareItems(
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 const _channel = MethodChannel("com.nkming.nc_photos/share");
}