HoraDurationFactory class

Factory class for creating durations with fractional values.

Use these methods when you need to create durations from fractional hours, minutes, etc.

final d = HoraDurationFactory.fromHours(2.5);
print(d.hours); // 2
print(d.minutes); // 30

Properties

hashCode int
The hash code for this object.
no setterinherited
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
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromDays(double days) HoraDuration
Creates a duration from days (can be fractional).
fromHours(double hours) HoraDuration
Creates a duration from hours (can be fractional).
fromMinutes(double minutes) HoraDuration
Creates a duration from minutes (can be fractional).
fromSeconds(double seconds) HoraDuration
Creates a duration from seconds (can be fractional).