Pomodoro class abstract

The class that represents the Pomodoro.

You can easily create a Pomodoro set by implementing the following.

final Pomodoro pomodoro = Pomodoro(Configuration()
          .setConcentrationMinutes(20)
          .setBreakMinutes(5)
          .setLongerBreakMinutes(15)
          .setCountUntilLongerBreak(4));

while (pomodoro.performs()) {
  if (pomodoro.shouldStartBreak()) {
    pomodoro.startBreak();

    while (pomodoro.isBreaking()) {
      if (pomodoro.shouldEndBreak()) {
         pomodoro.endBreak();
      }
    }
  }
}

Constructors

Pomodoro(Configuration configuration)
The factory constructor.
factory

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

endBreak() → void
Ends the break.
inherited
isBreaking() bool
Checkes if a break is ongoing.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performs() bool
Starts a pomodoro set and returns true as long as this pomodoro set is ongoing.
reset() → void
Resets the pomodoro.
shouldEndBreak() bool
Checkes if a break should be ended.
inherited
shouldStartBreak() bool
Checkes if a break should be started.
inherited
startBreak() → void
Starts the break.
inherited
stop() → void
Stops the pomodoro.
toString() String
A string representation of this object.
inherited

Operators

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