contact ui, create ticket
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:glassmorphism/glassmorphism.dart';
|
||||
|
||||
class CustomTextFormField extends StatefulWidget {
|
||||
@@ -65,8 +66,8 @@ class _CustomTextFormFieldState extends State<CustomTextFormField> {
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFffffff).withOpacity(0.1),
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
const Color(0xFFffffff).withOpacity(0.1),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: [
|
||||
0.1,
|
||||
@@ -76,8 +77,8 @@ class _CustomTextFormFieldState extends State<CustomTextFormField> {
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xff9A0000).withOpacity(0.5),
|
||||
Color(0xFFffffff).withOpacity(0.5),
|
||||
const Color(0xff9A0000).withOpacity(0.5),
|
||||
const Color(0xFFffffff).withOpacity(0.5),
|
||||
],
|
||||
),
|
||||
child: TextFormField(
|
||||
@@ -126,9 +127,9 @@ class _CustomTextFormFieldState extends State<CustomTextFormField> {
|
||||
? null
|
||||
: widget.suffixIcon!,
|
||||
border: InputBorder.none,
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 10),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
),
|
||||
style: TextStyle(color: Colors.white),
|
||||
style: const TextStyle(color: Colors.white),
|
||||
keyboardType: widget.texttype,
|
||||
// validator: widget.validator ??
|
||||
// (value) {
|
||||
@@ -145,3 +146,145 @@ class _CustomTextFormFieldState extends State<CustomTextFormField> {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CustomTextFormField1 extends StatefulWidget {
|
||||
const CustomTextFormField1({
|
||||
Key? key,
|
||||
this.validator,
|
||||
this.textEditingController,
|
||||
this.hintText,
|
||||
this.leadingIcon,
|
||||
this.prefixIconColor = const Color(0xFF737373),
|
||||
this.isInputPassword = false,
|
||||
this.validatorText,
|
||||
this.value,
|
||||
this.readonly = false,
|
||||
this.enabled = true,
|
||||
this.maxlines = 1,
|
||||
this.texttype,
|
||||
this.inputFormatters,
|
||||
this.onInput,
|
||||
this.onTap,
|
||||
this.suffixIcon,
|
||||
}) : super(key: key);
|
||||
|
||||
final dynamic validator;
|
||||
final TextEditingController? textEditingController;
|
||||
final String? hintText;
|
||||
final Widget? leadingIcon;
|
||||
final Color prefixIconColor;
|
||||
final bool isInputPassword;
|
||||
final String? validatorText;
|
||||
final String? value;
|
||||
final bool readonly;
|
||||
final bool enabled;
|
||||
final int maxlines;
|
||||
final TextInputType? texttype;
|
||||
final dynamic inputFormatters;
|
||||
final Function(String)? onInput;
|
||||
final VoidCallback? onTap;
|
||||
final Widget? suffixIcon;
|
||||
|
||||
@override
|
||||
State<CustomTextFormField1> createState() => _CustomTextFormField1State();
|
||||
}
|
||||
|
||||
class _CustomTextFormField1State extends State<CustomTextFormField1> {
|
||||
late bool obscureText;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
obscureText = widget.isInputPassword;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TextFormField(
|
||||
cursorColor: Colors.red,
|
||||
initialValue: widget.value,
|
||||
readOnly: widget.readonly,
|
||||
onTap: widget.onTap,
|
||||
enabled: widget.enabled,
|
||||
enableInteractiveSelection: false,
|
||||
maxLines: widget.maxlines,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
obscureText: obscureText,
|
||||
controller: widget.textEditingController,
|
||||
decoration: InputDecoration(
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
vertical: 15,
|
||||
horizontal: 14,
|
||||
),
|
||||
hintText: widget.hintText,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
borderSide: const BorderSide(color: Color(0XFF3A3A3A), width: 1),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
borderSide: const BorderSide(color: Color(0XFF3A3A3A), width: 1),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
borderSide: const BorderSide(color: Color(0XFF3A3A3A), width: 1),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: const BorderSide(color: Colors.red, width: 1),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderSide: const BorderSide(color: Colors.red, width: 1),
|
||||
),
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 16.sp, fontFamily: "manrope", color: Colors.white),
|
||||
prefixIconColor: widget.prefixIconColor,
|
||||
// ignore: prefer_null_aware_operators
|
||||
prefixIcon: widget.leadingIcon == null ? null : widget.leadingIcon!,
|
||||
suffixIcon: widget.isInputPassword
|
||||
? GestureDetector(
|
||||
onTap: () => setState(() => obscureText = !obscureText),
|
||||
child: obscureText
|
||||
? const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 20.0),
|
||||
child: Icon(Icons.remove_red_eye),
|
||||
),
|
||||
],
|
||||
)
|
||||
: const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 20.0),
|
||||
child: Icon(
|
||||
Icons.remove_red_eye_outlined,
|
||||
color: Color(0xFF959595),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: widget.suffixIcon == null
|
||||
? null
|
||||
: widget.suffixIcon!,
|
||||
),
|
||||
style: const TextStyle(color: Colors.white),
|
||||
keyboardType: widget.texttype,
|
||||
validator: widget.validator ??
|
||||
(value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return "Empty value";
|
||||
}
|
||||
return null;
|
||||
},
|
||||
inputFormatters: widget.inputFormatters,
|
||||
onChanged: (value) {
|
||||
widget.onInput?.call(value);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
40
lib/Utils/Common/FilePicker.dart
Normal file
40
lib/Utils/Common/FilePicker.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:traderscircuit/Utils/Dialogs.dart';
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:traderscircuit/controller/contact_us_controller.dart';
|
||||
|
||||
class FilePickerMethod {
|
||||
ContactUsController contactUsController = Get.put(ContactUsController());
|
||||
String extractFileName(String filePath) {
|
||||
return path.basename(filePath);
|
||||
}
|
||||
|
||||
Future<List<File?>?> pickFile() async {
|
||||
FilePickerResult? result = await FilePicker.platform.pickFiles(
|
||||
allowMultiple: true,
|
||||
allowCompression: true, compressionQuality: 50,
|
||||
type: FileType.custom,
|
||||
allowedExtensions: [
|
||||
'jpg',
|
||||
'jpeg',
|
||||
'png',
|
||||
'pdf'
|
||||
], // Define the allowed file types
|
||||
);
|
||||
|
||||
if (result != null) {
|
||||
if (contactUsController.attachmentFileList.length + result.count > 3) {
|
||||
utils.showToast("Can Select Max 3 Files");
|
||||
return null;
|
||||
} else {
|
||||
return result.paths.map((path) => File(path!)).toList();
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,13 +45,16 @@ Widget text18W500(String text) {
|
||||
);
|
||||
}
|
||||
|
||||
Widget text18W400(String text) {
|
||||
Widget text18W400(String text,
|
||||
{TextAlign texAl = TextAlign.start, double heightV = 1.5}) {
|
||||
return Text(
|
||||
text,
|
||||
textAlign: texAl,
|
||||
style: TextStyle(
|
||||
fontSize: 18.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400,
|
||||
height: heightV,
|
||||
fontFamily: 'manrope'),
|
||||
);
|
||||
}
|
||||
@@ -69,12 +72,14 @@ Widget text24W500(String text) {
|
||||
);
|
||||
}
|
||||
|
||||
Widget text16W400(String text) {
|
||||
Widget text16W400(String text,
|
||||
{Color clr = Colors.white, TextOverflow textOver = TextOverflow.clip}) {
|
||||
return Text(
|
||||
text,
|
||||
overflow: textOver,
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
color: clr,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'manrope'),
|
||||
);
|
||||
@@ -124,12 +129,12 @@ Widget text16W600(String text) {
|
||||
);
|
||||
}
|
||||
|
||||
Widget text16W500(String text) {
|
||||
Widget text16W500(String text, {Color clr = Colors.white}) {
|
||||
return Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
color: clr,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontFamily: 'manrope'),
|
||||
);
|
||||
@@ -167,6 +172,7 @@ Widget text12W400(String text) {
|
||||
fontFamily: 'manrope'),
|
||||
);
|
||||
}
|
||||
|
||||
Widget text12W500(String text) {
|
||||
return Text(
|
||||
text,
|
||||
|
||||
8
lib/controller/contact_us_controller.dart
Normal file
8
lib/controller/contact_us_controller.dart
Normal file
@@ -0,0 +1,8 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class ContactUsController extends GetxController {
|
||||
RxList<File?> attachmentFileList = [File("")].obs;
|
||||
RxList<String> attachmentPathNameList = [""].obs;
|
||||
}
|
||||
@@ -16,8 +16,6 @@ class RouteName {
|
||||
static const String notification = '/notification';
|
||||
static const String exploreUnseen = '/exploreUnseen';
|
||||
|
||||
|
||||
|
||||
static const String verifyotp = '/verifyotp';
|
||||
|
||||
//secureaccess
|
||||
@@ -40,4 +38,7 @@ class RouteName {
|
||||
static const String termsandcondition = '/termsandcondition';
|
||||
static const String privacypolicy = '/privacypolicy';
|
||||
static const String aboutus = '/aboutus';
|
||||
|
||||
//contact us
|
||||
static const String contactUsMain = '/contactUsMain';
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:traderscircuit/view/MainScreen/ExploreUnseen.dart';
|
||||
import 'package:traderscircuit/view/Sidemenu/AboutUs.dart';
|
||||
import 'package:traderscircuit/view/Sidemenu/PrivacyPolicy.dart';
|
||||
import 'package:traderscircuit/view/Sidemenu/TermsAndCondition.dart';
|
||||
import 'package:traderscircuit/view/Sidemenu/contactUs/contact_us_main.dart';
|
||||
|
||||
import 'package:traderscircuit/view/login/AddDetails.dart';
|
||||
import 'package:traderscircuit/view/login/Kyc.dart';
|
||||
@@ -140,5 +141,11 @@ class AppRoutes {
|
||||
name: RouteName.aboutus,
|
||||
page: () => const AboutUs(),
|
||||
),
|
||||
|
||||
//contact us
|
||||
GetPage(
|
||||
name: RouteName.contactUsMain,
|
||||
page: () => const ContactUsMainScreen(),
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import 'package:get/get.dart';
|
||||
import 'package:traderscircuit/Utils/Common/sized_box.dart';
|
||||
import 'package:traderscircuit/Utils/text.dart';
|
||||
import 'package:traderscircuit/resources/routes/route_name.dart';
|
||||
import 'package:traderscircuit/view/onBoarding/splashScreen1.dart';
|
||||
|
||||
class SideMenu extends StatefulWidget {
|
||||
const SideMenu({super.key});
|
||||
@@ -16,7 +15,10 @@ class SideMenu extends StatefulWidget {
|
||||
|
||||
class _SideMenuState extends State<SideMenu> {
|
||||
List sideBarData = [
|
||||
{"imagePath": "assets/images/svg/sidemenu/Faq.svg", "text": "FAQ’s"},
|
||||
{
|
||||
"imagePath": "assets/images/svg/sidemenu/Faq.svg",
|
||||
"text": "FAQ’s",
|
||||
},
|
||||
{
|
||||
"imagePath": "assets/images/svg/sidemenu/contact.svg",
|
||||
"text": "Contact Us"
|
||||
@@ -62,9 +64,9 @@ class _SideMenuState extends State<SideMenu> {
|
||||
child: Container(
|
||||
width: 25.w,
|
||||
height: 25.h,
|
||||
decoration: ShapeDecoration(
|
||||
decoration: const ShapeDecoration(
|
||||
color: Colors.black,
|
||||
shape: const OvalBorder(),
|
||||
shape: OvalBorder(),
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.center,
|
||||
@@ -105,13 +107,13 @@ class _SideMenuState extends State<SideMenu> {
|
||||
Container(
|
||||
width: 80.w,
|
||||
height: 80.h,
|
||||
decoration: ShapeDecoration(
|
||||
decoration: const ShapeDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
"assets/images/png/Ellipse 560.png"),
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
shape: const OvalBorder(),
|
||||
shape: OvalBorder(),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(20.w),
|
||||
@@ -131,7 +133,7 @@ class _SideMenuState extends State<SideMenu> {
|
||||
Container(
|
||||
height: 1,
|
||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Color.fromRGBO(176, 176, 176, 0.5),
|
||||
@@ -152,7 +154,7 @@ class _SideMenuState extends State<SideMenu> {
|
||||
width: 122.w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6.r),
|
||||
color: Color(0xFF34C759),
|
||||
color: const Color(0xFF34C759),
|
||||
),
|
||||
child: Center(child: text14W500_black('Upgrade')),
|
||||
),
|
||||
@@ -166,7 +168,7 @@ class _SideMenuState extends State<SideMenu> {
|
||||
Container(
|
||||
height: 1,
|
||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Color.fromRGBO(176, 176, 176, 0.5),
|
||||
@@ -192,7 +194,7 @@ class _SideMenuState extends State<SideMenu> {
|
||||
Container(
|
||||
height: 1,
|
||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Color.fromRGBO(176, 176, 176, 0.5),
|
||||
@@ -213,8 +215,8 @@ class _SideMenuState extends State<SideMenu> {
|
||||
width: 122.w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6.r),
|
||||
color: Color(0xFF3A3A3A).withOpacity(0.6),
|
||||
border: Border.all(color: Color(0xFF9A0000))),
|
||||
color: const Color(0xFF3A3A3A).withOpacity(0.6),
|
||||
border: Border.all(color: const Color(0xFF9A0000))),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
||||
child: Row(
|
||||
@@ -224,7 +226,7 @@ class _SideMenuState extends State<SideMenu> {
|
||||
Container(
|
||||
height: 30.h,
|
||||
width: 30.h,
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
'assets/images/png/Ellipse 1498.png',
|
||||
@@ -238,15 +240,13 @@ class _SideMenuState extends State<SideMenu> {
|
||||
),
|
||||
selected: true,
|
||||
onTap: () {
|
||||
setState(() {
|
||||
// Get.toNamed(RouteName.privacypolicy);
|
||||
});
|
||||
Get.toNamed(RouteName.kyc);
|
||||
},
|
||||
),
|
||||
Container(
|
||||
height: 1,
|
||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Color.fromRGBO(176, 176, 176, 0.5),
|
||||
@@ -267,7 +267,7 @@ class _SideMenuState extends State<SideMenu> {
|
||||
width: 122.w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6.r),
|
||||
color: Color(0xFF0093FF),
|
||||
color: const Color(0xFF0093FF),
|
||||
),
|
||||
child: Center(child: text14W500('Conservative')),
|
||||
),
|
||||
@@ -284,6 +284,7 @@ class _SideMenuState extends State<SideMenu> {
|
||||
image: sideBarData[index]["imagePath"],
|
||||
text: sideBarData[index]["text"],
|
||||
onTap: () {
|
||||
print(index);
|
||||
navigateTo(index, context);
|
||||
},
|
||||
);
|
||||
@@ -367,7 +368,7 @@ LogOutdialog(context) {
|
||||
color: const Color(0xFFFFFFFF)),
|
||||
),
|
||||
sizedBoxHeight(40.h),
|
||||
Row(
|
||||
const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
// SizedBox(
|
||||
@@ -408,7 +409,7 @@ void navigateTo(int index, BuildContext context) {
|
||||
|
||||
case 1:
|
||||
{
|
||||
// Get.toNamed(RouteName.feedback);
|
||||
Get.toNamed(RouteName.contactUsMain);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -420,7 +421,7 @@ void navigateTo(int index, BuildContext context) {
|
||||
|
||||
case 3:
|
||||
{
|
||||
// Get.toNamed(RouteName.contactUs);
|
||||
// Get.toNamed(RouteName.contactUsMain);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -517,7 +518,7 @@ void navigateTo(int index, BuildContext context) {
|
||||
child: Container(
|
||||
width: 150.w,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF3192D8),
|
||||
color: const Color(0xFF3192D8),
|
||||
borderRadius: BorderRadius.circular(5.r),
|
||||
),
|
||||
child: Padding(
|
||||
@@ -568,7 +569,7 @@ class sideBarTile extends StatelessWidget {
|
||||
Container(
|
||||
height: 1,
|
||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: Color.fromRGBO(176, 176, 176, 0.5),
|
||||
|
||||
241
lib/view/Sidemenu/contactUs/contact_us_main.dart
Normal file
241
lib/view/Sidemenu/contactUs/contact_us_main.dart
Normal file
@@ -0,0 +1,241 @@
|
||||
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 '../../../Utils/Common/CommonAppbar.dart';
|
||||
import '../../../Utils/Common/commonBotton.dart';
|
||||
import '../../../Utils/text.dart';
|
||||
import '../../onBoarding/splashScreen1.dart';
|
||||
import 'create_ticket_bottom_sheet.dart';
|
||||
|
||||
class ContactUsMainScreen extends StatefulWidget {
|
||||
const ContactUsMainScreen({super.key});
|
||||
|
||||
@override
|
||||
State<ContactUsMainScreen> createState() => _ContactUsMainScreenState();
|
||||
}
|
||||
|
||||
class _ContactUsMainScreenState extends State<ContactUsMainScreen> {
|
||||
ContactUsController contactUsController = Get.put(ContactUsController());
|
||||
@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),
|
||||
),
|
||||
),
|
||||
),
|
||||
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: "manrope",
|
||||
),
|
||||
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: "manrope",
|
||||
),
|
||||
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) {
|
||||
return dataL[index]["type"] != type && type != "ALL"
|
||||
? SizedBox()
|
||||
: 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(dataL[index]["id"]),
|
||||
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),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
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"
|
||||
}
|
||||
];
|
||||
219
lib/view/Sidemenu/contactUs/create_ticket_bottom_sheet.dart
Normal file
219
lib/view/Sidemenu/contactUs/create_ticket_bottom_sheet.dart
Normal file
@@ -0,0 +1,219 @@
|
||||
import 'dart:developer';
|
||||
import 'dart:io';
|
||||
|
||||
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:traderscircuit/Utils/text.dart';
|
||||
|
||||
import '../../../Utils/Common/CustomTextFormField.dart';
|
||||
import '../../../Utils/Common/FilePicker.dart';
|
||||
import '../../../Utils/Common/commonBotton.dart';
|
||||
import '../../../Utils/Common/custom_drop_down.dart';
|
||||
import '../../../controller/contact_us_controller.dart';
|
||||
import 'ticket_confirmed_bottom_sheet.dart';
|
||||
|
||||
class CreateTicketBottomSheet {
|
||||
TextEditingController descriptionController = TextEditingController();
|
||||
ContactUsController contactUsController = Get.put(ContactUsController());
|
||||
bottomSheet(
|
||||
BuildContext context,
|
||||
) {
|
||||
return showModalBottomSheet(
|
||||
useSafeArea: true,
|
||||
isScrollControlled: true,
|
||||
context: context,
|
||||
backgroundColor: const Color(0xFF101111),
|
||||
isDismissible: false,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(8.r),
|
||||
topRight: Radius.circular(8.r),
|
||||
),
|
||||
),
|
||||
builder: (BuildContext context) {
|
||||
return Obx(
|
||||
() => Container(
|
||||
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"
|
||||
],
|
||||
),
|
||||
const Gap(14),
|
||||
Stack(
|
||||
children: [
|
||||
CustomTextFormField1(
|
||||
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(6),
|
||||
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),
|
||||
),
|
||||
),
|
||||
const Gap(30),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
import 'package:flutter/material.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:lottie/lottie.dart';
|
||||
import 'package:traderscircuit/Utils/text.dart';
|
||||
|
||||
import '../../../Utils/Common/commonBotton.dart';
|
||||
|
||||
class TicketConfirmedBottomSheet {
|
||||
bottomSheet(
|
||||
BuildContext context,
|
||||
) {
|
||||
return showModalBottomSheet(
|
||||
useSafeArea: true,
|
||||
isScrollControlled: true,
|
||||
context: context,
|
||||
backgroundColor: const Color(0xFF101111),
|
||||
isDismissible: false,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(8.r),
|
||||
topRight: Radius.circular(8.r),
|
||||
),
|
||||
),
|
||||
builder: (BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 20),
|
||||
child: Wrap(
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
"assets/images/svg/cross_cancel.svg")),
|
||||
],
|
||||
),
|
||||
const Gap(22),
|
||||
Lottie.asset(
|
||||
'assets/images/png/check_lottie.json',
|
||||
width: 140,
|
||||
height: 140,
|
||||
),
|
||||
const Gap(10),
|
||||
text18W600("#18663765"),
|
||||
const Gap(8),
|
||||
text18W400(
|
||||
"Your ticket has been created successfully. our support team will get back to you in 24-48 business hours.",
|
||||
texAl: TextAlign.center,
|
||||
heightV: 2,
|
||||
),
|
||||
const Gap(35),
|
||||
SizedBox(
|
||||
width: Get.width,
|
||||
child: kycBtn(
|
||||
text: "Done",
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
bgClr: const Color(0xFF6C0000),
|
||||
borderClr: const Color(0xFF990000),
|
||||
),
|
||||
),
|
||||
const Gap(30),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,6 @@ import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:glassmorphism/glassmorphism.dart';
|
||||
import 'package:traderscircuit/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:traderscircuit/Utils/Common/CommonDropdown.dart';
|
||||
import 'package:traderscircuit/Utils/Common/CustomTextFormField.dart';
|
||||
import 'package:traderscircuit/Utils/Common/commonBotton.dart';
|
||||
import 'package:traderscircuit/Utils/text.dart';
|
||||
|
||||
Reference in New Issue
Block a user