toJson method

Map<String, dynamic> toJson()

Convert to JSON map.

Implementation

Map<String, dynamic> toJson() => {
      'filePath': filePath,
      'itemCount': itemCount,
      'totalCost': totalCost,
      'countByType':
          countByType.map((type, count) => MapEntry(type.name, count)),
    };