fromString function

Duration fromString(
  1. String str
)

将形如 102:10:04 格式的字符串 转换 Duration

fromSimpleString('10:02')

Implementation

Duration fromString(String str) {
  return Duration(seconds: _str2Seconds(str.split(':')));
}