2025-08-19 12:48:35 -04:00
|
|
|
import 'package:pigeon/pigeon.dart';
|
|
|
|
|
|
|
|
|
|
@ConfigurePigeon(
|
|
|
|
|
PigeonOptions(
|
2026-01-24 14:34:29 -05:00
|
|
|
dartOut: 'lib/platform/remote_image_api.g.dart',
|
|
|
|
|
swiftOut: 'ios/Runner/Images/RemoteImages.g.swift',
|
2025-08-19 12:48:35 -04:00
|
|
|
swiftOptions: SwiftOptions(includeErrorClass: false),
|
2026-03-05 12:04:45 -05:00
|
|
|
kotlinOut: 'android/app/src/main/kotlin/app/alextran/immich/images/RemoteImages.g.kt',
|
2026-01-24 14:34:29 -05:00
|
|
|
kotlinOptions: KotlinOptions(package: 'app.alextran.immich.images', includeErrorClass: false),
|
2025-08-19 12:48:35 -04:00
|
|
|
dartOptions: DartOptions(),
|
|
|
|
|
dartPackageName: 'immich_mobile',
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
@HostApi()
|
2026-01-24 14:34:29 -05:00
|
|
|
abstract class RemoteImageApi {
|
2026-08-10 21:14:23 +06:00
|
|
|
/// Width and height are the physical decode size, or null for the source size.
|
2025-08-19 12:48:35 -04:00
|
|
|
@async
|
2026-08-10 21:14:23 +06:00
|
|
|
Map<String, int>? requestImage(
|
|
|
|
|
String url, {
|
|
|
|
|
required int requestId,
|
|
|
|
|
required bool preferEncoded,
|
|
|
|
|
int? width,
|
|
|
|
|
int? height,
|
|
|
|
|
});
|
2025-08-19 12:48:35 -04:00
|
|
|
|
2026-01-24 14:34:29 -05:00
|
|
|
void cancelRequest(int requestId);
|
2025-08-19 12:48:35 -04:00
|
|
|
|
|
|
|
|
@async
|
2026-01-24 14:34:29 -05:00
|
|
|
int clearCache();
|
2025-08-19 12:48:35 -04:00
|
|
|
}
|