auto_logout 0.0.1 copy "auto_logout: ^0.0.1" to clipboard
auto_logout: ^0.0.1 copied to clipboard

A simple tool that allows you to log out users after a certain period of inactivity or if the app is sent to the background for a certain amount of time

Auto Logout #

A simple package that can automatically log users out after a certain period of inactivity or if the app is sent to the background for a certain amount of time.

Getting started #

Add the package to your pubspec.yaml file:

dependencies:
  auto_logout: ^0.0.1

Usage #

AutoLogout(
  onLogout: () {},
  isLoggedIn: () async => true,
  config: const LogoutConfig(
    appBackgroundDelay: Duration(seconds: 2),
    appInactivityDelay: Duration(seconds: 5),
  ),
  child: YourRootWidget,
)

Example App #

A comprehensive demo is available under example/.

Run the example:

cd example
flutter run

2
likes
140
points
41
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A simple tool that allows you to log out users after a certain period of inactivity or if the app is sent to the background for a certain amount of time

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, flutter_secure_storage

More

Packages that depend on auto_logout