SmartTimer({required this.duration, required this.onTick}) { WidgetsBinding.instance?.addObserver(this); _initializeTimer(); }