updateLightOptions method

Future<bool> updateLightOptions(
  1. KeyLightOptions newOptions
)

Implementation

Future<bool> updateLightOptions(KeyLightOptions newOptions) {
  return http
      .put(
    Uri.parse(formatUrl('lights')),
    body: jsonEncode(newOptions.toJSON()),
  )
      .then((response) {
    return response.statusCode == 200;
  });
}