contact us final
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:traderscircuit/model/ContactUsModel/contact_us_cat_model.dart';
|
||||
import 'package:traderscircuit/model/ContactUsModel/contact_us_model.dart';
|
||||
|
||||
@@ -20,6 +21,17 @@ class ContactUsController extends GetxController {
|
||||
RxBool onDropTap = false.obs;
|
||||
RxString selectedValue = "".obs;
|
||||
|
||||
RxInt allC = 0.obs;
|
||||
RxInt openC = 0.obs;
|
||||
RxInt closeC = 0.obs;
|
||||
RxInt resolvedC = 0.obs;
|
||||
|
||||
String formatedDateTimeMethod(String originalDateTimeString) {
|
||||
DateTime dateTime = DateTime.parse(originalDateTimeString);
|
||||
|
||||
return DateFormat("dd MMM yyyy, hh:mm a").format(dateTime.toLocal());
|
||||
}
|
||||
|
||||
RxList<dynamic> contactUsDetailsChatContent = [
|
||||
{
|
||||
"initial_name": "SM",
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
import 'dart:developer';
|
||||
import 'dart:ffi';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:traderscircuit/controller/contact_us_controller.dart';
|
||||
import 'package:traderscircuit/model/ContactUsModel/contact_us_cat_model.dart';
|
||||
import 'package:traderscircuit/model/ContactUsModel/contact_us_model.dart'
|
||||
as ContactModel;
|
||||
import 'package:traderscircuit/model/ContactUsModel/contact_us_model.dart';
|
||||
import 'package:traderscircuit/resources/routes/route_name.dart';
|
||||
import 'package:traderscircuit/view_model/ContactUsApi/contact_us_api.dart';
|
||||
import '../../../Utils/Common/CommonAppbar.dart';
|
||||
import '../../../Utils/Common/commonBotton.dart';
|
||||
import '../../../Utils/text.dart';
|
||||
import '../../../view_model/ProfileAPI/GetProfileApi.dart';
|
||||
import '../../onBoarding/splashScreen1.dart';
|
||||
import 'create_ticket_bottom_sheet.dart';
|
||||
|
||||
@@ -25,13 +21,10 @@ class ContactUsMainScreen extends StatefulWidget {
|
||||
State<ContactUsMainScreen> createState() => _ContactUsMainScreenState();
|
||||
}
|
||||
|
||||
Map<int, List<ContactModel.Data>> status1Map = {};
|
||||
Map<int, List<ContactModel.Data>> status2Map = {};
|
||||
Map<int, List<ContactModel.Data>> status3Map = {};
|
||||
|
||||
class _ContactUsMainScreenState extends State<ContactUsMainScreen> {
|
||||
ContactUsController contactUsController = Get.put(ContactUsController());
|
||||
|
||||
RxBool isEmpty = false.obs;
|
||||
@override
|
||||
void initState() {
|
||||
contactUsController.isLoading.value == true;
|
||||
@@ -40,33 +33,36 @@ class _ContactUsMainScreenState extends State<ContactUsMainScreen> {
|
||||
ContactUsCatModel.fromJson(value.data);
|
||||
|
||||
ContactUsApi().getContactUsData().then((value) {
|
||||
contactUsController.contactModel = ContactUsModel.fromJson(value.data);
|
||||
contactUsController.isLoading.value = false;
|
||||
log(contactUsController.isLoading.value.toString());
|
||||
status1Map.clear();
|
||||
status2Map.clear();
|
||||
status3Map.clear();
|
||||
// Iterate over the data and categorize them based on their status
|
||||
for (var item in contactUsController.contactModel!.data!) {
|
||||
if (item.status == 1) {
|
||||
status1Map.putIfAbsent(item.status!, () => []).add(item);
|
||||
} else if (item.status == 2) {
|
||||
status2Map.putIfAbsent(item.status!, () => []).add(item);
|
||||
} else if (item.status == 3) {
|
||||
status3Map.putIfAbsent(item.status!, () => []).add(item);
|
||||
Map<String, dynamic> responseData =
|
||||
Map<String, dynamic>.from(value.data);
|
||||
if (responseData["message"] == "Data not found.") {
|
||||
isEmpty.value = true;
|
||||
} else {
|
||||
contactUsController.allC.value = 0;
|
||||
contactUsController.openC.value = 0;
|
||||
contactUsController.closeC.value = 0;
|
||||
contactUsController.resolvedC.value = 0;
|
||||
|
||||
contactUsController.contactModel =
|
||||
ContactUsModel.fromJson(value.data);
|
||||
for (var a in contactUsController.contactModel.data!) {
|
||||
if (a.status == 1) {
|
||||
contactUsController.openC.value += 1;
|
||||
contactUsController.allC.value += 1;
|
||||
} else if (a.status == 2) {
|
||||
contactUsController.closeC.value += 1;
|
||||
contactUsController.allC.value += 1;
|
||||
} else if (a.status == 3) {
|
||||
contactUsController.resolvedC.value += 1;
|
||||
contactUsController.allC.value += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
contactUsController.isLoading.value = false;
|
||||
});
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
status1Map.clear();
|
||||
status2Map.clear();
|
||||
status3Map.clear();
|
||||
super.dispose();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -106,19 +102,20 @@ class _ContactUsMainScreenState extends State<ContactUsMainScreen> {
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16, vertical: 16),
|
||||
child: contactUsController.isLoading.value
|
||||
? Center(
|
||||
? const Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.redAccent,
|
||||
))
|
||||
: contactUsController.contactModel.data!.isEmpty
|
||||
? Text("No Data Available")
|
||||
: isEmpty.value
|
||||
? Center(child: text18W800("No Data Available"))
|
||||
: ListView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
children: [
|
||||
text25W600("Contact Us"),
|
||||
const Gap(20),
|
||||
text16W400("Hi Afrid"),
|
||||
text16W400("We are here to help you Us"),
|
||||
text16W400(
|
||||
"Hi ${ProfileObj!.data!.userName}"),
|
||||
text16W400("We are here to help you"),
|
||||
const Gap(12),
|
||||
TabBar(
|
||||
tabAlignment: TabAlignment.start,
|
||||
@@ -141,16 +138,16 @@ class _ContactUsMainScreenState extends State<ContactUsMainScreen> {
|
||||
tabs: [
|
||||
Tab(
|
||||
text:
|
||||
"All Tickets (${contactUsController.contactModel.data!.length.toString()})"),
|
||||
"All Tickets (${contactUsController.allC.value})"),
|
||||
Tab(
|
||||
text:
|
||||
"Open Tickets (${status1Map.values.expand((list) => list).length.toString()})"),
|
||||
"Open Tickets (${contactUsController.openC.value})"),
|
||||
Tab(
|
||||
text:
|
||||
"Closed (${status2Map.values.expand((list) => list).length.toString()})"),
|
||||
"Closed (${contactUsController.closeC.value})"),
|
||||
Tab(
|
||||
text:
|
||||
"Resolved (${status3Map.values.expand((list) => list).length.toString()})"),
|
||||
"Resolved (${contactUsController.resolvedC.value})"),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
@@ -164,28 +161,43 @@ class _ContactUsMainScreenState extends State<ContactUsMainScreen> {
|
||||
index, "ALL");
|
||||
}),
|
||||
ListView.builder(
|
||||
itemCount: status1Map.values
|
||||
.expand((list) => list)
|
||||
.length,
|
||||
itemCount: contactUsController
|
||||
.contactModel.data!.length,
|
||||
itemBuilder: (ctx, index) {
|
||||
return ticketCardWidget(
|
||||
index, "OPEN");
|
||||
return contactUsController
|
||||
.contactModel
|
||||
.data![index]
|
||||
.status ==
|
||||
1
|
||||
? ticketCardWidget(
|
||||
index, "OPEN")
|
||||
: const SizedBox();
|
||||
}),
|
||||
ListView.builder(
|
||||
itemCount: status2Map.values
|
||||
.expand((list) => list)
|
||||
.length,
|
||||
itemCount: contactUsController
|
||||
.contactModel.data!.length,
|
||||
itemBuilder: (ctx, index) {
|
||||
return ticketCardWidget(
|
||||
index, "CLOSED");
|
||||
return contactUsController
|
||||
.contactModel
|
||||
.data![index]
|
||||
.status ==
|
||||
2
|
||||
? ticketCardWidget(
|
||||
index, "CLOSED")
|
||||
: const SizedBox();
|
||||
}),
|
||||
ListView.builder(
|
||||
itemCount: status3Map.values
|
||||
.expand((list) => list)
|
||||
.length,
|
||||
itemCount: contactUsController
|
||||
.contactModel.data!.length,
|
||||
itemBuilder: (ctx, index) {
|
||||
return ticketCardWidget(
|
||||
index, "RESOLVED");
|
||||
return contactUsController
|
||||
.contactModel
|
||||
.data![index]
|
||||
.status ==
|
||||
3
|
||||
? ticketCardWidget(
|
||||
index, "RESOLVED")
|
||||
: const SizedBox();
|
||||
}),
|
||||
]),
|
||||
)
|
||||
@@ -201,598 +213,169 @@ class _ContactUsMainScreenState extends State<ContactUsMainScreen> {
|
||||
|
||||
Widget ticketCardWidget(index, type) {
|
||||
ContactUsController contactUsController = Get.put(ContactUsController());
|
||||
return contactUsController.contactModel.data!.elementAt(index).status != 0 &&
|
||||
type == "ALL"
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
contactUsController.attachmentFileDetailsList.clear();
|
||||
contactUsController.attachmentPathNameDetailsList.clear();
|
||||
Get.toNamed(RouteName.contactUsMainDetails);
|
||||
},
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
height: 190,
|
||||
margin: EdgeInsets.only(bottom: 18, top: index == 0 ? 15 : 0),
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: const Alignment(0.98, -0.21),
|
||||
end: const Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.03999999910593033),
|
||||
Colors.white.withOpacity(0.05999999865889549)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: const BorderSide(width: 1, color: Color(0xFF393939)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 15,
|
||||
horizontal: 10,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
text16W600(contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.uniqueTicketId
|
||||
.toString()),
|
||||
Row(
|
||||
children: [
|
||||
text16W500(
|
||||
contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.status ==
|
||||
1
|
||||
? "Open"
|
||||
: contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.status ==
|
||||
2
|
||||
? "Closed"
|
||||
: "Resolved",
|
||||
clr: contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.status ==
|
||||
1
|
||||
? const Color(0xFFFFAD31)
|
||||
: contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.status ==
|
||||
2
|
||||
? const Color(0xFF95CCFF)
|
||||
: const Color(0xFF34C759)),
|
||||
const Gap(8),
|
||||
CircleAvatar(
|
||||
radius: 10,
|
||||
backgroundColor: contactUsController
|
||||
.contactModel.data!
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
contactUsController.attachmentFileDetailsList.clear();
|
||||
contactUsController.attachmentPathNameDetailsList.clear();
|
||||
|
||||
var result = await Get.toNamed(RouteName.contactUsMainDetails,
|
||||
arguments: {
|
||||
"id": contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.id
|
||||
.toString()
|
||||
});
|
||||
|
||||
if (result != null && result) {
|
||||
contactUsController.isLoading.value = true;
|
||||
ContactUsApi().getContactUsData().then((value) {
|
||||
contactUsController.allC.value = 0;
|
||||
contactUsController.openC.value = 0;
|
||||
contactUsController.closeC.value = 0;
|
||||
contactUsController.resolvedC.value = 0;
|
||||
|
||||
contactUsController.contactModel =
|
||||
ContactUsModel.fromJson(value.data);
|
||||
for (var a in contactUsController.contactModel.data!) {
|
||||
if (a.status == 1) {
|
||||
contactUsController.openC.value += 1;
|
||||
contactUsController.allC.value += 1;
|
||||
} else if (a.status == 2) {
|
||||
contactUsController.closeC.value += 1;
|
||||
contactUsController.allC.value += 1;
|
||||
} else if (a.status == 3) {
|
||||
contactUsController.resolvedC.value += 1;
|
||||
contactUsController.allC.value += 1;
|
||||
}
|
||||
}
|
||||
|
||||
contactUsController.isLoading.value = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
height: 195,
|
||||
margin: EdgeInsets.only(bottom: 18, top: index == 0 ? 15 : 0),
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: const Alignment(0.98, -0.21),
|
||||
end: const Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.03999999910593033),
|
||||
Colors.white.withOpacity(0.05999999865889549)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: const BorderSide(width: 1, color: Color(0xFF393939)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 15,
|
||||
horizontal: 10,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
text16W600(contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.uniqueTicketId
|
||||
.toString()),
|
||||
Row(
|
||||
children: [
|
||||
text16W500(
|
||||
contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.status ==
|
||||
1
|
||||
? "Open"
|
||||
: contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.status ==
|
||||
1
|
||||
? const Color(0xFFFFAD31)
|
||||
: contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.status ==
|
||||
2
|
||||
? const Color(0xFF95CCFF)
|
||||
: const Color(0xFF34C759),
|
||||
child: const Center(
|
||||
child: Icon(
|
||||
Icons.check_rounded,
|
||||
size: 15,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
const Gap(10),
|
||||
text16W600(contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.createdAt
|
||||
.toString()),
|
||||
const Gap(5),
|
||||
text16W400(contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.ticketCategory!
|
||||
.name
|
||||
.toString()),
|
||||
const Gap(22),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
),
|
||||
width: Get.width,
|
||||
height: 50,
|
||||
decoration: ShapeDecoration(
|
||||
color: Colors.black.withOpacity(0.03999999910593033),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: const BorderSide(
|
||||
width: 1, color: Color(0xFF393939)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: text16W400(
|
||||
contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.description
|
||||
.toString(),
|
||||
clr: const Color(0xFF9E9E9E),
|
||||
textOver: TextOverflow.ellipsis),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: type == "OPEN"
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
contactUsController.attachmentFileDetailsList.clear();
|
||||
contactUsController.attachmentPathNameDetailsList.clear();
|
||||
Get.toNamed(RouteName.contactUsMainDetails);
|
||||
},
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
height: 190,
|
||||
margin: EdgeInsets.only(bottom: 18, top: index == 0 ? 15 : 0),
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: const Alignment(0.98, -0.21),
|
||||
end: const Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.03999999910593033),
|
||||
Colors.white.withOpacity(0.05999999865889549)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: const BorderSide(width: 1, color: Color(0xFF393939)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 15,
|
||||
horizontal: 10,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
text16W600(status1Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.ticketCategoryXid
|
||||
.toString()),
|
||||
Row(
|
||||
children: [
|
||||
text16W500(
|
||||
status1Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.status
|
||||
.toString() ==
|
||||
"1"
|
||||
? "OPEN"
|
||||
: "Open",
|
||||
clr: status1Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.status
|
||||
.toString() ==
|
||||
"1"
|
||||
? const Color(0xFFFFAD31)
|
||||
: status1Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.status
|
||||
.toString() ==
|
||||
"2"
|
||||
? const Color(0xFF95CCFF)
|
||||
: const Color(0xFF34C759)),
|
||||
const Gap(8),
|
||||
CircleAvatar(
|
||||
radius: 10,
|
||||
backgroundColor: status1Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.status
|
||||
.toString() ==
|
||||
"1"
|
||||
? const Color(0xFFFFAD31)
|
||||
: status1Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.status
|
||||
.toString() ==
|
||||
"2"
|
||||
? const Color(0xFF95CCFF)
|
||||
: const Color(0xFF34C759),
|
||||
child: const Center(
|
||||
child: Icon(
|
||||
Icons.check_rounded,
|
||||
size: 15,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
const Gap(10),
|
||||
text16W600(status1Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.createdAt
|
||||
.toString()),
|
||||
const Gap(5),
|
||||
text16W400(status1Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.ticketCategory!
|
||||
.name
|
||||
.toString()),
|
||||
const Gap(22),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
),
|
||||
width: Get.width,
|
||||
height: 50,
|
||||
decoration: ShapeDecoration(
|
||||
color: Colors.black.withOpacity(0.03999999910593033),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: const BorderSide(
|
||||
width: 1, color: Color(0xFF393939)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: text16W400(
|
||||
status1Map.values
|
||||
.expand((list) => list)
|
||||
2
|
||||
? "Closed"
|
||||
: "Resolved",
|
||||
clr: contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.status ==
|
||||
1
|
||||
? const Color(0xFFFFAD31)
|
||||
: contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.status ==
|
||||
2
|
||||
? const Color(0xFF95CCFF)
|
||||
: const Color(0xFF34C759)),
|
||||
const Gap(8),
|
||||
CircleAvatar(
|
||||
radius: 10,
|
||||
backgroundColor: contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.description
|
||||
.toString(),
|
||||
clr: const Color(0xFF9E9E9E),
|
||||
textOver: TextOverflow.ellipsis),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: type == "CLOSED"
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
contactUsController.attachmentFileDetailsList.clear();
|
||||
contactUsController.attachmentPathNameDetailsList.clear();
|
||||
Get.toNamed(RouteName.contactUsMainDetails);
|
||||
},
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
height: 190,
|
||||
margin:
|
||||
EdgeInsets.only(bottom: 18, top: index == 0 ? 15 : 0),
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: const Alignment(0.98, -0.21),
|
||||
end: const Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.03999999910593033),
|
||||
Colors.white.withOpacity(0.05999999865889549)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: const BorderSide(
|
||||
width: 1, color: Color(0xFF393939)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 15,
|
||||
horizontal: 10,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
text16W600(status2Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.ticketCategoryXid
|
||||
.toString()),
|
||||
Row(
|
||||
children: [
|
||||
text16W500(
|
||||
status2Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.status
|
||||
.toString() ==
|
||||
"2"
|
||||
? "CLOSED"
|
||||
: "Closed",
|
||||
clr: status2Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.status
|
||||
.toString() ==
|
||||
"1"
|
||||
? const Color(0xFFFFAD31)
|
||||
: status2Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.status
|
||||
.toString() ==
|
||||
"2"
|
||||
? const Color(0xFF95CCFF)
|
||||
: const Color(0xFF34C759)),
|
||||
const Gap(8),
|
||||
CircleAvatar(
|
||||
radius: 10,
|
||||
backgroundColor: status2Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.status
|
||||
.toString() ==
|
||||
"1"
|
||||
? const Color(0xFFFFAD31)
|
||||
: status2Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.status
|
||||
.toString() ==
|
||||
"2"
|
||||
? const Color(0xFF95CCFF)
|
||||
: const Color(0xFF34C759),
|
||||
child: const Center(
|
||||
child: Icon(
|
||||
Icons.check_rounded,
|
||||
size: 15,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
const Gap(10),
|
||||
text16W600(status2Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.createdAt
|
||||
.toString()),
|
||||
const Gap(5),
|
||||
text16W400(status2Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.ticketCategory!
|
||||
.name
|
||||
.toString()),
|
||||
const Gap(22),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
),
|
||||
width: Get.width,
|
||||
height: 50,
|
||||
decoration: ShapeDecoration(
|
||||
color:
|
||||
Colors.black.withOpacity(0.03999999910593033),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: const BorderSide(
|
||||
width: 1, color: Color(0xFF393939)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: text16W400(
|
||||
status2Map.values
|
||||
.expand((list) => list)
|
||||
.status ==
|
||||
1
|
||||
? const Color(0xFFFFAD31)
|
||||
: contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.description
|
||||
.toString(),
|
||||
clr: const Color(0xFF9E9E9E),
|
||||
textOver: TextOverflow.ellipsis),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: type == "RESOLVED"
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
contactUsController.attachmentFileDetailsList.clear();
|
||||
contactUsController.attachmentPathNameDetailsList
|
||||
.clear();
|
||||
Get.toNamed(RouteName.contactUsMainDetails);
|
||||
},
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
height: 190,
|
||||
margin: EdgeInsets.only(
|
||||
bottom: 18, top: index == 0 ? 15 : 0),
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: const Alignment(0.98, -0.21),
|
||||
end: const Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.03999999910593033),
|
||||
Colors.white.withOpacity(0.05999999865889549)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: const BorderSide(
|
||||
width: 1, color: Color(0xFF393939)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 15,
|
||||
horizontal: 10,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
text16W600(status3Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.ticketCategoryXid
|
||||
.toString()),
|
||||
Row(
|
||||
children: [
|
||||
text16W500(
|
||||
status3Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.status
|
||||
.toString() ==
|
||||
"3"
|
||||
? "RESOLVED"
|
||||
: "Resolved",
|
||||
clr: status3Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.status
|
||||
.toString() ==
|
||||
"1"
|
||||
? const Color(0xFFFFAD31)
|
||||
: status3Map.values
|
||||
.expand(
|
||||
(list) => list)
|
||||
.elementAt(index)
|
||||
.status
|
||||
.toString() ==
|
||||
"2"
|
||||
? const Color(0xFF95CCFF)
|
||||
: const Color(0xFF34C759)),
|
||||
const Gap(8),
|
||||
CircleAvatar(
|
||||
radius: 10,
|
||||
backgroundColor: status3Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.status
|
||||
.toString() ==
|
||||
"1"
|
||||
? const Color(0xFFFFAD31)
|
||||
: status3Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.status
|
||||
.toString() ==
|
||||
"2"
|
||||
? const Color(0xFF95CCFF)
|
||||
: const Color(0xFF34C759),
|
||||
child: const Center(
|
||||
child: Icon(
|
||||
Icons.check_rounded,
|
||||
size: 15,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
const Gap(10),
|
||||
text16W600(status3Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.createdAt
|
||||
.toString()),
|
||||
const Gap(5),
|
||||
text16W400(status3Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.ticketCategory!
|
||||
.name
|
||||
.toString()),
|
||||
const Gap(22),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
),
|
||||
width: Get.width,
|
||||
height: 50,
|
||||
decoration: ShapeDecoration(
|
||||
color: Colors.black
|
||||
.withOpacity(0.03999999910593033),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: const BorderSide(
|
||||
width: 1, color: Color(0xFF393939)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: text16W400(
|
||||
status3Map.values
|
||||
.expand((list) => list)
|
||||
.elementAt(index)
|
||||
.description
|
||||
.toString(),
|
||||
clr: const Color(0xFF9E9E9E),
|
||||
textOver: TextOverflow.ellipsis),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
.status ==
|
||||
2
|
||||
? const Color(0xFF95CCFF)
|
||||
: const Color(0xFF34C759),
|
||||
child: const Center(
|
||||
child: Icon(
|
||||
Icons.check_rounded,
|
||||
size: 15,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
)
|
||||
: SizedBox();
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
const Gap(10),
|
||||
text16W600(contactUsController.formatedDateTimeMethod(
|
||||
contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.createdAt
|
||||
.toString())),
|
||||
const Gap(5),
|
||||
text16W400(contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.ticketCategory!
|
||||
.name
|
||||
.toString()),
|
||||
const Gap(22),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
),
|
||||
width: Get.width,
|
||||
height: 50,
|
||||
decoration: ShapeDecoration(
|
||||
color: Colors.black.withOpacity(0.03999999910593033),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: const BorderSide(width: 1, color: Color(0xFF393939)),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: text16W400(
|
||||
contactUsController.contactModel.data!
|
||||
.elementAt(index)
|
||||
.description
|
||||
.toString(),
|
||||
clr: const Color(0xFF9E9E9E),
|
||||
textOver: TextOverflow.ellipsis),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
List<dynamic> dataL = [
|
||||
{
|
||||
"id": "#13569412",
|
||||
"date": "16 Feb 2024, 11 : 35PM",
|
||||
"category": "Account Management",
|
||||
"desc":
|
||||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500. Lorem Ipsum has been the industry's standard dummy text ever since the 1500",
|
||||
"type": "OPEN"
|
||||
},
|
||||
{
|
||||
"id": "#13569412",
|
||||
"date": "16 Feb 2024, 11 : 35PM",
|
||||
"category": "Technical Support",
|
||||
"desc":
|
||||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500. Lorem Ipsum has been the industry's standard dummy text ever since the 1500",
|
||||
"type": "CLOSED"
|
||||
},
|
||||
{
|
||||
"id": "#13569412",
|
||||
"date": "16 Feb 2024, 11 : 35PM",
|
||||
"category": "Feedback and Suggestions",
|
||||
"desc":
|
||||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500. Lorem Ipsum has been the industry's standard dummy text ever since the 1500",
|
||||
"type": "RESOLVED"
|
||||
}
|
||||
];
|
||||
|
||||
30
pubspec.lock
30
pubspec.lock
@@ -553,13 +553,13 @@ packages:
|
||||
source: hosted
|
||||
version: "1.5.4"
|
||||
intl:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: intl
|
||||
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
|
||||
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.18.1"
|
||||
version: "0.19.0"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -612,10 +612,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: local_auth
|
||||
sha256: "27679ed8e0d7daab2357db6bb7076359e083a56b295c0c59723845301da6aed9"
|
||||
sha256: "280421b416b32de31405b0a25c3bd42dfcef2538dfbb20c03019e02a5ed55ed0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.8"
|
||||
version: "2.2.0"
|
||||
local_auth_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -624,14 +624,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.37"
|
||||
local_auth_ios:
|
||||
local_auth_darwin:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: local_auth_ios
|
||||
sha256: eb283b530029b334698918f1e282d4483737cbca972ff21b9193be3d6de8e2b8
|
||||
name: local_auth_darwin
|
||||
sha256: "33381a15b0de2279523eca694089393bb146baebdce72a404555d03174ebc1e9"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.6"
|
||||
version: "1.2.2"
|
||||
local_auth_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -993,18 +993,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: syncfusion_flutter_pdf
|
||||
sha256: e97daea47f9ac4cf25cc8fc11a0475580ad9c592056d9c2bdc809c73e276decf
|
||||
sha256: a42186922a416c2c9634a8f221aee261101babc2d30b1a1e908a7f034e743046
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "21.2.10"
|
||||
version: "21.2.4"
|
||||
syncfusion_flutter_pdfviewer:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: syncfusion_flutter_pdfviewer
|
||||
sha256: fdd2ff565cd42247b8e86e26304329bae924fdfe8ddc1f4a3a264916f6c1ff1f
|
||||
sha256: "2dc016f251c675f8e4923135c485356473b4d89c677670164292159cd1dd4f45"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "21.2.10"
|
||||
version: "21.2.3"
|
||||
syncfusion_pdfviewer_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1295,5 +1295,5 @@ packages:
|
||||
source: hosted
|
||||
version: "6.3.0"
|
||||
sdks:
|
||||
dart: ">=3.2.0-194.0.dev <4.0.0"
|
||||
flutter: ">=3.13.0"
|
||||
dart: ">=3.2.3 <4.0.0"
|
||||
flutter: ">=3.16.6"
|
||||
|
||||
@@ -48,6 +48,7 @@ dependencies:
|
||||
audio_video_progress_bar: ^2.0.2
|
||||
syncfusion_flutter_pdfviewer:
|
||||
flutter_html: ^3.0.0-beta.2
|
||||
intl: ^0.19.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
Reference in New Issue
Block a user