OverflowedTime class
To keep days
Constructors
- OverflowedTime({required int hour, required int days, int minute = 0, int second = 0})
-
Initialize new
OverflowedTime
instanceconst
Properties
- asDateTime → DateTime
-
Convert to DateTime
no setterinherited
- asOverflowed → OverflowedTime
-
Convert to
OverflowedTime
representationno 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 millisecondsno setterinherited - inMins → int
-
Represents the
Time
in minutes or total minutesno setteroverride - inSeconds → int
-
Represents the
Time
in seconds or total secondsno 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 formatHH: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
toString
inherited -
isAfter(
Time time, {bool orSame = false}) → bool -
////////////////////////////////// COMPARISON
Is the
Time
after anothertime
inherited -
isBefore(
Time time, {bool orSame = false}) → bool -
Is the
Time
before anothertime
inherited -
isWithinRange(
Time start, Time end) → bool -
Return true if time is within
start
andend
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 formatHH:mm:ss
inherited -
toStringWithSeparator(
String separator) → String -
Get the formatted
String
with theseparator
between each partinherited -
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