Usage.fromJson constructor

Usage.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Usage.fromJson(Map<String, dynamic> json) {
  return Usage(
    endDate: json['endDate'] as String?,
    items: (json['values'] as Map<String, dynamic>?)?.map((k, e) => MapEntry(
        k,
        (e as List)
            .whereNotNull()
            .map((e) =>
                (e as List).whereNotNull().map((e) => e as int).toList())
            .toList())),
    position: json['position'] as String?,
    startDate: json['startDate'] as String?,
    usagePlanId: json['usagePlanId'] as String?,
  );
}