2021-07-10 17:06:04 +02:00
|
|
|
import 'package:nc_photos/mobile/android/share.dart';
|
|
|
|
import 'package:nc_photos/platform/share.dart' as itf;
|
|
|
|
|
2021-09-28 08:36:00 +02:00
|
|
|
class AndroidFileShare extends itf.FileShare {
|
|
|
|
AndroidFileShare(this.fileUris, this.mimeTypes);
|
2021-07-10 17:06:04 +02:00
|
|
|
|
|
|
|
@override
|
2021-09-28 08:36:00 +02:00
|
|
|
share() {
|
2021-07-10 17:06:04 +02:00
|
|
|
return Share.shareItems(fileUris, mimeTypes);
|
|
|
|
}
|
|
|
|
|
|
|
|
final List<String> fileUris;
|
2021-07-23 22:05:57 +02:00
|
|
|
final List<String?> mimeTypes;
|
2021-07-10 17:06:04 +02:00
|
|
|
}
|
2021-09-28 08:36:00 +02:00
|
|
|
|
|
|
|
class AndroidTextShare extends itf.TextShare {
|
|
|
|
AndroidTextShare(
|
|
|
|
this.text, {
|
|
|
|
this.mimeType = "text/plain",
|
|
|
|
});
|
|
|
|
|
|
|
|
@override
|
|
|
|
share() {
|
|
|
|
return Share.shareText(text, mimeType);
|
|
|
|
}
|
|
|
|
|
|
|
|
final String text;
|
|
|
|
final String? mimeType;
|
|
|
|
}
|