Skip to content

Commit 02777d7

Browse files
authored
docs(messaging): update documentation for setForegroundNotificationPresentationOptions to clarify persistence of options (#18107)
1 parent 2b8517c commit 02777d7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/firebase_messaging/firebase_messaging/lib/src/messaging.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ class FirebaseMessaging extends FirebasePluginPlatform {
245245
///
246246
/// If all arguments are `false` or are omitted, a notification will not be displayed in the
247247
/// foreground, however you will still receive events relating to the notification.
248+
///
249+
/// Important: Options set to `true` are persisted. If you
250+
/// later remove or comment out this call, those values remain in effect—they are not reset to
251+
/// `false`. To turn off foreground display after having set it to `true`, call this method
252+
/// explicitly with `alert: false` (and `badge`/`sound` as desired).
248253
Future<void> setForegroundNotificationPresentationOptions({
249254
bool alert = false,
250255
bool badge = false,

0 commit comments

Comments
 (0)