screen_usage 0.0.4

Flutter Android iOS

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
80
pub points
8%
popularity

Publisher

cachet.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

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on screen_usage