init
This commit is contained in:
16
client/lib/features/vocabulary/models/daily_stats_model.dart
Normal file
16
client/lib/features/vocabulary/models/daily_stats_model.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
class DailyStats {
|
||||
final int wordsLearned;
|
||||
final int studyTimeMinutes;
|
||||
|
||||
DailyStats({
|
||||
required this.wordsLearned,
|
||||
required this.studyTimeMinutes,
|
||||
});
|
||||
|
||||
factory DailyStats.fromJson(Map<String, dynamic> json) {
|
||||
return DailyStats(
|
||||
wordsLearned: (json['wordsLearned'] as num?)?.toInt() ?? 0,
|
||||
studyTimeMinutes: (json['studyTimeMinutes'] as num?)?.toInt() ?? 0,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user