-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7bba79
commit 91915a1
Showing
10 changed files
with
105 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
core/lib/src/models/fitbit/fitbit_datas/fitbit_sleep_data.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import 'package:json_annotation/json_annotation.dart'; | ||
import 'package:studyu_core/src/models/fitbit/fitbit_datas/fibit_data.dart'; | ||
|
||
part 'fitbit_sleep_data.g.dart'; | ||
|
||
@JsonSerializable() | ||
class FitbitSleepData extends FitbitData { | ||
static const String dataType = 'steps'; | ||
DateTime dateOfSleep; | ||
String level; | ||
|
||
FitbitSleepData( | ||
this.dateOfSleep, | ||
this.level, | ||
DateTime dateTime, | ||
) : super(dataType, dateTime); | ||
|
||
factory FitbitSleepData.fromJson(Map<String, dynamic> json) => | ||
_$FitbitSleepDataFromJson(json); | ||
|
||
@override | ||
Map<String, dynamic> toJson() => _$FitbitSleepDataToJson(this); | ||
} |
22 changes: 22 additions & 0 deletions
22
core/lib/src/models/fitbit/fitbit_datas/fitbit_sleep_data.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
core/lib/src/models/fitbit/fitbit_datas/fitbit_step_data.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import 'package:json_annotation/json_annotation.dart'; | ||
import 'package:studyu_core/src/models/fitbit/fitbit_datas/fibit_data.dart'; | ||
|
||
part 'fitbit_step_data.g.dart'; | ||
|
||
@JsonSerializable() | ||
class FitbitStepData extends FitbitData { | ||
static const String dataType = 'steps'; | ||
double value; | ||
|
||
FitbitStepData(this.value, DateTime dateTime) : super(dataType, dateTime); | ||
|
||
factory FitbitStepData.fromJson(Map<String, dynamic> json) => | ||
_$FitbitStepDataFromJson(json); | ||
|
||
@override | ||
Map<String, dynamic> toJson() => _$FitbitStepDataToJson(this); | ||
} |
20 changes: 20 additions & 0 deletions
20
core/lib/src/models/fitbit/fitbit_datas/fitbit_step_data.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export 'fitbit_credentials.dart'; | ||
export 'fitbit_datas/fibit_data.dart'; | ||
export 'fitbit_datas/fitbit_heart_data.dart'; | ||
export 'fitbit_datas/fitbit_step_data.dart'; | ||
export 'fitbit_datas/fitbit_sleep_data.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
core/lib/src/models/questionnaire/questions/fitbit_question.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters