From e9f475a5ddf7bcbf5afdf73524f269f41ee05d01 Mon Sep 17 00:00:00 2001 From: xue Date: Sat, 29 Jun 2024 01:53:47 +0300 Subject: [PATCH 1/4] refactor: Update search and filter icons in community.dart --- lib/pages/home/community.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pages/home/community.dart b/lib/pages/home/community.dart index e03624a..9ce3741 100644 --- a/lib/pages/home/community.dart +++ b/lib/pages/home/community.dart @@ -73,11 +73,11 @@ class _CommunityState extends ConsumerState Row( children: [ IconButton( - icon: const Icon(Icons.search, size: 30), + icon: const Icon(Icons.search), onPressed: () {}, ), IconButton( - icon: const Icon(Icons.filter_list, size: 30), + icon: const Icon(Icons.filter_list), onPressed: () { Navigator.push( context, From b408b3fb9b7a5feb2c936702bb50ad4d001cb405 Mon Sep 17 00:00:00 2001 From: xue Date: Sat, 29 Jun 2024 01:55:05 +0300 Subject: [PATCH 2/4] refactor: Remove unnecessary background color from FiltersPage --- lib/pages/home/filters.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/pages/home/filters.dart b/lib/pages/home/filters.dart index 49f643b..aee4649 100644 --- a/lib/pages/home/filters.dart +++ b/lib/pages/home/filters.dart @@ -28,7 +28,6 @@ class FiltersPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: Colors.white, appBar: AppBar( backgroundColor: Colors.yellow[700], leading: IconButton( From c5cf0e70f317d12e435f44e0e7acd9db1d8c471b Mon Sep 17 00:00:00 2001 From: xue Date: Sat, 29 Jun 2024 05:16:25 +0300 Subject: [PATCH 3/4] refactor: Update FiltersPage UI and remove unnecessary code --- lib/pages/home/filters.dart | 83 +++++++++++++------------------------ 1 file changed, 28 insertions(+), 55 deletions(-) diff --git a/lib/pages/home/filters.dart b/lib/pages/home/filters.dart index aee4649..9ee45e5 100644 --- a/lib/pages/home/filters.dart +++ b/lib/pages/home/filters.dart @@ -112,20 +112,9 @@ class FiltersPageState extends State { _buildFilterSection( title: 'Age', options: [ - Container( - decoration: const BoxDecoration( - border: Border( - bottom: BorderSide( - color: Colors.grey, - width: 1.0, - ), - ), - ), - child: ListTile( - leading: - Icon(Icons.calendar_today, color: Colors.yellow[700]), - title: Text(rangeLable), - ), + ListTile( + leading: Icon(Icons.calendar_today, color: Colors.yellow[700]), + title: Text(rangeLable), ), Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), @@ -161,7 +150,7 @@ class FiltersPageState extends State { ), onPressed: () {}, child: const Text( - 'APPLY', + 'Apply', style: TextStyle(fontSize: 16), ), ), @@ -178,7 +167,6 @@ class FiltersPageState extends State { }) { return Card( elevation: 8.0, - color: Colors.white, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(16.0), ), @@ -189,7 +177,12 @@ class FiltersPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ ListTile( - title: Text(title), + title: Expanded( + child: Text( + title, + style: TextStyle(fontSize: 25), + ), + ), trailing: hasArrow ? const Icon(Icons.arrow_forward_ios) : null, ), Column(children: options), @@ -201,48 +194,28 @@ class FiltersPageState extends State { Widget _buildOptionRow(String text, StatelessWidget icon, bool selection, BoolCallback onChange) { - return Container( - decoration: const BoxDecoration( - border: Border( - bottom: BorderSide( - color: Colors.grey, - width: 1.0, - ), - ), - ), - child: ListTile( - leading: icon, - title: Text(text), - trailing: Checkbox( - activeColor: Colors.yellow[700], - checkColor: Colors.black, - value: selection, - onChanged: onChange), - ), + return ListTile( + leading: icon, + title: Text(text), + trailing: Checkbox( + activeColor: Colors.yellow[700], + checkColor: Colors.black, + value: selection, + onChanged: onChange), ); } Widget _buildOptionRow2(String text, StatelessWidget icon) { - return Container( - decoration: const BoxDecoration( - border: Border( - bottom: BorderSide( - color: Colors.grey, - width: 1.0, - ), - ), - ), - child: ListTile( - leading: icon, - title: Text(text), - trailing: IconButton( - iconSize: 30, - icon: const Icon(Icons.chevron_right), - onPressed: () { - debugPrint("Print"); - }, - color: Colors.grey, - ), + return ListTile( + leading: icon, + title: Text(text), + trailing: IconButton( + iconSize: 30, + icon: const Icon(Icons.chevron_right), + onPressed: () { + debugPrint("Print"); + }, + color: Colors.grey, ), ); } From a52dd1c620ccfd4f3adbfdac47592c3c4a7cfdc8 Mon Sep 17 00:00:00 2001 From: xue Date: Sat, 29 Jun 2024 05:18:17 +0300 Subject: [PATCH 4/4] refactor: Update FiltersPage UI and remove unnecessary code --- lib/pages/home/filters.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/pages/home/filters.dart b/lib/pages/home/filters.dart index 9ee45e5..1496ff3 100644 --- a/lib/pages/home/filters.dart +++ b/lib/pages/home/filters.dart @@ -177,11 +177,9 @@ class FiltersPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ ListTile( - title: Expanded( - child: Text( - title, - style: TextStyle(fontSize: 25), - ), + title: Text( + title, + style: const TextStyle(fontSize: 25), ), trailing: hasArrow ? const Icon(Icons.arrow_forward_ios) : null, ),