@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
44import 'package:provider/provider.dart' ;
55import 'package:pslab/constants.dart' ;
66import 'package:pslab/providers/barometer_state_provider.dart' ;
7+ import 'package:pslab/theme/colors.dart' ;
78import 'package:pslab/view/widgets/common_scaffold_widget.dart' ;
89import 'package:pslab/view/widgets/barometer_card.dart' ;
910import 'package:fl_chart/fl_chart.dart' ;
@@ -21,9 +22,9 @@ class _BarometerScreenState extends State<BarometerScreen> {
2122 SnackBar (
2223 content: Text (
2324 message,
24- style: const TextStyle (color: Colors .white ),
25+ style: TextStyle (color: snackBarContentColor ),
2526 ),
26- backgroundColor: Colors .grey[ 700 ] ,
27+ backgroundColor: snackBarBackgroundColor ,
2728 duration: const Duration (seconds: 4 ),
2829 behavior: SnackBarBehavior .floating,
2930 ),
@@ -79,8 +80,8 @@ class _BarometerScreenState extends State<BarometerScreen> {
7980 margin: EdgeInsets .fromLTRB (cardMargin, 0 , cardMargin, cardMargin),
8081 padding: EdgeInsets .all (cardPadding),
8182 decoration: BoxDecoration (
82- color: Colors .black ,
83- borderRadius: BorderRadius .circular ( 8 ) ,
83+ color: chartBackgroundColor ,
84+ borderRadius: BorderRadius .zero ,
8485 ),
8586 child: _buildChart (
8687 screenWidth,
@@ -104,7 +105,7 @@ class _BarometerScreenState extends State<BarometerScreen> {
104105 ? 8.0
105106 : 9.0 ;
106107 final style = TextStyle (
107- color: Colors .white ,
108+ color: chartTextColor ,
108109 fontSize: fontSize,
109110 );
110111 String timeText;
@@ -137,7 +138,7 @@ class _BarometerScreenState extends State<BarometerScreen> {
137138 ? 8.0
138139 : 9.0 ;
139140 final style = TextStyle (
140- color: Colors .white ,
141+ color: chartTextColor ,
141142 fontSize: fontSize,
142143 );
143144
@@ -195,7 +196,7 @@ class _BarometerScreenState extends State<BarometerScreen> {
195196
196197 return LineChart (
197198 LineChartData (
198- backgroundColor: Colors .black ,
199+ backgroundColor: chartBackgroundColor ,
199200 titlesData: FlTitlesData (
200201 show: true ,
201202 topTitles: AxisTitles (
@@ -205,7 +206,7 @@ class _BarometerScreenState extends State<BarometerScreen> {
205206 timeAxisLabel,
206207 style: TextStyle (
207208 fontSize: axisNameFontSize,
208- color: Colors .white ,
209+ color: chartTextColor ,
209210 fontWeight: FontWeight .bold,
210211 ),
211212 ),
@@ -225,7 +226,7 @@ class _BarometerScreenState extends State<BarometerScreen> {
225226 atm,
226227 style: TextStyle (
227228 fontSize: axisNameFontSize,
228- color: Colors .white ,
229+ color: chartTextColor ,
229230 fontWeight: FontWeight .bold,
230231 ),
231232 ),
@@ -238,7 +239,7 @@ class _BarometerScreenState extends State<BarometerScreen> {
238239 child: Text (
239240 value.toStringAsFixed (2 ),
240241 style: TextStyle (
241- color: Colors .white ,
242+ color: chartTextColor ,
242243 fontSize: chartFontSize,
243244 ),
244245 ),
@@ -252,7 +253,7 @@ class _BarometerScreenState extends State<BarometerScreen> {
252253 meterUnit,
253254 style: TextStyle (
254255 fontSize: axisNameFontSize,
255- color: Colors .white ,
256+ color: chartTextColor ,
256257 fontWeight: FontWeight .bold,
257258 ),
258259 ),
@@ -274,11 +275,11 @@ class _BarometerScreenState extends State<BarometerScreen> {
274275 ),
275276 borderData: FlBorderData (
276277 show: true ,
277- border: const Border (
278- bottom: BorderSide (color: Colors .white38 ),
279- left: BorderSide (color: Colors .white38 ),
280- top: BorderSide (color: Colors .white38 ),
281- right: BorderSide (color: Colors .white38 ),
278+ border: Border (
279+ bottom: BorderSide (color: chartBorderColor ),
280+ left: BorderSide (color: chartBorderColor ),
281+ top: BorderSide (color: chartBorderColor ),
282+ right: BorderSide (color: chartBorderColor ),
282283 ),
283284 ),
284285 minY: 0 ,
@@ -290,7 +291,7 @@ class _BarometerScreenState extends State<BarometerScreen> {
290291 LineChartBarData (
291292 spots: spots,
292293 isCurved: true ,
293- color: Colors .yellow ,
294+ color: xOrientationChartLineColor ,
294295 barWidth: screenWidth < 400 ? 1.5 : 2.0 ,
295296 isStrokeCapRound: true ,
296297 dotData: const FlDotData (show: false ),
0 commit comments