fromJson method
Implementation
Duration fromJson(Map data) {
final DurationDataScheme durationData = DurationDataScheme(data);
return Duration(
days: (durationData.days ?? 0).toInt(),
hours: (durationData.hours ?? 0).toInt(),
minutes: (durationData.minutes ?? 0).toInt(),
seconds: (durationData.seconds ?? 0).toInt(),
milliseconds: (durationData.milliseconds ?? 0).toInt(),
microseconds: (durationData.microseconds ?? 0).toInt(),
);
}