我试图在Android开发中停用颤动的屏幕超时 . 但是找不到怎样的方法Android prevent screen timeout
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.5.1, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
[✓] Android Studio (version 3.1)
[✓] Connected devices (1 available)
• No issues found!
1 回答
您可以使用此Flutter包执行此操作:https://pub.dartlang.org/packages/screen
在Android上,您必须在
AndroidManifest.xml
文件上添加新权限Install de plugin
在
pubspec.yaml
文件中添加此依赖项并在你的飞镖文件中使用它: