dp_stopwatch

Creator: coderz1093

Last updated:

0 purchases

dp_stopwatch Image
dp_stopwatch Images

Languages

Categories

Add to Cart

Description:

dp stopwatch

The default widget Stopwatch() class has no method to get the values as a stream. It only outputs a single value whenever one of its methods is called. This repo brings a better version of stopwatch
Features #

Getting started #
The project shall migrate to null safety
Usage #

Create viewmodel

final stopwatchViewModel = DPStopwatchViewModel(
clockTextStyle: const TextStyle(
color: Colors.black,
fontSize: 32,
),
);
copied to clipboard

Bind the viewmodel to widget

...
DPStopWatchWidget(
stopwatchViewModel,
),
...
copied to clipboard

Control the widget via viewmodel, e.x. when user clicks a button

...
TextButton(
style: TextButton.styleFrom(
textStyle: const TextStyle(fontSize: 20),
),
onPressed: () {
stopwatchViewModel.pause?.call();
},
child: const Text('pause'),
),
...
copied to clipboard

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.