Files
toaster/plugins/toaster_utils/toaster_utils_ios/pigeons/messages.dart
T
mars3142 2847092782
Test / test (push) Successful in 7m16s
starting porting old Java code to Kotlin
- no stubs for iOS and macOS yet

Signed-off-by: Peter Siegmund <developer@mars3142.org>
2026-04-26 16:51:32 +02:00

59 lines
1.1 KiB
Dart

// ToasterUtilsApi must be abstract.
// ignore_for_file: one_member_abstracts
import 'package:pigeon/pigeon.dart';
@ConfigurePigeon(
PigeonOptions(
dartOut: 'lib/src/messages.g.dart',
dartPackageName: 'toaster_utils',
swiftOut: 'ios/toaster_utils_ios/Sources/toaster_utils_ios/Messages.g.swift',
swiftOptions: SwiftOptions(),
copyrightHeader: 'pigeons/copyright.txt',
),
)
@HostApi()
abstract class ToasterUtilsApi {
@async
String? getPlatformName();
@async
List<App> getInstalledApps();
@async
App? getInstalledApp(String packageName);
@async
List<Toast> getToasts(String packageName);
@async
List<Toast> getToastFiltered(String packageName, int from);
@async
bool isServiceRunning();
@async
void showSettings();
@async
void exampleToast();
}
class App {
const App(this.packageName, this.appName, this.installedBy, this.icon);
final String packageName;
final String appName;
final String installedBy;
final Uint8List icon;
}
class Toast {
const Toast(this.app, this.message, this.timestamp, this.duration);
final App app;
final String message;
final int timestamp;
final int duration;
}