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

A convenient wrapper that allows you to easily detect user idle time

Flutter Idle Detector Package #

The Flutter Idle Detector package is a convenient wrapper that allows you to easily detect user idle time within your Flutter applications. With this package, you can set the duration of idle time and specify actions to be performed when the user becomes idle.

Example Usage #

IdleDetector(
  idleTime: const Duration(minutes: 5),
  onIdle: () {
    // Perform actions when the user becomes idle
  },
  child: Scaffold(
    resizeToAvoidBottomInset: true,
    extendBody: true,
    backgroundColor: Colors.white,
    appBar: AppBar(
      title: Text('Example'),
    ),
    body: Container(
      child: Text("Example"),
    ),
  ),
),

Getting Started #

  1. To use this package, follow these steps:

  2. Add the following dependency to your project's pubspec.yaml file:

dependencies:
  flutter_idle_detector: ^1.0.0
  1. Run the command flutter pub get to fetch the package.

  2. Import the package into your Dart code:

import 'package:flutter_idle_detector/flutter_idle_detector.dart';
  1. Start using the IdleDetector widget within your Flutter application as shown in the example usage above.

That's it! You can now easily detect user idle time and perform actions accordingly using the Flutter Idle Detector package.

Contributing #

Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request on the GitHub repository.

8
likes
140
pub points
89%
popularity

Publisher

unverified uploader

A convenient wrapper that allows you to easily detect user idle time

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_hooks

More

Packages that depend on idle_detector_wrapper