Skip to content

PassiveTrigger

A trigger that triggers when the app calls trigger.

Use it to start a task from your own Dart code, e.g. when the user taps a button.

Inheritance
Annotations

Constructors

PassiveTrigger.fromJson

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

PassiveTrigger

PassiveTrigger()

Creates a trigger that triggers when the trigger method is called.

Properties

executor

  1. @JsonKey(includeFromJson: false, includeToJson: false)
TriggerExecutor<TriggerConfiguration> executor
getter/setter pair

The TriggerExecutor that backs this trigger.

Set automatically by the runtime when the trigger executor is created. Do not set this manually.

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.

trigger

void trigger()

Triggers this trigger now.

Only works once the study is deployed and the executor is set.