import ‘package:wakelock/wakelock. dart’; // To keep the screen on: Wakelock. enable(); // or Wakelock. toggle(on: true); // To let the screen turn off again: Wakelock.
Read moreHow do I get flutter apps to run in the background?
create new Flutter project.
Read more