pullInstructionContent function

Future<double> pullInstructionContent(
  1. List<Record> records
)

Implementation

Future<double> pullInstructionContent(List<Record> records) async {
  final totalLines = records.map((e) => e.lines?.found).reduce(sum);
  final hitLines = records.map((e) => e.lines?.hit).reduce(sum);
  return (hitLines ?? 0) / (totalLines ?? 1) * 100;
}