AnalyticsData constructor

const AnalyticsData({
  1. required String category,
  2. @JsonKey.new(name: 'total_items') required int totalItems,
  3. @JsonKey.new(name: 'start_date') required String startDate,
  4. @JsonKey.new(name: 'end_date') required String endDate,
  5. @JsonKey.new(name: 'total_count') required int totalCount,
  6. required Map<String, int> items,
})

Implementation

const factory AnalyticsData({
  required String category,
  @JsonKey(name: 'total_items') required int totalItems,
  @JsonKey(name: 'start_date') required String startDate,
  @JsonKey(name: 'end_date') required String endDate,
  @JsonKey(name: 'total_count') required int totalCount,

  /// Map of formula name -> install count.
  required Map<String, int> items,
}) = _AnalyticsData;