diff --git a/assets/icons/filter.svg b/assets/icons/filter.svg
new file mode 100644
index 0000000..0c1af3c
--- /dev/null
+++ b/assets/icons/filter.svg
@@ -0,0 +1,4 @@
+
diff --git a/lib/core/constants/assets.dart b/lib/core/constants/assets.dart
index fd5a45c..723fbe1 100644
--- a/lib/core/constants/assets.dart
+++ b/lib/core/constants/assets.dart
@@ -12,9 +12,9 @@ class AssetsManager {
static const tendersActive = 'assets/icons/task-square_active.svg';
static const profile = 'assets/icons/profile-circle.svg';
static const profileActive = 'assets/icons/profile-circle_active.svg';
- static const contracts = 'assets/icons/icon_contracts.svg';
- static const notify = 'assets/icons/notify_icon.svg';
- static const notifyActive = 'assets/icons/notify_icon_active.svg';
+ static const contracts = 'assets/icons/icon_contracts.svg';
+ static const notify = 'assets/icons/notify_icon.svg';
+ static const notifyActive = 'assets/icons/notify_icon_active.svg';
// login page
static const logo = 'assets/pngs/logo.png';
@@ -65,7 +65,7 @@ class AssetsManager {
static const moon = 'assets/icons/moon.svg';
//Liked tenders
- static const trash = 'assets/icons/trash.svg';
- static const arrowDownSmall = 'assets/icons/arrow_down_small.svg';
-
+ static const trash = 'assets/icons/trash.svg';
+ static const arrowDownSmall = 'assets/icons/arrow_down_small.svg';
+ static const filter = 'assets/icons/filter.svg';
}
diff --git a/lib/views/liked_tenders/pages/liked_tenders_desktop_page.dart b/lib/views/liked_tenders/pages/liked_tenders_desktop_page.dart
index 12c0fc2..b4f8387 100644
--- a/lib/views/liked_tenders/pages/liked_tenders_desktop_page.dart
+++ b/lib/views/liked_tenders/pages/liked_tenders_desktop_page.dart
@@ -9,6 +9,7 @@ import 'package:tm_app/view_models/liked_tenders_view_model.dart';
import 'package:tm_app/views/liked_tenders/widgets/liked_tenders_list_item.dart';
import '../../../core/utils/app_toast.dart';
+import '../../shared/base_button.dart';
import '../../shared/desktop_navigation_widget.dart';
import '../strings/liked_tenders_strings.dart';
@@ -53,9 +54,51 @@ class _LikedTendersDesktopPageState extends State {
},
child: Scaffold(
backgroundColor: AppColors.backgroundColor,
+ endDrawer: Drawer(
+ backgroundColor: AppColors.backgroundColor,
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.horizontal(left: Radius.circular(20)),
+ ),
+ child: Padding(
+ padding: const EdgeInsets.all(16.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 30.0.h()),
+ Text(
+ LikedTendersStrings.filter,
+ style: TextStyle(
+ fontWeight: FontWeight.w600,
+ color: AppColors.grey70,
+ fontSize: 20.0.sp(),
+ ),
+ ),
+ SizedBox(height: 20.0.h()),
+ _buildFilterOption('Industry'),
+ _buildFilterOption('Finance'),
+ _buildFilterOption('Business'),
+ _buildFilterOption('IT'),
+ _buildFilterOption('Software'),
+ const Spacer(),
+ BaseButton(
+ backgroundColor: AppColors.primary2,
+ borderRadius: 24,
+ isEnabled: true,
+ onPressed: () {
+ Navigator.pop(context);
+ },
+ text: LikedTendersStrings.apply,
+ textColor: AppColors.textBlue,
+ ),
+ SizedBox(height: 20.0.h()),
+ ],
+ ),
+ ),
+ ),
+
body: Column(
children: [
- DesktopNavigationWidget(currentIndex: 1),
+ const DesktopNavigationWidget(currentIndex: 1, haveFilter: true),
Expanded(
child: SizedBox(
width: 740,
@@ -165,7 +208,8 @@ class _LikedTendersDesktopPageState extends State {
context: context,
builder: (context) {
return AlertDialog(
- backgroundColor: AppColors.backgroundColor,
+ backgroundColor:
+ AppColors.backgroundColor,
title: const Text(
LikedTendersStrings.selectPage,
),
@@ -219,7 +263,6 @@ class _LikedTendersDesktopPageState extends State {
SizedBox(width: 5.0.w()),
SvgPicture.asset(
AssetsManager.arrowDownSmall,
- color: AppColors.grey80,
),
SizedBox(width: 5.0.w()),
],
@@ -261,3 +304,20 @@ class _LikedTendersDesktopPageState extends State {
);
}
}
+
+Widget _buildFilterOption(String title) {
+ return Padding(
+ padding: EdgeInsets.symmetric(vertical: 8.0.h()),
+ child: Align(
+ alignment: Alignment.centerLeft,
+ child: Text(
+ title,
+ style: TextStyle(
+ fontSize: 16.0.sp(),
+ color: AppColors.grey80,
+ fontWeight: FontWeight.w400,
+ ),
+ ),
+ ),
+ );
+}
diff --git a/lib/views/liked_tenders/pages/liked_tenders_mobile_page.dart b/lib/views/liked_tenders/pages/liked_tenders_mobile_page.dart
index 9d694c0..ce05989 100644
--- a/lib/views/liked_tenders/pages/liked_tenders_mobile_page.dart
+++ b/lib/views/liked_tenders/pages/liked_tenders_mobile_page.dart
@@ -10,7 +10,7 @@ import 'package:tm_app/data/services/model/tender_approvals_data/tender_approval
import 'package:tm_app/view_models/liked_tenders_view_model.dart';
import 'package:tm_app/views/liked_tenders/strings/liked_tenders_strings.dart';
import 'package:tm_app/views/liked_tenders/widgets/liked_tenders_list_item.dart';
-import 'package:tm_app/views/shared/tender_app_bar.dart';
+import 'package:tm_app/views/login/widgets/widgets.dart';
class LikedTendersMobilePage extends StatefulWidget {
const LikedTendersMobilePage({super.key});
@@ -73,10 +73,90 @@ class _LikedTendersMobilePageState extends State {
},
child: Scaffold(
backgroundColor: AppColors.backgroundColor,
- appBar: appBar(
- context: context,
- title: LikedTendersStrings.likedTenders,
+ appBar: PreferredSize(
+ preferredSize: const Size.fromHeight(60),
+ child: AppBar(
+ backgroundColor: AppColors.backgroundColor,
+ elevation: 0,
+ titleSpacing: 0,
+ leading: IconButton(
+ icon: SvgPicture.asset(
+ AssetsManager.arrowLeft,
+ height: 24.0.w(),
+ width: 24.0.w(),
+ ),
+ onPressed: () => Navigator.pop(context),
+ ),
+ title: Text(
+ LikedTendersStrings.likedTenders,
+ style: TextStyle(
+ color: AppColors.grey70,
+ fontWeight: FontWeight.w600,
+ fontSize: 20.0.sp(),
+ ),
+ ),
+ actions: [
+ IconButton(
+ icon: SvgPicture.asset(
+ AssetsManager.filter,
+ height: 24.0.w(),
+ width: 24.0.w(),
+ ),
+ onPressed: () {
+ showModalBottomSheet(
+ backgroundColor: AppColors.backgroundColor,
+ context: context,
+ isScrollControlled: true,
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.vertical(
+ top: Radius.circular(20),
+ ),
+ ),
+ builder: (context) {
+ return Padding(
+ padding: const EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ SizedBox(height: 10.0.h()),
+ Text(
+ LikedTendersStrings.filter,
+ style: TextStyle(
+ fontWeight: FontWeight.w600,
+ color: AppColors.grey70,
+ fontSize: 20.0.sp(),
+ ),
+ ),
+ SizedBox(height: 20.0.h()),
+ _buildFilterOption('Industry'),
+ _buildFilterOption('Finance'),
+ _buildFilterOption('Business'),
+ _buildFilterOption('IT'),
+ _buildFilterOption('Software'),
+ SizedBox(height: 20.0.h()),
+ BaseButton(
+ backgroundColor: AppColors.primary2,
+ borderRadius: 24,
+ isEnabled: true,
+ onPressed: () {
+ Navigator.pop(context);
+ },
+ text: 'Apply',
+ textColor: AppColors.textBlue,
+ ),
+ ],
+ ),
+ );
+ },
+ );
+ },
+ ),
+
+ SizedBox(width: 16.0.w()),
+ ],
+ ),
),
+
body: Column(
children: [
Expanded(
@@ -181,3 +261,20 @@ class _LikedTendersMobilePageState extends State {
);
}
}
+
+Widget _buildFilterOption(String title) {
+ return Padding(
+ padding: EdgeInsets.symmetric(vertical: 8.0.h()),
+ child: Align(
+ alignment: Alignment.centerLeft,
+ child: Text(
+ title,
+ style: TextStyle(
+ fontSize: 16.0.sp(),
+ color: AppColors.grey80,
+ fontWeight: FontWeight.w400,
+ ),
+ ),
+ ),
+ );
+}
diff --git a/lib/views/liked_tenders/pages/liked_tenders_tablet_page.dart b/lib/views/liked_tenders/pages/liked_tenders_tablet_page.dart
index 3f73bd1..cd0d277 100644
--- a/lib/views/liked_tenders/pages/liked_tenders_tablet_page.dart
+++ b/lib/views/liked_tenders/pages/liked_tenders_tablet_page.dart
@@ -8,11 +8,11 @@ import 'package:tm_app/core/utils/size_config.dart';
import 'package:tm_app/view_models/liked_tenders_view_model.dart';
import 'package:tm_app/views/liked_tenders/strings/liked_tenders_strings.dart';
import 'package:tm_app/views/liked_tenders/widgets/liked_tenders_list_item.dart';
+import 'package:tm_app/views/shared/base_button.dart';
import '../../../core/utils/app_toast.dart';
import '../../../data/services/model/tender_approvals_data/tender_approvals_data.dart';
import '../../shared/tablet_navigation_widget.dart';
-import '../../shared/tender_app_bar.dart';
class LikedTendersTabletPage extends StatefulWidget {
const LikedTendersTabletPage({super.key});
@@ -58,7 +58,95 @@ class _LikedTendersTabletPageState extends State {
child: Scaffold(
key: key,
backgroundColor: AppColors.backgroundColor,
- appBar: tabletAppBar(title: LikedTendersStrings.likedTenders, key: key),
+ appBar: PreferredSize(
+ preferredSize: const Size.fromHeight(60),
+ child: AppBar(
+ backgroundColor: AppColors.backgroundColor,
+ elevation: 0,
+ titleSpacing: 0,
+ leading: IconButton(
+ icon: SvgPicture.asset(
+ AssetsManager.arrowLeft,
+ height: 24.0.w(),
+ width: 24.0.w(),
+ ),
+ onPressed: () => Navigator.pop(context),
+ ),
+ title: Text(
+ LikedTendersStrings.likedTenders,
+ style: TextStyle(
+ color: AppColors.grey70,
+ fontWeight: FontWeight.w600,
+ fontSize: 20.0.sp(),
+ ),
+ ),
+ actions: [
+ IconButton(
+ icon: SvgPicture.asset(
+ AssetsManager.filter,
+ height: 24.0.w(),
+ width: 24.0.w(),
+ ),
+ onPressed: () {
+ showModalBottomSheet(
+ context: context,
+ isScrollControlled: true,
+ backgroundColor: AppColors.backgroundColor,
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.vertical(
+ top: Radius.circular(20),
+ ),
+ ),
+ constraints: BoxConstraints(
+ maxWidth: MediaQuery.of(context).size.width,
+ maxHeight: MediaQuery.of(context).size.height,
+ ),
+ builder: (context) {
+ return SizedBox(
+ width: double.infinity,
+ child: Padding(
+ padding: const EdgeInsets.all(16.0),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ SizedBox(height: 10.0.h()),
+ Text(
+ LikedTendersStrings.filter,
+ style: TextStyle(
+ fontWeight: FontWeight.w600,
+ color: AppColors.grey70,
+ fontSize: 20.0.sp(),
+ ),
+ ),
+ SizedBox(height: 20.0.h()),
+ _buildFilterOption('Industry'),
+ _buildFilterOption('Finance'),
+ _buildFilterOption('Business'),
+ _buildFilterOption('IT'),
+ _buildFilterOption('Software'),
+ SizedBox(height: 20.0.h()),
+ BaseButton(
+ backgroundColor: AppColors.primary2,
+ borderRadius: 24,
+ isEnabled: true,
+ onPressed: () => Navigator.pop(context),
+ text: 'Apply',
+ textColor: AppColors.textBlue,
+ ),
+ ],
+ ),
+ ),
+ );
+ },
+ );
+ },
+ ),
+
+ SizedBox(width: 16.0.w()),
+ ],
+ ),
+ ),
+ //tabletAppBar(title: LikedTendersStrings.likedTenders, key: key),
drawer: TabletNavigationWidget(currentIndex: 1),
body: Center(
child: SizedBox(
@@ -175,7 +263,8 @@ class _LikedTendersTabletPageState extends State {
context: context,
builder: (context) {
return AlertDialog(
- backgroundColor: AppColors.backgroundColor,
+ backgroundColor:
+ AppColors.backgroundColor,
title: const Text(
LikedTendersStrings.selectPage,
),
@@ -229,7 +318,6 @@ class _LikedTendersTabletPageState extends State {
SizedBox(width: 5.0.w()),
SvgPicture.asset(
AssetsManager.arrowDownSmall,
- color: AppColors.grey80,
),
SizedBox(width: 5.0.w()),
],
@@ -273,3 +361,20 @@ class _LikedTendersTabletPageState extends State {
);
}
}
+
+Widget _buildFilterOption(String title) {
+ return Padding(
+ padding: EdgeInsets.symmetric(vertical: 8.0.h()),
+ child: Align(
+ alignment: Alignment.centerLeft,
+ child: Text(
+ title,
+ style: TextStyle(
+ fontSize: 16.0.sp(),
+ color: AppColors.grey80,
+ fontWeight: FontWeight.w400,
+ ),
+ ),
+ ),
+ );
+}
diff --git a/lib/views/liked_tenders/strings/liked_tenders_strings.dart b/lib/views/liked_tenders/strings/liked_tenders_strings.dart
index 896ba57..9c486bb 100644
--- a/lib/views/liked_tenders/strings/liked_tenders_strings.dart
+++ b/lib/views/liked_tenders/strings/liked_tenders_strings.dart
@@ -16,4 +16,5 @@ class LikedTendersStrings {
static const page = 'Page';
static const selectPage = 'Select Page';
static const of = 'Of';
+ static const apply = 'Apply';
}
diff --git a/lib/views/shared/desktop_navigation_widget.dart b/lib/views/shared/desktop_navigation_widget.dart
index 5a4393c..f584edb 100644
--- a/lib/views/shared/desktop_navigation_widget.dart
+++ b/lib/views/shared/desktop_navigation_widget.dart
@@ -7,15 +7,23 @@ import 'package:tm_app/core/utils/size_config.dart';
import 'package:tm_app/view_models/home_view_model.dart';
import 'package:tm_app/view_models/tenders_view_model.dart';
import 'package:tm_app/views/home/strings/home_strings.dart';
-import 'package:tm_app/views/profile/strings/profile_strings.dart';
import 'package:tm_app/views/tenders/strings/tenders_strings.dart';
import '../../core/routes/app_routes.dart';
-class DesktopNavigationWidget extends StatelessWidget {
- const DesktopNavigationWidget({required this.currentIndex, super.key});
+class DesktopNavigationWidget extends StatelessWidget
+ implements PreferredSizeWidget {
+ const DesktopNavigationWidget({
+ required this.currentIndex,
+ super.key,
+ this.haveFilter = false,
+ });
final int currentIndex;
+ final bool haveFilter;
+
+ @override
+ Size get preferredSize => const Size.fromHeight(64);
@override
Widget build(BuildContext context) {
@@ -26,20 +34,16 @@ class DesktopNavigationWidget extends StatelessWidget {
border: Border(bottom: BorderSide(color: AppColors.grey30)),
),
child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.center,
children: [
- SizedBox(width: 40),
+ const SizedBox(width: 40),
SvgPicture.asset(AssetsManager.logoSmall),
- Spacer(),
+ const Spacer(),
_navigationItem(
context: context,
text: HomeStrings.home,
isActive: currentIndex == 0,
onTap: () {
- if (currentIndex == 0) {
- return;
- } else {
+ if (currentIndex != 0) {
Router.neglect(context, () => HomeRouteData().go(context));
context.read().init();
}
@@ -47,15 +51,13 @@ class DesktopNavigationWidget extends StatelessWidget {
iconPath: AssetsManager.home,
activeIconPath: AssetsManager.homeActive,
),
- SizedBox(width: 24),
+ const SizedBox(width: 24),
_navigationItem(
context: context,
text: TendersStrings.tendersTitle,
isActive: currentIndex == 1,
onTap: () {
- if (currentIndex == 1) {
- return;
- } else {
+ if (currentIndex != 1) {
Router.neglect(context, () => TendersRouteData().go(context));
context.read().getTenders();
}
@@ -63,58 +65,35 @@ class DesktopNavigationWidget extends StatelessWidget {
iconPath: AssetsManager.tenders,
activeIconPath: AssetsManager.tendersActive,
),
- SizedBox(width: 24),
+ const SizedBox(width: 24),
_navigationItem(
context: context,
text: TendersStrings.contracts,
isActive: currentIndex == 2,
onTap: () {
- if (currentIndex == 2) {
- return;
- } else {
- // Router.neglect(context, () => TendersRouteData().go(context));
- // context.read().getTenders();
- }
- },
- iconPath: AssetsManager.contracts,
- activeIconPath: AssetsManager.contracts,
- ),
- SizedBox(width: 24),
- _navigationItem(
- context: context,
- text: TendersStrings.notifications,
- isActive: currentIndex == 3,
- onTap: () {
- if (currentIndex == 3) {
- return;
- } else {
- Router.neglect(
- context,
- () => NotificationRouteData().go(context),
- );
- //context.read().getTenders();
- }
- },
- iconPath: AssetsManager.notify,
- activeIconPath: AssetsManager.notifyActive,
- ),
- SizedBox(width: 24),
- _navigationItem(
- context: context,
- text: ProfileStrings.profileTitle,
- isActive: currentIndex == 4,
- onTap: () {
- if (currentIndex == 4) {
- return;
- } else {
+ if (currentIndex != 2) {
Router.neglect(context, () => ProfileRouteData().go(context));
}
},
iconPath: AssetsManager.profile,
activeIconPath: AssetsManager.profileActive,
),
- Spacer(),
- SizedBox(width: 68),
+ const Spacer(),
+ if (haveFilter)
+ Builder(
+ builder:
+ (context) => IconButton(
+ icon: SvgPicture.asset(
+ AssetsManager.filter,
+ height: 24.0.w(),
+ width: 24.0.w(),
+ ),
+ onPressed: () {
+ Scaffold.of(context).openEndDrawer();
+ },
+ ),
+ ),
+ const SizedBox(width: 68),
],
),
);
@@ -138,7 +117,7 @@ class DesktopNavigationWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SvgPicture.asset(isActive ? activeIconPath : iconPath),
- SizedBox(width: 8),
+ const SizedBox(width: 8),
Text(
text,
style: TextStyle(