Current color for color picker fix

This commit is contained in:
Yegor Vialov
2019-02-10 18:24:54 +02:00
parent b399357517
commit d0e0bf3571
2 changed files with 22 additions and 8 deletions

View File

@ -117,7 +117,7 @@ class _LightControlsWidgetState extends State<LightControlsWidget> {
return UniversalSlider(
title: "Color temperature",
leading: Text("Cold", style: TextStyle(color: Colors.lightBlue),),
value: _tmpColorTemp.toDouble(),
value: _tmpColorTemp == null ? 0 : _tmpColorTemp.toDouble(),
onChangeEnd: (value) => _setColorTemp(entity, value),
max: entity.maxMireds,
min: entity.minMireds,