listCollections method

Future<List<String>> listCollections()

Lists all collections

Implementation

Future<List<String>> listCollections() async {
  final response = await _client.get(
    Uri.parse('$baseUrl/collections'),
    headers: _headers,
  );

  final data = _handleResponse(response);
  final collections = data['collections'] as List? ?? [];
  return List<String>.from(collections);
}