incrementAppOpenCount method

Future<void> incrementAppOpenCount()

Call this method every time the app is opened (e.g., in main.dart).

Implementation

Future<void> incrementAppOpenCount() async {
  final SharedPreferences prefs = await _getPrefs;
  int currentCount = prefs.getInt(_StorageKeys.appOpenCount) ?? 0;
  await prefs.setInt(_StorageKeys.appOpenCount, currentCount + 1);
  debugPrint('SmartReviewPrompter: App open count: ${currentCount + 1}');
}