Commit b6afbb1

derdilla <82763757+NobodyForNothing@users.noreply.github.com>
2023-10-07 10:17:33
review settings classes
Signed-off-by: derdilla <82763757+NobodyForNothing@users.noreply.github.com>
1 parent 34410cc
lib/model/storage/export_csv_settings_store.dart
@@ -5,6 +5,7 @@ import 'package:blood_pressure_app/model/storage/common_settings_interfaces.dart
 import 'package:blood_pressure_app/model/storage/convert_util.dart';
 import 'package:flutter/material.dart';
 
+/// Settings that are only important for exporting entries to csv files.
 class CsvExportSettings extends ChangeNotifier implements CustomFieldsSettings {
   CsvExportSettings({
     String? fieldDelimiter,
lib/model/storage/export_pdf_settings_store.dart
@@ -5,6 +5,7 @@ import 'package:blood_pressure_app/model/storage/common_settings_interfaces.dart
 import 'package:blood_pressure_app/model/storage/convert_util.dart';
 import 'package:flutter/material.dart';
 
+/// Settings that are only important for exporting measurements as a pdf file.
 class PdfExportSettings extends ChangeNotifier implements CustomFieldsSettings {
   PdfExportSettings({
     bool? exportTitle,
lib/model/storage/export_settings_store.dart
@@ -3,6 +3,7 @@ import 'dart:convert';
 import 'package:blood_pressure_app/model/storage/convert_util.dart';
 import 'package:flutter/material.dart';
 
+/// General settings for exporting measurements that are applicable to all export formats.
 class ExportSettings extends ChangeNotifier {
   ExportSettings({
     ExportFormat? exportFormat,
@@ -59,6 +60,7 @@ class ExportSettings extends ChangeNotifier {
 
 }
 
+/// File formats to which measurements can be exported.
 enum ExportFormat {
   csv,
   pdf,
lib/model/storage/intervall_store.dart
@@ -11,7 +11,6 @@ class IntervallStorage extends ChangeNotifier {
     _stepSize = stepSize ?? TimeStep.last7Days;
     _currentRange = range ?? _getMostRecentDisplayIntervall();
   }
-   //TODO: add to database
   late TimeStep _stepSize;
   late DateTimeRange _currentRange;
 
@@ -149,6 +148,7 @@ class IntervallStorage extends ChangeNotifier {
   }
 }
 
+/// Different range types supported by the interval switcher.
 enum TimeStep {
   day,
   month,
lib/model/storage/settings_store.dart
@@ -7,7 +7,8 @@ import 'package:flutter/material.dart';
 /// Stores settings that are directly controllable by the user through the Settings screen.
 ///
 /// This class should not be used to save persistent state that the user doesn't know about. To do this use one of the
-/// other classes in the storage directory or add a table to config_db and create your own class.
+/// other classes in the storage directory or add a table to config_db and create your own class. Keeping data modular
+/// helps to reduce the amount of data saved to the database and makes the internal purpose of a setting more clear.
 ///
 /// Steps for expanding this class:
 /// - [ ] Add private variable with default value