activsy 1.0.0 copy "activsy: ^1.0.0" to clipboard
activsy: ^1.0.0 copied to clipboard

outdated

reacts when there are no user activities in your application

activsy #

reacts when there are no user activities in your application

Installation #

dependencies:
  activsy: ^1.0.0

Usage #

void main() {
  Activsy.config(seconds: 10, noActivity: () async {
    /// perform operation
    /// call the start to continue monitoring 
  });
  runApp(const MyApp());
}
ActivsyWidget(
  detectedMouseAction: false,
  builder: (ctx) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
         primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  },
)

After the onActivity method call the monitoring is terminated

To monitor user interaction with the application just call: Activsy.startTimer()

start and set the timer

Activsy.startTimer()

stop the timer

Activsy.stopTimer()

Restore timer

Note: From the timer reset it can also change the seconds it must wait before triggering the noActivity

Activsy.reset(seconds: 8);

There are several reasons to trigger the noActivity method before the stipulated timer

 Activsy.trigger()

Note: call the functions after the config method otherwise you will throw an exception

Support #

You liked this package? then give it a star. If you want to help then:

  • Start this repository
  • Send a Pull Request with new features
  • Share this package
  • Create issues if you find a Bug or want to suggest something
6
likes
0
pub points
0%
popularity

Publisher

verified publisheredvaldomartins.dev

reacts when there are no user activities in your application

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on activsy