From 9a24c4e053af3ea2e771ac5d053acf9ea7becfa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9E=A5=EC=8A=B9=ED=98=B8?= Date: Tue, 1 Aug 2023 14:44:15 +0900 Subject: [PATCH] fix: UX refactor --- lib/providers/lecture_search_model.dart | 8 ++++---- lib/widgets/search_filter_panel.dart | 14 ++++++-------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/providers/lecture_search_model.dart b/lib/providers/lecture_search_model.dart index da27e336..587f5a01 100644 --- a/lib/providers/lecture_search_model.dart +++ b/lib/providers/lecture_search_model.dart @@ -212,7 +212,7 @@ class LectureSearchModel extends ChangeNotifier { if (v.options.expand((i) => i).every((i) => i.selected == false)) { if (v.isMultiSelect == true) v.options.expand((i) => i).forEach((j) { - j.selected = true; + // j.selected = true; }); else v.options.first.first.selected = true; @@ -221,7 +221,7 @@ class LectureSearchModel extends ChangeNotifier { List dep = _lectureFilter['departments']! .options .expand((i) => i) - .every((i) => i.selected == true) + .every((i) => i.selected == false) ? [] : _lectureFilter['departments']! .options @@ -231,7 +231,7 @@ class LectureSearchModel extends ChangeNotifier { List typ = _lectureFilter['types']! .options .expand((i) => i) - .every((i) => i.selected == true) + .every((i) => i.selected == false) ? [] : _lectureFilter['types']! .options @@ -241,7 +241,7 @@ class LectureSearchModel extends ChangeNotifier { List lev = _lectureFilter['levels']! .options .expand((i) => i) - .every((i) => i.selected == true) + .every((i) => i.selected == false) ? [] : _lectureFilter['levels']! .options diff --git a/lib/widgets/search_filter_panel.dart b/lib/widgets/search_filter_panel.dart index d028867b..bd85a52d 100644 --- a/lib/widgets/search_filter_panel.dart +++ b/lib/widgets/search_filter_panel.dart @@ -132,7 +132,7 @@ class _SelectorState extends State { !widget.selectList.every( (v) => v.every((w) => w.selected == false), ), - child: GestureDetector( + child: IconTextButton( onTap: () { widget.selectList.forEach((v) { v.forEach((w) { @@ -140,15 +140,13 @@ class _SelectorState extends State { }); }); }, - child: Text( - "common.reset".tr(), - style: bodyRegular.copyWith( - color: OTLColor.pinksMain, - decoration: TextDecoration.underline, - ), + text: "common.reset".tr(), + textStyle: bodyRegular.copyWith( + color: OTLColor.pinksMain, + decoration: TextDecoration.underline, ), ), - ) + ), ], ), ),