Skip to content

StepEvent

A step event as sensed by the phone's built-in pedometer.

Collected by PedometerProbe for the SensorSamplingPackage.STEP_EVENT measure.

Normally, a step event is sent for each step taken by the user. But note that this depends on the underlying OS and hardware capabilities. steps is the number of steps taken since last reboot of the device. This number is accumulated by the OS and not reset when the app is restarted.

Inheritance
Annotations

Constructors

StepEvent.fromJson

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

StepEvent

StepEvent({
  1. int steps = 0,
})

Properties

fromJsonFunction

Function get fromJsonFunction
override

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

steps

int steps
getter/setter pair

Number of steps accumulated since last reboot of the device.

Methods

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.