feat: Move over the platform API

This commit is contained in:
2023-09-08 19:47:39 +02:00
parent 6e6b50d0c2
commit 79f4420510
6 changed files with 308 additions and 0 deletions

22
pigeon/platform.dart Normal file
View File

@@ -0,0 +1,22 @@
import 'package:pigeon/pigeon.dart';
@ConfigurePigeon(
PigeonOptions(
dartOut: 'lib/pigeon/platform.g.dart',
kotlinOut: 'android/src/main/kotlin/org/moxxy/moxxy_native/platform/PlatformApi.kt',
kotlinOptions: KotlinOptions(
package: 'org.moxxy.moxxy_native.platform',
),
),
)
@HostApi()
abstract class MoxxyPlatformApi {
String getPersistentDataPath();
String getCacheDataPath();
void openBatteryOptimisationSettings();
bool isIgnoringBatteryOptimizations();
}