Commit 2638303
Changed files (3)
lib
lib/components/measurement_graph.dart
@@ -114,12 +114,12 @@ class _LineChart extends StatelessWidget {
show: false,
),
color: settings.pulColor,
- barWidth: 4,
+ barWidth: settings.graphLineThickness,
),
LineChartBarData(
spots: diastolicSpots,
color: settings.diaColor,
- barWidth: 4,
+ barWidth: settings.graphLineThickness,
dotData: FlDotData(
show: false,
),
@@ -133,7 +133,7 @@ class _LineChart extends StatelessWidget {
LineChartBarData(
spots: systolicSpots,
color: settings.sysColor,
- barWidth: 4,
+ barWidth: settings.graphLineThickness,
dotData: FlDotData(
show: false,
),
lib/model/settings_store.dart
@@ -174,6 +174,14 @@ class Settings extends ChangeNotifier {
notifyListeners();
}
+ double get graphLineThickness {
+ return _prefs.getDouble('graphLineThickness') ?? 3;
+ }
+ set graphLineThickness(double newThickness) {
+ _prefs.setDouble('graphLineThickness', newThickness);
+ notifyListeners();
+ }
+
}
class TimeStep {
lib/screens/statistics.dart
@@ -116,21 +116,21 @@ class StatisticsPage extends StatelessWidget {
borderColor: settings.diaColor,
fillColor: settings.diaColor.withOpacity(opacity),
entryRadius: 0,
- borderWidth: 3
+ borderWidth: settings.graphLineThickness
),
RadarDataSet(
dataEntries: intListToRadarEntry(daytimeAvgs[1]),
borderColor: settings.sysColor,
fillColor: settings.sysColor.withOpacity(opacity),
entryRadius: 0,
- borderWidth: 3
+ borderWidth: settings.graphLineThickness
),
RadarDataSet(
dataEntries: intListToRadarEntry(daytimeAvgs[2]),
borderColor: settings.pulColor,
fillColor: settings.pulColor.withOpacity(opacity),
entryRadius: 0,
- borderWidth: 3
+ borderWidth: settings.graphLineThickness
),
],
),