ZigbeeDeviceDiscoveryAction.fromJson constructor

ZigbeeDeviceDiscoveryAction.fromJson(
  1. Map<String, dynamic> dataMap
)

Creates a ZigbeeDeviceDiscoveryAction object from the JSON response to a GET request.

Implementation

factory ZigbeeDeviceDiscoveryAction.fromJson(Map<String, dynamic> dataMap) {
  return ZigbeeDeviceDiscoveryAction(
    actionType: dataMap[ApiFields.actionType] ?? "",
    searchCodes: List<String>.from(dataMap[ApiFields.searchCodes] ?? []),
    installCodes: List<String>.from(dataMap[ApiFields.installCodes] ?? []),
  );
}