toDuration method

Duration toDuration(
  1. String value
)

text to duration example:

days - hours - minutes - seconds - milliseconds - microseconds

0 - 0 - 0 - 0 - 0 - 0

"0-0-0-0-0-0".toDuration();

Implementation

Duration toDuration(String value) {
  return Duration().fromText(value);
}