Closed micshome closed 3 years ago
When parsing a string with us function tryParseDuration always returns Format error
Example: tryParseDuration('1us');
Reason is a mistake in validation RegExp, extra ] after "us":
final match = RegExp(r'^(\d+)(d|h|m|s|ms|us])$').matchAsPrefix(part);
in file duration-2.0.15/lib/src/parse/parse.dart, line 13
Thanks! Fixed it.
When parsing a string with us function tryParseDuration always returns Format error
Example: tryParseDuration('1us');
Reason is a mistake in validation RegExp, extra ] after "us":
final match = RegExp(r'^(\d+)(d|h|m|s|ms|us])$').matchAsPrefix(part);
in file duration-2.0.15/lib/src/parse/parse.dart, line 13