changes
This commit is contained in:
@@ -8,7 +8,8 @@ class AppConfig {
|
|||||||
|
|
||||||
// این متد بر اساس محیط فعال، URL مناسب را برمیگرداند.
|
// این متد بر اساس محیط فعال، URL مناسب را برمیگرداند.
|
||||||
static String get apiBaseUrl {
|
static String get apiBaseUrl {
|
||||||
return 'http://10.0.2.2:8081';
|
// return 'http://10.0.2.2:8081';
|
||||||
|
return 'http:127.0.0.1';
|
||||||
// if (isDevelopment) {
|
// if (isDevelopment) {
|
||||||
// // Handle different platforms for local development
|
// // Handle different platforms for local development
|
||||||
// if (kIsWeb) {
|
// if (kIsWeb) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class ProfileService {
|
|||||||
|
|
||||||
Future<Result<ProfileResponse>> getProfile() async {
|
Future<Result<ProfileResponse>> getProfile() async {
|
||||||
final result = await _networkManager.makeRequest(
|
final result = await _networkManager.makeRequest(
|
||||||
'/admin/v1/profile',
|
'/api/v1/profile',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
(json) => ProfileResponse.fromJson(json),
|
(json) => ProfileResponse.fromJson(json),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -31,24 +31,28 @@ class MobileHomePage extends StatelessWidget {
|
|||||||
if (homeViewModel.errorMessage != null) {
|
if (homeViewModel.errorMessage != null) {
|
||||||
return Center(child: Text(homeViewModel.errorMessage!));
|
return Center(child: Text(homeViewModel.errorMessage!));
|
||||||
}
|
}
|
||||||
|
if (homeViewModel.homeResponse != null) {
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(height: 18.0.h()),
|
SizedBox(height: 18.0.h()),
|
||||||
NotificationCard(),
|
NotificationCard(),
|
||||||
SizedBox(height: 32.0.h()),
|
SizedBox(height: 32.0.h()),
|
||||||
_progressBarsRow(homeViewModel.homeResponse!),
|
_progressBarsRow(homeViewModel.homeResponse!),
|
||||||
SizedBox(height: 32.0.h()),
|
SizedBox(height: 32.0.h()),
|
||||||
_firstTenderCardsRow(context, homeViewModel.homeResponse!),
|
_firstTenderCardsRow(context, homeViewModel.homeResponse!),
|
||||||
SizedBox(height: 8.0.h()),
|
SizedBox(height: 8.0.h()),
|
||||||
_secondTenderCardsRow(homeViewModel.homeResponse!),
|
_secondTenderCardsRow(homeViewModel.homeResponse!),
|
||||||
SizedBox(height: 40.0.h()),
|
SizedBox(height: 40.0.h()),
|
||||||
_yourTenderText(),
|
_yourTenderText(),
|
||||||
_bottomListView(homeViewModel.recommendedTendersResponse!),
|
_bottomListView(homeViewModel.recommendedTendersResponse!),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return const Center(
|
||||||
|
child: CircularProgressIndicator(color: AppColors.secondary50),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class TendersListItem extends StatelessWidget {
|
|||||||
child: Text(
|
child: Text(
|
||||||
tender.description!,
|
tender.description!,
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
maxLines: 6,
|
maxLines: 4,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14.0.sp(),
|
fontSize: 14.0.sp(),
|
||||||
@@ -95,7 +95,8 @@ class TendersListItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 18.0.h()),
|
Spacer(),
|
||||||
|
// SizedBox(height: 18.0.h()),
|
||||||
TenderCardProgressBar(),
|
TenderCardProgressBar(),
|
||||||
SizedBox(height: 15.0.h()),
|
SizedBox(height: 15.0.h()),
|
||||||
|
|
||||||
|
|||||||
@@ -102,9 +102,23 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
|
|||||||
),
|
),
|
||||||
child: const ThemeToggle(),
|
child: const ThemeToggle(),
|
||||||
),
|
),
|
||||||
ElevatedButton(
|
// ElevatedButton(
|
||||||
onPressed: () => viewModel.logout(),
|
// onPressed: () => viewModel.logout(),
|
||||||
child: const Text('Logout'),
|
// child: const Text('Logout'),
|
||||||
|
// ),
|
||||||
|
SizedBox(height: 24.0.h()),
|
||||||
|
InkWell(
|
||||||
|
onTap: () => viewModel.logout(),
|
||||||
|
child: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 45.0.h(),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border: Border.all(color: AppColors.borderColor),
|
||||||
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text('Logout'),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ class TenderCard extends StatelessWidget {
|
|||||||
Widget _tenderDescription() {
|
Widget _tenderDescription() {
|
||||||
return Text(
|
return Text(
|
||||||
tender.description ?? '',
|
tender.description ?? '',
|
||||||
|
maxLines: 7,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: AppColors.grey70,
|
color: AppColors.grey70,
|
||||||
fontSize: 16.0.sp(),
|
fontSize: 16.0.sp(),
|
||||||
|
|||||||
+16
-8
@@ -37,10 +37,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: async
|
name: async
|
||||||
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
|
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.12.0"
|
version: "2.13.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -221,10 +221,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
|
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.2"
|
version: "1.3.3"
|
||||||
ffi:
|
ffi:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -400,6 +400,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.4.1"
|
version: "2.4.1"
|
||||||
|
intl:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: intl
|
||||||
|
sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.20.2"
|
||||||
io:
|
io:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -436,10 +444,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker
|
name: leak_tracker
|
||||||
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
|
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.0.8"
|
version: "10.0.9"
|
||||||
leak_tracker_flutter_testing:
|
leak_tracker_flutter_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -841,10 +849,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vm_service
|
name: vm_service
|
||||||
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
|
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "14.3.1"
|
version: "15.0.0"
|
||||||
watcher:
|
watcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
Reference in New Issue
Block a user