exportCollection method

Future<void> exportCollection(
  1. String collectionName,
  2. String filePath
)

Implementation

Future<void> exportCollection(String collectionName, String filePath) async {
  final collection = _collections[collectionName];
  if (collection != null) {
    final dataToSave = jsonEncode(collection.collection);
    _harnFile.writeExportFile(collectionName, dataToSave, 'harnCollection');
  } else {
    throw Exception('Collection $collectionName not found');
  }
}