PowerManagementEvent.fromJson constructor

PowerManagementEvent.fromJson(
  1. Map json_
)

Implementation

PowerManagementEvent.fromJson(core.Map json_)
    : this(
        batteryLevel: json_.containsKey('batteryLevel')
            ? (json_['batteryLevel'] as core.num).toDouble()
            : null,
        createTime: json_.containsKey('createTime')
            ? json_['createTime'] as core.String
            : null,
        eventType: json_.containsKey('eventType')
            ? json_['eventType'] as core.String
            : null,
      );