From be39551790c6e26df217864bc2fa7970afd68c8d Mon Sep 17 00:00:00 2001 From: jayesh Date: Fri, 22 Mar 2024 17:21:40 +0530 Subject: [PATCH 1/2] contact ui, create ticket --- assets/images/png/check_lottie.json | 1 + assets/images/svg/attachment_pin.svg | 7 + assets/images/svg/cross_cancel.svg | 3 + lib/Utils/Common/CustomTextFormField.dart | 155 ++++++++++- lib/Utils/Common/FilePicker.dart | 40 +++ lib/Utils/text.dart | 16 +- lib/controller/contact_us_controller.dart | 8 + lib/resources/routes/route_name.dart | 5 +- lib/resources/routes/routes.dart | 7 + lib/view/Sidemenu/Sidemenu.dart | 47 ++-- .../Sidemenu/contactUs/contact_us_main.dart | 241 ++++++++++++++++++ .../contactUs/create_ticket_bottom_sheet.dart | 219 ++++++++++++++++ .../ticket_confirmed_bottom_sheet.dart | 83 ++++++ lib/view/login/Kyc.dart | 1 - pubspec.lock | 48 ++++ pubspec.yaml | 2 + 16 files changed, 846 insertions(+), 37 deletions(-) create mode 100644 assets/images/png/check_lottie.json create mode 100644 assets/images/svg/attachment_pin.svg create mode 100644 assets/images/svg/cross_cancel.svg create mode 100644 lib/Utils/Common/FilePicker.dart create mode 100644 lib/controller/contact_us_controller.dart create mode 100644 lib/view/Sidemenu/contactUs/contact_us_main.dart create mode 100644 lib/view/Sidemenu/contactUs/create_ticket_bottom_sheet.dart create mode 100644 lib/view/Sidemenu/contactUs/ticket_confirmed_bottom_sheet.dart diff --git a/assets/images/png/check_lottie.json b/assets/images/png/check_lottie.json new file mode 100644 index 0000000..b2d5208 --- /dev/null +++ b/assets/images/png/check_lottie.json @@ -0,0 +1 @@ +{"v":"5.5.7","meta":{"g":"LottieFiles AE 0.1.20","a":"","k":"","d":"","tc":""},"fr":29.9700012207031,"ip":0,"op":91.000003706506,"w":1080,"h":1080,"nm":"CHECK","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 8","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":315,"ix":10},"p":{"a":0,"k":[552,540,0],"ix":2},"a":{"a":0,"k":[-396,-26.286,0],"ix":1},"s":{"a":0,"k":[70,70,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-236,-32],[94.286,-32]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.432],"y":[1]},"o":{"x":[0.622],"y":[0]},"t":4.2,"s":[0]},{"t":14.0000005702317,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.442],"y":[1]},"o":{"x":[0.609],"y":[0]},"t":0,"s":[0]},{"t":10.2675004182038,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.133333333333,0.800000059838,0.533333333333,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":65,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":94.0000038286985,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 7","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":270,"ix":10},"p":{"a":0,"k":[552,540,0],"ix":2},"a":{"a":0,"k":[-396,-26.286,0],"ix":1},"s":{"a":0,"k":[70,70,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-236,-32],[94.286,-32]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.432],"y":[1]},"o":{"x":[0.622],"y":[0]},"t":4.2,"s":[0]},{"t":14.0000005702317,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.442],"y":[1]},"o":{"x":[0.609],"y":[0]},"t":0,"s":[0]},{"t":10.2675004182038,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.133333333333,0.800000059838,0.533333333333,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":65,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":94.0000038286985,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 6","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":225,"ix":10},"p":{"a":0,"k":[552,540,0],"ix":2},"a":{"a":0,"k":[-396,-26.286,0],"ix":1},"s":{"a":0,"k":[70,70,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-236,-32],[94.286,-32]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.432],"y":[1]},"o":{"x":[0.622],"y":[0]},"t":4.2,"s":[0]},{"t":14.0000005702317,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.442],"y":[1]},"o":{"x":[0.609],"y":[0]},"t":0,"s":[0]},{"t":10.2675004182038,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.133333333333,0.800000059838,0.533333333333,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":65,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":94.0000038286985,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Shape Layer 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":180,"ix":10},"p":{"a":0,"k":[552,540,0],"ix":2},"a":{"a":0,"k":[-396,-26.286,0],"ix":1},"s":{"a":0,"k":[70,70,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-236,-32],[94.286,-32]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.432],"y":[1]},"o":{"x":[0.622],"y":[0]},"t":4.2,"s":[0]},{"t":14.0000005702317,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.442],"y":[1]},"o":{"x":[0.609],"y":[0]},"t":0,"s":[0]},{"t":10.2675004182038,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.133333333333,0.800000059838,0.533333333333,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":65,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":94.0000038286985,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Shape Layer 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":135,"ix":10},"p":{"a":0,"k":[552,540,0],"ix":2},"a":{"a":0,"k":[-396,-26.286,0],"ix":1},"s":{"a":0,"k":[70,70,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-236,-32],[94.286,-32]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.432],"y":[1]},"o":{"x":[0.622],"y":[0]},"t":4.2,"s":[0]},{"t":14.0000005702317,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.442],"y":[1]},"o":{"x":[0.609],"y":[0]},"t":0,"s":[0]},{"t":10.2675004182038,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.133333333333,0.800000059838,0.533333333333,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":65,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":94.0000038286985,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Shape Layer 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90,"ix":10},"p":{"a":0,"k":[552,540,0],"ix":2},"a":{"a":0,"k":[-396,-26.286,0],"ix":1},"s":{"a":0,"k":[70,70,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-236,-32],[94.286,-32]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.432],"y":[1]},"o":{"x":[0.622],"y":[0]},"t":4.2,"s":[0]},{"t":14.0000005702317,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.442],"y":[1]},"o":{"x":[0.609],"y":[0]},"t":0,"s":[0]},{"t":10.2675004182038,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.133333333333,0.800000059838,0.533333333333,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":65,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":94.0000038286985,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":45,"ix":10},"p":{"a":0,"k":[552,540,0],"ix":2},"a":{"a":0,"k":[-396,-26.286,0],"ix":1},"s":{"a":0,"k":[70,70,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-236,-32],[94.286,-32]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.432],"y":[1]},"o":{"x":[0.622],"y":[0]},"t":4.2,"s":[0]},{"t":14.0000005702317,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.442],"y":[1]},"o":{"x":[0.609],"y":[0]},"t":0,"s":[0]},{"t":10.2675004182038,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.133333333333,0.800000059838,0.533333333333,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":65,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":94.0000038286985,"st":0,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[552,540,0],"ix":2},"a":{"a":0,"k":[-396,-26.286,0],"ix":1},"s":{"a":0,"k":[70,70,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-236,-32],[94.286,-32]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.432],"y":[1]},"o":{"x":[0.622],"y":[0]},"t":4.2,"s":[0]},{"t":14.0000005702317,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.442],"y":[1]},"o":{"x":[0.609],"y":[0]},"t":0,"s":[0]},{"t":10.2675004182038,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.133333333333,0.800000059838,0.533333333333,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":65,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":94.0000038286985,"st":0,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"Comp 2","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[496,220,0],"ix":2},"a":{"a":0,"k":[540,540,0],"ix":1},"s":{"a":0,"k":[31.111,31.111,100],"ix":6}},"ao":0,"w":1080,"h":1080,"ip":14.0000005702317,"op":108.00000439893,"st":14.0000005702317,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[524,552,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-156,36],[-32,160],[220,-140]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":59,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.221],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":28,"s":[0]},{"i":{"x":[0.191],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":44,"s":[100]},{"t":59.0000024031193,"s":[87]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":28.0000011404634,"op":122.000004969162,"st":28.0000011404634,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[540,540,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[60,60,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[1080,1080],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.133333333333,0.800000059838,0.533333333333,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":65,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.113],"y":[1]},"o":{"x":[0.647],"y":[0]},"t":0,"s":[0]},{"t":22.0000008960784,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":94.0000038286985,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Shape Layer 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[540,540,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.321,0.321,0.667],"y":[1,1,1]},"o":{"x":[0.725,0.725,0.333],"y":[0,0,0]},"t":17,"s":[0,0,100]},{"t":40.0000016292334,"s":[60,60,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[1080,1080],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.956862984452,0.145097994337,0.203922002456,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.131938231225,0.799417892157,0.534389181698,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":17.0000006924242,"op":111.000004521123,"st":17.0000006924242,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/assets/images/svg/attachment_pin.svg b/assets/images/svg/attachment_pin.svg new file mode 100644 index 0000000..c4234ad --- /dev/null +++ b/assets/images/svg/attachment_pin.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/images/svg/cross_cancel.svg b/assets/images/svg/cross_cancel.svg new file mode 100644 index 0000000..82261ce --- /dev/null +++ b/assets/images/svg/cross_cancel.svg @@ -0,0 +1,3 @@ + + + diff --git a/lib/Utils/Common/CustomTextFormField.dart b/lib/Utils/Common/CustomTextFormField.dart index 18fba02..32a621b 100644 --- a/lib/Utils/Common/CustomTextFormField.dart +++ b/lib/Utils/Common/CustomTextFormField.dart @@ -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 { 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 { 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 { ? 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 { ); } } + +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 createState() => _CustomTextFormField1State(); +} + +class _CustomTextFormField1State extends State { + 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); + }, + ); + } +} diff --git a/lib/Utils/Common/FilePicker.dart b/lib/Utils/Common/FilePicker.dart new file mode 100644 index 0000000..2f52b82 --- /dev/null +++ b/lib/Utils/Common/FilePicker.dart @@ -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?> 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; + } + } +} diff --git a/lib/Utils/text.dart b/lib/Utils/text.dart index 1d8141f..017d20e 100644 --- a/lib/Utils/text.dart +++ b/lib/Utils/text.dart @@ -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, diff --git a/lib/controller/contact_us_controller.dart b/lib/controller/contact_us_controller.dart new file mode 100644 index 0000000..5ce64ef --- /dev/null +++ b/lib/controller/contact_us_controller.dart @@ -0,0 +1,8 @@ +import 'dart:io'; + +import 'package:get/get.dart'; + +class ContactUsController extends GetxController { + RxList attachmentFileList = [File("")].obs; + RxList attachmentPathNameList = [""].obs; +} diff --git a/lib/resources/routes/route_name.dart b/lib/resources/routes/route_name.dart index 60a26a0..d2497ba 100644 --- a/lib/resources/routes/route_name.dart +++ b/lib/resources/routes/route_name.dart @@ -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'; } diff --git a/lib/resources/routes/routes.dart b/lib/resources/routes/routes.dart index d233d14..cdc6971 100644 --- a/lib/resources/routes/routes.dart +++ b/lib/resources/routes/routes.dart @@ -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(), + ) ]; } diff --git a/lib/view/Sidemenu/Sidemenu.dart b/lib/view/Sidemenu/Sidemenu.dart index ca68bf7..c20ab17 100644 --- a/lib/view/Sidemenu/Sidemenu.dart +++ b/lib/view/Sidemenu/Sidemenu.dart @@ -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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { ), 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 { 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 { 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), diff --git a/lib/view/Sidemenu/contactUs/contact_us_main.dart b/lib/view/Sidemenu/contactUs/contact_us_main.dart new file mode 100644 index 0000000..dbd7426 --- /dev/null +++ b/lib/view/Sidemenu/contactUs/contact_us_main.dart @@ -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 createState() => _ContactUsMainScreenState(); +} + +class _ContactUsMainScreenState extends State { + 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 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" + } +]; diff --git a/lib/view/Sidemenu/contactUs/create_ticket_bottom_sheet.dart b/lib/view/Sidemenu/contactUs/create_ticket_bottom_sheet.dart new file mode 100644 index 0000000..c7128f1 --- /dev/null +++ b/lib/view/Sidemenu/contactUs/create_ticket_bottom_sheet.dart @@ -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), + ], + ) + ], + ), + ), + ); + }, + ); + } +} diff --git a/lib/view/Sidemenu/contactUs/ticket_confirmed_bottom_sheet.dart b/lib/view/Sidemenu/contactUs/ticket_confirmed_bottom_sheet.dart new file mode 100644 index 0000000..b419b62 --- /dev/null +++ b/lib/view/Sidemenu/contactUs/ticket_confirmed_bottom_sheet.dart @@ -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), + ], + ) + ], + ), + ); + }, + ); + } +} diff --git a/lib/view/login/Kyc.dart b/lib/view/login/Kyc.dart index 488328b..00759e0 100644 --- a/lib/view/login/Kyc.dart +++ b/lib/view/login/Kyc.dart @@ -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'; diff --git a/pubspec.lock b/pubspec.lock index 6eb065e..ac31d40 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,14 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + archive: + dependency: transitive + description: + name: archive + sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d" + url: "https://pub.dev" + source: hosted + version: "3.4.10" args: dependency: transitive description: @@ -65,6 +73,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.4" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" cross_file: dependency: transitive description: @@ -73,6 +89,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.3+7" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" cupertino_icons: dependency: "direct main" description: @@ -129,6 +153,14 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.0" + file_picker: + dependency: "direct main" + description: + name: file_picker + sha256: d1d0ac3966b36dc3e66eeefb40280c17feb87fa2099c6e22e6a1fc959327bd03 + url: "https://pub.dev" + source: hosted + version: "8.0.0+1" file_selector_linux: dependency: transitive description: @@ -360,6 +392,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + lottie: + dependency: "direct main" + description: + name: lottie + sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + url: "https://pub.dev" + source: hosted + version: "2.7.0" matcher: dependency: transitive description: @@ -480,6 +520,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" + pointycastle: + dependency: transitive + description: + name: pointycastle + sha256: "43ac87de6e10afabc85c445745a7b799e04de84cebaa4fd7bf55a5e1e9604d29" + url: "https://pub.dev" + source: hosted + version: "3.7.4" shared_preferences: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index f0a1945..e84b270 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -26,6 +26,8 @@ dependencies: image_picker: ^1.0.7 dotted_border: ^2.1.0 image_cropper: ^4.0.1 + file_picker: ^8.0.0+1 + lottie: ^2.7.0 dev_dependencies: flutter_test: From 9d2f9abc634d156990792ed559966644aa69b833 Mon Sep 17 00:00:00 2001 From: jayesh Date: Tue, 26 Mar 2024 13:46:22 +0530 Subject: [PATCH 2/2] contact us detaile screen ui --- lib/Utils/text.dart | 9 +- lib/controller/contact_us_controller.dart | 30 ++ lib/resources/routes/route_name.dart | 1 + lib/resources/routes/routes.dart | 5 + .../contactUs/cancel_ticket_bottom_sheet.dart | 101 +++++ .../contactUs/contact_us_details.dart | 392 ++++++++++++++++++ .../Sidemenu/contactUs/contact_us_main.dart | 165 ++++---- 7 files changed, 620 insertions(+), 83 deletions(-) create mode 100644 lib/view/Sidemenu/contactUs/cancel_ticket_bottom_sheet.dart create mode 100644 lib/view/Sidemenu/contactUs/contact_us_details.dart diff --git a/lib/Utils/text.dart b/lib/Utils/text.dart index d80cd16..e0ee671 100644 --- a/lib/Utils/text.dart +++ b/lib/Utils/text.dart @@ -35,9 +35,10 @@ Widget text18W800(String text) { ); } -Widget text18W600(String text) { +Widget text18W600(String text, {TextAlign textAl = TextAlign.start}) { return Text( text, + textAlign: textAl, style: TextStyle( fontSize: 18.sp, color: Colors.white, @@ -130,12 +131,12 @@ Widget text14W600_1B1B1B(String text) { ); } -Widget text16W600(String text) { +Widget text16W600(String text, {Color clr = Colors.white}) { return Text( text, style: TextStyle( fontSize: 16.sp, - color: Colors.white, + color: clr, fontWeight: FontWeight.w600, fontFamily: 'manrope'), ); @@ -306,8 +307,6 @@ Widget text14W400_979797(String text) { ); } - - Widget text12W400_979797(String text) { return Text( text, diff --git a/lib/controller/contact_us_controller.dart b/lib/controller/contact_us_controller.dart index 5ce64ef..41c82be 100644 --- a/lib/controller/contact_us_controller.dart +++ b/lib/controller/contact_us_controller.dart @@ -3,6 +3,36 @@ import 'dart:io'; import 'package:get/get.dart'; class ContactUsController extends GetxController { + //contact us page controller RxList attachmentFileList = [File("")].obs; RxList attachmentPathNameList = [""].obs; + + //contact us details page controller + RxList attachmentFileDetailsList = [File("")].obs; + RxList attachmentPathNameDetailsList = [""].obs; + + RxList contactUsDetailsChatContent = [ + { + "initial_name": "SM", + "date": "16 Feb 2024, 11 : 35PM", + "content": """ Dear Customer, +Thank you for contacting Traders Circuit + +Your Service reference no is 18663765 + +when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to + +using 'Content here, content here', making it look like readable English. + +Regards, +Centralised Service Desk + +Traders Circuit""", + }, + { + "initial_name": "AM", + "date": "16 Feb 2024, 11 : 35PM", + "content": "Thank You.......", + } + ].obs; } diff --git a/lib/resources/routes/route_name.dart b/lib/resources/routes/route_name.dart index 9c0c81d..c84d058 100644 --- a/lib/resources/routes/route_name.dart +++ b/lib/resources/routes/route_name.dart @@ -43,4 +43,5 @@ class RouteName { //contact us static const String contactUsMain = '/contactUsMain'; + static const String contactUsMainDetails = '/contactUsMainDetails'; } diff --git a/lib/resources/routes/routes.dart b/lib/resources/routes/routes.dart index cbfef13..8250322 100644 --- a/lib/resources/routes/routes.dart +++ b/lib/resources/routes/routes.dart @@ -29,6 +29,7 @@ import 'package:traderscircuit/view/secureAccess.dart/Fingerprint.dart'; import 'package:traderscircuit/view/secureAccess.dart/Pin.dart'; import 'package:traderscircuit/view/secureAccess.dart/SecureAccess.dart'; +import '../../view/Sidemenu/contactUs/contact_us_details.dart'; import '../../view/login/uploadKycImage.dart'; class AppRoutes { @@ -151,6 +152,10 @@ class AppRoutes { GetPage( name: RouteName.contactUsMain, page: () => const ContactUsMainScreen(), + ), + GetPage( + name: RouteName.contactUsMainDetails, + page: () => const ContactUsDetailsScreen(), ) ]; } diff --git a/lib/view/Sidemenu/contactUs/cancel_ticket_bottom_sheet.dart b/lib/view/Sidemenu/contactUs/cancel_ticket_bottom_sheet.dart new file mode 100644 index 0000000..7cf690c --- /dev/null +++ b/lib/view/Sidemenu/contactUs/cancel_ticket_bottom_sheet.dart @@ -0,0 +1,101 @@ +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:traderscircuit/Utils/text.dart'; + +import '../../../Utils/Common/commonBotton.dart'; +import 'ticket_confirmed_bottom_sheet.dart'; + +class CancelTicketBottomSheet { + 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( + 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), + Container( + margin: const EdgeInsets.symmetric(horizontal: 15), + child: Center( + child: text18W600( + "Are You Sure You want to Close the Ticket?", + textAl: TextAlign.center), + ), + ), + const Gap(25), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 17, vertical: 20), + child: Row( + children: [ + Expanded( + child: SizedBox( + width: 191.w, + child: kycBtn( + text: "Yes", + onTap: () { + Get.back(); + }, + bgClr: const Color(0xFF6C0000), + borderClr: const Color(0xFF9A0000), + ), + ), + ), + const Gap(16), + Expanded( + child: SizedBox( + width: 191.w, + child: kycBtn( + text: "No", + onTap: () { + Get.back(); + }, + bgClr: const Color(0xFF111313), + borderClr: const Color(0xFF9A0000), + ), + ), + ), + ], + ), + ), + const Gap(25), + ], + ) + ], + ), + ); + }, + ); + } +} diff --git a/lib/view/Sidemenu/contactUs/contact_us_details.dart b/lib/view/Sidemenu/contactUs/contact_us_details.dart new file mode 100644 index 0000000..641d7a6 --- /dev/null +++ b/lib/view/Sidemenu/contactUs/contact_us_details.dart @@ -0,0 +1,392 @@ +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/controller/contact_us_controller.dart'; + +import '../../../Utils/Common/CommonAppbar.dart'; +import '../../../Utils/Common/CustomTextFormField.dart'; +import '../../../Utils/Common/FilePicker.dart'; +import '../../../Utils/Common/commonBotton.dart'; +import '../../../Utils/text.dart'; +import '../../onBoarding/splashScreen1.dart'; +import 'cancel_ticket_bottom_sheet.dart'; + +class ContactUsDetailsScreen extends StatefulWidget { + const ContactUsDetailsScreen({super.key}); + + @override + State createState() => _ContactUsDetailsScreenState(); +} + +class _ContactUsDetailsScreenState extends State { + ContactUsController contactUsController = Get.put(ContactUsController()); + TextEditingController queriesTextController = TextEditingController(); + @override + Widget build(BuildContext context) { + final GlobalKey queriesForm = GlobalKey(); + return Obx( + () => Form( + key: queriesForm, + child: Scaffold( + appBar: CommonAppbar( + height: 75, + titleTxt: "", + customActionWidget: text16W400(""), + ), + backgroundColor: Colors.black, + extendBody: true, + body: Stack( + children: [ + const CommonBlurLeft(), + const CommonBlurRight(), + Stack(children: [ + SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 18, vertical: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + //physics: const NeverScrollableScrollPhysics(), + children: [ + text25W600("Contact Us"), + const Gap(20), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + text22W600("#18663765"), + const Gap(10), + text16W500( + "RESOLVED", + clr: const Color(0xFF34C759), + ), + ], + ), + text16W400("16 Feb 2024, 11 : 35 PM"), + ], + ), + const Gap(15), + const Divider( + thickness: 1, + color: Color(0xFF242424), + ), + const Gap(20), + text16W600("Ticket Category"), + const Gap(10), + text16W400( + "It is a long established fact that a reader It is a long established fact that a reader It is a long established fact that a reader"), + contactUsController + .attachmentPathNameDetailsList.isEmpty + ? const SizedBox() + : const Gap(15), + contactUsController + .attachmentPathNameDetailsList.isEmpty + ? const SizedBox() + : ListView.builder( + physics: const NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: contactUsController + .attachmentPathNameDetailsList.length, + itemBuilder: (ctx, index) { + return Container( + width: 1.sw, + height: 42.h, + margin: const EdgeInsets.symmetric( + vertical: 6, + ), + decoration: BoxDecoration( + color: const Color(0xFF0C0C0C), + borderRadius: + BorderRadius.circular(4), + border: Border.all( + width: 1, + color: const Color(0xFF3A3A3A))), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + const Gap(6), + SvgPicture.asset( + "assets/images/svg/attachment_pin.svg"), + const Gap(6), + Container( + width: 0.7.sw, + child: FittedBox( + child: text12W400( + contactUsController + .attachmentPathNameDetailsList[ + index]), + ), + ), + ], + ), + GestureDetector( + onTap: () { + contactUsController + .attachmentPathNameDetailsList + .removeAt(index); + contactUsController + .attachmentFileDetailsList + .removeAt(index); + }, + child: Container( + margin: const EdgeInsets.only( + right: 20), + child: SvgPicture.asset( + "assets/images/svg/cross_cancel.svg", + color: + const Color(0xFF818181), + width: 10, + height: 10, + ), + )), + ], + ), + ); + }), + contactUsController + .contactUsDetailsChatContent.isEmpty + ? const SizedBox() + : const Gap(18), + ListView.builder( + physics: const NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: contactUsController + .contactUsDetailsChatContent.length + + 1, + itemBuilder: (ctx, index) { + return index == + contactUsController + .contactUsDetailsChatContent.length + ? Container( + margin: EdgeInsets.only(top: 20), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.end, + mainAxisSize: MainAxisSize.min, + children: [ + Stack( + children: [ + CustomTextFormField3( + texttype: + TextInputType.multiline, + hintText: + "Enter some text...", + textEditingController: + queriesTextController, + maxlines: 8, + validator: (value) { + if (value.isEmpty) { + return 'Enter your Content'; + } else if (value + .toString() + .length < + 30) { + return 'Content should be minimum 30 characters'; + } + return null; + }, + inputFormatters: [ + LengthLimitingTextInputFormatter( + 200), + ], + ), + Positioned( + bottom: 15, + left: 37, + right: 37, + child: SizedBox( + width: 200.w, + child: kycBtn( + text: "Close Ticket", + onTap: () { + CancelTicketBottomSheet() + .bottomSheet( + context); + }, + bgClr: const Color( + 0xFF111313), + borderClr: const Color( + 0xFF990000), + ), + ), + ) + ], + ), + contactUsController + .attachmentPathNameDetailsList + .length >= + 3 + ? const SizedBox() + : const Gap(10), + contactUsController + .attachmentPathNameDetailsList + .length >= + 3 + ? const SizedBox() + : InkWell( + onTap: () async { + var result = + await FilePickerMethod() + .pickFile(); + if (result != null) { + contactUsController + .attachmentPathNameDetailsList + .clear(); + + for (var a in result) { + contactUsController + .attachmentFileDetailsList + .add(a); + } + + for (var a + in contactUsController + .attachmentFileDetailsList) { + contactUsController + .attachmentPathNameDetailsList + .add(FilePickerMethod() + .extractFileName( + a?.path ?? + '')); + } + } + }, + child: Row( + mainAxisAlignment: + MainAxisAlignment.end, + children: [ + SvgPicture.asset( + "assets/images/svg/attachment_pin.svg"), + const Gap(6), + text12W400( + "Add Attachment (Max 32MB / Optional)"), + ], + ), + ), + const Gap(20), + Padding( + padding: + const EdgeInsets.symmetric( + // horizontal: 10, + vertical: 20), + child: SizedBox( + width: Get.width, + child: kycBtn( + text: "Submit", + onTap: () { + final isValid = queriesForm + .currentState + ?.validate(); + + if (isValid!) { + contactUsController + .contactUsDetailsChatContent + .add({ + "initial_name": "AM", + "date": + "16 Feb 2024, 11 : 35PM", + "content": + queriesTextController + .text, + }); + queriesTextController + .clear(); + } + }, + bgClr: + const Color(0xFF6C0000), + borderClr: + const Color(0xFF990000), + ), + ), + ), + ], + ), + ) + : Container( + width: 1.sw, + margin: const EdgeInsets.symmetric( + vertical: 5, + ), + decoration: BoxDecoration( + color: const Color(0xFF0C0C0C), + borderRadius: + BorderRadius.circular(8), + 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) + ], + ), + border: Border.all( + width: 1, + color: + const Color(0xFF3A3A3A))), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + CircleAvatar( + radius: 18, + backgroundColor: + Colors.white, + child: Center( + child: text16W600( + contactUsController + .contactUsDetailsChatContent[ + index] + ["initial_name"], + clr: const Color( + 0xFF535353)), + ), + ), + text14W500( + contactUsController + .contactUsDetailsChatContent[ + index]["date"], + ), + ], + ), + const Gap(18), + text16W400( + contactUsController + .contactUsDetailsChatContent[ + index]["content"], + ) + ], + ), + )); + }), + ]), + ), + ) + ]), + ], + ), + ), + ), + ); + } +} diff --git a/lib/view/Sidemenu/contactUs/contact_us_main.dart b/lib/view/Sidemenu/contactUs/contact_us_main.dart index dbd7426..00235a1 100644 --- a/lib/view/Sidemenu/contactUs/contact_us_main.dart +++ b/lib/view/Sidemenu/contactUs/contact_us_main.dart @@ -3,6 +3,7 @@ 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/resources/routes/route_name.dart'; import '../../../Utils/Common/CommonAppbar.dart'; import '../../../Utils/Common/commonBotton.dart'; @@ -122,92 +123,100 @@ class _ContactUsMainScreenState extends State { } Widget ticketCardWidget(index, type) { + ContactUsController contactUsController = Get.put(ContactUsController()); 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) - ], + ? const SizedBox() + : 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), + ), ), - 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" + 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)), - 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 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, ), - ], - ), - 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), + 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), - ), - ) - ], + child: Center( + child: text16W400(dataL[index]["desc"], + clr: const Color(0xFF9E9E9E), + textOver: TextOverflow.ellipsis), + ), + ) + ], + ), ), ), );