emit method
Writes all leaks to disk as formatted JSON.
Existing files will be overwritten.
Implementation
@override
void emit(List<Allocation> leaks) {
final jsonList = leaks.map((allocation) => allocation.toJson()).toList();
final jsonString = _jsonEncoder.convert(jsonList);
File(filePath).writeAsStringSync(jsonString);
}