TaskNotificationConfig class final
Notification configuration object
Determines how a taskOrGroup or Task.group of tasks needs to be notified
running is the notification used while the task is in progress complete is the notification used when the task completed error is the notification used when something went wrong, including pause, failed and notFound status progressBar if set will show a progress bar tapOpensFile if set will attempt to open the file when the complete notification is tapped groupNotificationId if set will group all notifications with the same groupNotificationId and change the progress bar to number of finished tasks versus total number of tasks in the groupNotification. Use {finished} and {total} tokens in the TaskNotification.title and TaskNotification.body to substitute. Task-specific substitutions such as {filename} are not valid. The groupNotification is considered complete when there are no more tasks running within that group, and at that point the complete notification is shown (if configured). If any task in the groupNotification fails, the error notification is shown. The first character of the groupNotificationId cannot be '*'.
Constructors
- TaskNotificationConfig({dynamic taskOrGroup, TaskNotification? running, TaskNotification? complete, TaskNotification? error, TaskNotification? paused, TaskNotification? canceled, bool progressBar = false, bool tapOpensFile = false, String groupNotificationId = ''})
- Create notification configuration that determines what notifications are shown, whether a progress bar is shown (Android only), and whether tapping the 'complete' notification opens the downloaded file.
Properties
- canceled → TaskNotification?
-
final
- complete → TaskNotification?
-
final
- error → TaskNotification?
-
final
- groupNotificationId → String
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- paused → TaskNotification?
-
final
- progressBar → bool
-
final
- running → TaskNotification?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tapOpensFile → bool
-
final
- taskOrGroup → dynamic
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Return JSON Map representing object, excluding the taskOrGroup field, as the JSON map is only required to pass along the config with a task
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override