LeakSummary.fromJson constructor

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

Implementation

factory LeakSummary.fromJson(Map<String, dynamic> json) => LeakSummary(
      (json[_JsonFields.totals] as Map<String, dynamic>).map(
        (key, value) => MapEntry(
          LeakType.byName(key),
          int.parse(value as String),
        ),
      ),
      time:
          DateTime.fromMillisecondsSinceEpoch(json[_JsonFields.time] as int),
    );