Skip to content

robrob-creator/idle_detector_wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A flutter pacakge to detect if user is idle

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published