flutter_smart_timer 1.0.6
flutter_smart_timer: ^1.0.6 copied to clipboard
Timer for best setup and use
example/flutter_smart_timer_example.dart
import 'package:flutter_smart_timer/smart_timer.dart';
void main() {
final timer = SmartTimer(
intervals: [5, 10, 15],
onTick: (time) {
print('Тик: $time секунд');
},
onComplete: () {
print('Таймер завершён!');
},
);
timer.start();
Future.delayed(Duration(seconds: 7), () {
timer.pause();
print('Таймер на паузе');
});
Future.delayed(Duration(seconds: 10), () {
timer.resume();
print('Таймер возобновлён');
});
Future.delayed(Duration(seconds: 20), () {
timer.stop();
print('Таймер остановлен');
});
}