Skip to content

DelayedTrigger

A trigger that triggers after delay from the (re)start of sampling.

The delay is measured from when the study is resumed, i.e. typically when resume() is called on the SmartphoneStudyController or SmartPhoneClientManager. It triggers again on every resume.

Inheritance
Annotations

Constructors

DelayedTrigger.fromJson

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

DelayedTrigger

DelayedTrigger({
  1. Duration delay = const Duration(),
})

Creates a trigger that delays for delay and then triggers. Default is no delay.

Properties

delay

Duration delay
getter/setter pair

Delay before this trigger triggers.

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.