OneTimeSensingUserTask class Null safety

A non-UI sensing taks that collects sensor data once. For example collecting a location datum.

It resumes sensing when the onStart methods is called and then automatically pauses after 10 seconds.

Inheritance

Constructors

OneTimeSensingUserTask(AppTaskExecutor executor)

Properties

description String
read-only, inherited
enqueued DateTime
The time this task was added to the queue (enqueued).
read / write, inherited
executor TaskExecutor
The TaskExecutor that is to be executed once the user want to start this task.
read-only, inherited
expiresIn Duration?
Returns a Duration until this task expires and is removed from the queue. The returned Duration will be negative if this has expired. Returns null if this task never expires.
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
id String
read-only, inherited
instructions String
read-only, inherited
notification bool
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
state UserTaskState
The state of this task.
read / write, inherited
stateEvents Stream<UserTaskState>
A stream of state changes of this user task. [...]
read-only, inherited
task AppTask
The AppTask from which this user task originates from.
read-only, inherited
title String
read-only, inherited
type String
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
onCancel(BuildContext context, {dynamic dequeue = false}) → void
Callback from app if this task is canceled. [...]
inherited
onDone(BuildContext context, {dynamic dequeue = false}) → void
Callback from app when this task is done. [...]
inherited
onNotification() → void
Callback from the OS when this task is clicked by the user in the notification system. [...]
inherited
onStart(BuildContext context) → void
Resume sensing for 10 seconds. After 10 seconds, the executor is paused automatically
override
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited