Skip to content

Commit

Permalink
Chore: Add comma after the final things in a series of long parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
ntut-xuan committed Feb 12, 2024
1 parent df623de commit b4b19a3
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions lib/src/model/coursetable/course.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@ class Course {
String syllabusLink;
String note;

Course(
{required this.idString,
required this.name,
required this.stageString,
required this.creditString,
required this.periodCountString,
required this.category,
required this.teacherString,
required this.classNameString,
required this.periodSlots,
required this.classroomString,
required this.applyStatus,
required this.language,
required this.syllabusLink,
required this.note}) {
Course({required this.idString,
required this.name,
required this.stageString,
required this.creditString,
required this.periodCountString,
required this.category,
required this.teacherString,
required this.classNameString,
required this.periodSlots,
required this.classroomString,
required this.applyStatus,
required this.language,
required this.syllabusLink,
required this.note,
}) {
id = JsonInit.intInit(idString);
name = JsonInit.stringInit(name).trim();
stage = JsonInit.doubleInit(stageString);
Expand Down Expand Up @@ -93,9 +93,12 @@ class Course {
}

static bool _isNullOrEmpty(String? text) {
return text == null || text.replaceAll(RegExp(r"\s"), "").isEmpty;
return text == null || text
.replaceAll(RegExp(r"\s"), "")
.isEmpty;
}

factory Course.fromJson(Map<String, dynamic> json) => _$CourseFromJson(json);

Map<String, dynamic> toJson() => _$CourseToJson(this);
}
}

0 comments on commit b4b19a3

Please sign in to comment.