From 0792eb1190efc086a6c4250815b5b4fa1aa51d8e Mon Sep 17 00:00:00 2001 From: Crondung <1922635@stud.hs-mannheim.de> Date: Wed, 15 Feb 2023 14:03:02 +0100 Subject: [PATCH] wip --- lib/enums/group.dart | 6 ++++++ lib/models/settings.dart | 38 ++++++++++++++++++++++++++++++++++++++ pubspec.yaml | 2 -- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 lib/enums/group.dart create mode 100644 lib/models/settings.dart diff --git a/lib/enums/group.dart b/lib/enums/group.dart new file mode 100644 index 0000000..f58dd58 --- /dev/null +++ b/lib/enums/group.dart @@ -0,0 +1,6 @@ +enum Group { + gruppe1, //HIIT Morgens + gruppe2, //HIIT Abends + gruppe3, //HIIT Morgens + Schach + gruppe4, //HIIT Abends + Schach +} diff --git a/lib/models/settings.dart b/lib/models/settings.dart new file mode 100644 index 0000000..9d98a9e --- /dev/null +++ b/lib/models/settings.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; +import 'package:smoke_cess_app/enums/group.dart'; + +class Settings { + //should use shared preferences package + //https://pub.dev/packages/shared_preferences + Group _group; + TimeOfDay _dailyTrainingStartTime; + late DateTime _experimentStartDate; + + Settings(this._group, this._dailyTrainingStartTime) { + _experimentStartDate = DateTime.now(); + } + + void setGroup(Group group) { + _group = group; + } + + void setDailyTrainingStartTime(TimeOfDay time) { + _dailyTrainingStartTime = time; + } + + void set(Group group) { + _group = group; + } + + Group getGroup() { + return _group; + } + + TimeOfDay getDailyTrainingStartTime() { + return _dailyTrainingStartTime; + } + + DateTime getExperimentStartDate() { + return _experimentStartDate; + } +} diff --git a/pubspec.yaml b/pubspec.yaml index 1364a5e..802d4a0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -32,7 +32,6 @@ dependencies: flutter: sdk: flutter - # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 @@ -53,7 +52,6 @@ dev_dependencies: # The following section is specific to Flutter packages. flutter: - # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class.