debug_screen_on 1.0.2 copy "debug_screen_on: ^1.0.2" to clipboard
debug_screen_on: ^1.0.2 copied to clipboard

PlatformAndroid

A Flutter plugin that keeps the screen on during debugging sessions when a debugger is attached or ADB is enabled.

debug_screen_on #

A Flutter plugin that automatically keeps the screen on during debugging sessions when a debugger is attached or ADB is enabled, but only in DEBUG builds.

Features #

  • Automatically keeps screen on when debugger is connected
  • Automatically keeps screen on when ADB is enabled
  • Only active in DEBUG builds for security
  • Automatically turns off screen keep-on when debugging stops
  • Logs debug information to help track state changes

Usage #

Add this to your pubspec.yaml:

dependencies:
  debug_screen_on: ^1.0.0

That's it! No code changes needed. The plugin automatically hooks into your app's lifecycle and manages the screen keep-on behavior during debugging.

Platform Support #

  • ✅ Android
  • ❌ iOS (not applicable - iOS handles debugging differently)

How it Works #

The plugin checks if:

  1. A debugger is connected (Debug.isDebuggerConnected())
  2. ADB is enabled in system settings

If either condition is true in a DEBUG build, it sets FLAG_KEEP_SCREEN_ON on the window. When debugging stops, the flag is automatically cleared.

0
likes
150
points
14
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin that keeps the screen on during debugging sessions when a debugger is attached or ADB is enabled.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on debug_screen_on

Packages that implement debug_screen_on