is_first_run 0.1.0 copy "is_first_run: ^0.1.0" to clipboard
is_first_run: ^0.1.0 copied to clipboard

outdated

A simple package to check if it is the first time the app runs.

is_first_run #

A simple package to check if it is the first time the app runs.

Internally it uses the shared_preferences plugin.

Getting Started #

To use this plugin, add is_first_run as a dependency in your pubspec.yaml file.

Usage #

Import is_first_run.dart:

import 'package:is_first_run/is_first_run.dart';

Then check, if this is the first time the app is run:

bool firstRun = await IsFirstRun.isFirstRun();

Calling this function for the first time after installing the app returns true, after that every function call returns false.

You can reset the plugin by calling

await IsFirstRun.reset();

After calling reset() the first call of isFirstRun() will return true, subsequent calls will return false again.

Example #

The example is a simple page showing you the result of the function IsFirstRun.isFirstRun(). A button allows you to call IsFirstRun.isFirstRun() again, the reset button calls IsFirstRun.reset().

Maintainers #

Pull requests are always very welcome.

87
likes
40
pub points
95%
popularity

Publisher

verified publisherjulianassmann.de

A simple package to check if it is the first time the app runs.

Homepage
Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

flutter, shared_preferences

More

Packages that depend on is_first_run