ConvertStringToDuration class
A tool to convert a string to a Duration.
Constructors
- ConvertStringToDuration(String? input)
-
const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDuration(
) → Duration -
Tries convert the input to a Duration. It assumes the
input format is
HH:MM:SS.SSS
. Throws ConvertStringToDurationEx on error. -
toDurationOrNull(
) → Duration? -
Tries to convert the input to a Duration. Accepts formats like
HH
,HH:MM
,HH:MM:SS
, andHH:MM:SS.SSS
. Any components not specified are set to 0. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited