is_first_run
1.0.0, released 6 years ago by julianassmann.de
Check if the app is running for the first time.
WASM-ready
What it does
Provides methods to check if it is the first time the app runs or the first time a specific method is called. It relies internally on shared_preferences to persist the state. It also offers a reset function to clear the recorded state.
AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to show an onboarding walkthrough on the first app launch
- You need to trigger a one-time migration or setup task on the initial run
Skip it when
- You already manage persistent preferences and want to minimize dependency overhead by implementing the check directly
Strengths
- Simple and straightforward API
- Supports all major Flutter platforms (Android, iOS, Web, Windows, macOS, Linux)
Weaknesses
- Relies on shared_preferences, which may not be suitable if you require encrypted storage
- Limited functionality beyond checking the first run state
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:is_first_run/is_first_run.dart';
bool firstRun = await IsFirstRun.isFirstRun();Works with
Packages commonly used together with is_first_run: ones it builds on, ones built on it, and its own family.