markShown method
- String? appVersion,
Records that the prompt was shown. Call this after displaying the widget.
Implementation
Future<void> markShown({String? appVersion}) async {
final prefs = SharedPreferencesAsync();
await prefs.setInt(
_kLastShownKey, DateTime.now().millisecondsSinceEpoch);
if (oncePerVersion && appVersion != null) {
await prefs.setString(_kLastVersionKey, appVersion);
}
}