2026-04-15
This commit is contained in:
1 parent
d01e5ba860
commit
96de59e9be
46 files changed
+1299
-1191
No files matched your search
@@ -39,7 +39,7 @@ class ChatProfileScreen extends ConsumerWidget {
|
||||
title: const Text(
|
||||
"Profile",
|
||||
style: TextStyle(
|
||||
fontFamily: "Gilroy-SemiBold",
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 20,
|
||||
height: 1.4,
|
||||
@@ -113,7 +113,7 @@ class ChatProfileScreen extends ConsumerWidget {
|
||||
const Text(
|
||||
"Shared By Taxglide",
|
||||
style: TextStyle(
|
||||
fontFamily: "Gilroy-SemiBold",
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 20,
|
||||
height: 1.4,
|
||||
@@ -213,7 +213,7 @@ class ChatProfileScreen extends ConsumerWidget {
|
||||
const Text(
|
||||
"Shared By Client",
|
||||
style: TextStyle(
|
||||
fontFamily: "Gilroy-SemiBold",
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 20,
|
||||
height: 1.4,
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:taxglide/consts/download_helper.dart';
|
||||
import 'package:taxglide/controller/api_contoller.dart';
|
||||
import 'package:taxglide/controller/api_repository.dart';
|
||||
import 'package:taxglide/model/chat_model.dart';
|
||||
import 'package:taxglide/view/Mahi_chat/live_chat_screen.dart';
|
||||
|
||||
// ⭐⭐⭐ CHAT INPUT BOX WITH FILE TAG SUPPORT ⭐⭐⭐
|
||||
@@ -246,49 +247,61 @@ class _ChatInputBoxState extends ConsumerState<ChatInputBox> {
|
||||
|
||||
setState(() => _isSending = true);
|
||||
|
||||
// Show loading dialog
|
||||
showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (context) => WillPopScope(
|
||||
onWillPop: () async => false,
|
||||
child: const Center(
|
||||
child: Card(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(20),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
CircularProgressIndicator(),
|
||||
SizedBox(height: 16),
|
||||
Text("Sending message..."),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
// ⭐ OPTIMISTIC UI: Create a temporary message and add it immediately
|
||||
final tempId = DateTime.now().millisecondsSinceEpoch;
|
||||
final tempMsg = MessageModel(
|
||||
id: tempId,
|
||||
chatBy: "user", // User
|
||||
message: text,
|
||||
type: selectedFiles.isNotEmpty ? "file" : "text",
|
||||
isDelivered: 0,
|
||||
isRead: 0,
|
||||
createdAt: DateTime.now().toIso8601String(),
|
||||
userId: 0,
|
||||
tagId: tagId > 0 ? tagId : null,
|
||||
parentTag: taggedMessage != null ? ParentTagModel(
|
||||
id: taggedMessage.id,
|
||||
message: taggedMessage.message,
|
||||
type: taggedMessage.type,
|
||||
fileName: taggedMessage.fileName,
|
||||
) : null,
|
||||
uploadedDocuments: selectedFiles.map((file) => DocumentModel(
|
||||
filePath: file.path,
|
||||
fileName: file.path.split('/').last,
|
||||
fileType: "image",
|
||||
)).toList(),
|
||||
documents: [],
|
||||
);
|
||||
|
||||
// Add to UI immediately
|
||||
final notifier = ref.read(chatMessagesProvider(widget.chatId).notifier);
|
||||
notifier.addNewMessage(tempMsg);
|
||||
|
||||
// Clear input immediately for snappy feel
|
||||
final savedSelectedFiles = List<File>.from(selectedFiles);
|
||||
messageCtrl.clear();
|
||||
selectedFiles.clear();
|
||||
ref.read(taggedMessageProvider.notifier).state = null;
|
||||
|
||||
// Notify parent to scroll to bottom instantly
|
||||
if (widget.onMessageSent != null) {
|
||||
widget.onMessageSent!();
|
||||
}
|
||||
|
||||
try {
|
||||
List<File> filesToUpload = [];
|
||||
|
||||
// ⭐⭐⭐ Save files to Send folder
|
||||
if (selectedFiles.isNotEmpty) {
|
||||
print("📤 Saving ${selectedFiles.length} files to Send folder...");
|
||||
|
||||
for (File file in selectedFiles) {
|
||||
if (savedSelectedFiles.isNotEmpty) {
|
||||
for (File file in savedSelectedFiles) {
|
||||
try {
|
||||
// Try to save to Send folder, fallback to original if fails
|
||||
final savedPath = await DownloadHelper.saveToSendFolder(file);
|
||||
filesToUpload.add(File(savedPath));
|
||||
} catch (e) {
|
||||
print("⚠️ Could not save file, using original: $e");
|
||||
filesToUpload.add(file);
|
||||
}
|
||||
}
|
||||
|
||||
print("✅ Files prepared for upload: ${filesToUpload.length}");
|
||||
}
|
||||
|
||||
// Send message with files
|
||||
@@ -299,37 +312,22 @@ class _ChatInputBoxState extends ConsumerState<ChatInputBox> {
|
||||
files: filesToUpload,
|
||||
);
|
||||
|
||||
// Refresh chat messages
|
||||
await ref.read(chatMessagesProvider(widget.chatId).notifier).refresh();
|
||||
// Refresh chat messages (this will replace the temp message with the real one)
|
||||
await notifier.refresh();
|
||||
ref.invalidate(chatDocumentProvider);
|
||||
print("✅ Message sent successfully with tagId: $tagId");
|
||||
|
||||
// Close loading dialog
|
||||
if (mounted) Navigator.pop(context);
|
||||
|
||||
// Clear input
|
||||
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
messageCtrl.clear();
|
||||
selectedFiles.clear();
|
||||
_isSending = false;
|
||||
});
|
||||
}
|
||||
|
||||
// Clear the tagged message
|
||||
ref.read(taggedMessageProvider.notifier).state = null;
|
||||
|
||||
// Notify parent to scroll to bottom
|
||||
if (widget.onMessageSent != null) {
|
||||
widget.onMessageSent!();
|
||||
setState(() => _isSending = false);
|
||||
}
|
||||
} catch (e) {
|
||||
print("❌ Error sending message: $e");
|
||||
|
||||
if (mounted) {
|
||||
setState(() => _isSending = false);
|
||||
}
|
||||
|
||||
// Close loading dialog
|
||||
if (mounted) Navigator.pop(context);
|
||||
|
||||
setState(() => _isSending = false);
|
||||
// If it failed, delete the temporary message
|
||||
notifier.deleteMessage(tempId);
|
||||
|
||||
// Show error message
|
||||
if (mounted) {
|
||||
@@ -361,6 +359,7 @@ class _ChatInputBoxState extends ConsumerState<ChatInputBox> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final taggedMessage = ref.watch(taggedMessageProvider);
|
||||
|
||||
@@ -270,7 +270,7 @@ class _DownloadsScreenState extends State<DownloadsScreen>
|
||||
title: const Text(
|
||||
"Downloads",
|
||||
style: TextStyle(
|
||||
fontFamily: "Gilroy-SemiBold",
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -9,7 +9,7 @@ class SwipeableMessageBubble extends StatefulWidget {
|
||||
final MessageModel message;
|
||||
final DateTime msgDate;
|
||||
final String Function(DateTime) formatTime;
|
||||
final Widget Function(int, int) buildTick;
|
||||
final Widget Function(MessageModel) buildTick;
|
||||
final VoidCallback onSwipe;
|
||||
final Function(int?)? onParentTagTap;
|
||||
final Function(List<String> imageUrls, int initialIndex)?
|
||||
@@ -669,10 +669,7 @@ class SwipeableMessageBubbleState extends State<SwipeableMessageBubble>
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
widget.buildTick(
|
||||
widget.message.isDelivered,
|
||||
widget.message.isRead,
|
||||
),
|
||||
widget.buildTick(widget.message),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@@ -160,8 +160,11 @@ class _LiveChatScreenState extends ConsumerState<LiveChatScreen>
|
||||
try {
|
||||
final event = message['event'] as String?;
|
||||
|
||||
if (event == 'message.sent' || event == 'message.received') {
|
||||
debugPrint("🔔 New message detected!");
|
||||
if (event == 'message.sent' ||
|
||||
event == 'message.received' ||
|
||||
event == 'message.read' ||
|
||||
event == 'message.delivered') {
|
||||
debugPrint("🔔 Message status/new message event: $event");
|
||||
|
||||
if (WidgetsBinding.instance.lifecycleState ==
|
||||
AppLifecycleState.resumed) {
|
||||
@@ -409,7 +412,16 @@ class _LiveChatScreenState extends ConsumerState<LiveChatScreen>
|
||||
return "$hour:$minute $period";
|
||||
}
|
||||
|
||||
Widget buildTick(int isDelivered, int isRead) {
|
||||
Widget buildTick(MessageModel message) {
|
||||
// ⭐ Status 0/1/pending
|
||||
final isRead = message.isRead;
|
||||
final isDelivered = message.isDelivered;
|
||||
|
||||
// Check if it's an optimistic pending message (huge ID)
|
||||
if (message.id > 1000000000000) {
|
||||
return const Icon(Icons.schedule, size: 14, color: Colors.grey);
|
||||
}
|
||||
|
||||
if (isRead == 1) {
|
||||
return const Icon(Icons.done_all, size: 16, color: Colors.blue);
|
||||
} else if (isDelivered == 1) {
|
||||
@@ -445,7 +457,7 @@ class _LiveChatScreenState extends ConsumerState<LiveChatScreen>
|
||||
? 'File ID : ${widget.fileid.toString()}'
|
||||
: "Live Chat",
|
||||
style: const TextStyle(
|
||||
fontFamily: "Gilroy-SemiBold",
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:taxglide/consts/app_asstes.dart';
|
||||
import 'package:taxglide/consts/app_style.dart';
|
||||
import 'package:taxglide/consts/comman_webscoket.dart';
|
||||
import 'package:taxglide/consts/local_store.dart';
|
||||
import 'package:taxglide/consts/notification_webscoket.dart';
|
||||
import 'package:taxglide/controller/api_contoller.dart';
|
||||
import 'package:taxglide/view/Mahi_chat/live_chat_screen.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:taxglide/consts/responsive_helper.dart';
|
||||
|
||||
class CommanChatBox extends ConsumerStatefulWidget {
|
||||
final String? chatId;
|
||||
@@ -86,11 +88,12 @@ class _CommanChatBoxState extends ConsumerState<CommanChatBox> {
|
||||
}
|
||||
|
||||
final id = snapshot.data ?? "0";
|
||||
final r = ResponsiveUtils(context);
|
||||
final countAsync = ref.watch(countProvider(id));
|
||||
|
||||
return Positioned(
|
||||
right: 20,
|
||||
bottom: 120,
|
||||
bottom: r.spacing(mobile: 35, tablet: 45, desktop: 55),
|
||||
child: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
@@ -154,10 +157,9 @@ class _CommanChatBoxState extends ConsumerState<CommanChatBox> {
|
||||
),
|
||||
child: Text(
|
||||
data.count.toString(),
|
||||
style: const TextStyle(
|
||||
style: AppTextStyles.bold.copyWith(
|
||||
color: Colors.white,
|
||||
fontSize: 11,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 10,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -13,6 +13,9 @@ import 'package:taxglide/view/screens/home_screen.dart';
|
||||
import 'package:taxglide/view/screens/list_service_screen.dart';
|
||||
import 'package:taxglide/view/screens/profile/employee_profile/employee_profile_screen.dart';
|
||||
import 'package:taxglide/view/screens/profile/profile_screen.dart';
|
||||
import 'package:curved_labeled_navigation_bar/curved_navigation_bar.dart';
|
||||
import 'package:curved_labeled_navigation_bar/curved_navigation_bar_item.dart';
|
||||
import 'package:taxglide/consts/app_style.dart';
|
||||
|
||||
class MainController extends ConsumerStatefulWidget {
|
||||
final Widget? child; // Optional child (like ServiceRequestScreen)
|
||||
@@ -39,7 +42,7 @@ class _MainControllerState extends ConsumerState<MainController> {
|
||||
final List<String> _labels = [
|
||||
'Home',
|
||||
'Services',
|
||||
'Service Details',
|
||||
'Task Status',
|
||||
'Profile',
|
||||
];
|
||||
|
||||
@@ -177,65 +180,6 @@ class _MainControllerState extends ConsumerState<MainController> {
|
||||
body: Stack(
|
||||
children: [
|
||||
mainContent,
|
||||
|
||||
/// ✅ Bottom Navigation Bar
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
child: SafeArea(
|
||||
top: false,
|
||||
child: Container(
|
||||
width: size.width,
|
||||
height: 80,
|
||||
child: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
CustomPaint(
|
||||
size: Size(size.width, 80),
|
||||
painter: BNBCustomPainter(),
|
||||
),
|
||||
Center(
|
||||
heightFactor: 0.6,
|
||||
child: GestureDetector(
|
||||
onTap: () {},
|
||||
child: CustomPaint(
|
||||
painter: PentagonPainter(
|
||||
color: const Color(0xFF61277A),
|
||||
),
|
||||
child: Container(
|
||||
width: 70,
|
||||
height: 70,
|
||||
alignment: Alignment.center,
|
||||
child: Image.asset(
|
||||
AppAssets.maincontroller,
|
||||
color: Colors.white,
|
||||
fit: BoxFit.contain,
|
||||
height: 40,
|
||||
width: 40,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: size.width,
|
||||
height: 80,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
_buildNavItem(Icons.home, 0, _labels[0]),
|
||||
_buildNavItem(Icons.list_alt_sharp, 1, _labels[1]),
|
||||
SizedBox(width: size.width * 0.20),
|
||||
_buildNavItem(Icons.history_edu, 2, _labels[2]),
|
||||
_buildNavItem(Icons.person_2, 3, _labels[3]),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
dashboardAsync.when(
|
||||
data: (dashboard) {
|
||||
final int? chatIdInt = dashboard.generalChatId;
|
||||
@@ -253,199 +197,89 @@ class _MainControllerState extends ConsumerState<MainController> {
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// ✅ Navigation Logic with Refresh
|
||||
Widget _buildNavItem(IconData icon, int index, String label) {
|
||||
bool isSelected = currentIndex == index;
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
// 🔹 If inside ServiceRequestScreen
|
||||
if (widget.child != null) {
|
||||
if (widget.initialIndex == index) return;
|
||||
|
||||
if (widget.sourceTabIndex == 0 && index == 1) {
|
||||
Get.offAll(() => const MainController(initialIndex: 1));
|
||||
return;
|
||||
}
|
||||
|
||||
if (widget.sourceTabIndex == 1 && index == 1) return;
|
||||
|
||||
Get.offAll(() => MainController(initialIndex: index));
|
||||
return;
|
||||
}
|
||||
|
||||
// 🔹 If same tab tapped again → refresh
|
||||
if (currentIndex == index) {
|
||||
_refreshTab(index);
|
||||
return;
|
||||
}
|
||||
|
||||
// 🔹 Switch to a different tab
|
||||
setBottomBarIndex(index);
|
||||
},
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
padding: const EdgeInsets.all(6),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
border: isSelected
|
||||
? Border.all(color: const Color(0xFF61277A), width: 2)
|
||||
: null,
|
||||
),
|
||||
child: Icon(
|
||||
icon,
|
||||
color: isSelected
|
||||
? const Color(0xFF61277A)
|
||||
: const Color(0xFF6C7278),
|
||||
size: isSelected ? 19.5 : 20.8,
|
||||
),
|
||||
),
|
||||
if (isSelected)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 4),
|
||||
child: Text(
|
||||
label,
|
||||
style: const TextStyle(
|
||||
color: Color(0xFF61277A),
|
||||
bottomNavigationBar: SafeArea(
|
||||
top: false,
|
||||
child: CurvedNavigationBar(
|
||||
backgroundColor: Color(0xFF61277A),
|
||||
buttonBackgroundColor: Colors.white,
|
||||
color: Colors.white,
|
||||
animationDuration: const Duration(milliseconds: 300),
|
||||
index: currentIndex,
|
||||
items: [
|
||||
CurvedNavigationBarItem(
|
||||
child: Icon(
|
||||
Icons.home,
|
||||
color: currentIndex == 0 ? Colors.black : const Color(0xFF6C7278),
|
||||
),
|
||||
label: _labels[0],
|
||||
labelStyle: (currentIndex == 0 ? AppTextStyles.bold : AppTextStyles.bold).copyWith(
|
||||
color: currentIndex == 0 ? const Color(0xFF61277A) : const Color(0xFF6C7278),
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
CurvedNavigationBarItem(
|
||||
child: Icon(
|
||||
Icons.list_alt_sharp,
|
||||
color: currentIndex == 1 ? Colors.black : const Color(0xFF6C7278),
|
||||
),
|
||||
label: _labels[1],
|
||||
labelStyle: (currentIndex == 0 ? AppTextStyles.bold : AppTextStyles.bold).copyWith(
|
||||
color: currentIndex == 1 ? const Color(0xFF61277A) : const Color(0xFF6C7278),
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
CurvedNavigationBarItem(
|
||||
child: Icon(
|
||||
Icons.history_edu,
|
||||
color: currentIndex == 2 ? Colors.black : const Color(0xFF6C7278),
|
||||
),
|
||||
label: _labels[2],
|
||||
labelStyle: (currentIndex == 0 ? AppTextStyles.bold : AppTextStyles.bold).copyWith(
|
||||
color: currentIndex == 2 ? const Color(0xFF61277A) : const Color(0xFF6C7278),
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
CurvedNavigationBarItem(
|
||||
child: Icon(
|
||||
Icons.person_2,
|
||||
color: currentIndex == 3 ? Colors.black : const Color(0xFF6C7278),
|
||||
),
|
||||
label: _labels[3],
|
||||
labelStyle: (currentIndex == 0 ? AppTextStyles.bold : AppTextStyles.bold).copyWith(
|
||||
color: currentIndex == 3 ? const Color(0xFF61277A) : const Color(0xFF6C7278),
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
onTap: (index) {
|
||||
// 🔹 If inside ServiceRequestScreen
|
||||
if (widget.child != null) {
|
||||
if (widget.initialIndex == index) return;
|
||||
|
||||
if (widget.sourceTabIndex == 0 && index == 1) {
|
||||
Get.offAll(() => const MainController(initialIndex: 1));
|
||||
return;
|
||||
}
|
||||
|
||||
if (widget.sourceTabIndex == 1 && index == 1) return;
|
||||
|
||||
Get.offAll(() => MainController(initialIndex: index));
|
||||
return;
|
||||
}
|
||||
|
||||
// 🔹 If same tab tapped again → refresh
|
||||
if (currentIndex == index) {
|
||||
_refreshTab(index);
|
||||
return;
|
||||
}
|
||||
|
||||
// 🔹 Switch to a different tab
|
||||
setBottomBarIndex(index);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// ✅ Custom Curved Bottom Navigation Painter
|
||||
class BNBCustomPainter extends CustomPainter {
|
||||
@override
|
||||
void paint(Canvas canvas, Size size) {
|
||||
Paint paint = Paint()
|
||||
..color = Colors.white
|
||||
..style = PaintingStyle.fill;
|
||||
|
||||
Path path = Path();
|
||||
path.moveTo(0, 20);
|
||||
path.quadraticBezierTo(size.width * 0.20, 0, size.width * 0.35, 0);
|
||||
path.quadraticBezierTo(size.width * 0.40, 0, size.width * 0.40, 20);
|
||||
path.arcToPoint(
|
||||
Offset(size.width * 0.60, 20),
|
||||
radius: const Radius.circular(20.0),
|
||||
clockwise: false,
|
||||
);
|
||||
path.quadraticBezierTo(size.width * 0.60, 0, size.width * 0.65, 0);
|
||||
path.quadraticBezierTo(size.width * 0.80, 0, size.width, 20);
|
||||
path.lineTo(size.width, size.height);
|
||||
path.lineTo(0, size.height);
|
||||
path.close();
|
||||
|
||||
canvas.drawShadow(path, Colors.black.withOpacity(0.2), 5, true);
|
||||
canvas.drawPath(path, paint);
|
||||
}
|
||||
|
||||
@override
|
||||
bool shouldRepaint(CustomPainter oldDelegate) => false;
|
||||
}
|
||||
|
||||
/// ✅ Pentagon Button Painter
|
||||
/// ✅ Pentagon Button Painter
|
||||
class PentagonPainter extends CustomPainter {
|
||||
final Color color;
|
||||
final double cornerRadius;
|
||||
|
||||
PentagonPainter({
|
||||
required this.color,
|
||||
this.cornerRadius = 8.0, // Adjust this value for more/less rounding
|
||||
});
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Size size) {
|
||||
final paint = Paint()
|
||||
..color = color
|
||||
..style = PaintingStyle.fill;
|
||||
|
||||
final double w = size.width;
|
||||
final double cx = w / 2;
|
||||
final double cy = size.height / 2;
|
||||
final double r = w / 2;
|
||||
|
||||
// Calculate pentagon vertices
|
||||
List<Offset> vertices = [];
|
||||
for (int i = 0; i < 5; i++) {
|
||||
double angle = (72 * i - 90) * math.pi / 180;
|
||||
double x = cx + r * 0.95 * math.cos(angle);
|
||||
double y = cy + r * 0.95 * math.sin(angle);
|
||||
vertices.add(Offset(x, y));
|
||||
}
|
||||
|
||||
// Create path with rounded corners
|
||||
final path = Path();
|
||||
|
||||
for (int i = 0; i < vertices.length; i++) {
|
||||
final current = vertices[i];
|
||||
final next = vertices[(i + 1) % vertices.length];
|
||||
final prev = vertices[(i - 1 + vertices.length) % vertices.length];
|
||||
|
||||
// Calculate direction vectors
|
||||
final toCurrent = Offset(current.dx - prev.dx, current.dy - prev.dy);
|
||||
final toNext = Offset(next.dx - current.dx, next.dy - current.dy);
|
||||
|
||||
// Normalize and scale by corner radius
|
||||
final lengthToCurrent = math.sqrt(
|
||||
toCurrent.dx * toCurrent.dx + toCurrent.dy * toCurrent.dy,
|
||||
);
|
||||
final lengthToNext = math.sqrt(
|
||||
toNext.dx * toNext.dx + toNext.dy * toNext.dy,
|
||||
);
|
||||
|
||||
final normalizedToCurrent = Offset(
|
||||
toCurrent.dx / lengthToCurrent,
|
||||
toCurrent.dy / lengthToCurrent,
|
||||
);
|
||||
final normalizedToNext = Offset(
|
||||
toNext.dx / lengthToNext,
|
||||
toNext.dy / lengthToNext,
|
||||
);
|
||||
|
||||
// Points before and after the corner
|
||||
final beforeCorner = Offset(
|
||||
current.dx - normalizedToCurrent.dx * cornerRadius,
|
||||
current.dy - normalizedToCurrent.dy * cornerRadius,
|
||||
);
|
||||
final afterCorner = Offset(
|
||||
current.dx + normalizedToNext.dx * cornerRadius,
|
||||
current.dy + normalizedToNext.dy * cornerRadius,
|
||||
);
|
||||
|
||||
if (i == 0) {
|
||||
path.moveTo(beforeCorner.dx, beforeCorner.dy);
|
||||
} else {
|
||||
path.lineTo(beforeCorner.dx, beforeCorner.dy);
|
||||
}
|
||||
|
||||
// Draw rounded corner using quadratic bezier
|
||||
path.quadraticBezierTo(
|
||||
current.dx,
|
||||
current.dy,
|
||||
afterCorner.dx,
|
||||
afterCorner.dy,
|
||||
);
|
||||
}
|
||||
path.close();
|
||||
|
||||
canvas.drawShadow(path, Colors.black.withOpacity(0.3), 4, true);
|
||||
canvas.drawPath(path, paint);
|
||||
}
|
||||
|
||||
@override
|
||||
bool shouldRepaint(CustomPainter oldDelegate) => false;
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import 'package:flutter_riverpod/legacy.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get_core/src/get_main.dart';
|
||||
import 'package:taxglide/consts/app_asstes.dart';
|
||||
import 'package:taxglide/consts/app_style.dart';
|
||||
import 'package:taxglide/controller/api_contoller.dart';
|
||||
import 'package:taxglide/model/chat_model.dart';
|
||||
import 'package:taxglide/view/Mahi_chat/chat_profile_screen.dart';
|
||||
@@ -193,8 +194,11 @@ class _CompletedLiveChatScreenState
|
||||
try {
|
||||
final event = message['event'] as String?;
|
||||
|
||||
if (event == 'message.sent' || event == 'message.received') {
|
||||
debugPrint("🔔 New message detected!");
|
||||
if (event == 'message.sent' ||
|
||||
event == 'message.received' ||
|
||||
event == 'message.read' ||
|
||||
event == 'message.delivered') {
|
||||
debugPrint("🔔 Message status/new message event: $event");
|
||||
|
||||
if (WidgetsBinding.instance.lifecycleState ==
|
||||
AppLifecycleState.resumed) {
|
||||
@@ -332,7 +336,11 @@ class _CompletedLiveChatScreenState
|
||||
return "$hour:$minute $period";
|
||||
}
|
||||
|
||||
Widget buildTick(int isDelivered, int isRead) {
|
||||
Widget buildTick(MessageModel message) {
|
||||
// ⭐ Status 0/1
|
||||
final isRead = message.isRead;
|
||||
final isDelivered = message.isDelivered;
|
||||
|
||||
if (isRead == 1) {
|
||||
return const Icon(Icons.done_all, size: 16, color: Colors.blue);
|
||||
} else if (isDelivered == 1) {
|
||||
@@ -357,9 +365,9 @@ class _CompletedLiveChatScreenState
|
||||
widget.fileid.toString() != "0")
|
||||
? 'File ID : ${widget.fileid.toString()}'
|
||||
: "Live Chat",
|
||||
style: const TextStyle(
|
||||
fontFamily: "Gilroy-SemiBold",
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: 16,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
backgroundColor: Colors.white,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:taxglide/consts/app_style.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:taxglide/consts/app_asstes.dart';
|
||||
import 'package:taxglide/consts/comman_button.dart';
|
||||
@@ -183,9 +184,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
label: Text(
|
||||
"Invoice Not Available",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: width * 0.045,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.04 * 17.64,
|
||||
@@ -239,9 +238,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
? "View Invoice"
|
||||
: "Download Invoice",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: width * 0.045,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.04 * 17.64,
|
||||
@@ -312,9 +309,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
: isDownloaded
|
||||
? "View Proforma"
|
||||
: "Download Proforma",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: 12,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.04 * 14.47,
|
||||
@@ -337,6 +332,22 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
|
||||
final detailAsync = ref.watch(serviceDetailProvider(widget.id));
|
||||
|
||||
// 🔄 Silent refresh when notification trigger changes
|
||||
ref.listen(notificationTriggerProvider, (previous, next) {
|
||||
if (previous != null && next != previous) {
|
||||
debugPrint("🔔 Silent refresh triggered for DetailScreen");
|
||||
ref.refresh(serviceDetailProvider(widget.id));
|
||||
|
||||
// Also refresh unread count if available
|
||||
detailAsync.whenData((model) {
|
||||
final chatId = model.data?.chatId;
|
||||
if (chatId != null && chatId.isNotEmpty) {
|
||||
ref.refresh(countProvider(chatId));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return Scaffold(
|
||||
body: Container(
|
||||
height: height,
|
||||
@@ -349,16 +360,16 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
),
|
||||
child: SafeArea(
|
||||
child: detailAsync.when(
|
||||
skipLoadingOnRefresh: true,
|
||||
loading: () => const Center(
|
||||
child: CircularProgressIndicator(color: Colors.deepPurple),
|
||||
),
|
||||
error: (e, _) => Center(
|
||||
child: Text(
|
||||
"Error: $e",
|
||||
style: const TextStyle(
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
color: Colors.red,
|
||||
fontSize: 16,
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -391,9 +402,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
Text(
|
||||
"Service Details",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.055,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -474,9 +483,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
children: [
|
||||
Text(
|
||||
"Detailed Information",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.047,
|
||||
height: 1.4,
|
||||
letterSpacing: 0.03 * 20,
|
||||
@@ -508,9 +515,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
child: Center(
|
||||
child: Text(
|
||||
data.serviceStatus.toString(),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: width * 0.029,
|
||||
color: const Color(0xFFFF0F0F),
|
||||
),
|
||||
@@ -541,9 +546,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
child: Center(
|
||||
child: Text(
|
||||
data.serviceStatus.toString(),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: width * 0.032,
|
||||
letterSpacing: 0.03,
|
||||
color: const Color(0xFF12800C),
|
||||
@@ -575,9 +578,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
child: Center(
|
||||
child: Text(
|
||||
data.serviceStatus.toString(),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: width * 0.029,
|
||||
letterSpacing: 0.03,
|
||||
color: const Color(0xFFFF630F),
|
||||
@@ -616,18 +617,16 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Task Final Report",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: width * 0.042,
|
||||
height: 1.4,
|
||||
letterSpacing: 0.03 * 16,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
Text(
|
||||
"This is your final task document",
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.042,
|
||||
height: 1.4,
|
||||
letterSpacing: 0.03 * 16,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
@@ -640,9 +639,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Date: ',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
@@ -651,9 +648,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
),
|
||||
TextSpan(
|
||||
text: data.createdDate ?? "-",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontWeight: FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
@@ -673,9 +668,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Payment : ',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
@@ -684,9 +677,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
),
|
||||
TextSpan(
|
||||
text: data.paymentStatus ?? "-",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontWeight: FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
@@ -899,7 +890,10 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
],
|
||||
Column(
|
||||
children: [
|
||||
if (data.paymentStatus == "Un Paid") ...[
|
||||
if (data.paymentStatus == "Un Paid" &&
|
||||
!(data.serviceStatus ?? "")
|
||||
.toLowerCase()
|
||||
.contains("cancelled")) ...[
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 31,
|
||||
@@ -932,9 +926,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
children: [
|
||||
Text(
|
||||
"Payment Advice",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.042,
|
||||
height: 1.4,
|
||||
letterSpacing: 0.03 * 16,
|
||||
@@ -953,36 +945,22 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Date: ',
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Gilroy-SemiBold',
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing:
|
||||
0.04 * 13.97,
|
||||
color: const Color(
|
||||
0xFF111827,
|
||||
),
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text:
|
||||
data.createdDate ??
|
||||
"-",
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Gilroy-Medium',
|
||||
fontWeight:
|
||||
FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing:
|
||||
0.04 * 13.97,
|
||||
color: const Color(
|
||||
0xFF111827,
|
||||
),
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -998,36 +976,22 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Payment : ',
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Gilroy-SemiBold',
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing:
|
||||
0.04 * 13.97,
|
||||
color: const Color(
|
||||
0xFF111827,
|
||||
),
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text:
|
||||
data.paymentStatus ??
|
||||
"-",
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Gilroy-Medium',
|
||||
fontWeight:
|
||||
FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing:
|
||||
0.04 * 13.97,
|
||||
color: const Color(
|
||||
0xFF111827,
|
||||
),
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -1045,18 +1009,15 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
children: [
|
||||
Text(
|
||||
"Total Amount",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.04,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"₹ ${data.paymentAmount ?? '0'}",
|
||||
style: TextStyle(
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontFamily: 'Roboto',
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: width * 0.045,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -1105,9 +1066,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
children: [
|
||||
Text(
|
||||
"Payment Advice",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.042,
|
||||
height: 1.4,
|
||||
letterSpacing: 0.03 * 16,
|
||||
@@ -1126,36 +1085,22 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Date: ',
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Gilroy-SemiBold',
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing:
|
||||
0.04 * 13.97,
|
||||
color: const Color(
|
||||
0xFF111827,
|
||||
),
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text:
|
||||
data.createdDate ??
|
||||
"-",
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Gilroy-Medium',
|
||||
fontWeight:
|
||||
FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing:
|
||||
0.04 * 13.97,
|
||||
color: const Color(
|
||||
0xFF111827,
|
||||
),
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -1171,36 +1116,22 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Payment: ',
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Gilroy-SemiBold',
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing:
|
||||
0.04 * 13.97,
|
||||
color: const Color(
|
||||
0xFF111827,
|
||||
),
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text:
|
||||
data.paymentStatus ??
|
||||
"-",
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Gilroy-Medium',
|
||||
fontWeight:
|
||||
FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing:
|
||||
0.04 * 13.97,
|
||||
color: const Color(
|
||||
0xFF111827,
|
||||
),
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -1218,18 +1149,15 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
children: [
|
||||
Text(
|
||||
"Total Amount",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.04,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"₹ ${data.paymentAmount ?? '0'}",
|
||||
style: TextStyle(
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontFamily: 'Roboto',
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: width * 0.045,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -1248,10 +1176,8 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
],
|
||||
),
|
||||
),
|
||||
] else if (data.paymentStatus == "Waiting") ...[
|
||||
const SizedBox.shrink(),
|
||||
] else ...[
|
||||
Text("Unknown Status: ${data.paymentStatus}"),
|
||||
const SizedBox.shrink(),
|
||||
],
|
||||
|
||||
if (data.proforma != null &&
|
||||
@@ -1285,10 +1211,8 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Payment Advice",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
"Profoma Advice",
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.042,
|
||||
height: 1.4,
|
||||
letterSpacing: 0.03 * 16,
|
||||
@@ -1308,10 +1232,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'proforma Number : ',
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
@@ -1321,12 +1242,9 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text:
|
||||
data.proformaNumber ??
|
||||
text: data.proformaNumber ??
|
||||
"-",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontWeight: FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
@@ -1349,9 +1267,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'proforma Status : ',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
@@ -1359,10 +1275,35 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: data.proformastatus ?? "-",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontWeight: FontWeight.w400,
|
||||
text: data.proformaStatus ?? "-",
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
RichText(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.end,
|
||||
text: TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Subject : ',
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: data.subject ?? "-",
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.04 * 13.97,
|
||||
@@ -1372,15 +1313,12 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 20),
|
||||
if (data.proformastatus != "Accepted") ...[
|
||||
if (data.proformaStatus != "Accepted") ...[
|
||||
Text(
|
||||
"Note : Once you accept this proforma only you can pay the amount for the service",
|
||||
textAlign: TextAlign.start,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: 13,
|
||||
height: 1.78, // 178% line-height
|
||||
letterSpacing: 0.04 * 13, // 4%
|
||||
@@ -1404,7 +1342,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
|
||||
const SizedBox(width: 8),
|
||||
|
||||
if (data.proformastatus != "Accepted")
|
||||
if (data.proformaStatus != "Accepted")
|
||||
/// ✅ Accept (Less width)
|
||||
Expanded(
|
||||
flex: 2,
|
||||
@@ -1525,9 +1463,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
/// 🔹 File List Section
|
||||
Text(
|
||||
"File Attachments:",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.04,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -1714,18 +1650,19 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
),
|
||||
)
|
||||
else
|
||||
const Text(
|
||||
Text(
|
||||
"No documents uploaded",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
color: Color(0xFF6B7280),
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
color: const Color(0xFF6B7280),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (data.chatId != null && data.chatId!.isNotEmpty)
|
||||
if (data.chatId != null &&
|
||||
data.chatId!.isNotEmpty &&
|
||||
!(data.serviceStatus ?? "").toLowerCase().contains("cancelled"))
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 20,
|
||||
@@ -1821,7 +1758,7 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 150),
|
||||
SizedBox(height: 80.0 + MediaQuery.of(context).padding.bottom),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -1839,18 +1776,14 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '$label: ',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.04,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: value.isEmpty ? '—' : value,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontWeight: FontWeight.w500,
|
||||
style: AppTextStyles.medium.copyWith(
|
||||
fontSize: width * 0.04,
|
||||
height: 1.5,
|
||||
color: const Color(0xFF374151),
|
||||
@@ -1879,10 +1812,9 @@ class _DetailScreenState extends ConsumerState<DetailScreen> {
|
||||
),
|
||||
child: Text(
|
||||
count.toString(),
|
||||
style: const TextStyle(
|
||||
style: AppTextStyles.bold.copyWith(
|
||||
color: Colors.white,
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -145,7 +145,7 @@ class _FilterBottomSheetState extends State<_FilterBottomSheet>
|
||||
child: const Text(
|
||||
"Cancel",
|
||||
style: TextStyle(
|
||||
fontFamily: "Gilroy-SemiBold", // ✅ Font
|
||||
fontFamily: "Gilroy", // ✅ Font
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 16,
|
||||
height: 1.3, // ✅ line-height 130%
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:taxglide/consts/app_style.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:taxglide/controller/api_contoller.dart';
|
||||
import 'package:taxglide/view/Main_controller/main_controller.dart';
|
||||
import 'package:taxglide/view/screens/history/detail_screen.dart';
|
||||
import 'package:taxglide/view/Mahi_chat/live_chat_screen.dart';
|
||||
import 'package:taxglide/view/screens/history/completed_live_chat_screen.dart';
|
||||
|
||||
class PendingScreen extends ConsumerWidget {
|
||||
final String status;
|
||||
@@ -17,6 +20,17 @@ class PendingScreen extends ConsumerWidget {
|
||||
final width = size.width;
|
||||
final height = size.height;
|
||||
|
||||
// 🔄 Silent refresh when notification trigger changes
|
||||
ref.listen(notificationTriggerProvider, (previous, next) {
|
||||
if (previous != null && next != previous) {
|
||||
debugPrint("🔔 Silent refresh triggered for PendingScreen ($status)");
|
||||
ref
|
||||
.read(serviceHistoryNotifierProvider(status).notifier)
|
||||
.fetchServiceHistory(isSilent: true);
|
||||
ref.invalidate(countProvider);
|
||||
}
|
||||
});
|
||||
|
||||
return pendingAsync.when(
|
||||
data: (data) {
|
||||
final list = data.data ?? [];
|
||||
@@ -31,7 +45,7 @@ class PendingScreen extends ConsumerWidget {
|
||||
width * 0.04,
|
||||
height * 0.01,
|
||||
width * 0.04,
|
||||
height * 0.2,
|
||||
80.0 + MediaQuery.of(context).padding.bottom,
|
||||
),
|
||||
itemCount: list.length,
|
||||
separatorBuilder: (_, __) => SizedBox(height: height * 0.01),
|
||||
@@ -58,137 +72,236 @@ class PendingScreen extends ConsumerWidget {
|
||||
children: [
|
||||
// 🔹 File ID Row
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'File ID : ',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: width * 0.04,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: '${item.id}',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: width * 0.04,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
],
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
/// 🔹 File ID
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'File ID : ',
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.04,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: '${item.id}',
|
||||
style: AppTextStyles.medium.copyWith(
|
||||
fontSize: width * 0.04,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
/// 🔥 Status + Chat Icon
|
||||
Row(
|
||||
children: [
|
||||
/// 🔴 Waiting / Pending / Cancelled
|
||||
if (item.status == 'Waiting for Admin' ||
|
||||
item.status == 'Payment Pending' ||
|
||||
item.status == 'Cancelled By Admin')
|
||||
Container(
|
||||
width: width * 0.4,
|
||||
height: height * 0.04,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFFE8E8),
|
||||
borderRadius: BorderRadius.circular(5.52),
|
||||
border: Border.all(
|
||||
color: const Color(0xFFFFD7D7),
|
||||
width: 1.84,
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.25),
|
||||
blurRadius: 7.17,
|
||||
offset: const Offset(0, 3.68),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
item.status.toString(),
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: 11.03,
|
||||
color: const Color(0xFFFF0F0F),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
/// 🟢 In Progress
|
||||
if (item.status == 'In Progress')
|
||||
Container(
|
||||
width: 98,
|
||||
height: 34.9,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFEAFAE6),
|
||||
borderRadius: BorderRadius.circular(6.21),
|
||||
border: Border.all(
|
||||
color: const Color(0xFFDDFFDD),
|
||||
width: 2.07,
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.25),
|
||||
blurRadius: 8.08,
|
||||
offset: const Offset(0, 4.14),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'In Progress',
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: 12.43,
|
||||
color: const Color(0xFF12800C),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
/// 🟡 Completed
|
||||
if (item.status == 'Completed')
|
||||
Container(
|
||||
width: 87,
|
||||
height: 31,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFAF7E6),
|
||||
borderRadius: BorderRadius.circular(5.52),
|
||||
border: Border.all(
|
||||
color: const Color(0xFFFFE9DD),
|
||||
width: 1.84,
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.25),
|
||||
blurRadius: 7.17,
|
||||
offset: const Offset(0, 3.68),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Completed',
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: 11.03,
|
||||
color: const Color(0xFFFF630F),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
/// 🔥 Space between status & icon
|
||||
const SizedBox(width: 8),
|
||||
if ((item.status == 'Completed' ||
|
||||
item.status == 'Cancelled By Admin' ||
|
||||
item.status == 'In Progress') &&
|
||||
item.chatId != null &&
|
||||
item.chatId.toString().isNotEmpty &&
|
||||
item.chatId.toString() != "0") ...[
|
||||
|
||||
/// 💬 Chat Icon with Badge
|
||||
Builder(builder: (context) {
|
||||
final chatIdStr = item.chatId.toString();
|
||||
final countAsync = ref.watch(countProvider(chatIdStr));
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
final chatid = int.tryParse(chatIdStr) ?? 0;
|
||||
if (chatid == 0) return;
|
||||
|
||||
if (item.status == 'In Progress') {
|
||||
Get.to(() => LiveChatScreen(
|
||||
fileid: item.id.toString(),
|
||||
chatid: chatid,
|
||||
))?.then((_) {
|
||||
ref.read(notificationTriggerProvider.notifier).state++;
|
||||
ref.invalidate(chatMessagesProvider(chatid));
|
||||
ref.invalidate(countProvider(chatIdStr));
|
||||
});
|
||||
} else {
|
||||
Get.to(() => CompletedLiveChatScreen(
|
||||
fileid: item.id.toString(),
|
||||
chatid: chatid,
|
||||
))?.then((_) {
|
||||
ref.read(notificationTriggerProvider.notifier).state++;
|
||||
ref.invalidate(chatMessagesProvider(chatid));
|
||||
ref.invalidate(countProvider(chatIdStr));
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
child: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
/// 🔵 Chat Icon
|
||||
Container(
|
||||
width: 39,
|
||||
height: 39,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: const Color(0xFF61277A),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.25),
|
||||
blurRadius: 8.08,
|
||||
offset: const Offset(0, 4.14),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: const Center(
|
||||
child: Icon(
|
||||
Icons.message,
|
||||
color: Colors.white,
|
||||
size: 20,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
/// 🔴 Badge
|
||||
countAsync.when(
|
||||
data: (countData) => countData.count > 0
|
||||
? Positioned(
|
||||
top: -4,
|
||||
right: -4,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(4),
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.red,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 16,
|
||||
minHeight: 16,
|
||||
),
|
||||
child: Text(
|
||||
'${countData.count}',
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
loading: () => const SizedBox.shrink(),
|
||||
error: (_, __) => const SizedBox.shrink(),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}),
|
||||
|
||||
// 🔹 Status Badges
|
||||
if (item.status == 'Waiting for Admin' ||
|
||||
item.status == 'Payment Pending' ||
|
||||
item.status == 'Cancelled By Admin')
|
||||
Container(
|
||||
width: width * 0.3,
|
||||
height: height * 0.04,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFFE8E8),
|
||||
borderRadius: BorderRadius.circular(5.52),
|
||||
border: Border.all(
|
||||
color: const Color(0xFFFFD7D7),
|
||||
width: 1.84,
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.25),
|
||||
blurRadius: 7.17,
|
||||
offset: const Offset(0, 3.68),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
item.status.toString(),
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 11.03,
|
||||
color: Color(0xFFFF0F0F),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// 🔹 In Progress Badge
|
||||
if (item.status == 'In Progress')
|
||||
Container(
|
||||
width: 98,
|
||||
height: 34.9,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFEAFAE6),
|
||||
borderRadius: BorderRadius.circular(6.21),
|
||||
border: Border.all(
|
||||
color: const Color(0xFFDDFFDD),
|
||||
width: 2.07,
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.25),
|
||||
blurRadius: 8.08,
|
||||
offset: const Offset(0, 4.14),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: const Center(
|
||||
child: Text(
|
||||
'In Progress',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 12.43,
|
||||
letterSpacing: 0.03,
|
||||
color: Color(0xFF12800C),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// 🔹 Completed Badge
|
||||
if (item.status == 'Completed')
|
||||
Container(
|
||||
width: 87,
|
||||
height: 31,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFAF7E6),
|
||||
borderRadius: BorderRadius.circular(5.52),
|
||||
border: Border.all(
|
||||
color: const Color(0xFFFFE9DD),
|
||||
width: 1.84,
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.25),
|
||||
blurRadius: 7.17,
|
||||
offset: const Offset(0, 3.68),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: const Center(
|
||||
child: Text(
|
||||
'Completed',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 11.03,
|
||||
letterSpacing: 0.03,
|
||||
color: Color(0xFFFF630F),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
]
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
SizedBox(height: height * 0.015),
|
||||
|
||||
@@ -198,18 +311,14 @@ class PendingScreen extends ConsumerWidget {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Request Type : ',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: width * 0.035,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: item.service,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontWeight: FontWeight.w500,
|
||||
style: AppTextStyles.medium.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -228,21 +337,17 @@ class PendingScreen extends ConsumerWidget {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Date : ',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: width * 0.035,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: item.createdDate,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: width * 0.035,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
style: AppTextStyles.medium.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -253,21 +358,17 @@ class PendingScreen extends ConsumerWidget {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Time : ',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: width * 0.035,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: item.createdTime,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: width * 0.035,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
style: AppTextStyles.medium.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -283,18 +384,14 @@ class PendingScreen extends ConsumerWidget {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Message : ',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: width * 0.035,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: item.message,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontWeight: FontWeight.w500,
|
||||
style: AppTextStyles.medium.copyWith(
|
||||
fontSize: width * 0.035,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -314,9 +411,7 @@ class PendingScreen extends ConsumerWidget {
|
||||
children: [
|
||||
Text(
|
||||
"Total Amount",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: width * 0.038,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -357,14 +452,12 @@ class PendingScreen extends ConsumerWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
child: const Center(
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Pay Now",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: 16,
|
||||
color: Color(0xFF61277A),
|
||||
color: const Color(0xFF61277A),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -399,12 +492,10 @@ class PendingScreen extends ConsumerWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
child: const Center(
|
||||
child: Center(
|
||||
child: Text(
|
||||
"View Details",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: 16,
|
||||
color: Colors.white,
|
||||
),
|
||||
@@ -434,12 +525,10 @@ class PendingScreen extends ConsumerWidget {
|
||||
],
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: const Text(
|
||||
child: Text(
|
||||
"Payment Status: Paid",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: 12.08,
|
||||
letterSpacing: 0.04,
|
||||
height: 1.3,
|
||||
@@ -474,12 +563,10 @@ class PendingScreen extends ConsumerWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
child: const Center(
|
||||
child: Center(
|
||||
child: Text(
|
||||
"View Details",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: 16,
|
||||
color: Colors.white,
|
||||
),
|
||||
@@ -519,12 +606,10 @@ class PendingScreen extends ConsumerWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
child: const Center(
|
||||
child: Center(
|
||||
child: Text(
|
||||
"View Details",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: 16,
|
||||
color: Colors.white,
|
||||
),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:taxglide/consts/app_style.dart';
|
||||
import 'package:taxglide/view/screens/history/flitter_popup.dart';
|
||||
import 'package:taxglide/view/screens/history/pending_screen.dart';
|
||||
|
||||
@@ -57,15 +58,13 @@ class _ServicesStatusScreenState extends ConsumerState<ServicesStatusScreen>
|
||||
children: [
|
||||
const SizedBox(width: 40), // ✅ Left side space balance
|
||||
// ✅ CENTER TITLE
|
||||
const Text(
|
||||
"Service Status",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 24,
|
||||
color: Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"My Task Status",
|
||||
style: AppTextStyles.bold.copyWith(
|
||||
fontSize: 24,
|
||||
color: Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
|
||||
// ✅ RIGHT SIDE FILTER ICON
|
||||
GestureDetector(
|
||||
@@ -126,21 +125,17 @@ class _ServicesStatusScreenState extends ConsumerState<ServicesStatusScreen>
|
||||
),
|
||||
labelColor: const Color(0xFF5F297B),
|
||||
unselectedLabelColor: const Color(0xFF6C7278),
|
||||
labelStyle: const TextStyle(
|
||||
fontFamily: "Gilroy-SemiBold",
|
||||
fontWeight: FontWeight.w600,
|
||||
labelStyle: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: 16,
|
||||
height: 1.4,
|
||||
letterSpacing: 0.03,
|
||||
color: Color(0xFF5F297B),
|
||||
color: const Color(0xFF5F297B),
|
||||
),
|
||||
unselectedLabelStyle: const TextStyle(
|
||||
fontFamily: "Gilroy-Regular",
|
||||
fontWeight: FontWeight.w400,
|
||||
unselectedLabelStyle: AppTextStyles.regular.copyWith(
|
||||
fontSize: 16,
|
||||
height: 1.4,
|
||||
letterSpacing: 0.03,
|
||||
color: Color(0xFF6C7278),
|
||||
color: const Color(0xFF6C7278),
|
||||
),
|
||||
tabs: _tabs.map((tab) => Tab(text: tab)).toList(),
|
||||
),
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:carousel_slider/carousel_options.dart';
|
||||
import 'package:carousel_slider/carousel_slider.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:taxglide/consts/app_asstes.dart';
|
||||
import 'package:taxglide/consts/app_style.dart';
|
||||
import 'package:taxglide/consts/app_colors.dart';
|
||||
import 'package:taxglide/consts/comman_serivce.dart';
|
||||
import 'package:taxglide/consts/home_page_headers.dart';
|
||||
@@ -128,6 +131,29 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
final kycTitleSize = r.fontSize(mobile: 16, tablet: 18, desktop: 20);
|
||||
final kycBodySize = r.fontSize(mobile: 10, tablet: 10, desktop: 11);
|
||||
|
||||
// My Task Status Button responsive values
|
||||
final taskStatusGlowWidth = r.getValue<double>(
|
||||
mobile: 200,
|
||||
tablet: 220,
|
||||
desktop: 240,
|
||||
);
|
||||
final taskStatusGlowHeight = r.getValue<double>(
|
||||
mobile: 45,
|
||||
tablet: 50,
|
||||
desktop: 55,
|
||||
);
|
||||
final taskStatusButtonWidth = r.getValue<double>(
|
||||
mobile: 197.45,
|
||||
tablet: 215,
|
||||
desktop: 235,
|
||||
);
|
||||
final taskStatusButtonHeight = r.getValue<double>(
|
||||
mobile: 41.38,
|
||||
tablet: 46,
|
||||
desktop: 50,
|
||||
);
|
||||
final taskStatusFontSize = r.fontSize(mobile: 18, tablet: 20, desktop: 22);
|
||||
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -141,8 +167,8 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// KYC Banner
|
||||
if (dashboard.isKycCompleted == false)
|
||||
Container(
|
||||
if (dashboard.isKycCompleted == true)...[
|
||||
Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.all(cardPadding),
|
||||
decoration: const BoxDecoration(
|
||||
@@ -162,8 +188,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
children: [
|
||||
Text(
|
||||
"KYC Details",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: kycTitleSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
@@ -171,7 +196,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
"Your KYC verification couldn't be completed. Please complete your KYC details to continue exploring more features.",
|
||||
style: TextStyle(
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: kycBodySize,
|
||||
color: const Color(0xFFFFFFCC),
|
||||
),
|
||||
@@ -213,15 +238,85 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
SizedBox(
|
||||
height: r.spacing(mobile: 26, tablet: 28, desktop: 32),
|
||||
),],
|
||||
|
||||
|
||||
|
||||
Center(
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
/// 🌈 Gradient + Blur Glow
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(40),
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(
|
||||
sigmaX: 16.54,
|
||||
sigmaY: 16.54,
|
||||
),
|
||||
child: Container(
|
||||
width: taskStatusGlowWidth,
|
||||
height: taskStatusGlowHeight,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(40),
|
||||
gradient: const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF7BFAFA),
|
||||
Color(0xFF8BF0FD),
|
||||
Color(0xFF8EFFD5),
|
||||
Color(0xFFC8F895),
|
||||
Color(0xFFE7F392),
|
||||
Color(0xFFFBE28D),
|
||||
Color(0xFFFCDAB1),
|
||||
Color(0xFFFEDCAA),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
/// 🔲 Black Button
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.offAll(
|
||||
() => const MainController(
|
||||
initialIndex: 2,
|
||||
sourceTabIndex: 0,
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
width: taskStatusButtonWidth,
|
||||
height: taskStatusButtonHeight,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF000000),
|
||||
borderRadius: BorderRadius.circular(39.02),
|
||||
),
|
||||
child: Text(
|
||||
"My Task Status",
|
||||
textAlign: TextAlign.center,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: taskStatusFontSize,
|
||||
height: 1.4,
|
||||
letterSpacing: 0.03 * taskStatusFontSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: r.spacing(mobile: 26, tablet: 28, desktop: 32),
|
||||
),
|
||||
|
||||
Text(
|
||||
"List of Services Offered",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.bold.copyWith(
|
||||
fontSize: sectionTitleSize,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.72,
|
||||
@@ -295,9 +390,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
children: [
|
||||
Text(
|
||||
"Booking List",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.bold.copyWith(
|
||||
fontSize: bookingTitleSize,
|
||||
height: 1.4,
|
||||
letterSpacing: 0.6,
|
||||
@@ -314,9 +407,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
},
|
||||
child: Text(
|
||||
"See All",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: seeAllSize,
|
||||
height: 1.4,
|
||||
letterSpacing: 0.45,
|
||||
@@ -369,18 +460,14 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'File ID : ',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: fileIdSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: '${item.id}',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontWeight: FontWeight.w500,
|
||||
style: AppTextStyles.medium.copyWith(
|
||||
fontSize: fileIdSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -426,9 +513,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
child: Center(
|
||||
child: Text(
|
||||
item.status.toString(),
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: r.fontSize(
|
||||
mobile: 10,
|
||||
tablet: 11,
|
||||
@@ -474,9 +559,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
child: Center(
|
||||
child: Text(
|
||||
'In Progress',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: r.fontSize(
|
||||
mobile: 11,
|
||||
tablet: 12.43,
|
||||
@@ -523,9 +606,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Completed',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: r.fontSize(
|
||||
mobile: 10,
|
||||
tablet: 11.03,
|
||||
@@ -548,18 +629,14 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Request Type : ',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: labelSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: item.service,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontWeight: FontWeight.w500,
|
||||
style: AppTextStyles.medium.copyWith(
|
||||
fontSize: valueSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -578,18 +655,14 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Date : ',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: labelSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: item.createdDate,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontWeight: FontWeight.w500,
|
||||
style: AppTextStyles.medium.copyWith(
|
||||
fontSize: valueSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -609,18 +682,14 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Time : ',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: labelSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: item.createdTime,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontWeight: FontWeight.w500,
|
||||
style: AppTextStyles.medium.copyWith(
|
||||
fontSize: valueSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -639,18 +708,14 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text: 'Message : ',
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: labelSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: item.message,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontWeight: FontWeight.w500,
|
||||
style: AppTextStyles.medium.copyWith(
|
||||
fontSize: valueSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -671,18 +736,15 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
children: [
|
||||
Text(
|
||||
"Total Amount",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: labelSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'₹ ${item.paymentAmount.toString()}',
|
||||
style: TextStyle(
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontFamily: 'Roboto',
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: amountSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -719,9 +781,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Pay Now",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: buttonTextSize,
|
||||
color: const Color(0xFF61277A),
|
||||
),
|
||||
@@ -773,9 +833,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
child: Center(
|
||||
child: Text(
|
||||
"View Details",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: buttonTextSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
@@ -821,9 +879,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
child: Text(
|
||||
"Payment Status: Paid",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: r.fontSize(
|
||||
mobile: 11,
|
||||
tablet: 12.08,
|
||||
@@ -872,9 +928,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
child: Center(
|
||||
child: Text(
|
||||
"View Details",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: buttonTextSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
@@ -922,9 +976,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
child: Center(
|
||||
child: Text(
|
||||
"View Details",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: buttonTextSize,
|
||||
color: Colors.white,
|
||||
),
|
||||
@@ -1038,11 +1090,9 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
children: [
|
||||
Text(
|
||||
"What Our Customers Say",
|
||||
style: TextStyle(
|
||||
fontFamily: "Gilroy-SemiBold",
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: reviewTitleSize,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -1084,7 +1134,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
],
|
||||
),
|
||||
|
||||
const SizedBox(height: 200),
|
||||
SizedBox(height: r.spacing(mobile: 120, tablet: 140, desktop: 160)),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -1129,15 +1179,14 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
children: [
|
||||
Text(
|
||||
name,
|
||||
style: TextStyle(
|
||||
style: AppTextStyles.bold.copyWith(
|
||||
fontSize: r.fontSize(mobile: 13, tablet: 15, desktop: 16),
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Colors.black87,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
position,
|
||||
style: TextStyle(
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: r.fontSize(mobile: 10, tablet: 11, desktop: 12),
|
||||
color: Colors.grey,
|
||||
),
|
||||
@@ -1164,7 +1213,7 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
maxLines: 4,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: r.fontSize(mobile: 11, tablet: 12, desktop: 13),
|
||||
height: 1.3,
|
||||
color: Colors.black87,
|
||||
@@ -1180,13 +1229,12 @@ class _HomeScreenState extends ConsumerState<HomeScreen> {
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: BoxDecoration(color: iconColor, shape: BoxShape.circle),
|
||||
child: const Center(
|
||||
child: Center(
|
||||
child: Text(
|
||||
"❝",
|
||||
style: TextStyle(
|
||||
style: AppTextStyles.bold.copyWith(
|
||||
color: Colors.white,
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:taxglide/consts/app_style.dart';
|
||||
import 'package:taxglide/consts/app_asstes.dart';
|
||||
import 'package:taxglide/consts/comman_serivce.dart';
|
||||
import 'package:taxglide/controller/api_contoller.dart';
|
||||
@@ -38,9 +39,7 @@ class _ListServiceScreenState extends ConsumerState<ListServiceScreen> {
|
||||
children: [
|
||||
Text(
|
||||
"List of Services Offered",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontStyle: FontStyle.normal,
|
||||
fontSize: 18,
|
||||
height: 1.3,
|
||||
@@ -54,14 +53,13 @@ class _ListServiceScreenState extends ConsumerState<ListServiceScreen> {
|
||||
serviceAsync.when(
|
||||
data: (services) {
|
||||
if (services.isEmpty) {
|
||||
return const Padding(
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: 40),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"No Services Available",
|
||||
style: TextStyle(
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: 16,
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
color: Colors.black54,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:taxglide/consts/app_style.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get_core/src/get_main.dart';
|
||||
@@ -55,11 +56,9 @@ class _NotificationScreenState extends ConsumerState<NotificationScreen> {
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
const Text(
|
||||
Text(
|
||||
"Notification",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: 24,
|
||||
color: Color(0xFF111827),
|
||||
),
|
||||
@@ -126,9 +125,7 @@ class _NotificationScreenState extends ConsumerState<NotificationScreen> {
|
||||
children: [
|
||||
Text(
|
||||
item.title,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w700,
|
||||
style: AppTextStyles.bold.copyWith(
|
||||
fontSize: 16,
|
||||
color: Colors.black,
|
||||
),
|
||||
@@ -136,12 +133,12 @@ class _NotificationScreenState extends ConsumerState<NotificationScreen> {
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
item.description,
|
||||
style: const TextStyle(fontSize: 14, color: Colors.grey),
|
||||
style: AppTextStyles.regular.copyWith(fontSize: 14, color: Colors.grey),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
item.createdAt,
|
||||
style: const TextStyle(fontSize: 12, color: Colors.grey),
|
||||
style: AppTextStyles.regular.copyWith(fontSize: 12, color: Colors.grey),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -71,7 +71,7 @@ class _EmployeeProfileListState extends ConsumerState<EmployeeProfileList> {
|
||||
"KYC Details",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight
|
||||
.w600, // equivalent to 400 (Normal)
|
||||
fontStyle: FontStyle.normal,
|
||||
@@ -117,7 +117,7 @@ class _EmployeeProfileListState extends ConsumerState<EmployeeProfileList> {
|
||||
const Text(
|
||||
"Personal Details",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontFamily: "Gilroy",
|
||||
fontSize: 20,
|
||||
color: Color(0xFF111827),
|
||||
),
|
||||
@@ -202,7 +202,7 @@ class _EmployeeProfileListState extends ConsumerState<EmployeeProfileList> {
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14,
|
||||
height: 1.3,
|
||||
@@ -216,7 +216,7 @@ class _EmployeeProfileListState extends ConsumerState<EmployeeProfileList> {
|
||||
softWrap: true,
|
||||
overflow: TextOverflow.visible,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Gilroy-Regular',
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 14,
|
||||
height: 1.3,
|
||||
|
||||
@@ -22,6 +22,12 @@ class _EmployeeProfileScreenState extends ConsumerState<EmployeeProfileScreen> {
|
||||
String? selectedItem;
|
||||
bool _isLoggingOut = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
selectedItem = 'profile'; // Default selection
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final profileAsync = ref.watch(employeeProfileProvider);
|
||||
@@ -110,7 +116,7 @@ class _EmployeeProfileScreenState extends ConsumerState<EmployeeProfileScreen> {
|
||||
Text(
|
||||
data?.name ?? 'No Company Name',
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 20,
|
||||
color: Colors.black,
|
||||
@@ -244,7 +250,7 @@ class _EmployeeProfileScreenState extends ConsumerState<EmployeeProfileScreen> {
|
||||
const Text(
|
||||
"Note",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 20,
|
||||
color: Colors.black,
|
||||
@@ -254,7 +260,7 @@ class _EmployeeProfileScreenState extends ConsumerState<EmployeeProfileScreen> {
|
||||
"Are you sure you want to log out?",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 15,
|
||||
color: Colors.black87,
|
||||
@@ -270,7 +276,7 @@ class _EmployeeProfileScreenState extends ConsumerState<EmployeeProfileScreen> {
|
||||
style: TextStyle(
|
||||
color: Color(0xFF535A5B),
|
||||
fontSize: 16,
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
@@ -321,7 +327,7 @@ class _EmployeeProfileScreenState extends ConsumerState<EmployeeProfileScreen> {
|
||||
style: TextStyle(
|
||||
color: Color(0xFF5F297B),
|
||||
fontSize: 16,
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
@@ -384,7 +390,7 @@ class _EmployeeProfileScreenState extends ConsumerState<EmployeeProfileScreen> {
|
||||
child: Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
fontFamily: "Gilroy",
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.black87,
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:taxglide/consts/app_asstes.dart';
|
||||
import 'package:taxglide/consts/app_style.dart';
|
||||
import 'package:taxglide/consts/download_helper.dart';
|
||||
import 'package:taxglide/controller/api_consts.dart';
|
||||
import 'package:taxglide/controller/api_contoller.dart';
|
||||
@@ -65,7 +66,7 @@ class _KycDetailsListState extends ConsumerState<KycDetailsList> {
|
||||
"KYC Details",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight
|
||||
.w600, // equivalent to 400 (Normal)
|
||||
fontStyle: FontStyle.normal,
|
||||
@@ -115,7 +116,7 @@ class _KycDetailsListState extends ConsumerState<KycDetailsList> {
|
||||
"Personal Details",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight
|
||||
.w400, // equivalent to 400 (Normal)
|
||||
fontStyle: FontStyle.normal,
|
||||
@@ -181,7 +182,7 @@ class _KycDetailsListState extends ConsumerState<KycDetailsList> {
|
||||
'Edit',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight.w600,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontSize: 16,
|
||||
@@ -277,9 +278,8 @@ class _KycDetailsListState extends ConsumerState<KycDetailsList> {
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
|
||||
fontSize: 14,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.64,
|
||||
@@ -291,9 +291,8 @@ class _KycDetailsListState extends ConsumerState<KycDetailsList> {
|
||||
value,
|
||||
softWrap: true,
|
||||
overflow: TextOverflow.visible,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Gilroy-Regular',
|
||||
fontWeight: FontWeight.w400,
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
|
||||
fontSize: 14,
|
||||
height: 1.3,
|
||||
letterSpacing: 0.64,
|
||||
@@ -342,9 +341,9 @@ class _KycDetailsListState extends ConsumerState<KycDetailsList> {
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Roboto',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
|
||||
|
||||
fontSize: 13,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:math' as math show sqrt;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:taxglide/consts/app_style.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:taxglide/consts/app_asstes.dart';
|
||||
@@ -28,6 +29,7 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
selectedItem = 'profile'; // Set default selection
|
||||
_loadRole(); // <-- load role on start
|
||||
}
|
||||
|
||||
@@ -104,10 +106,9 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
|
||||
data!.companyName!.isNotEmpty)
|
||||
? data.companyName![0].toUpperCase()
|
||||
: "M",
|
||||
style: const TextStyle(
|
||||
style: AppTextStyles.bold.copyWith(
|
||||
color: Colors.white,
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -120,9 +121,7 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
|
||||
const SizedBox(height: 60),
|
||||
Text(
|
||||
data?.companyName ?? 'No Company Name',
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: 20,
|
||||
color: Colors.black,
|
||||
),
|
||||
@@ -271,21 +270,17 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const Text(
|
||||
Text(
|
||||
"Note",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: 20,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
const Text(
|
||||
Text(
|
||||
"Are you sure you want to log out?",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w500,
|
||||
style: AppTextStyles.medium.copyWith(
|
||||
fontSize: 15,
|
||||
color: Colors.black87,
|
||||
),
|
||||
@@ -295,13 +290,11 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: const Text(
|
||||
child: Text(
|
||||
"Cancel",
|
||||
style: TextStyle(
|
||||
color: Color(0xFF535A5B),
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
color: const Color(0xFF535A5B),
|
||||
fontSize: 16,
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -344,13 +337,11 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
|
||||
color: Color(0xFF5F297B),
|
||||
),
|
||||
)
|
||||
: const Text(
|
||||
: Text(
|
||||
"Log Out",
|
||||
style: TextStyle(
|
||||
color: Color(0xFF5F297B),
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
color: const Color(0xFF5F297B),
|
||||
fontSize: 16,
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -411,10 +402,8 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
|
||||
Expanded(
|
||||
child: Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
style: AppTextStyles.medium.copyWith(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.black87,
|
||||
),
|
||||
),
|
||||
@@ -445,7 +434,7 @@ class _ProfileScreenState extends ConsumerState<ProfileScreen> {
|
||||
Expanded(
|
||||
child: Text(
|
||||
msg,
|
||||
style: const TextStyle(color: Colors.white, fontSize: 12),
|
||||
style: AppTextStyles.regular.copyWith(color: Colors.white, fontSize: 12),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
|
||||
@@ -16,7 +16,7 @@ class _StaffListScreenState extends ConsumerState<StaffListScreen> {
|
||||
final staffAsync = ref.watch(staffListProvider);
|
||||
|
||||
const commonTextStyle = TextStyle(
|
||||
fontFamily: "Gilroy-SemiBold",
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14.7,
|
||||
height: 1.30, // 130%
|
||||
@@ -24,7 +24,7 @@ class _StaffListScreenState extends ConsumerState<StaffListScreen> {
|
||||
color: Color(0xFF111827),
|
||||
);
|
||||
const commonTextStylevalue = TextStyle(
|
||||
fontFamily: "Gilroy-SemiBold",
|
||||
fontFamily: "Gilroy",
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 14.7,
|
||||
height: 1.30, // 130%
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:taxglide/consts/app_style.dart';
|
||||
import 'package:taxglide/consts/comman_button.dart';
|
||||
import 'package:taxglide/consts/responsive_helper.dart';
|
||||
import 'package:taxglide/controller/api_contoller.dart';
|
||||
@@ -71,7 +72,7 @@ class _ServiceRequestScreenState extends ConsumerState<ServiceRequestScreen> {
|
||||
Expanded(
|
||||
child: Text(
|
||||
msg,
|
||||
style: const TextStyle(color: Colors.white, fontSize: 12),
|
||||
style: AppTextStyles.regular.copyWith(color: Colors.white, fontSize: 12),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
),
|
||||
@@ -89,11 +90,11 @@ class _ServiceRequestScreenState extends ConsumerState<ServiceRequestScreen> {
|
||||
});
|
||||
|
||||
bool isValid = true;
|
||||
if (_selectedFiles.isEmpty) {
|
||||
setState(() => _isFileError = true);
|
||||
_showSnackBar("Please upload at least one file", isError: true);
|
||||
isValid = false;
|
||||
}
|
||||
// if (_selectedFiles.isEmpty) {
|
||||
// setState(() => _isFileError = true);
|
||||
// _showSnackBar("Please upload at least one file", isError: true);
|
||||
// isValid = false;
|
||||
// }
|
||||
if (!_isTermsAccepted) {
|
||||
setState(() => _isCheckboxError = true);
|
||||
_showSnackBar("Please accept terms and conditions", isError: true);
|
||||
@@ -374,9 +375,7 @@ class _ServiceRequestScreenState extends ConsumerState<ServiceRequestScreen> {
|
||||
children: [
|
||||
Text(
|
||||
"New Service Request",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: headerFontSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -424,9 +423,7 @@ class _ServiceRequestScreenState extends ConsumerState<ServiceRequestScreen> {
|
||||
SizedBox(height: spacingMD),
|
||||
Text(
|
||||
widget.service,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: serviceNameFontSize,
|
||||
color: const Color(0xFF3F3F3F),
|
||||
),
|
||||
@@ -454,10 +451,8 @@ class _ServiceRequestScreenState extends ConsumerState<ServiceRequestScreen> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"File Upload *",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
"File Upload",
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: labelFontSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -527,9 +522,7 @@ class _ServiceRequestScreenState extends ConsumerState<ServiceRequestScreen> {
|
||||
Expanded(
|
||||
child: Text(
|
||||
"I accept the terms and conditions *",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontStyle: FontStyle.normal,
|
||||
fontSize: checkboxFontSize,
|
||||
height: 25.56 / 12.78,
|
||||
@@ -556,7 +549,7 @@ class _ServiceRequestScreenState extends ConsumerState<ServiceRequestScreen> {
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 250),
|
||||
SizedBox(height: r.spacing(mobile: 40, tablet: 60, desktop: 80)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -568,9 +561,7 @@ class _ServiceRequestScreenState extends ConsumerState<ServiceRequestScreen> {
|
||||
padding: EdgeInsets.symmetric(horizontal: hPadding),
|
||||
child: Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: fontSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -597,9 +588,7 @@ class _ServiceRequestScreenState extends ConsumerState<ServiceRequestScreen> {
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 21),
|
||||
child: Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: fontSize,
|
||||
color: const Color(0xFF3F3F3F),
|
||||
),
|
||||
@@ -619,8 +608,8 @@ class _ServiceRequestScreenState extends ConsumerState<ServiceRequestScreen> {
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
border: Border.all(
|
||||
color: _isFileError ? Colors.red : const Color(0xFFDFDFDF),
|
||||
width: _isFileError ? 2 : 1,
|
||||
color: const Color(0xFFDFDFDF),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 21),
|
||||
@@ -628,34 +617,22 @@ class _ServiceRequestScreenState extends ConsumerState<ServiceRequestScreen> {
|
||||
children: [
|
||||
Text(
|
||||
"Upload PDF, IMG, JPG, ZIP",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: fontSize,
|
||||
height: 25.56 / 12.78,
|
||||
letterSpacing: 0.8,
|
||||
color: _isFileError ? Colors.red : const Color(0xFF4F4C4C),
|
||||
color: const Color(0xFF4F4C4C),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"(40 MB only allowed File)",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: subFontSize,
|
||||
height: 25.56 / 12.78,
|
||||
letterSpacing: 0.8,
|
||||
color: _isFileError ? Colors.red : const Color(0xFF4F4C4C),
|
||||
color: const Color(0xFF4F4C4C),
|
||||
),
|
||||
),
|
||||
if (_isFileError)
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(top: 8),
|
||||
child: Text(
|
||||
"Please upload at least one file",
|
||||
style: TextStyle(color: Colors.red, fontSize: 11),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -705,9 +682,7 @@ class _ServiceRequestScreenState extends ConsumerState<ServiceRequestScreen> {
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
"Uploaded Files (${_selectedFiles.length})",
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-SemiBold',
|
||||
fontWeight: FontWeight.w600,
|
||||
style: AppTextStyles.semiBold.copyWith(
|
||||
fontSize: countFontSize,
|
||||
color: const Color(0xFF111827),
|
||||
),
|
||||
@@ -894,8 +869,7 @@ class _ServiceRequestScreenState extends ConsumerState<ServiceRequestScreen> {
|
||||
controller: _messageController,
|
||||
maxLines: null,
|
||||
expands: true,
|
||||
style: TextStyle(
|
||||
fontFamily: 'Gilroy-Medium',
|
||||
style: AppTextStyles.regular.copyWith(
|
||||
fontSize: fontSize,
|
||||
color: const Color(0xFF6C7278),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user