BASE: Update Icons & Name Of The App.

This commit is contained in:
2025-12-04 10:23:59 +05:00
parent b04050384d
commit e602782edd
228 changed files with 34364 additions and 7905 deletions

View File

@@ -3,7 +3,7 @@ import 'package:customer/screen_ui/parcel_service/parcel_order_details.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get/get.dart' hide Trans;
import '../../constant/constant.dart';
import '../../controllers/parcel_my_booking_controller.dart';
import '../../controllers/theme_controller.dart';
@@ -23,14 +23,27 @@ class MyBookingScreen extends StatelessWidget {
builder: (controller) {
return DefaultTabController(
length: controller.tabTitles.length,
initialIndex: controller.tabTitles.indexOf(controller.selectedTab.value),
initialIndex: controller.tabTitles.indexOf(
controller.selectedTab.value,
),
child: Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
backgroundColor: AppThemeData.primary300,
title: Padding(
padding: const EdgeInsets.only(bottom: 10),
child: Row(children: [const SizedBox(width: 10), Text("Parcel History".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900))]),
child: Row(
children: [
const SizedBox(width: 10),
Text(
"Parcel History".tr(),
style: AppThemeData.boldTextStyle(
fontSize: 18,
color: AppThemeData.grey900,
),
),
],
),
),
bottom: TabBar(
// don't re-subscribe onTap — just update selectedTab (optional)
@@ -41,8 +54,13 @@ class MyBookingScreen extends StatelessWidget {
labelColor: AppThemeData.parcelService500,
unselectedLabelColor: AppThemeData.parcelService500,
labelStyle: AppThemeData.boldTextStyle(fontSize: 15),
unselectedLabelStyle: AppThemeData.mediumTextStyle(fontSize: 15),
tabs: controller.tabTitles.map((title) => Tab(child: Center(child: Text(title)))).toList(),
unselectedLabelStyle: AppThemeData.mediumTextStyle(
fontSize: 15,
),
tabs:
controller.tabTitles
.map((title) => Tab(child: Center(child: Text(title))))
.toList(),
),
),
@@ -56,12 +74,30 @@ class MyBookingScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text("Please Log In to Continue".tr(), style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
Text(
"Please Log In to Continue".tr(),
style: TextStyle(
color:
isDark
? AppThemeData.grey100
: AppThemeData.grey800,
fontSize: 22,
fontFamily: AppThemeData.semiBold,
),
),
const SizedBox(height: 5),
Text(
"Youre not logged in. Please sign in to access your account and explore all features.".tr(),
"Youre not logged in. Please sign in to access your account and explore all features."
.tr(),
textAlign: TextAlign.center,
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.bold),
style: TextStyle(
color:
isDark
? AppThemeData.grey50
: AppThemeData.grey500,
fontSize: 16,
fontFamily: AppThemeData.bold,
),
),
const SizedBox(height: 20),
RoundedButtonFill(
@@ -83,7 +119,17 @@ class MyBookingScreen extends StatelessWidget {
final orders = controller.getOrdersForTab(title);
if (orders.isEmpty) {
return Center(child: Text("No orders found".tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)));
return Center(
child: Text(
"No orders found".tr(),
style: AppThemeData.mediumTextStyle(
color:
isDark
? AppThemeData.greyDark900
: AppThemeData.grey900,
),
),
);
}
return ListView.builder(
@@ -93,55 +139,98 @@ class MyBookingScreen extends StatelessWidget {
final order = orders[index];
return GestureDetector(
onTap: () {
Get.to(() => const ParcelOrderDetails(), arguments: order);
Get.to(
() => const ParcelOrderDetails(),
arguments: order,
);
},
child: Container(
margin: const EdgeInsets.only(bottom: 16),
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: isDark ? AppThemeData.greyDark50 : AppThemeData.grey50,
color:
isDark
? AppThemeData.greyDark50
: AppThemeData.grey50,
borderRadius: BorderRadius.circular(15),
border: Border.all(color: isDark ? AppThemeData.greyDark200 : AppThemeData.grey200),
border: Border.all(
color:
isDark
? AppThemeData.greyDark200
: AppThemeData.grey200,
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(bottom: 8.0),
padding: const EdgeInsets.only(
bottom: 8.0,
),
child: Text(
"${'Order Date:'.tr()}${order.isSchedule == true ? controller.formatDate(order.createdAt!) : controller.formatDate(order.senderPickupDateTime!)}",
style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.info400),
style: AppThemeData.mediumTextStyle(
fontSize: 14,
color: AppThemeData.info400,
),
),
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Column(
children: [
Image.asset("assets/images/image_parcel.png", height: 32, width: 32),
DottedBorder(
options: CustomPathDottedBorderOptions(
color: Colors.grey.shade400,
strokeWidth: 2,
dashPattern: [4, 4],
customPath:
(size) =>
Path()
..moveTo(size.width / 2, 0)
..lineTo(size.width / 2, size.height),
),
child: const SizedBox(width: 20, height: 95),
Image.asset(
"assets/images/image_parcel.png",
height: 32,
width: 32,
),
DottedBorder(
options:
CustomPathDottedBorderOptions(
color:
Colors
.grey
.shade400,
strokeWidth: 2,
dashPattern: [4, 4],
customPath:
(size) =>
Path()
..moveTo(
size.width /
2,
0,
)
..lineTo(
size.width /
2,
size.height,
),
),
child: const SizedBox(
width: 20,
height: 95,
),
),
Image.asset(
"assets/images/image_parcel.png",
height: 32,
width: 32,
),
Image.asset("assets/images/image_parcel.png", height: 32, width: 32),
],
),
const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
_infoSection(
"Pickup Address (Sender):".tr(),
"Pickup Address (Sender):"
.tr(),
order.sender?.name ?? '',
order.sender?.address ?? '',
order.sender?.phone ?? '',
@@ -153,9 +242,11 @@ class MyBookingScreen extends StatelessWidget {
),
const SizedBox(height: 16),
_infoSection(
"Delivery Address (Receiver):".tr(),
"Delivery Address (Receiver):"
.tr(),
order.receiver?.name ?? '',
order.receiver?.address ?? '',
order.receiver?.address ??
'',
order.receiver?.phone ?? '',
// order.receiverPickupDateTime != null
// ? "Delivery Time: ${controller.formatDate(order.receiverPickupDateTime!)}"
@@ -182,27 +273,74 @@ class MyBookingScreen extends StatelessWidget {
);
}
Widget _infoSection(String title, String name, String address, String phone, String? status, bool isDark) {
Widget _infoSection(
String title,
String name,
String address,
String phone,
String? status,
bool isDark,
) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Expanded(
child: Text(title, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900), maxLines: 1, overflow: TextOverflow.ellipsis),
child: Text(
title,
style: AppThemeData.semiBoldTextStyle(
fontSize: 16,
color:
isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
if (status != null) ...[
Container(
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 12),
decoration: BoxDecoration(color: AppThemeData.info50, border: Border.all(color: AppThemeData.info300), borderRadius: BorderRadius.circular(12)),
child: Text(status, style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.info500)),
padding: const EdgeInsets.symmetric(
vertical: 6,
horizontal: 12,
),
decoration: BoxDecoration(
color: AppThemeData.info50,
border: Border.all(color: AppThemeData.info300),
borderRadius: BorderRadius.circular(12),
),
child: Text(
status,
style: AppThemeData.boldTextStyle(
fontSize: 14,
color: AppThemeData.info500,
),
),
),
],
],
),
Text(name, style: AppThemeData.semiBoldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(address, style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(phone, style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(
name,
style: AppThemeData.semiBoldTextStyle(
fontSize: 14,
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
),
),
Text(
address,
style: AppThemeData.mediumTextStyle(
fontSize: 14,
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
),
),
Text(
phone,
style: AppThemeData.mediumTextStyle(
fontSize: 14,
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
),
),
//Text(time, style: AppThemeData.semiBoldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
],
);