SubjectProgress.fromJson constructor

SubjectProgress.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory SubjectProgress.fromJson(Map<String, dynamic> json) {
  final progress = _$SubjectProgressFromJson(json);

  final String? startedAt = json['started_at'] as String?;
  if (startedAt != null) {
    progress.startedAt = DateTime.parse(startedAt);
  }

  return progress;
}