OverflowedTime class

To keep days

Inheritance

Constructors

OverflowedTime({required int hour, required int days, int minute = 0, int second = 0})
Initialize new OverflowedTime instance
const

Properties

asDateTime DateTime
Convert to DateTime
no setterinherited
asOverflowed OverflowedTime
Convert to OverflowedTime representation
no setterinherited
days int
Days
final
duration Duration
Represents the Time in Duration
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hour int
Represents hours
finalinherited
inMilliseconds int
Represents the Time in milliseconds or total milliseconds
no setterinherited
inMins int
Represents the Time in minutes or total minutes
no setteroverride
inSeconds int
Represents the Time in seconds or total seconds
no setterinherited
key String
/////////////////////////////// KEY Convert Time to a unique id (using dash, most db system won't accept : as id)
no setterinherited
millisecond int
Represents the milliseconds [0...999]
finalinherited
minute int
Represents minutes
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
second int
Represents seconds
finalinherited
title String
Represent the time as a String in the format HH:mm:ss:SSS
no setterinherited

Methods

addDuration(Duration dur) Time
////////////////////////////////// OPERATIONS
inherited
addHours(int amount) Time
Add hours and may be Overflowed
inherited
addMinutes(int amount) Time
Add minutes and may be Overflowed
inherited
addSeconds(int amount) Time
Add seconds and may be Overflowed
inherited
closeTo(Time anotherTime, {Duration delta = const Duration(seconds: 1)}) bool
Close to another Time
inherited
compareTo(Time other) int
Comparator function used for sorting purpose
inherited
copyWith({int? hour, int? minute, int? second}) Time
inherited
format([TimeStringFormat format = TimeStringFormat.HHmmssSSS]) String
Format the Time to String
inherited
isAfter(Time time, {bool orSame = false}) bool
////////////////////////////////// COMPARISON Is the Time after another time
inherited
isBefore(Time time, {bool orSame = false}) bool
Is the Time before another time
inherited
isWithinRange(Time start, Time end) bool
Return true if time is within start and end
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
overflowBy(int days) OverflowedTime
Keep days
inherited
roundToTheNearestMin(int stepInMin, {bool back = false}) Time
Round the time to next nearest
inherited
toString() String
Represent the time as a String in the format HH:mm:ss
inherited
toStringWithSeparator(String separator) String
Get the formatted String with the separator between each part
inherited
withDate(Date date) DateTime
Convert to DateTime with the given date
inherited

Operators

operator *(num times) Time
inherited
operator +(Time other) Time
inherited
operator -(Time other) Time
inherited
operator /(num times) Time
inherited
operator <(Time other) bool
inherited
operator <=(Time other) bool
inherited
operator ==(Object other) bool
The equality operator.
inherited
operator >(Time other) bool
inherited
operator >=(Time other) bool
inherited