CountdownMilestone<T> class
Null safety
Countdown to an mielstone occurring at a specific duration from the completion of a parent Countdown
Constructors
- CountdownMilestone({required Countdown parent, required T event, required Duration fromEnd})
Properties
-
completed
→ BehaviorSubject<
bool> -
Has countdown completed
final, inherited
-
completesIn
→ Stream<
Duration> -
Emits the duration to completion every second
read-only, inherited
- completion → DateTime
-
The completion of this milestone
read-only, override
-
completion$
↔ Rx<
DateTime> -
Observable completion
read / write, inherited
- event → T
-
Event occuring at the end of the countdown
final, inherited
- fromEnd → Duration
-
Duration from the end of the parent countdown that this event
reaches completion
final
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- initialCompletion → DateTime
-
Initial time of completion
final, inherited
- isCompleted → dynamic
-
Has the completion time passed
read-only, inherited
- isNotCompleted → dynamic
-
Has the completion time not passed
read-only, inherited
-
milestones
→ Map<
T, CountdownMilestone< T> > -
Milestones relative to the completion
final, inherited
- parent → Countdown
-
Parent Countdown to which this milestone is related
final
- repeats ↔ CountdownRepeat?
-
Duration until the completion of the next instance of this countdown
when the current countdown is completed
@JsonKey(toJson: CountdownRepeat.repeatToJson), read / write, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
-
storage
↔ SimpleStorage<
String> -
Storage for completion overrides
read / write, inherited
-
withMilestones
→ Map<
T, Duration> -
Map of event names to the Duration from the completion
to the milestone
TODO: Allow this to take a function to calculate the final date time
from the countdown completion datetime
final, inherited
Methods
-
milestoneCompletedFor(
T event) → bool -
Returns if the milestone for the given
event
has completedinherited -
milestoneFor(
T event) → Countdown< T> ? -
Get the milestone for the given
event
inherited -
milestoneNotCompletedFor(
T event) → bool -
Returns if the milestone for the given
event
has not been completedinherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
restoreInitialCompletion(
) → Future< void> -
Restore inital completion date time
inherited
-
setNextCompletion(
int sinceCompletion) → Future< void> -
Calculates the time of next completion with the duration
sinceCompletion
inherited -
toString(
) → String -
A string representation of this object. [...]
inherited
-
updateCompletion(
DateTime completion) → Future< void> -
Time of completion
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited