list static method

Future<List<CloudMediaItem>> list({
  1. CloudMediaType? type,
  2. int limit = 50,
  3. int offset = 0,
  4. DateTime? startDate,
  5. DateTime? endDate,
  6. String? searchQuery,
})

List all media uploaded by the current authenticated user.

Supports filtering by type, date range, and pagination.

// All media
final all = await CloudMedia.list();

// Images only
final images = await CloudMedia.list(type: CloudMediaType.image);

// Date range
final recent = await CloudMedia.list(
  startDate: DateTime.now().subtract(Duration(days: 7)),
);

Implementation

static Future<List<CloudMediaItem>> list({
  CloudMediaType? type,
  int limit = 50,
  int offset = 0,
  DateTime? startDate,
  DateTime? endDate,
  String? searchQuery,
}) async {
  _ensure();
  return _provider!.listMedia(
    type: type,
    limit: limit,
    offset: offset,
    startDate: startDate,
    endDate: endDate,
    searchQuery: searchQuery,
  );
}