Peripheral.fromJson constructor

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

Creates a Peripheral instance from a JSON map.

Implementation

factory Peripheral.fromJson(Map<String, dynamic> json) {
  return Peripheral(
    name: json['name'],
    uuid: json['uuid'],
    stateStr: json['state'],
  );
}