parseMillisecondsDuration function
Parses the duration in milliseconds stored under key in json.
Throws a FormatException when the value is missing or is not a number.
As in parseIso8601, the exception does not carry json itself.
Implementation
Duration parseMillisecondsDuration(Map<String, dynamic> json, String key) {
return Duration(milliseconds: _millisecondsUnder(json, key));
}