listCollections method

Future<List<Map<String, dynamic>>> listCollections(
  1. {bool excludeSystem = true}
)

Implementation

Future<List<Map<String, dynamic>>> listCollections({
  bool excludeSystem = true,
}) async {
  final resp = await _connection.request(
      path: '/_api/collection',
      queries: {'excludeSystem': excludeSystem.toString()});

  final data = _connection.arangoMajor <= 2
      ? resp.body['collections']
      : resp.body['result'];

  return List<Map<String, dynamic>>.from(data);
}