readValues function

void readValues()

Implementation

void readValues() {
  // Loading approved cases if they exist
  final approvedCases = ApprovalDart.loadApprovedCasesIfExists();
  final List<Item> actualItems = [];
  final List<Item> expectedItems = [];

  // For each case in approvedCases, add it as JSON to both actual and expected Items.
  for (var testCase in approvedCases) {
    actualItems.add(Item.fromJson(testCase['actual']));
    expectedItems.add(Item.fromJson(testCase['expected']));
  }

  // Printing the lengths of actualItems and expectedItems lists
  print(actualItems.length);
  print(expectedItems.length);
}