Part of PalestineDevelopers
Lightweight and easy check if the app runs for its first time, apply that to custom calls.
- Check app is @ first run
- Check custom actions is @ first call
To start, import package
import 'package:palestine_first_run/palestine_first_run.dart';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');