From 8ee64bb09b40c812130e261f7cc7619b5f90f51b Mon Sep 17 00:00:00 2001 From: ntut-xuan Date: Mon, 12 Feb 2024 17:37:02 +0800 Subject: [PATCH] Chore: Run format --- lib/src/model/course/course_semester.g.dart | 3 +- lib/src/model/coursetable/course.dart | 31 +++++++++---------- lib/src/model/coursetable/course.g.dart | 11 ++----- lib/src/model/coursetable/course_table.g.dart | 7 ++--- 4 files changed, 21 insertions(+), 31 deletions(-) diff --git a/lib/src/model/course/course_semester.g.dart b/lib/src/model/course/course_semester.g.dart index b6e51b73..b09ab650 100644 --- a/lib/src/model/course/course_semester.g.dart +++ b/lib/src/model/course/course_semester.g.dart @@ -11,8 +11,7 @@ SemesterJson _$SemesterJsonFromJson(Map json) => SemesterJson( semester: json['semester'] as String, ); -Map _$SemesterJsonToJson(SemesterJson instance) => - { +Map _$SemesterJsonToJson(SemesterJson instance) => { 'year': instance.year, 'semester': instance.semester, }; diff --git a/lib/src/model/coursetable/course.dart b/lib/src/model/coursetable/course.dart index 3df2a450..1d88c242 100644 --- a/lib/src/model/coursetable/course.dart +++ b/lib/src/model/coursetable/course.dart @@ -22,22 +22,21 @@ class Course { String syllabusLink; String note; - Course({ - required this.id, - required this.name, - required this.stage, - required this.credit, - required this.periodCount, - required this.category, - required this.teachers, - required this.classNames, - required this.coursePeriods, - required this.classrooms, - required this.applyStatus, - required this.language, - required this.syllabusLink, - required this.note - }); + Course( + {required this.id, + required this.name, + required this.stage, + required this.credit, + required this.periodCount, + required this.category, + required this.teachers, + required this.classNames, + required this.coursePeriods, + required this.classrooms, + required this.applyStatus, + required this.language, + required this.syllabusLink, + required this.note}); Course.parseNodeString({ required String idString, diff --git a/lib/src/model/coursetable/course.g.dart b/lib/src/model/coursetable/course.g.dart index 1b5a6748..b97e54e2 100644 --- a/lib/src/model/coursetable/course.g.dart +++ b/lib/src/model/coursetable/course.g.dart @@ -13,17 +13,12 @@ Course _$CourseFromJson(Map json) => Course( credit: (json['credit'] as num).toDouble(), periodCount: json['periodCount'] as int, category: json['category'] as String, - teachers: - (json['teachers'] as List).map((e) => e as String).toList(), - classNames: (json['classNames'] as List) - .map((e) => e as String) - .toList(), + teachers: (json['teachers'] as List).map((e) => e as String).toList(), + classNames: (json['classNames'] as List).map((e) => e as String).toList(), coursePeriods: (json['coursePeriods'] as List) .map((e) => CoursePeriod.fromJson(e as Map)) .toList(), - classrooms: (json['classrooms'] as List) - .map((e) => e as String) - .toList(), + classrooms: (json['classrooms'] as List).map((e) => e as String).toList(), applyStatus: json['applyStatus'] as String, language: json['language'] as String, syllabusLink: json['syllabusLink'] as String, diff --git a/lib/src/model/coursetable/course_table.g.dart b/lib/src/model/coursetable/course_table.g.dart index 26b8a1a2..865d58d5 100644 --- a/lib/src/model/coursetable/course_table.g.dart +++ b/lib/src/model/coursetable/course_table.g.dart @@ -9,14 +9,11 @@ part of 'course_table.dart'; CourseTable _$CourseTableFromJson(Map json) => CourseTable( year: json['year'] as int, semester: json['semester'] as int, - courses: (json['courses'] as List) - .map((e) => Course.fromJson(e as Map)) - .toList(), + courses: (json['courses'] as List).map((e) => Course.fromJson(e as Map)).toList(), user: User.fromJson(json['user'] as Map), ); -Map _$CourseTableToJson(CourseTable instance) => - { +Map _$CourseTableToJson(CourseTable instance) => { 'year': instance.year, 'semester': instance.semester, 'courses': instance.courses,