MethodChannelTaskFlow class

An implementation of TaskFlowPlatform that uses method channels.

Inheritance
  • Object
  • PlatformInterface
  • MethodChannelTaskFlow

Constructors

MethodChannelTaskFlow()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
taskEvents → Stream<Map<String, dynamic>>
Stream of task status events.
no setter

Methods

cancel(String name) → Future<void>
Cancels all executions of a task by name.
cancelAll() → Future<void>
Cancels all tasks.
cancelByTag(String tag) → Future<void>
Cancels all tasks with a given tag.
cancelChain(String chainId) → Future<void>
Cancels an entire task chain.
cancelExecution(String executionId) → Future<void>
Cancels a specific task execution.
enqueue({required String name, required Map<String, dynamic> input, Map<String, dynamic>? constraints, Map<String, dynamic>? retry, required String priority, required List<String> tags, int? initialDelayMs, String? uniqueId, String? uniquePolicy}) → Future<String>
Enqueues a one-off task.
enqueueChain({required List<Map<String, dynamic>> steps, required Map<String, dynamic> input, Map<String, dynamic>? constraints}) → Future<String>
Enqueues a chain of tasks.
getAllTasks() → Future<List<Map<String, dynamic>>>
Gets all registered tasks.
getStatus(String name) → Future<Map<String, dynamic>?>
Gets the current status of a task.
getTasksByTag(String tag) → Future<List<Map<String, dynamic>>>
Gets all tasks with a given tag.
initialize() → Future<void>
Initializes the platform with the dispatcher entry point.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reportProgress({required String executionId, required double progress}) → Future<void>
Reports progress for a running task.
reschedule({required String name, required int intervalMs}) → Future<void>
Reschedules a periodic task.
schedule({required String name, required int intervalMs, required Map<String, dynamic> input, Map<String, dynamic>? constraints, Map<String, dynamic>? retry, required String priority}) → Future<void>
Schedules a periodic task.
startService({required String name, required String notificationTitle, required String notificationBody, String? notificationIconName, int notificationId = 1001, int? updateIntervalMs}) → Future<void>
Starts a persistent background service with foreground notification.
stopService(String name) → Future<void>
Stops a persistent background service.
toString() → String
A string representation of this object.
inherited
unschedule(String name) → Future<void>
Stops a periodic task.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

eventChannel → const EventChannel
The event channel for receiving task status updates.
methodChannel → const MethodChannel
The method channel used to interact with the native platform.