पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv1.0.0

is_first_run

एक सरल पैकेज जो जांचता है कि क्या ऐप का पहला बार चलाया गया है।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
2.7 हज़ार
लाइक
92
Pub अंक
160

पैकेज इंस्टॉल करें

flutter pub add is_first_run

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

is_first_run पैकेज एप्लिकेशन के डिवाइस पर पहली बार लॉन्च किए जाने के बारे में निर्धारित करने का एक सीधा तरीका प्रदान करता है। यह साझा प्राथमिकता का उपयोग करके एप्लिकेशन के रन स्टेटस को निर्दिष्ट करने वाले फ्लैग को स्टोर करता है, जिससे सत्रों के बीच भरोसेमंद डिटेक्शन सुनिश्चित होता है। सेटअप फ्लो को शुरू करने, ओनबोर्डिंग स्क्रीन दिखाने या पहली बार के उपयोगकर्ता कार्रवाई को ट्रिगर करने के लिए आदर्श है। पैकेज हल्का है और सभी प्रमुख Flutter प्लेटफॉर्म्स, जैसे मोबाइल, वेब और डेस्कटॉप के साथ संगत है। इसमें कोई जटिल कॉन्फ़िगरेशन की आवश्यकता नहीं है और मौजूदा प्रोजेक्ट में बिना किसी दिक्कत के एकीकृत किया जा सकता है।

उपयोग

  • ऑनबोर्डिंग स्क्रीन प्रदर्शन
  • पहली बार के उपयोगकर्ता सेटअप
  • प्रारंभिक डेटा पहली बार अभियांत्रिकी
  • स्वागत संदेश डिलीवरी
  • फीचर टॉगल सक्रियण

मुख्य विशेषताएँ

  • सरल API
  • स्थायी राज्य संग्रहण
  • क्रॉस-प्लेटफ़ॉर्म समर्थन
  • कोई बाहरी निर्भरता नहीं
  • आसान एकीकरण

इनके लिए उपयुक्त

  • नई ऐप लॉन्च
  • उपयोगकर्ता ऑनबोर्डिंग प्रवाह
  • प्रारंभिक कॉन्फ़िगरेशन कार्य
  • हल्का राज्य ट्रैकिंग
  • पहली बार चलाने के लिए तर्क की आवश्यकता वाले ऐप्स

विचार योग्य बातें

  • साझा प्राथमिकताओं पर निर्भर करता है
  • स्वतः रीसेट नहीं होता
  • हाथ से साफ करने की आवश्यकता हो सकती है
  • पहली बार चलाने का निर्धारण सीमित
  • कोई निर्मित विश्लेषण नहीं

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

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';

To check if this is the first time the app is run:

bool firstRun = await IsFirstRun.isFirstRun();

If it is the first call of this method since installing the app, the method will return true for as long as the app keeps running.After a restart of the app it returns false.

There is also a method that allows you to check if it is the first time you call it:

bool firstCall = await IsFirstRun.isFirstCall();

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(), calling isFirstRun() will return true as long as the app is running. After a restart, it will return false again. The first call of isFirstCall() 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.

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 1 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट