Skip to content

BackgroundTask

A task which specifies that all containing measures and/or outputs should immediately start running in the background once triggered.

The task runs for the specified duration, or until stopped, or until all measures and/or outputs have completed. This is the usual task type for passive sensing.

Inheritance
Annotations

Constructors

BackgroundTask.fromJson

BackgroundTask.fromJson(
  1. Map<String, dynamic> json
)

BackgroundTask

BackgroundTask({
  1. String? name,
  2. String? description,
  3. List<Measure>? measures,
  4. Duration? duration,
})

Create a new task which can run in the background.

Properties

duration

  1. @JsonKey(toJson: _$IsoDurationToJson, fromJson: _$IsoDurationFromJson)
Duration? duration
getter/setter pair

The optional duration over the course of which the measures need to be sampled. Null implies infinite by default.

fromJsonFunction

Function get fromJsonFunction
override

The function which can convert a JSON string to an object of this type.

Methods

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.