Cosmetic, datagen will now turn the screen on

This commit is contained in:
zontreck 2025-06-01 13:25:50 -07:00
parent b102c3cd5a
commit ec46c62a24
2 changed files with 4 additions and 0 deletions

View file

@ -7,6 +7,7 @@ import 'package:libacflutter/Constants.dart';
import 'package:pokedex/Consts.dart';
import 'package:pokedex/Session.dart';
import 'package:pokedex/pokemon.dart';
import 'package:wakelock_plus/wakelock_plus.dart';
Future<int> main(List<String> args) async {
runApp(CompletedGenerator());
@ -58,6 +59,7 @@ class _main extends State<MainGen> {
void didChangeDependencies() {
if (firstLaunch) {
firstLaunch = false;
WakelockPlus.enable();
setState(() {
statusMessage = "Warming up...";
progress = 0.0;
@ -205,6 +207,7 @@ class _main extends State<MainGen> {
state++;
setState(() {});
} else if (state - index == 9) {
await WakelockPlus.disable();
x.cancel();
sleep(Duration(seconds: 10));
exit(0);

View file

@ -42,6 +42,7 @@ dependencies:
version: ^1.0.052725+1354
ota_update: ^7.0.1
dio: ^5.8.0+1
wakelock_plus: ^1.3.2
dev_dependencies:
flutter_test: