2023-09-08 17:47:39 +00:00
|
|
|
import 'package:pigeon/pigeon.dart';
|
|
|
|
|
|
|
|
@ConfigurePigeon(
|
|
|
|
PigeonOptions(
|
|
|
|
dartOut: 'lib/pigeon/platform.g.dart',
|
2023-09-08 19:44:37 +00:00
|
|
|
kotlinOut:
|
|
|
|
'android/src/main/kotlin/org/moxxy/moxxy_native/platform/PlatformApi.kt',
|
2023-09-08 17:47:39 +00:00
|
|
|
kotlinOptions: KotlinOptions(
|
|
|
|
package: 'org.moxxy.moxxy_native.platform',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
2023-09-18 15:58:16 +00:00
|
|
|
class ShareItem {
|
|
|
|
const ShareItem(this.path, this.mime, this.text);
|
|
|
|
final String? path;
|
|
|
|
final String mime;
|
|
|
|
final String? text;
|
|
|
|
}
|
|
|
|
|
2023-09-08 17:47:39 +00:00
|
|
|
@HostApi()
|
|
|
|
abstract class MoxxyPlatformApi {
|
|
|
|
String getPersistentDataPath();
|
|
|
|
|
|
|
|
String getCacheDataPath();
|
|
|
|
|
|
|
|
void openBatteryOptimisationSettings();
|
|
|
|
|
|
|
|
bool isIgnoringBatteryOptimizations();
|
2023-09-18 15:58:16 +00:00
|
|
|
|
|
|
|
void shareItems(List<ShareItem> items, String genericMimeType);
|
2023-09-08 17:47:39 +00:00
|
|
|
}
|