Skip to content

Commit

Permalink
fix(widget_style_constants.dart-detail_screen.dart): Add correct acce…
Browse files Browse the repository at this point in the history
…nt colors according to figma
  • Loading branch information
rlperez committed Dec 21, 2021
1 parent 30cf58e commit 460405c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/traits/detail_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ class DetailScreenWidget extends StatelessWidget {

Color _getBatteryLevelColor(int batteryLevel) {
if (batteryLevel >= WidgetStyleConstants.batteryFullMin) {
return Colors.green;
return WidgetStyleConstants.globalSuccessColor;
} else if (batteryLevel <= WidgetStyleConstants.batteryLowMax) {
return Colors.red;
return WidgetStyleConstants.globalWarningColor;
} else {
return Colors.white;
}
Expand Down
4 changes: 4 additions & 0 deletions lib/ui/widget_style_constants.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import 'package:flutter/material.dart';

class WidgetStyleConstants {
static const Color globalWarningColor = Color(0xFFF19953);

static const Color globalSuccessColor = Color(0xFF01A299);

static const Color modesButtonUnpressedColor = Color(0xFFDFE0E4);

static const Color modesButtonPressedColor = Color(0xFF5D657A);
Expand Down

0 comments on commit 460405c

Please sign in to comment.