Skip to content

Commit

Permalink
fix(color_temp_widget): use correct icons according to figma designs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ses110 committed Apr 26, 2022
1 parent 52b623d commit 2d40f9b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/traits/color_temperature_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ class _ColorTemperatureWidgetState extends State<ColorTemperatureWidget>
child: widget._colorTemperatureProvider.isPerformingAction
? CircularProgressIndicator()
: Icon(
BootstrapIcons.sun,
BootstrapIcons.box,
color: widget._iconColor,
size: widget._iconSize,
),
)),
),
SizedBox(height: 10),
Row(children: [
Icon(BootstrapIcons.sun, color: widget._iconColor),
Icon(BootstrapIcons.thermometer_sun, color: widget._iconColor),
Expanded(
child: Slider(
label: ColorTemperatureWidget.label,
Expand Down
3 changes: 1 addition & 2 deletions lib/traits/slim/color_temperature_slim_widget.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:bootstrap_icons/bootstrap_icons.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:yonomi_device_widgets/providers/color_temperature_provider.dart';
import 'package:yonomi_device_widgets/ui/widget_style_constants.dart';

Expand Down Expand Up @@ -46,7 +45,7 @@ class _ColorTemperatureSlimWidgetState
leading: (widget._colorTemperatureProvider.isPerformingAction ||
widget._colorTemperatureProvider.isLoading)
? CircularProgressIndicator()
: Icon(BootstrapIcons.sun, color: widget._iconColor),
: Icon(BootstrapIcons.box, color: widget._iconColor),
title: Slider(
label: ColorTemperatureSlimWidget.label,
value: colorTemperature?.toDouble() ?? DEFAULT_COLOR_TEMP,
Expand Down
3 changes: 2 additions & 1 deletion test/traits/detail_screen_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ void main() {
testedDeviceId,
));

expect(find.byIcon(BootstrapIcons.sun), findsNWidgets(2));
expect(find.byIcon(BootstrapIcons.box), findsOneWidget);
expect(find.byIcon(BootstrapIcons.thermometer_sun), findsOneWidget);
expect(find.byType(ColorTemperatureWidget), findsOneWidget);
});

Expand Down

0 comments on commit 2d40f9b

Please sign in to comment.