ConvertStringToDuration class
A tool to convert a string to a Duration.
Constructors
- ConvertStringToDuration(String? inputString)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- inputString → String?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDuration(
) → Duration -
Tries convert the inputString to a Duration. It assumes the
inputString format is
HH:MM:SS.SSS. Throws ConvertStringToDurationEx on error. -
toDurationOrNull(
) → Duration? -
Tries to convert the inputString 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