screen_usage 0.0.4 copy "screen_usage: ^0.0.4" to clipboard
screen_usage: ^0.0.4 copied to clipboard

A plugin for reporting screen events while the flutter application is running in background. Works for Android only.

Screen Usage #

Supported operating systems (as of September 10th 2018)

  • Android: ✔
  • iOS: ✖

Events #

Registers the following events (also while the application is running in the background):

  • SCREEN_UNLOCKED
  • SCREEN_ON
  • SCREEN_OFF

Usage #

class Class {
  Screen _screenListener = new Screen();
  ScreenEvent _screenEvent;
  StreamSubscription<ScreenEvent> _screenEventSubscription;
  
  ...
  
  void function() {
    ...
     _screenEventSubscription =
        _screenListener.screenEvents.listen((ScreenEvent event) {
          setState(() {
            _screenEvent = event;
            /// Use _screenEvent
          });
        });
     ...
  }
}
0
likes
30
pub points
0%
popularity

Publisher

verified publishercachet.dk

A plugin for reporting screen events while the flutter application is running in background. Works for Android only.

Homepage
Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on screen_usage