iso_duration library
Extensions
Functions
-
parseIso8601Duration(
String str) → Duration - Converts an ISO 8601 duration string to a Dart Duration instance.
-
tryParseIso8601Duration(
String? str, {bool zeroAsNull = false}) → Duration? -
Returns
null
if the duration string format is invalid or if the duration is 0 andzeroAsNull
istrue
.