You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
basedFood-app/lib/data/media/media_service_interface.dart

24 lines
755 B

import 'dart:io';
import 'dart:typed_data';
/// Interface for media services (Immich, Blossom, etc.)
abstract class MediaServiceInterface {
/// Uploads an image file.
/// Returns a map with 'id' (or 'hash') and 'url' keys.
Future<Map<String, dynamic>> uploadImage(File imageFile);
/// Fetches image bytes for an asset/blob.
Future<Uint8List> fetchImageBytes(String assetId, {bool isThumbnail = true});
/// Gets the full image URL for an asset/blob.
String getImageUrl(String assetId);
/// Gets the base URL.
String get baseUrl;
/// Clears the cache for a specific image URL or asset ID.
/// This is useful when images are removed from recipes to free up cache space.
Future<void> clearImageCache(String imageUrlOrAssetId);
}

Powered by TurnKey Linux.