Merge pull request #35 from WDI-Ideas/temp

create ticket
This commit is contained in:
Raj
2024-04-29 13:06:01 +05:30
committed by GitHub
12 changed files with 850 additions and 298 deletions

View File

@@ -236,7 +236,6 @@ class _VideosMoreState extends State<AudioMore> {
.contentBytesCategoriesModel
.data![index]
.id!;
log(contentBytesController.filterId.toString());
handleSearch(searchControllera.text,
contentBytesController.filterId.toString());

View File

@@ -16,6 +16,7 @@ import 'package:traderscircuit/resources/routes/route_name.dart';
import 'package:traderscircuit/view/Sidemenu/ContentByte/PlayerWidget.dart';
import 'package:traderscircuit/view/Sidemenu/ContentByte/read_pdf.dart';
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
import 'package:traderscircuit/view_model/ContentBytesApi/content_bytes_api.dart';
class ReadMore extends StatefulWidget {
const ReadMore({super.key});
@@ -29,6 +30,29 @@ class _VideosMoreState extends State<ReadMore> {
Get.put(ContentBytesController());
var data;
RxBool isLoading = false.obs;
TextEditingController searchControllerr = TextEditingController();
@override
void initState() {
ContentBytesApi().getContentBytesData("", "reads", "").then((value) {
contentBytesController.contentBytesModel =
ContentBytesModel.fromJson(value.data);
contentBytesController.isApiCalling.value = false;
setState(() {});
});
super.initState();
}
void handleSearch(String query, String category) async {
await ContentBytesApi()
.getContentBytesData(
query, "reads", contentBytesController.filterId.toString())
.then((value) {
contentBytesController.contentBytesModel =
ContentBytesModel.fromJson(value.data);
setState(() {});
});
}
@override
Widget build(BuildContext context) {
@@ -62,13 +86,22 @@ class _VideosMoreState extends State<ReadMore> {
Row(
children: [
SizedBox(
width: 290.w,
child: CustomTextFormField(
leadingIcon: Icon(Icons.search),
width: 295.w,
child: TextField(
controller: searchControllerr,
onChanged: (value) {
// Call method to handle search
handleSearch(value, "");
},
decoration: InputDecoration(
prefixIcon: Icon(Icons.search),
hintText: 'Search videos',
border: OutlineInputBorder(),
),
),
),
SizedBox(
width: 10.w,
width: 12.w,
),
filter(),
],
@@ -202,6 +235,8 @@ class _VideosMoreState extends State<ReadMore> {
.id!;
log(contentBytesController.filterId.toString());
handleSearch(searchControllerr.text,
contentBytesController.filterId.toString());
},
child: itemFilter(index));
}),

View File

@@ -121,7 +121,9 @@ class _SideMenuState extends State<SideMenu> {
decoration: ShapeDecoration(
image: DecorationImage(
image: NetworkImage(
ProfileObj!.data!.profilePhoto ?? ""),
// ProfileObj!.data!.profilePhoto ??
""),
fit: BoxFit.fill,
),
shape: OvalBorder(),
@@ -131,7 +133,9 @@ class _SideMenuState extends State<SideMenu> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
text18W400(ProfileObj!.data!.userName ?? ""),
text18W400(
//ProfileObj!.data!.userName ??
""),
sizedBoxHeight(4.h),
text18W400('My Profile'),
],

View File

@@ -3,8 +3,10 @@ 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';
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';
@@ -20,113 +22,130 @@ class ContactUsMainScreen extends StatefulWidget {
class _ContactUsMainScreenState extends State<ContactUsMainScreen> {
ContactUsController contactUsController = Get.put(ContactUsController());
@override
void initState() {
ContactUsApi().getContactUsCategoriesData().then((value) {
contactUsController.contactCatModel =
ContactUsCatModel.fromJson(value.data);
});
ContactUsApi().getContactUsData().then((value) {
contactUsController.contactModel = ContactUsModel.fromJson(value.data);
});
super.initState();
}
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 4,
child: Scaffold(
appBar: CommonAppbar(
height: 75,
titleTxt: "",
customActionWidget: text16W400(""),
),
backgroundColor: Colors.black,
extendBody: true,
bottomNavigationBar: Padding(
padding: const EdgeInsets.symmetric(horizontal: 17, vertical: 40),
child: SizedBox(
width: Get.width,
child: kycBtn(
text: "Create Ticket",
onTap: () {
contactUsController.attachmentFileList.clear();
contactUsController.attachmentPathNameList.clear();
CreateTicketBottomSheet().bottomSheet(context);
},
bgClr: const Color(0xFF6C0000),
borderClr: const Color(0xFF990000),
return Obx(() => DefaultTabController(
length: 4,
child: Scaffold(
appBar: CommonAppbar(
height: 75,
titleTxt: "",
customActionWidget: text16W400(""),
),
backgroundColor: Colors.black,
extendBody: true,
bottomNavigationBar: Padding(
padding: const EdgeInsets.symmetric(horizontal: 17, vertical: 40),
child: SizedBox(
width: Get.width,
child: kycBtn(
text: "Create Ticket",
onTap: () {
contactUsController.attachmentFileList.clear();
contactUsController.attachmentPathNameList.clear();
CreateTicketBottomSheet().bottomSheet(context);
},
bgClr: const Color(0xFF6C0000),
borderClr: const Color(0xFF990000),
),
),
),
body: Stack(
children: [
const CommonBlurLeft(),
const CommonBlurRight(),
Stack(children: [
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16, vertical: 16),
child: ListView(
physics: const NeverScrollableScrollPhysics(),
children: [
text25W600("Contact Us"),
const Gap(20),
text16W400("Hi Afrid,"),
text16W400("We are here to help you Us"),
const Gap(12),
TabBar(
tabAlignment: TabAlignment.start,
labelStyle: TextStyle(
fontSize: 18.sp,
fontWeight: FontWeight.w400,
fontFamily: "hiragino",
),
isScrollable: true,
labelColor: Colors.white,
unselectedLabelColor: const Color(0xFF464646),
indicatorColor: const Color(0xFF6C0000),
indicatorSize: TabBarIndicatorSize.tab,
unselectedLabelStyle: TextStyle(
fontSize: 18.sp,
fontWeight: FontWeight.w500,
fontFamily: "hiragino",
),
tabs: [
Tab(
text:
"All Tickets (${contactUsController.contactModel.data!.length.toString()})"),
Tab(text: "Open Tickets (2)"),
Tab(text: "Closed (1)"),
Tab(text: "Resolved (1)"),
],
),
SizedBox(
height: 0.5.sh,
child: TabBarView(children: [
ListView.builder(
itemCount: contactUsController
.contactModel.data!.length,
itemBuilder: (ctx, index) {
return ticketCardWidget(index, "ALL");
}),
ListView.builder(
itemCount: dataL.length,
itemBuilder: (ctx, index) {
return ticketCardWidget(index, "OPEN");
}),
ListView.builder(
itemCount: dataL.length,
itemBuilder: (ctx, index) {
return ticketCardWidget(index, "CLOSED");
}),
ListView.builder(
itemCount: dataL.length,
itemBuilder: (ctx, index) {
return ticketCardWidget(index, "RESOLVED");
}),
]),
)
],
)),
]),
],
),
),
),
body: Stack(
children: [
const CommonBlurLeft(),
const CommonBlurRight(),
Stack(children: [
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: ListView(
physics: const NeverScrollableScrollPhysics(),
children: [
text25W600("Contact Us"),
const Gap(20),
text16W400("Hi Afrid,"),
text16W400("We are here to help you Us"),
const Gap(12),
TabBar(
labelStyle: TextStyle(
fontSize: 18.sp,
fontWeight: FontWeight.w400,
fontFamily: "hiragino",
),
isScrollable: true,
labelColor: Colors.white,
unselectedLabelColor: const Color(0xFF464646),
indicatorColor: const Color(0xFF6C0000),
indicatorSize: TabBarIndicatorSize.label,
unselectedLabelStyle: TextStyle(
fontSize: 18.sp,
fontWeight: FontWeight.w500,
fontFamily: "hiragino",
),
tabs: const [
Tab(text: "All Tickets (2)"),
Tab(text: "Open Tickets (2)"),
Tab(text: "Closed (1)"),
Tab(text: "Resolved (1)"),
],
),
SizedBox(
height: 0.5.sh,
child: TabBarView(children: [
ListView.builder(
itemCount: dataL.length,
itemBuilder: (ctx, index) {
return ticketCardWidget(index, "ALL");
}),
ListView.builder(
itemCount: dataL.length,
itemBuilder: (ctx, index) {
return ticketCardWidget(index, "OPEN");
}),
ListView.builder(
itemCount: dataL.length,
itemBuilder: (ctx, index) {
return ticketCardWidget(index, "CLOSED");
}),
ListView.builder(
itemCount: dataL.length,
itemBuilder: (ctx, index) {
return ticketCardWidget(index, "RESOLVED");
}),
]),
)
],
)),
]),
],
),
),
);
));
}
}
Widget ticketCardWidget(index, type) {
ContactUsController contactUsController = Get.put(ContactUsController());
return dataL[index]["type"] != type && type != "ALL"
? const SizedBox()
: InkWell(
return contactUsController.contactModel.data!.elementAt(index).status != 0
? InkWell(
onTap: () {
contactUsController.attachmentFileDetailsList.clear();
contactUsController.attachmentPathNameDetailsList.clear();
@@ -161,21 +180,48 @@ Widget ticketCardWidget(index, type) {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
text16W600(dataL[index]["id"]),
text16W600(contactUsController.contactModel.data!
.elementAt(index)
.uniqueTicketId
.toString()),
Row(
children: [
text16W500(dataL[index]["type"],
clr: dataL[index]["type"] == "OPEN"
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)
: dataL[index]["type"] == "CLOSED"
: contactUsController.contactModel.data!
.elementAt(index)
.status ==
2
? const Color(0xFF95CCFF)
: const Color(0xFF34C759)),
const Gap(8),
CircleAvatar(
radius: 10,
backgroundColor: dataL[index]["type"] == "OPEN"
backgroundColor: contactUsController
.contactModel.data!
.elementAt(index)
.status ==
1
? const Color(0xFFFFAD31)
: dataL[index]["type"] == "CLOSED"
: contactUsController.contactModel.data!
.elementAt(index)
.status ==
2
? const Color(0xFF95CCFF)
: const Color(0xFF34C759),
child: const Center(
@@ -191,9 +237,16 @@ Widget ticketCardWidget(index, type) {
],
),
const Gap(10),
text16W600(dataL[index]["date"]),
text16W600(contactUsController.contactModel.data!
.elementAt(index)
.createdAt
.toString()),
const Gap(5),
text16W400(dataL[index]["category"]),
text16W400(contactUsController.contactModel.data!
.elementAt(index)
.ticketCategory!
.name
.toString()),
const Gap(22),
Container(
padding: const EdgeInsets.symmetric(
@@ -210,7 +263,11 @@ Widget ticketCardWidget(index, type) {
),
),
child: Center(
child: text16W400(dataL[index]["desc"],
child: text16W400(
contactUsController.contactModel.data!
.elementAt(index)
.description
.toString(),
clr: const Color(0xFF9E9E9E),
textOver: TextOverflow.ellipsis),
),
@@ -219,7 +276,107 @@ Widget ticketCardWidget(index, type) {
),
),
),
);
)
: contactUsController.contactModel.data!.elementAt(index).status != 1 &&
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)
.ticketCategoryXid
.toString()),
Row(
children: [
text16W500(dataL[index]["type"],
clr: dataL[index]["type"] == "OPEN"
? const Color(0xFFFFAD31)
: dataL[index]["type"] == "CLOSED"
? const Color(0xFF95CCFF)
: const Color(0xFF34C759)),
const Gap(8),
CircleAvatar(
radius: 10,
backgroundColor: dataL[index]["type"] == "OPEN"
? const Color(0xFFFFAD31)
: dataL[index]["type"] == "CLOSED"
? const Color(0xFF95CCFF)
: const Color(0xFF34C759),
child: const Center(
child: Icon(
Icons.check_rounded,
size: 15,
color: Colors.white,
),
),
)
],
),
],
),
const Gap(10),
text16W600(dataL[index]["date"]),
const Gap(5),
text16W400(dataL[index]["category"]),
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(dataL[index]["desc"],
clr: const Color(0xFF9E9E9E),
textOver: TextOverflow.ellipsis),
),
)
],
),
),
),
)
: SizedBox();
}
List<dynamic> dataL = [

View File

@@ -1,10 +1,15 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/svg.dart';
import 'package:gap/gap.dart';
import 'package:get/get.dart';
import 'package:get/get.dart' hide MultipartFile, FormData;
import 'package:traderscircuit/Utils/base_manager.dart';
import 'package:traderscircuit/Utils/text.dart';
import 'package:traderscircuit/Utils/utils.dart';
import 'package:traderscircuit/resources/routes/route_name.dart';
import 'package:traderscircuit/view_model/ContactUsApi/contact_us_api.dart';
import '../../../Utils/Common/CustomTextFormField.dart';
import '../../../Utils/Common/FilePicker.dart';
@@ -12,13 +17,82 @@ import '../../../Utils/Common/commonBotton.dart';
import '../../../Utils/Common/custom_drop_down.dart';
import '../../../controller/contact_us_controller.dart';
import 'ticket_confirmed_bottom_sheet.dart';
import 'package:path/path.dart' as path;
class CreateTicketBottomSheet {
final GlobalKey<FormState> _addTicketform = GlobalKey<FormState>();
TextEditingController descriptionController = TextEditingController();
ContactUsController contactUsController = Get.put(ContactUsController());
int? ticketid;
// var ticketMulti;
bottomSheet(
BuildContext context,
) {
//names
List<String> namesList = [];
for (var item in contactUsController.contactCatModel.data!) {
namesList.add(item.name!);
}
// Find id corresponding to selectedValue
for (var item in contactUsController.contactCatModel.data!) {
if (item.name == contactUsController.selectedValue.toString()) {
ticketid = item.id;
break; // Stop loop once match is found
}
}
_addTicket() async {
List<MultipartFile> ticketlist = [];
for (var file in contactUsController.attachmentFileList
.where((file) => file != null)) {
ticketlist.add(
await MultipartFile.fromFile(
file!.path,
filename: path.basename(file.path),
),
);
}
// ticketMulti = await MultipartFile.fromFile(
// contactUsController.attachmentFileList,
// filename:
// path.basename(contactUsController.attachmentFileList.toString()),
// );
final isValid = _addTicketform.currentState?.validate();
if (isValid!) {
Utils.loader();
FormData formdata = FormData.fromMap({
"description": descriptionController.text,
"ticket_category_xid": ticketid,
"files[]": ticketlist,
});
final resp = await ContactUsApi().addTicketApi(formdata);
if (resp.status == ResponseStatus.SUCCESS) {
Get.back();
print("success");
TicketConfirmedBottomSheet().bottomSheet(context);
} else if (resp.status == ResponseStatus.PRIVATE) {
Get.back();
String? message = resp.data['message'];
Utils.showToast("$message");
} else if (resp.status == ResponseStatus.ERROR) {
Get.back();
String? message = resp.data['message'];
Utils.showToast("$message");
} else {
Get.back();
String? message = resp.data['message'];
Utils.showToast("$message");
}
}
}
return showModalBottomSheet(
useSafeArea: true,
isScrollControlled: true,
@@ -37,175 +111,171 @@ class CreateTicketBottomSheet {
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 20),
child: Wrap(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
children: [
GestureDetector(
onTap: () {
Get.back();
},
child: SvgPicture.asset(
"assets/images/svg/cross_cancel.svg")),
],
),
const Gap(16),
text18W600("Raise a Ticket"),
const Gap(20),
const CustomDropDownWidget(
header: "Choose your query",
listData: [
"Account Management",
"Technical Support",
"Billing and Payments",
"Feedback and Suggestions",
"Complaints and Disputes",
"Subscriptions",
"Portfolio",
"Content Buytes",
"Market Insights"
],
title: "",
),
const Gap(14),
Stack(
children: [
CustomTextFormField3(
texttype: TextInputType.multiline,
hintText: "Description (min 30 characters)",
textEditingController: descriptionController,
maxlines: 8,
validator: (value) {
if (value.isEmpty) {
return 'Enter your description';
} else if (value.toString().length < 30) {
return 'Description should be minimum 30 characters';
}
return null;
},
inputFormatters: [
LengthLimitingTextInputFormatter(150),
],
),
contactUsController.attachmentPathNameList.isEmpty
? const SizedBox()
: Positioned(
bottom: 8,
left: 9,
right: 9,
child: SizedBox(
width: 1.sw,
height: 37.h,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: contactUsController
.attachmentPathNameList.length,
itemBuilder: (ctx, index) {
return Container(
width: 210.w,
height: 37.h,
margin:
const EdgeInsets.only(right: 5),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(8),
border: Border.all(
width: 1,
color:
const Color(0xFF3A3A3A))),
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
const Gap(6),
SvgPicture.asset(
"assets/images/svg/attachment_pin.svg"),
const Gap(6),
SizedBox(
width: 120,
child: FittedBox(
child: text12W400(
contactUsController
.attachmentPathNameList[
index]))),
const Gap(15),
GestureDetector(
onTap: () {
contactUsController
.attachmentPathNameList
.removeAt(index);
contactUsController
.attachmentFileList
.removeAt(index);
},
child: SvgPicture.asset(
"assets/images/svg/cross_cancel.svg",
color:
const Color(0xFF818181),
width: 8,
height: 8,
)),
],
),
);
}),
))
],
),
contactUsController.attachmentPathNameList.length >= 3
? const SizedBox()
: const Gap(10),
contactUsController.attachmentPathNameList.length >= 3
? const SizedBox()
: InkWell(
onTap: () async {
var result = await FilePickerMethod().pickFile();
if (result != null) {
contactUsController.attachmentPathNameList
.clear();
for (var a in result) {
contactUsController.attachmentFileList.add(a);
}
for (var a
in contactUsController.attachmentFileList) {
contactUsController.attachmentPathNameList
.add(FilePickerMethod()
.extractFileName(a?.path ?? ''));
}
}
},
child: Row(
children: [
SvgPicture.asset(
"assets/images/svg/attachment_pin.svg"),
const Gap(5),
text12W400(
"Add Attachment (Max 3 files of 2MB each / Optional)"),
],
),
),
const Gap(20),
SizedBox(
width: Get.width,
child: kycBtn(
text: "Create Ticket",
onTap: () {
Get.back();
TicketConfirmedBottomSheet().bottomSheet(context);
},
bgClr: const Color(0xFF6C0000),
borderClr: const Color(0xFF990000),
Form(
key: _addTicketform,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
children: [
GestureDetector(
onTap: () {
Get.back();
},
child: SvgPicture.asset(
"assets/images/svg/cross_cancel.svg")),
],
),
),
const Gap(30),
],
const Gap(16),
text18W600("Raise a Ticket"),
const Gap(20),
CustomDropDownWidget(
header: "Choose your query",
listData: namesList,
title: "",
),
const Gap(14),
Stack(
children: [
CustomTextFormField3(
texttype: TextInputType.multiline,
hintText: "Description (min 30 characters)",
textEditingController: descriptionController,
maxlines: 8,
validator: (value) {
if (value.isEmpty) {
return 'Enter your description';
} else if (value.toString().length < 30) {
return 'Description should be minimum 30 characters';
}
return null;
},
inputFormatters: [
LengthLimitingTextInputFormatter(150),
],
),
contactUsController.attachmentPathNameList.isEmpty
? const SizedBox()
: Positioned(
bottom: 8,
left: 9,
right: 9,
child: SizedBox(
width: 1.sw,
height: 37.h,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: contactUsController
.attachmentPathNameList.length,
itemBuilder: (ctx, index) {
return Container(
width: 210.w,
height: 37.h,
margin:
const EdgeInsets.only(right: 5),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(8),
border: Border.all(
width: 1,
color: const Color(
0xFF3A3A3A))),
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
const Gap(6),
SvgPicture.asset(
"assets/images/svg/attachment_pin.svg"),
const Gap(6),
SizedBox(
width: 120,
child: FittedBox(
child: text12W400(
contactUsController
.attachmentPathNameList[
index]))),
const Gap(15),
GestureDetector(
onTap: () {
contactUsController
.attachmentPathNameList
.removeAt(index);
contactUsController
.attachmentFileList
.removeAt(index);
},
child: SvgPicture.asset(
"assets/images/svg/cross_cancel.svg",
color: const Color(
0xFF818181),
width: 8,
height: 8,
)),
],
),
);
}),
))
],
),
contactUsController.attachmentPathNameList.length >= 3
? const SizedBox()
: const Gap(10),
contactUsController.attachmentPathNameList.length >= 3
? const SizedBox()
: InkWell(
onTap: () async {
var result =
await FilePickerMethod().pickFile();
if (result != null) {
contactUsController.attachmentPathNameList
.clear();
for (var a in result) {
contactUsController.attachmentFileList
.add(a);
}
for (var a in contactUsController
.attachmentFileList) {
contactUsController.attachmentPathNameList
.add(FilePickerMethod()
.extractFileName(a?.path ?? ''));
}
}
},
child: Row(
children: [
SvgPicture.asset(
"assets/images/svg/attachment_pin.svg"),
const Gap(5),
text12W400(
"Add Attachment (Max 3 files of 2MB each / Optional)"),
],
),
),
const Gap(20),
SizedBox(
width: Get.width,
child: kycBtn(
text: "Create Ticket",
onTap: () {
Get.back();
// TicketConfirmedBottomSheet().bottomSheet(context);
_addTicket();
},
bgClr: const Color(0xFF6C0000),
borderClr: const Color(0xFF990000),
),
),
const Gap(30),
],
),
)
],
),