progress static method

Future<bool> progress(
  1. int id, {
  2. required String title,
  3. required int value,
  4. int max = 100,
  5. String? body,
  6. bool indeterminate = false,
})

Shows or updates a progress notification (Android, Windows, Linux bar; others show the percent in text). UNotification.progress(5, title: "Downloading", value: 40)

Implementation

static Future<bool> progress(int id, {required String title, required int value, int max = 100, String? body, bool indeterminate = false}) => UNotifyChannel.show(
  UNotificationRequest(
    id: id,
    title: title,
    body: body,
    progress: UNotificationProgress(value: value, max: max, indeterminate: indeterminate),
    ongoing: value < max,
    silent: true,
    importance: UNotificationImportance.low,
    category: "progress",
  ),
);