搜索插件、代码仓与 APP 分类

插件详情v0.0.14

palestine_first_run

轻量且简单的检查方法,用于判断应用是否首次运行,并将其应用于自定义调用。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
57
喜欢数
31
Pub 分数
150

安装插件

flutter pub add palestine_first_run

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个轻量级的 Flutter 包,可简化检查应用程序是否首次运行。它提供了一个简单的 API 来检测首次运行场景,并相应地执行自定义逻辑,例如显示引导界面或初始化默认设置。专为跨所有主要平台的易用性而设计,可无缝集成到现有工作流程中,不会增加额外开销。非常适合希望在应用中实现最小化、可靠首次运行检测的开发者。

适合场景

  • 应用引导流程
  • 初始设置配置
  • 首次用户欢迎消息
  • 重置默认偏好设置
  • 跟踪首次启动事件
  • 自定义首次运行操作

主要特点

  • 用于首次运行检测的简单 API
  • 支持所有 Flutter 平台
  • 轻量且依赖极少
  • 可扩展以实现自定义逻辑
  • 使用 shared_preferences 的持久化存储
  • 与 flutter pub add 的轻松集成

适合对象

  • 新的 Flutter 项目
  • 引导流程实现
  • 需要首次启动逻辑的应用程序
  • 注重简洁性的开发者
  • 跨平台应用
  • 极简主义工具需求

使用建议

  • 依赖 shared_preferences 实现持久化存储
  • 不区分多次重新安装应用的情况
  • 无内置 UI 组件
  • 仅限首次运行检测
  • 需要手动处理边缘情况
  • 不适合复杂的状态管理

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

palestine_first_run

Part of PalestineDevelopers

Lightweight and easy check if the app runs for its first time, apply that to custom calls.

License Pub Example

PUB GitHub release GitHub stars GitHub forks

Build Status


Table Of Contents


Features

  • Check app is @ first run
  • Check custom actions is @ first call

Getting started

To start, import package

import 'package:palestine_first_run/palestine_first_run.dart';

Usage

Ensure flutter framework is active

  • Add this to the beginning of main()
// Make Sure Framework Is Ready
WidgetsFlutterBinding.ensureInitialized();

Just as easy as this

// First time (true), then (false)
final bool isFirstRun = await PalFirstRun.isFirstRun();

And for the custom calls

// First time (true), then (false)
final bool isFirstAPICall = await PalFirstRun.isFirstRun('call_api');

Contributors

Contributors

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。