timerun

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

timerun

timerun - A Timer Library for Flutter #
timerun is a timer library for Flutter that allows you to easily manage timers with customizable configurations. You can use this library to implement timers in your Flutter applications in a simple and flexible way.
Installation #
To get started with timerun, add the following line to your pubspec.yaml file:
dependencies:
timerun: ^0.8.0 # Replace this with the latest version of the library
copied to clipboard
Then run the command flutter pub get to install the library.
Basic Usage #
Import the library in your Dart file:
import 'package:timerun/timerun.dart';
copied to clipboard
Create a Timer
TimeRun myTimer = TimeRun(
series: 3,
repetitions: 10,
pauseSeries: 30,
pauseRepeition: 10,
time: 60,
onUpdate: (currentSeries, currentRepetition, currentTime, totalSeries, totalRepetitions, timerState) {
// Logic to handle timer updates
},
onFinish: () {
// Logic to handle when the timer finishes
},
onChange: (timerState) {
// Logic to handle changes in timer state (play, pause, stop)
},
);

copied to clipboard
Control the Timer
await myTimer.play(); // Start the timer
await myTimer.pause(); // Pause the timer
await myTimer.resume(); // Resume the timer
await myTimer.stop(); // Stop the timer
copied to clipboard
Parameters

series: Number of series in the timer.
repetitions: Number of repetitions per series.
pauseSeries: Pause time between series (in seconds).
pauseRepeition: Pause time between repetitions (in seconds).
time: Duration of each repetition (in seconds).
onUpdate: Function called on each timer update.
onFinish: Function called when the timer finishes.
onChange: Function called when the timer state changes (play, pause, stop).

And that's it! Now you are ready to start using the timerun library in your Flutter application.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.