updateDevice method

Future<Device> updateDevice(
  1. DeviceCore deviceCore
)

Implementation

Future<Device> updateDevice(DeviceCore deviceCore) async {
  final response = await _post('devices/${deviceCore.id}', data: {'name': deviceCore.name});
  final updated = Device.fromJson(jsonDecode(utf8.decode(response.bodyBytes)));
  return updated;
}