Merge pull request 'fixed conflicts' (#121) from merge_conflicts into main
Reviewed-on: https://repo.ravanertebat.com/TM/tm_app/pulls/121
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M5.39999 2.09961H18.6C19.7 2.09961 20.6 2.99961 20.6 4.09961V6.29961C20.6 7.09961 20.1 8.09961 19.6 8.59961L15.3 12.3996C14.7 12.8996 14.3 13.8996 14.3 14.6996V18.9996C14.3 19.5996 13.9 20.3996 13.4 20.6996L12 21.5996C10.7 22.3996 8.89999 21.4996 8.89999 19.8996V14.5996C8.89999 13.8996 8.49999 12.9996 8.09999 12.4996L4.29999 8.49961C3.79999 7.99961 3.39999 7.09961 3.39999 6.49961V4.19961C3.39999 2.99961 4.29999 2.09961 5.39999 2.09961Z" stroke="#444444" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M10.93 2.09961L6 9.99961" stroke="#444444" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 804 B |
@@ -12,9 +12,9 @@ class AssetsManager {
|
|||||||
static const tendersActive = 'assets/icons/task-square_active.svg';
|
static const tendersActive = 'assets/icons/task-square_active.svg';
|
||||||
static const profile = 'assets/icons/profile-circle.svg';
|
static const profile = 'assets/icons/profile-circle.svg';
|
||||||
static const profileActive = 'assets/icons/profile-circle_active.svg';
|
static const profileActive = 'assets/icons/profile-circle_active.svg';
|
||||||
static const contracts = 'assets/icons/icon_contracts.svg';
|
static const contracts = 'assets/icons/icon_contracts.svg';
|
||||||
static const notify = 'assets/icons/notify_icon.svg';
|
static const notify = 'assets/icons/notify_icon.svg';
|
||||||
static const notifyActive = 'assets/icons/notify_icon_active.svg';
|
static const notifyActive = 'assets/icons/notify_icon_active.svg';
|
||||||
|
|
||||||
// login page
|
// login page
|
||||||
static const logo = 'assets/pngs/logo.png';
|
static const logo = 'assets/pngs/logo.png';
|
||||||
@@ -65,7 +65,7 @@ class AssetsManager {
|
|||||||
static const moon = 'assets/icons/moon.svg';
|
static const moon = 'assets/icons/moon.svg';
|
||||||
|
|
||||||
//Liked tenders
|
//Liked tenders
|
||||||
static const trash = 'assets/icons/trash.svg';
|
static const trash = 'assets/icons/trash.svg';
|
||||||
static const arrowDownSmall = 'assets/icons/arrow_down_small.svg';
|
static const arrowDownSmall = 'assets/icons/arrow_down_small.svg';
|
||||||
|
static const filter = 'assets/icons/filter.svg';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 'package:tm_app/views/liked_tenders/widgets/liked_tenders_list_item.dart';
|
||||||
|
|
||||||
import '../../../core/utils/app_toast.dart';
|
import '../../../core/utils/app_toast.dart';
|
||||||
|
import '../../shared/base_button.dart';
|
||||||
import '../../shared/desktop_navigation_widget.dart';
|
import '../../shared/desktop_navigation_widget.dart';
|
||||||
import '../strings/liked_tenders_strings.dart';
|
import '../strings/liked_tenders_strings.dart';
|
||||||
|
|
||||||
@@ -53,9 +54,51 @@ class _LikedTendersDesktopPageState extends State<LikedTendersDesktopPage> {
|
|||||||
},
|
},
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: AppColors.backgroundColor,
|
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(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
DesktopNavigationWidget(currentIndex: 1),
|
const DesktopNavigationWidget(currentIndex: 1, haveFilter: true),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 740,
|
width: 740,
|
||||||
@@ -165,7 +208,8 @@ class _LikedTendersDesktopPageState extends State<LikedTendersDesktopPage> {
|
|||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
backgroundColor: AppColors.backgroundColor,
|
backgroundColor:
|
||||||
|
AppColors.backgroundColor,
|
||||||
title: const Text(
|
title: const Text(
|
||||||
LikedTendersStrings.selectPage,
|
LikedTendersStrings.selectPage,
|
||||||
),
|
),
|
||||||
@@ -219,7 +263,6 @@ class _LikedTendersDesktopPageState extends State<LikedTendersDesktopPage> {
|
|||||||
SizedBox(width: 5.0.w()),
|
SizedBox(width: 5.0.w()),
|
||||||
SvgPicture.asset(
|
SvgPicture.asset(
|
||||||
AssetsManager.arrowDownSmall,
|
AssetsManager.arrowDownSmall,
|
||||||
color: AppColors.grey80,
|
|
||||||
),
|
),
|
||||||
SizedBox(width: 5.0.w()),
|
SizedBox(width: 5.0.w()),
|
||||||
],
|
],
|
||||||
@@ -261,3 +304,20 @@ class _LikedTendersDesktopPageState extends State<LikedTendersDesktopPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
@@ -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/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/strings/liked_tenders_strings.dart';
|
||||||
import 'package:tm_app/views/liked_tenders/widgets/liked_tenders_list_item.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 {
|
class LikedTendersMobilePage extends StatefulWidget {
|
||||||
const LikedTendersMobilePage({super.key});
|
const LikedTendersMobilePage({super.key});
|
||||||
@@ -73,10 +73,90 @@ class _LikedTendersMobilePageState extends State<LikedTendersMobilePage> {
|
|||||||
},
|
},
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: AppColors.backgroundColor,
|
backgroundColor: AppColors.backgroundColor,
|
||||||
appBar: appBar(
|
appBar: PreferredSize(
|
||||||
context: context,
|
preferredSize: const Size.fromHeight(60),
|
||||||
title: LikedTendersStrings.likedTenders,
|
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(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -181,3 +261,20 @@ class _LikedTendersMobilePageState extends State<LikedTendersMobilePage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
@@ -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/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/strings/liked_tenders_strings.dart';
|
||||||
import 'package:tm_app/views/liked_tenders/widgets/liked_tenders_list_item.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 '../../../core/utils/app_toast.dart';
|
||||||
import '../../../data/services/model/tender_approvals_data/tender_approvals_data.dart';
|
import '../../../data/services/model/tender_approvals_data/tender_approvals_data.dart';
|
||||||
import '../../shared/tablet_navigation_widget.dart';
|
import '../../shared/tablet_navigation_widget.dart';
|
||||||
import '../../shared/tender_app_bar.dart';
|
|
||||||
|
|
||||||
class LikedTendersTabletPage extends StatefulWidget {
|
class LikedTendersTabletPage extends StatefulWidget {
|
||||||
const LikedTendersTabletPage({super.key});
|
const LikedTendersTabletPage({super.key});
|
||||||
@@ -58,7 +58,95 @@ class _LikedTendersTabletPageState extends State<LikedTendersTabletPage> {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
key: key,
|
key: key,
|
||||||
backgroundColor: AppColors.backgroundColor,
|
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),
|
drawer: TabletNavigationWidget(currentIndex: 1),
|
||||||
body: Center(
|
body: Center(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
@@ -175,7 +263,8 @@ class _LikedTendersTabletPageState extends State<LikedTendersTabletPage> {
|
|||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
backgroundColor: AppColors.backgroundColor,
|
backgroundColor:
|
||||||
|
AppColors.backgroundColor,
|
||||||
title: const Text(
|
title: const Text(
|
||||||
LikedTendersStrings.selectPage,
|
LikedTendersStrings.selectPage,
|
||||||
),
|
),
|
||||||
@@ -229,7 +318,6 @@ class _LikedTendersTabletPageState extends State<LikedTendersTabletPage> {
|
|||||||
SizedBox(width: 5.0.w()),
|
SizedBox(width: 5.0.w()),
|
||||||
SvgPicture.asset(
|
SvgPicture.asset(
|
||||||
AssetsManager.arrowDownSmall,
|
AssetsManager.arrowDownSmall,
|
||||||
color: AppColors.grey80,
|
|
||||||
),
|
),
|
||||||
SizedBox(width: 5.0.w()),
|
SizedBox(width: 5.0.w()),
|
||||||
],
|
],
|
||||||
@@ -273,3 +361,20 @@ class _LikedTendersTabletPageState extends State<LikedTendersTabletPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
@@ -16,4 +16,5 @@ class LikedTendersStrings {
|
|||||||
static const page = 'Page';
|
static const page = 'Page';
|
||||||
static const selectPage = 'Select Page';
|
static const selectPage = 'Select Page';
|
||||||
static const of = 'Of';
|
static const of = 'Of';
|
||||||
|
static const apply = 'Apply';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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/home_view_model.dart';
|
||||||
import 'package:tm_app/view_models/tenders_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/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 'package:tm_app/views/tenders/strings/tenders_strings.dart';
|
||||||
|
|
||||||
import '../../core/routes/app_routes.dart';
|
import '../../core/routes/app_routes.dart';
|
||||||
|
|
||||||
class DesktopNavigationWidget extends StatelessWidget {
|
class DesktopNavigationWidget extends StatelessWidget
|
||||||
const DesktopNavigationWidget({required this.currentIndex, super.key});
|
implements PreferredSizeWidget {
|
||||||
|
const DesktopNavigationWidget({
|
||||||
|
required this.currentIndex,
|
||||||
|
super.key,
|
||||||
|
this.haveFilter = false,
|
||||||
|
});
|
||||||
|
|
||||||
final int currentIndex;
|
final int currentIndex;
|
||||||
|
final bool haveFilter;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Size get preferredSize => const Size.fromHeight(64);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -26,20 +34,16 @@ class DesktopNavigationWidget extends StatelessWidget {
|
|||||||
border: Border(bottom: BorderSide(color: AppColors.grey30)),
|
border: Border(bottom: BorderSide(color: AppColors.grey30)),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 40),
|
const SizedBox(width: 40),
|
||||||
SvgPicture.asset(AssetsManager.logoSmall),
|
SvgPicture.asset(AssetsManager.logoSmall),
|
||||||
Spacer(),
|
const Spacer(),
|
||||||
_navigationItem(
|
_navigationItem(
|
||||||
context: context,
|
context: context,
|
||||||
text: HomeStrings.home,
|
text: HomeStrings.home,
|
||||||
isActive: currentIndex == 0,
|
isActive: currentIndex == 0,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (currentIndex == 0) {
|
if (currentIndex != 0) {
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
Router.neglect(context, () => HomeRouteData().go(context));
|
Router.neglect(context, () => HomeRouteData().go(context));
|
||||||
context.read<HomeViewModel>().init();
|
context.read<HomeViewModel>().init();
|
||||||
}
|
}
|
||||||
@@ -47,15 +51,13 @@ class DesktopNavigationWidget extends StatelessWidget {
|
|||||||
iconPath: AssetsManager.home,
|
iconPath: AssetsManager.home,
|
||||||
activeIconPath: AssetsManager.homeActive,
|
activeIconPath: AssetsManager.homeActive,
|
||||||
),
|
),
|
||||||
SizedBox(width: 24),
|
const SizedBox(width: 24),
|
||||||
_navigationItem(
|
_navigationItem(
|
||||||
context: context,
|
context: context,
|
||||||
text: TendersStrings.tendersTitle,
|
text: TendersStrings.tendersTitle,
|
||||||
isActive: currentIndex == 1,
|
isActive: currentIndex == 1,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (currentIndex == 1) {
|
if (currentIndex != 1) {
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
Router.neglect(context, () => TendersRouteData().go(context));
|
Router.neglect(context, () => TendersRouteData().go(context));
|
||||||
context.read<TendersViewModel>().getTenders();
|
context.read<TendersViewModel>().getTenders();
|
||||||
}
|
}
|
||||||
@@ -63,58 +65,35 @@ class DesktopNavigationWidget extends StatelessWidget {
|
|||||||
iconPath: AssetsManager.tenders,
|
iconPath: AssetsManager.tenders,
|
||||||
activeIconPath: AssetsManager.tendersActive,
|
activeIconPath: AssetsManager.tendersActive,
|
||||||
),
|
),
|
||||||
SizedBox(width: 24),
|
const SizedBox(width: 24),
|
||||||
_navigationItem(
|
_navigationItem(
|
||||||
context: context,
|
context: context,
|
||||||
text: TendersStrings.contracts,
|
text: TendersStrings.contracts,
|
||||||
isActive: currentIndex == 2,
|
isActive: currentIndex == 2,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (currentIndex == 2) {
|
if (currentIndex != 2) {
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
// Router.neglect(context, () => TendersRouteData().go(context));
|
|
||||||
// context.read<TendersViewModel>().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<notificationViewModel>().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 {
|
|
||||||
Router.neglect(context, () => ProfileRouteData().go(context));
|
Router.neglect(context, () => ProfileRouteData().go(context));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
iconPath: AssetsManager.profile,
|
iconPath: AssetsManager.profile,
|
||||||
activeIconPath: AssetsManager.profileActive,
|
activeIconPath: AssetsManager.profileActive,
|
||||||
),
|
),
|
||||||
Spacer(),
|
const Spacer(),
|
||||||
SizedBox(width: 68),
|
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,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
SvgPicture.asset(isActive ? activeIconPath : iconPath),
|
SvgPicture.asset(isActive ? activeIconPath : iconPath),
|
||||||
SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
Text(
|
||||||
text,
|
text,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|||||||
Reference in New Issue
Block a user