Cosmetic, datagen will now turn the screen on
This commit is contained in:
parent
b102c3cd5a
commit
ec46c62a24
2 changed files with 4 additions and 0 deletions
|
@ -7,6 +7,7 @@ import 'package:libacflutter/Constants.dart';
|
||||||
import 'package:pokedex/Consts.dart';
|
import 'package:pokedex/Consts.dart';
|
||||||
import 'package:pokedex/Session.dart';
|
import 'package:pokedex/Session.dart';
|
||||||
import 'package:pokedex/pokemon.dart';
|
import 'package:pokedex/pokemon.dart';
|
||||||
|
import 'package:wakelock_plus/wakelock_plus.dart';
|
||||||
|
|
||||||
Future<int> main(List<String> args) async {
|
Future<int> main(List<String> args) async {
|
||||||
runApp(CompletedGenerator());
|
runApp(CompletedGenerator());
|
||||||
|
@ -58,6 +59,7 @@ class _main extends State<MainGen> {
|
||||||
void didChangeDependencies() {
|
void didChangeDependencies() {
|
||||||
if (firstLaunch) {
|
if (firstLaunch) {
|
||||||
firstLaunch = false;
|
firstLaunch = false;
|
||||||
|
WakelockPlus.enable();
|
||||||
setState(() {
|
setState(() {
|
||||||
statusMessage = "Warming up...";
|
statusMessage = "Warming up...";
|
||||||
progress = 0.0;
|
progress = 0.0;
|
||||||
|
@ -205,6 +207,7 @@ class _main extends State<MainGen> {
|
||||||
state++;
|
state++;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
} else if (state - index == 9) {
|
} else if (state - index == 9) {
|
||||||
|
await WakelockPlus.disable();
|
||||||
x.cancel();
|
x.cancel();
|
||||||
sleep(Duration(seconds: 10));
|
sleep(Duration(seconds: 10));
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
|
@ -42,6 +42,7 @@ dependencies:
|
||||||
version: ^1.0.052725+1354
|
version: ^1.0.052725+1354
|
||||||
ota_update: ^7.0.1
|
ota_update: ^7.0.1
|
||||||
dio: ^5.8.0+1
|
dio: ^5.8.0+1
|
||||||
|
wakelock_plus: ^1.3.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue