fixed liked tender filter bar

This commit is contained in:
llsajjad
2025-09-16 12:43:25 +03:30
parent 8ad05f5c68
commit d804d5f26e
5 changed files with 232 additions and 99 deletions
+2 -2
View File
@@ -8,14 +8,14 @@ class AppConfig {
// این متد بر اساس محیط فعال، URL مناسب را برمی‌گرداند.
static String get apiBaseUrl {
return 'http://10.0.2.2:8081';
// return 'http://10.0.2.2:8081';
// return '192.168.1.103:8081';
// if (isDevelopment) {
// // Handle different platforms for local development
// if (kIsWeb) {
// For web, use localhost
// return 'https://app.opplens.com';
// return 'http://localhost:8081';
return 'http://localhost:8081';
// } else {
// For Android emulator, use 10.0.2.2 (special IP for host machine)
// return 'http://10.0.2.2:8081';
@@ -215,14 +215,12 @@ class FormCard extends StatelessWidget {
decoration: InputDecoration(
filled: true,
fillColor: AppColors.grey0,
hint: Text(
FinalCompletionOfDocumentsStrings.describeYourTeamHint,
style: TextStyle(
hintText: FinalCompletionOfDocumentsStrings.describeYourTeamHint,
hintStyle: TextStyle(
fontSize: 12.0,
fontWeight: FontWeight.w400,
color: AppColors.grey60,
),
),
border: OutlineInputBorder(
borderSide: const BorderSide(color: AppColors.secondaryborder2),
borderRadius: BorderRadius.circular(12),
@@ -9,6 +9,7 @@ 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 'package:tm_app/views/shared/tender_app_bar.dart';
import '../../../core/utils/app_toast.dart';
import '../../../data/services/model/tender_approvals_data/tender_approvals_data.dart';
@@ -58,12 +59,106 @@ class _LikedTendersTabletPageState extends State<LikedTendersTabletPage> {
child: Scaffold(
key: key,
backgroundColor: AppColors.backgroundColor,
appBar: PreferredSize(
preferredSize: const Size.fromHeight(60),
child: AppBar(
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: const TabletNavigationWidget(currentIndex: 1),
body: Center(
child: SizedBox(
width: 720,
child: Column(
children: [
AppBar(
backgroundColor: AppColors.backgroundColor,
elevation: 0,
titleSpacing: 0,
scrolledUnderElevation: 0,
leading: IconButton(
icon: SvgPicture.asset(
AssetsManager.arrowLeft,
@@ -141,18 +236,9 @@ class _LikedTendersTabletPageState extends State<LikedTendersTabletPage> {
);
},
),
SizedBox(width: 16.0.w()),
],
),
),
//tabletAppBar(title: LikedTendersStrings.likedTenders, key: key),
drawer: const TabletNavigationWidget(currentIndex: 1),
body: Center(
child: SizedBox(
width: 720,
child: Column(
children: [
Expanded(
child: Consumer<LikedTendersViewModel>(
builder: (context, viewModel, child) {
@@ -233,7 +319,7 @@ class _LikedTendersTabletPageState extends State<LikedTendersTabletPage> {
},
child: LikedListItem(
tender: item.tender!,
approval: approval!,
approval: approval,
),
),
);
+1
View File
@@ -68,6 +68,7 @@ PreferredSizeWidget tabletAppBar({
return PreferredSize(
preferredSize: const Size.fromHeight(64),
child: AppBar(
scrolledUnderElevation: 0,
backgroundColor: AppColors.backgroundColor,
elevation: 0,
titleSpacing: 0,
+48
View File
@@ -177,6 +177,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.2"
cross_file:
dependency: transitive
description:
name: cross_file
sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670"
url: "https://pub.dev"
source: hosted
version: "0.3.4+2"
crypto:
dependency: transitive
description:
@@ -209,6 +217,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.0"
dbus:
dependency: transitive
description:
name: dbus
sha256: "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c"
url: "https://pub.dev"
source: hosted
version: "0.7.11"
dio:
dependency: "direct main"
description:
@@ -225,6 +241,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.1"
dotted_border:
dependency: "direct main"
description:
name: dotted_border
sha256: "99b091ec6891ba0c5331fdc2b502993c7c108f898995739a73c6845d71dad70c"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
equatable:
dependency: transitive
description:
@@ -257,6 +281,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "7.0.1"
file_picker:
dependency: "direct main"
description:
name: file_picker
sha256: f2d9f173c2c14635cc0e9b14c143c49ef30b4934e8d1d274d6206fcb0086a06f
url: "https://pub.dev"
source: hosted
version: "10.3.3"
fixnum:
dependency: transitive
description:
@@ -302,6 +334,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.0.0"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: b0694b7fb1689b0e6cc193b3f1fcac6423c4f93c74fb20b806c6b6f196db0c31
url: "https://pub.dev"
source: hosted
version: "2.0.30"
flutter_svg:
dependency: "direct main"
description:
@@ -989,6 +1029,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.3"
win32:
dependency: transitive
description:
name: win32
sha256: "329edf97fdd893e0f1e3b9e88d6a0e627128cc17cc316a8d67fda8f1451178ba"
url: "https://pub.dev"
source: hosted
version: "5.13.0"
xdg_directories:
dependency: transitive
description: