title: How do I run code in the background, even with the screen off?
body: <p>I have a simple timer app in Flutter, which shows a countdown with the number of seconds remaining. I have:</p>
  
  <pre><code>new Timer.periodic(new Duration(seconds: 1), _decrementCounter);
  </code></pre>
  
  <p>It seems to work fine until my phone's display switches off (even if I switch to another app) and goes to sleep. Then, the timer pauses. Is there a recommended way to create a service that runs in the background even when the screen is off?</p>