showLiveActivity method

Future<bool> showLiveActivity({
  1. required int id,
  2. required String channelId,
  3. required String channelName,
  4. String? title,
  5. String? body,
  6. String? subText,
  7. int? progress,
  8. bool indeterminate = false,
  9. bool ongoing = true,
  10. String? payload,
})

Post or update an Android live ongoing notification (the Android equivalent of an iOS Live Activity). Uses a promoted Live Update (ProgressStyle) on Android 16+, a normal ongoing notification with a progress bar otherwise. Returns true if shown.

Implementation

Future<bool> showLiveActivity({
  required int id,
  required String channelId,
  required String channelName,
  String? title,
  String? body,
  String? subText,
  int? progress, // 0..100, null = no bar
  bool indeterminate = false,
  bool ongoing = true,
  String? payload,
}) async => false;