GithubHelp home page GithubHelp logo

sharpsan / idle_detector_wrapper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robrob-creator/idle_detector_wrapper

0.0 0.0 0.0 418 KB

A flutter pacakge to detect if user is idle

C++ 42.06% C 2.63% Objective-C 0.07% Kotlin 0.23% Dart 13.81% Swift 3.19% HTML 3.40% CMake 34.61%

idle_detector_wrapper's Introduction

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.

idle_detector_wrapper's People

Contributors

robert-moonshot avatar sharpsan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.