State const

This commit is contained in:
Yegor Vialov
2018-11-14 15:14:46 +02:00
parent 3190b45db3
commit 87f89b63e1
15 changed files with 116 additions and 42 deletions

View File

@ -98,7 +98,7 @@ class _LightControlsWidgetState extends State<LightControlsWidget> {
}
Widget _buildBrightnessControl(LightEntity entity) {
if ((entity.supportBrightness) && (_tmpBrightness != null) && (entity.state != "unavailable")) {
if ((entity.supportBrightness) && (_tmpBrightness != null) && (entity.state != EntityState.unavailable)) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[