Skip to content

smofe/smart_timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pub

smart_timer

A periodic Timer which runs only while the app's lifecycle is resumed.

The default Dart timer also runs while the app is paused, e.g. if it is in the background. This can be useful sometimes, but often you might want to stop the timer to save resources. smart_timer listens to app lifecycle changes and pauses/resumes the timer accordingly.

Usage

SmartTimer(
  duration: Duration(seconds: 1),
  onTick: () => print("Hello World"),
)

About

A periodic timer which only runs while the app lifecycle is resumed.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages