flutter_smart_timer 1.1.6 copy "flutter_smart_timer: ^1.1.6" to clipboard
flutter_smart_timer: ^1.1.6 copied to clipboard

A smart timer designed for easy use, featuring interval functions and customizable duration settings.

example/flutter_smart_timer_example.dart

import 'package:flutter_smart_timer/flutter_smart_timer.dart';

void main() {
  final timer = SmartTimer(
    customDuration: Duration(milliseconds: 100),
    countDownStartedTime: Duration(seconds: 120),
    countDown: true,
    endTime: 10,
    intervals: [5, 10, 15],
    onTick: (int time) {
      print('tick time $time');
    },
    onComplete: (int completedTime) {
      print('completed time $completedTime');
    },
    onIntervalTick: (int intervalTime) {
      print('interval time $intervalTime');
    },
  );

  timer.start();

  timer.onTick.listen((Duration duration) {
    print('stream listen ${duration.inSeconds}');
  });

  Future.delayed(Duration(seconds: 7), () {
    timer.pause();
  });

  Future.delayed(Duration(seconds: 10), () {
    timer.resume();
  });
}
2
likes
160
points
16
downloads

Publisher

verified publisheranykeylib.ru

Weekly Downloads

A smart timer designed for easy use, featuring interval functions and customizable duration settings.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on flutter_smart_timer