Skip to content

Commit

Permalink
chore: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
sboh1214 committed Jul 31, 2023
1 parent 3f082b0 commit fabbfd5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
4 changes: 3 additions & 1 deletion lib/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ class _OTLHomeState extends State<OTLHome> with SingleTickerProviderStateMixin {
padding: const EdgeInsets.only(left: 16),
child: SemesterPicker(
onSemesterChanged: () {
context.read<LectureSearchModel>().setSelectedLecture(null);
context
.read<LectureSearchModel>()
.setSelectedLecture(null);
context.read<LectureSearchModel>().lectureClear();
},
),
Expand Down
11 changes: 7 additions & 4 deletions lib/pages/timetable_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class _TimetablePageState extends State<TimetablePage> {
padding: const EdgeInsets.symmetric(vertical: 16),
decoration: BoxDecoration(
color: OTLColor.grayF,
borderRadius:
BorderRadius.only(topLeft: Radius.circular(16)),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(16)),
),
child: _buildTimetableTabs(context),
),
Expand All @@ -73,8 +73,11 @@ class _TimetablePageState extends State<TimetablePage> {
GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
context.read<LectureSearchModel>().resetLectureFilter();
Navigator.push(context, buildLectureSearchPageRoute());
context
.read<LectureSearchModel>()
.resetLectureFilter();
Navigator.push(
context, buildLectureSearchPageRoute());
},
child: Padding(
padding: const EdgeInsets.fromLTRB(12, 18, 16, 18),
Expand Down
3 changes: 2 additions & 1 deletion lib/providers/timetable_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ class TimetableModel extends ChangeNotifier {
Future<bool> shareTimetable(ShareType type, String language) async {
try {
final response = await DioProvider().dio.get(
API_SHARE_URL.replaceFirst('{share_type}', type == ShareType.image ? 'image' : 'ical'),
API_SHARE_URL.replaceFirst(
'{share_type}', type == ShareType.image ? 'image' : 'ical'),
queryParameters: {
'timetable': currentTimetable.id,
'year': selectedSemester.year,
Expand Down
6 changes: 4 additions & 2 deletions lib/widgets/timetable_tabs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ class _TimetableTabsState extends State<TimetableTabs> {
],
onChanged: (value) {
if (value == MenuItems.copy) widget.onCopyTap();
if (value == MenuItems.exportToImg) widget.onExportTap(ShareType.image);
if (value == MenuItems.exportToCal) widget.onExportTap(ShareType.ical);
if (value == MenuItems.exportToImg)
widget.onExportTap(ShareType.image);
if (value == MenuItems.exportToCal)
widget.onExportTap(ShareType.ical);
// if (value == MenuItems.syllabus) Pass
if (value == MenuItems.delete) widget.onDeleteTap();
},
Expand Down

0 comments on commit fabbfd5

Please sign in to comment.