Skip to content

Commit

Permalink
fix: use renamed DeviceItemIcon methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ses110 committed May 24, 2021
1 parent 880bf56 commit 63a55ce
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/assets/traits/device_item_icon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ class DeviceItemIcon {
static Widget getIcon(List<Trait> traits) {
Trait determiningTrait = traits[0];
if (determiningTrait is LockUnlockTrait) {
return (determiningTrait.state.value) ? getLockIcon() : getUnlockIcon();
return (determiningTrait.state.value)
? buildLockIcon()
: buildUnlockIcon();
}
if (determiningTrait is ThermostatTrait) {
return getThermostatIcon(determiningTrait.state.value);
return buildThermostatIcon(determiningTrait.state.value);
}
return Icon(
Icons.device_unknown,
Expand All @@ -18,7 +20,7 @@ class DeviceItemIcon {
);
}

static Widget getLockIcon(
static Widget buildLockIcon(
[double size = 60, Color color = WidgetStyleConstants.deviceIconColor]) {
return Icon(
Icons.lock,
Expand All @@ -27,7 +29,7 @@ class DeviceItemIcon {
);
}

static Widget getUnlockIcon(
static Widget buildUnlockIcon(
[double size = 60, Color color = WidgetStyleConstants.deviceIconColor]) {
return Icon(
Icons.lock_open,
Expand All @@ -36,7 +38,7 @@ class DeviceItemIcon {
);
}

static Widget getThermostatIcon(double thermostatState) {
static Widget buildThermostatIcon(double thermostatState) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
Expand Down

0 comments on commit 63a55ce

Please sign in to comment.