pomodoro4d 0.0.2 copy "pomodoro4d: ^0.0.2" to clipboard
pomodoro4d: ^0.0.2 copied to clipboard

This is a Pomodoro Technique binding library for the Dart language licensed under BSD 3-Clause.

example/example.dart

// Copyright (c) 2021, Kato Shinya. All rights reserved.
// Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:pomodoro4d/pomodoro4d.dart';

/// The class that demonstrates the [Pomodoro].
class DemoPomodoro {
  /// Starts the demonstrates.
  void main() {
    final Pomodoro pomodoro = Pomodoro(Configuration()
        .setConcentrationMinutes(25)
        .setBreakMinutes(5)
        .setLongerBreakMinutes(15)
        .setCountUntilLongerBreak(4));

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

        while (pomodoro.isBreaking()) {
          if (pomodoro.shouldEndBreak()) {
            pomodoro.endBreak();
          }
        }
      }
    }
  }
}
8
likes
140
pub points
31%
popularity

Publisher

unverified uploader

This is a Pomodoro Technique binding library for the Dart language licensed under BSD 3-Clause.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on pomodoro4d