PingSummary.fromMap constructor
Implementation
factory PingSummary.fromMap(Map<String, dynamic> map) {
return PingSummary(
transmitted: map['transmitted']?.toInt() ?? 0,
received: map['received']?.toInt() ?? 0,
time: map['time'] != null ? Duration(milliseconds: map['time']) : null,
errors: map['errors'] is List
? map['errors'].map<PingError>((e) => PingError.fromMap(e)).toList()
: null,
);
}