TimeSpan.ofSingleField constructor
TimeSpan.ofSingleField(
- dynamic field,
- num value
Implementation
factory TimeSpan.ofSingleField(dynamic field, num value) {
final unit =
timeSpanUnitOf(field) ?? (throw Exception("Invalid time span $field"));
return unit.toTimeSpan(value);
}