Skip to content

AmbientLight

Statistics of ambient light intensity, in lux, over a sampling period.

Collected by LightProbe for the SensorSamplingPackage.AMBIENT_LIGHT measure, typically from the light sensor on the front of the phone.

Inheritance
Annotations

Constructors

AmbientLight.fromJson

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

AmbientLight.fromLuxReadings

AmbientLight.fromLuxReadings(
  1. List<num> luxValues
)

Create an AmbientLight from a list of lux value readings.

AmbientLight

AmbientLight(
  1. num meanLux,
  2. num stdLux,
  3. num minLux,
  4. num maxLux,
)

Properties

fromJsonFunction

Function get fromJsonFunction
override

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

maxLux

num maxLux
getter/setter pair

Maximum light intensity in lux.

meanLux

num meanLux
getter/setter pair

Mean light intensity in lux.

minLux

num minLux
getter/setter pair

Minimum light intensity in lux.

stdLux

num stdLux
getter/setter pair

Standard deviation of the light intensity in lux.

Methods

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.