패키지, 저장소 및 앱 카테고리 검색

패키지 상세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 개

소스 저장소

이 패키지를 사용하는 프로젝트