Added docs for the summary model
This commit is contained in:
parent
2f12601c1f
commit
3b2c293dc3
1 changed files with 21 additions and 1 deletions
|
|
@ -2,15 +2,34 @@
|
||||||
///
|
///
|
||||||
/// It represents how many tasks were completed and added by a user every day.
|
/// It represents how many tasks were completed and added by a user every day.
|
||||||
class SummaryModel {
|
class SummaryModel {
|
||||||
|
/// Amount of tasks completed on Monday.
|
||||||
int completedMonday;
|
int completedMonday;
|
||||||
|
|
||||||
|
/// Amount od tasks added on Monday.
|
||||||
int addedMonday;
|
int addedMonday;
|
||||||
|
|
||||||
|
/// Amount of tasks completed on Tuesday.
|
||||||
int completedTuesday;
|
int completedTuesday;
|
||||||
|
|
||||||
|
/// Amount od tasks added on Tuesday.
|
||||||
int addedTuesday;
|
int addedTuesday;
|
||||||
|
|
||||||
|
/// Amount of tasks completed on Wednesday.
|
||||||
int completedWednesday;
|
int completedWednesday;
|
||||||
|
|
||||||
|
/// Amount od tasks added on Wednesday.
|
||||||
int addedWednesday;
|
int addedWednesday;
|
||||||
|
|
||||||
|
/// Amount of tasks completed on Thursday.
|
||||||
int completedThursday;
|
int completedThursday;
|
||||||
|
|
||||||
|
/// Amount od tasks added on Thursday.
|
||||||
int addedThursday;
|
int addedThursday;
|
||||||
|
|
||||||
|
/// Amount of tasks completed on Friday.
|
||||||
int completedFriday;
|
int completedFriday;
|
||||||
|
|
||||||
|
/// Amount od tasks added on Friday.
|
||||||
int addedFriday;
|
int addedFriday;
|
||||||
|
|
||||||
SummaryModel({
|
SummaryModel({
|
||||||
|
|
@ -26,7 +45,7 @@ class SummaryModel {
|
||||||
this.addedFriday = 0,
|
this.addedFriday = 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
/// Returns a [SummaryModel] from a map.
|
/// Creates a [SummaryModel] from a map.
|
||||||
SummaryModel.fromMap(Map<String, dynamic> map) {
|
SummaryModel.fromMap(Map<String, dynamic> map) {
|
||||||
completedMonday = map["completedMonday"];
|
completedMonday = map["completedMonday"];
|
||||||
addedMonday = map["addedMonday"];
|
addedMonday = map["addedMonday"];
|
||||||
|
|
@ -40,6 +59,7 @@ class SummaryModel {
|
||||||
addedFriday = map["addedFriday"];
|
addedFriday = map["addedFriday"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns a map representation of the model.
|
||||||
Map<String, int> toMap() {
|
Map<String, int> toMap() {
|
||||||
return <String, int>{
|
return <String, int>{
|
||||||
"completedMonday": completedMonday,
|
"completedMonday": completedMonday,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue