ConvertStringToDuration class

A tool to convert a string to a Duration.

Constructors

ConvertStringToDuration(String? input)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
input 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 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, and HH: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