From 710a06d536ff747fb8cf82d2d3b6dadf07e70c5f Mon Sep 17 00:00:00 2001 From: Fahed Khan <127182880+12fahed@users.noreply.github.com> Date: Sun, 14 Jul 2024 12:32:59 +0530 Subject: [PATCH 1/3] guidelines ui improved with i button for faq --- .../guidelines_screen/guidelinesscreen.dart | 431 ++++++------------ .../guidelines_screen/widgets/FAQCard.dart | 6 +- .../widgets/guidelines_card.dart | 23 +- pubspec.lock | 192 ++++---- 4 files changed, 253 insertions(+), 399 deletions(-) diff --git a/lib/new_ui/screens/guidelines_screen/guidelinesscreen.dart b/lib/new_ui/screens/guidelines_screen/guidelinesscreen.dart index b9cfa6b7..f3d4c274 100644 --- a/lib/new_ui/screens/guidelines_screen/guidelinesscreen.dart +++ b/lib/new_ui/screens/guidelines_screen/guidelinesscreen.dart @@ -11,190 +11,6 @@ class GuideLinesScreen extends StatefulWidget { } class _GuideLinesScreenState extends State { - - final Map uploadMap = { - - "guideLines": [ - { - "title": "First Time Applying for Railway Concession?", - "content": "If you've never applied for a railway concession pass, please visit the Railway Concession Desk on the ground floor of the new building." - }, - { - "title": "First Time Using the TSEC App for Railway Concession and Have previous pass?", - "content": "If you're using the app for the first time and have your previous pass, follow these four easy steps:", - "points": [ - "1. Apply Online using our app.", "2. Wait for your pass to be approved.", "3. Receive a notification once approved.", "4. Collect your pass from the Railway Concession Desk (Ground floor, new building)." - ] - }, - { - "title": "Detailed Guide", - "content": [ - { - "subtitle": "Step I: Submit Your Online Application", - "subPoints": [ - { - "words": "1. Open the TSEC App." - }, - { - "words": "2. Navigate to the Railway Concession feature." - }, - { - "image": "https://()" - }, - { - "words": "3. Tap the Apply button ." - }, - { - "image": "https://()" - }, - { - "words": "4. Fill in the required details on the form " - }, - { - "image": "https://()." - }, - { - "words": "NOTE: Ensure accuracy, as discrepancies can lead to rejection" - }, - { - "words": "5. Upload a clear photo of the front and back of your ID Card" - }, - { - "image": "https://()." - }, - { - "words": "6. Upload an image of your previous pass." - }, - { - "image": "https://()." - }, - { - "words": "NOTE: If you don't have a previous pass or ID card, visit the Railway Concession Desk (Ground floor, new building)." - }, - { - "words": "7. Submit the form. It may take a few seconds to process" - }, - { - "words": "NOTE: Once submitted, you will see the following changes: " - }, - { - "image": "https://." - } - ] - }, - { - "subtitle": "Step II: Wait for Approval", - "subPoints": [ - { - "words": "1. The approval process may take a day or so. Apply before your current pass expires to avoid delays." - }, - { - "words": "2. Upon approval, you will receive a notification." - }, - { - "image": "https://()." - }, - { - "words": "To modify your application or extend dates, visit the Railway Concession Desk (Ground floor, new building)." - } - ] - }, - { - "subtitle": "Step III: Concession Approval", - "subPoints": [ - { - "words": "1. Once approved, you'll receive a notification and a pass number, displayed on the railway concession screen" - }, - { - "image": "https://()." - }, - { - "words": "2. Show this pass number to collect your railway slip from the Railway Concession Desk (Ground floor, new building)." - } - ] - }, - { - "subtitle": "Step IV: Collecting Your Railway Concession", - "subPoints": [ - { - "words": "1. Show your pass number to collect the slip. You will receive a notification as an acknowledgment" - }, - { - "image": "https://()." - }, - { - "words": "Your interface will update as follows after collection:" - }, - { - "image": "https://." - } - ] - }, - { - "subtitle": "After Collecting the Pass", - "subPoints": [ - { - "words": "You will receive a reminder notification 3 days before your pass expires, prompting you to apply for a new pass. For example, if your pass is issued on July 6th and expires on August 5th, you can apply for a new pass from August 2nd. Reminders will be sent accordingly" - }, - { - "image": "https://()." - } - ] - } - ] - }, - { - "title": "Used the TSEC App Before?", - "content": "Great! If you've used the TSEC App for railway concession before, it's even easier. Just open the app, update your previous pass photo, and you're done!", - "points": [ - "https://" - ] - } - ], - "faq": [ - { - "title": "I have never applied concession", - "content": "Visit Railway Concession Desk on the ground floor of the new building." - }, - { - "title": "I have never used TSEC App have applied for concesion earlier in offline mode", - "content": "Great ! you might be having your previous pass. Upload ots photo in the form and follow the guidelines" - }, - { - "title": "I have lost my previous pass OR dont have ID Card", - "content": "Visit Railway Concession Desk on the ground floor of the new building." - }, - { - "title": "I am FE, Can I apply ?", - "content": "Ofcouse you can, but offline untill you dont get your login credentials of TSEC App" - }, - { - "title": "I have applied, didnt receive approval yet but have filled my data wrong on App, what to do ?", - "content": "No worries, you can still Visit Railway Concession Desk on the ground floor of the new building, give your details as NAME and YEAR. Your issue will be resolved and a confirmation notification will be sent to you on the spot" - }, - { - "title": "I have applied, received approval but have filled my data wrong on App, what to do ?", - "content": "No worries, you can still Visit Railway Concession Desk on the ground floor of the new building, give the pass number displayed on Railway Concession Screen. Your issue will be resolved and a confirmation notification will be sent to you on the spot" - }, - { - "title": "I have applied, received approval but I could not visit Railway consession Desk in college to collect slip, what to do ?", - "content": "No worries, you can still Visit Railway Concession Desk on the ground floor of the new building, give the pass number displayed on Railway Concession Screen. Your issue will be resolved and a confirmation notification will be sent to you on the spot" - }, - { - "title": "I have applied, received approval, collected Railway slip but could not remove Railway pass and its been more than 3 days now, what to do ?", - "content": "No worries, you can still Visit Railway Concession Desk on the ground floor of the new building, give the pass number displayed on Railway Concession Screen. You will be receiving a renew pass with extended date. Follow futher instructions as said by Person on desk." - }, - { - "title": "My pass is expiring in 3 days, what to do?", - "content": "Since 3 days before your pass expires, you will be receiving notification reminders everyday around 7am to renew your pass. Please apply for your pass before it expires" - }, - { - "title": "My pass had expired today OR few days back, can I still apply?", - "content": "Ofocurse! You can.. Follow the same procedure what you did to appky for the first time. Its easy now, just dont forget to change previous pass's photo" - } - ] - }; - List guideLines = []; List faqs = []; @@ -202,24 +18,31 @@ class _GuideLinesScreenState extends State { void initState() { super.initState(); setGuidelines(); + setFAQ(); } setGuidelines() { FirebaseFirestore.instance - .collection("Guidelines") - .doc("Guidelines") + .collection("ConcessionGuidelines") + .doc("guideLines") .get() .then((value) { - setState(() { - faqs = value.data()!['faq']; - guideLines = value.data()!['guideLines']; - }); + setState(() { + guideLines = value.data()!['guideLines']; + }); }); } - uploadMapFunction(){ - FirebaseFirestore.instance.collection('Guidelines').doc("Guidelines").set(uploadMap); - print("Uploaded"); + setFAQ() { + FirebaseFirestore.instance + .collection("ConcessionGuidelines") + .doc("faq") + .get() + .then((value) { + setState(() { + faqs = value.data()!['faq']; + }); + }); } @override @@ -232,115 +55,129 @@ class _GuideLinesScreenState extends State { ), body: guideLines.isNotEmpty && faqs.isNotEmpty ? SingleChildScrollView( - child: Column( - children: [ - SizedBox( - height: size.height * 0.02, - ), - Container( - width: size.width * 0.85, - child: Text( - "Guidelines", - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.w700, - fontSize: 25), - ), - ), - SizedBox( - height: size.height * 0.01, - ), - ListView.builder( - padding: EdgeInsets.zero, - itemCount: guideLines.length, - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - itemBuilder: (context, index) { - //print(guideLines[index]); - Map guideline = guideLines[index]; - return GuidelinesCard(inputGuideline: guideline); - // if (guideline.containsKey("text")) { - // return Padding( - // padding: const EdgeInsets.symmetric( - // horizontal: 30, vertical: 10), - // child: Text( - // "- ${guideline["text"]}", - // style: TextStyle(color: Colors.white), - // ), - // ); - // } else { - // return Container( - // margin: EdgeInsets.symmetric( - // horizontal: size.width * 0.1, vertical: 20), - // height: size.height * 0.2, - // decoration: BoxDecoration( - // image: DecorationImage( - // image: NetworkImage(guideline['image']), - // fit: BoxFit.fill), - // ), - // ); - // } - }, - ), - SizedBox( - height: size.height * 0.01, - ), - Container( - width: size.width * 0.85, - child: Text( - "FAQ", - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.w700, - fontSize: 25), + child: Column( + children: [ + SizedBox( + height: size.height * 0.02, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + width: size.width * 0.75, + child: Text( + "Railway Guidelines", + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.w700, + fontSize: 27, + shadows: [ + Shadow( + offset: Offset(1.0, 1.0), + blurRadius: 3.0, + color: Colors.blue, + ), + ], ), ), - SizedBox( - height: size.height * 0.01, - ), - ListView.builder( - padding: EdgeInsets.zero, - itemCount: faqs.length, - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - itemBuilder: (context, index) { - Map faq = faqs[index]; - return FAQCard(faqContent: faq["content"],faqTitle: faq["title"],); - }), - SizedBox( - height: size.height * 0.03, - ), - ], - ), - ) - : const Center( - child: CircularProgressIndicator(), + ), + IconButton( + icon: Icon(Icons.info_outline, color: Colors.white), + onPressed: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: Text( + "FAQ", + style: TextStyle(color: Colors.white,fontWeight: FontWeight.w700,fontSize: 20, + shadows: [Shadow(offset: Offset(1.0, 1.0),blurRadius: 3.0,color: Colors.blue,), + ], + ), + ), + content: Container( + width: double.maxFinite, + height: 400, + child: ListView.builder( + padding: EdgeInsets.zero, + itemCount: faqs.length, + itemBuilder: (context, index) { + Map faq = faqs[index]; + return FAQCard( + faqContent: faq["content"], + faqTitle: faq["title"], + ); + }, + ), + ), + actions: [ + TextButton( + child: Text( + "Close", + style: TextStyle(fontSize: 15), + ), + onPressed: () { + Navigator.of(context).pop(); + }, + ), + ], + ); + }, + ); + }, + ), + ], ), - ); - } -} - -class ViewImage extends StatelessWidget { - final int index; - - ViewImage({required this.index}); - - @override - Widget build(BuildContext context) { - return Scaffold( - body: Center( - child: Hero( - tag: "pic$index", - child: Container( - margin: EdgeInsets.symmetric(horizontal: 5, vertical: 5), - decoration: BoxDecoration( - image: DecorationImage( - image: NetworkImage( - "https://i.pinimg.com/564x/98/24/71/982471c8a222007297475323a0c4f5f9.jpg"), - fit: BoxFit.fitWidth), + SizedBox( + height: size.height * 0.01, ), - ), + ListView.builder( + padding: EdgeInsets.zero, + itemCount: guideLines.length, + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemBuilder: (context, index) { + Map guideline = guideLines[index]; + return GuidelinesCard(inputGuideline: guideline); + }, + ), + // SizedBox( + // height: size.height * 0.01, + // ), + // Container( + // width: size.width * 0.85, + // child: Text( + // "FAQ", + // style: TextStyle( + // color: Colors.white, + // fontWeight: FontWeight.w700, + // fontSize: 25), + // ), + // ), + // SizedBox( + // height: size.height * 0.01, + // ), + // ListView.builder( + // padding: EdgeInsets.zero, + // itemCount: faqs.length, + // shrinkWrap: true, + // physics: const NeverScrollableScrollPhysics(), + // itemBuilder: (context, index) { + // Map faq = faqs[index]; + // return FAQCard( + // faqContent: faq["content"], + // faqTitle: faq["title"], + // ); + // }, + // ), + // SizedBox( + // height: size.height * 0.03, + // ), + ], ), + ) + : const Center( + child: CircularProgressIndicator(), ), ); } diff --git a/lib/new_ui/screens/guidelines_screen/widgets/FAQCard.dart b/lib/new_ui/screens/guidelines_screen/widgets/FAQCard.dart index 8c200271..3ac2dd59 100644 --- a/lib/new_ui/screens/guidelines_screen/widgets/FAQCard.dart +++ b/lib/new_ui/screens/guidelines_screen/widgets/FAQCard.dart @@ -9,7 +9,7 @@ class FAQCard extends StatelessWidget { @override Widget build(BuildContext context) { return Container( - margin: EdgeInsets.symmetric(horizontal: 10,vertical: 7), + margin: EdgeInsets.symmetric(horizontal: 1,vertical: 7), decoration: BoxDecoration( borderRadius: BorderRadius.circular(10), border: Border.all(color: Colors.white), @@ -23,11 +23,11 @@ class FAQCard extends StatelessWidget { collapsedIconColor: Colors.white, collapsedTextColor: Colors.white, textColor: Colors.white, - title: Text(faqTitle), + title: Text(faqTitle, style: TextStyle(fontSize: 13, color: Color(0xFFFFFFDE)),), children: [ Padding( padding: const EdgeInsets.all(15.0), - child: Text(faqContent,style: TextStyle(color: Colors.white),), + child: Text(faqContent,style: TextStyle(color: Colors.white, fontSize: 12),), ), ], ), diff --git a/lib/new_ui/screens/guidelines_screen/widgets/guidelines_card.dart b/lib/new_ui/screens/guidelines_screen/widgets/guidelines_card.dart index 0b55f341..3b496147 100644 --- a/lib/new_ui/screens/guidelines_screen/widgets/guidelines_card.dart +++ b/lib/new_ui/screens/guidelines_screen/widgets/guidelines_card.dart @@ -17,10 +17,14 @@ class GuidelinesCard extends StatelessWidget { children: [ Padding( padding: const EdgeInsets.fromLTRB(0, 0, 0, 10), - child: Text(inputGuideline['title'], style: TextStyle(fontSize: 18, color: Colors.white, fontWeight: FontWeight.bold),), + child: Text( + inputGuideline['title'], + style: TextStyle(fontSize: 16, color: Color(0xFFFFFFDE), fontWeight: FontWeight.bold, + ), + ), ), if(inputGuideline['content'].runtimeType == String) - Text(inputGuideline['content'], style: TextStyle(fontSize: 14, color: Colors.white),), + Text(inputGuideline['content'], style: TextStyle(fontSize: 12, color: Colors.grey),), if(inputGuideline.containsKey('points')) ListView.builder( shrinkWrap: true, @@ -29,7 +33,7 @@ class GuidelinesCard extends StatelessWidget { itemBuilder: (context, index) { return Padding( padding: const EdgeInsets.all(8.0), - child: Text(inputGuideline['points'][index], style: TextStyle(fontSize: 14, color: Colors.white),), + child: Text(inputGuideline['points'][index], style: TextStyle(fontSize: 12, color: Colors.grey),), ); }, ) @@ -46,7 +50,10 @@ class GuidelinesCard extends StatelessWidget { children: [ //sub title and then list of points if(inputGuideline['content'].runtimeType != String) - Text(inputGuideline['content'][index]['subtitle'], style: TextStyle(fontSize: 16, color: Colors.white, fontWeight: FontWeight.bold),), + Text(inputGuideline['content'][index]['subtitle'], + style: TextStyle(fontSize: 14, color: Colors.white, fontWeight: FontWeight.bold, + ), + ), if(inputGuideline['content'].runtimeType != String) ListView.builder( shrinkWrap: true, @@ -59,12 +66,14 @@ class GuidelinesCard extends StatelessWidget { child: Text( inputGuideline['content'][index]['subPoints'][subindex]["words"], style: TextStyle( - fontSize: 12, color: Colors.white),), + fontSize: 12, color: Colors.grey),), ); } else { - return Container( - child: Image.network('https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png',)); + return Padding( + padding: const EdgeInsets.all(8.0), + child: Image.network(inputGuideline['content'][index]['subPoints'][subindex]["image"])); + } }, ) diff --git a/pubspec.lock b/pubspec.lock index 7819187a..9873bcc3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "67.0.0" _flutterfire_internals: dependency: transitive description: name: _flutterfire_internals - sha256: "4eec93681221723a686ad580c2e7d960e1017cf1a4e0a263c2573c2c6b0bf5cd" + sha256: "37a42d06068e2fe3deddb2da079a8c4d105f241225ba27b7122b37e9865fd8f7" url: "https://pub.dev" source: hosted - version: "1.3.25" + version: "1.3.35" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.4.1" animations: dependency: "direct main" description: @@ -93,10 +93,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -109,18 +109,18 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.11" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.3.1" built_collection: dependency: transitive description: @@ -205,26 +205,26 @@ packages: dependency: "direct main" description: name: cloud_firestore - sha256: "31cfa4d65d6e9ea837234fffe121304034c30c9214c06207b4a35867e3757900" + sha256: a0f161b92610e078b4962d7e6ebeb66dc9cce0ada3514aeee442f68165d78185 url: "https://pub.dev" source: hosted - version: "4.15.8" + version: "4.17.5" cloud_firestore_platform_interface: dependency: transitive description: name: cloud_firestore_platform_interface - sha256: a0097a26569b015faf8142e159e855241609ea9a1738b5fd1c40bfe8411b41a0 + sha256: "6a55b319f8d33c307396b9104512e8130a61904528ab7bd8b5402678fca54b81" url: "https://pub.dev" source: hosted - version: "6.1.9" + version: "6.2.5" cloud_firestore_web: dependency: transitive description: name: cloud_firestore_web - sha256: ed680ece29a5750985119c09cdc276b460c3a2fa80e8c12f9b7241f6b4a7ca16 + sha256: "89dfa1304d3da48b3039abbb2865e3d30896ef858e569a16804a99f4362283a9" url: "https://pub.dev" source: hosted - version: "3.10.8" + version: "3.12.5" code_builder: dependency: transitive description: @@ -253,10 +253,10 @@ packages: dependency: transitive description: name: cross_file - sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e + sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32" url: "https://pub.dev" source: hosted - version: "0.3.3+8" + version: "0.3.4+1" crypto: dependency: transitive description: @@ -357,10 +357,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" file: dependency: transitive description: @@ -413,34 +413,34 @@ packages: dependency: "direct main" description: name: firebase_auth - sha256: "17b841e1b000c3441b8ffceca88f468e078d0443db9643e77541bdfb7a3fd16b" + sha256: cfc2d970829202eca09e2896f0a5aa7c87302817ecc0bdfa954f026046bf10ba url: "https://pub.dev" source: hosted - version: "4.17.8" + version: "4.20.0" firebase_auth_platform_interface: dependency: transitive description: name: firebase_auth_platform_interface - sha256: f294ceef40409a36c819a14280ca864fe487b44033e5276443377c66cb448310 + sha256: a0270e1db3b2098a14cb2a2342b3cd2e7e458e0c391b1f64f6f78b14296ec093 url: "https://pub.dev" source: hosted - version: "7.1.8" + version: "7.3.0" firebase_auth_web: dependency: transitive description: name: firebase_auth_web - sha256: "1f231da900fe7ff9f2974f8adcbdb3363c410c24725978afa5dc33e1e7e62e06" + sha256: "64e067e763c6378b7e774e872f0f59f6812885e43020e25cde08f42e9459837b" url: "https://pub.dev" source: hosted - version: "5.9.8" + version: "5.12.0" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: "53316975310c8af75a96e365f9fccb67d1c544ef0acdbf0d88bbe30eedd1c4f9" + sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c" url: "https://pub.dev" source: hosted - version: "2.27.0" + version: "2.32.0" firebase_core_platform_interface: dependency: transitive description: @@ -453,58 +453,58 @@ packages: dependency: transitive description: name: firebase_core_web - sha256: c8e1d59385eee98de63c92f961d2a7062c5d9a65e7f45bdc7f1b0b205aab2492 + sha256: "23509cb3cddfb3c910c143279ac3f07f06d3120f7d835e4a5d4b42558e978712" url: "https://pub.dev" source: hosted - version: "2.11.5" + version: "2.17.3" firebase_messaging: dependency: "direct main" description: name: firebase_messaging - sha256: e41586e0fd04fe9a40424f8b0053d0832e6d04f49e020cdaf9919209a28497e9 + sha256: a1662cc95d9750a324ad9df349b873360af6f11414902021f130c68ec02267c4 url: "https://pub.dev" source: hosted - version: "14.7.19" + version: "14.9.4" firebase_messaging_platform_interface: dependency: transitive description: name: firebase_messaging_platform_interface - sha256: f7a9d74ff7fc588a924f6b2eaeaa148b0db521b13a9db55f6ad45864fa98c06e + sha256: "87c4a922cb6f811cfb7a889bdbb3622702443c52a0271636cbc90d813ceac147" url: "https://pub.dev" source: hosted - version: "4.5.27" + version: "4.5.37" firebase_messaging_web: dependency: transitive description: name: firebase_messaging_web - sha256: fc21e771166860c55b103701c5ac7cdb2eec28897b97c42e6e5703cbedf9e02e + sha256: "0d34dca01a7b103ed7f20138bffbb28eb0e61a677bf9e78a028a932e2c7322d5" url: "https://pub.dev" source: hosted - version: "3.6.8" + version: "3.8.7" firebase_storage: dependency: "direct main" description: name: firebase_storage - sha256: ce1b0efe8dc111058c5f079b2f2ce84906d030d0fd2eef70c42ca1253c67039a + sha256: "2ae478ceec9f458c1bcbf0ee3e0100e4e909708979e83f16d5d9fba35a5b42c1" url: "https://pub.dev" source: hosted - version: "11.6.9" + version: "11.7.7" firebase_storage_platform_interface: dependency: transitive description: name: firebase_storage_platform_interface - sha256: "4a2b64d4dac096390a0b7f2e7b6d086d0546c4a1bf7ee3fc4b5ae4cc41005c46" + sha256: "4e18662e6a66e2e0e181c06f94707de06d5097d70cfe2b5141bf64660c5b5da9" url: "https://pub.dev" source: hosted - version: "5.1.12" + version: "5.1.22" firebase_storage_web: dependency: transitive description: name: firebase_storage_web - sha256: "4153814db8d59138e816d9f016736e4095c45675a2c18f2868d11ffd8cc6a4ca" + sha256: "3a44aacd38a372efb159f6fe36bb4a7d79823949383816457fd43d3d47602a53" url: "https://pub.dev" source: hosted - version: "3.7.3" + version: "3.9.7" fixnum: dependency: transitive description: @@ -530,10 +530,10 @@ packages: dependency: transitive description: name: flutter_cache_manager - sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba" + sha256: "395d6b7831f21f3b989ebedbb785545932adb9afe2622c1ffacf7f4b53a7e544" url: "https://pub.dev" source: hosted - version: "3.3.1" + version: "3.3.2" flutter_launcher_icons: dependency: "direct dev" description: @@ -570,10 +570,10 @@ packages: dependency: transitive description: name: flutter_local_notifications_linux - sha256: "33f741ef47b5f63cc7f78fe75eeeac7e19f171ff3c3df054d84c1e38bedb6a03" + sha256: c49bd06165cad9beeb79090b18cd1eb0296f4bf4b23b84426e37dd7c027fc3af url: "https://pub.dev" source: hosted - version: "4.0.0+1" + version: "4.0.1" flutter_local_notifications_platform_interface: dependency: transitive description: @@ -586,10 +586,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" + sha256: c6b0b4c05c458e1c01ad9bcc14041dd7b1f6783d487be4386f793f47a8a4d03e url: "https://pub.dev" source: hosted - version: "2.0.19" + version: "2.0.20" flutter_riverpod: dependency: "direct main" description: @@ -620,10 +620,10 @@ packages: dependency: "direct main" description: name: get_it - sha256: e6017ce7fdeaf218dc51a100344d8cb70134b80e28b760f8bb23c242437bafd7 + sha256: d85128a5dae4ea777324730dc65edd9c9f43155c109d5cc0a69cab74139fbac1 url: "https://pub.dev" source: hosted - version: "7.6.7" + version: "7.7.0" glob: dependency: transitive description: @@ -652,10 +652,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" http_multi_server: dependency: transitive description: @@ -684,34 +684,34 @@ packages: dependency: "direct main" description: name: image_picker - sha256: "1f498d086203360cca099d20ffea2963f48c39ce91bdd8a3b6d4a045786b02c8" + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" url: "https://pub.dev" source: hosted - version: "1.0.8" + version: "1.1.2" image_picker_android: dependency: transitive description: name: image_picker_android - sha256: "844c6da4e4f2829dffdab97816bca09d0e0977e8dcef7450864aba4e07967a58" + sha256: ff39a10ab4f48f4ac70776d0494a97bf073cd2570892cd46bc8a5cac162c25db url: "https://pub.dev" source: hosted - version: "0.8.9+6" + version: "0.8.12+4" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3 + sha256: "5d6eb13048cd47b60dbf1a5495424dea226c5faf3950e20bf8120a58efb5b5f3" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.4" image_picker_ios: dependency: transitive description: name: image_picker_ios - sha256: "917a5cadd67d052554cfb258595e54217de53fac5b52939426e26319a02e6297" + sha256: "6703696ad49f5c3c8356d576d7ace84d1faf459afb07accbb0fae780753ff447" url: "https://pub.dev" source: hosted - version: "0.8.9+2" + version: "0.8.12" image_picker_linux: dependency: transitive description: @@ -732,10 +732,10 @@ packages: dependency: transitive description: name: image_picker_platform_interface - sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" url: "https://pub.dev" source: hosted - version: "2.9.3" + version: "2.10.0" image_picker_windows: dependency: transitive description: @@ -764,10 +764,10 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.7.1" json_annotation: dependency: "direct main" description: @@ -916,10 +916,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: "30c5aa827a6ae95ce2853cdc5fe3971daaac00f6f081c419c013f7f57bff2f5e" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.7" path_provider_foundation: dependency: transitive description: @@ -1068,10 +1068,10 @@ packages: dependency: transitive description: name: shared_preferences_android - sha256: "1ee8bf911094a1b592de7ab29add6f826a7331fb854273d55918693d5364a1f2" + sha256: "93d0ec9dd902d85f326068e6a899487d1f65ffcd5798721a95330b26c8131577" url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.2.3" shared_preferences_foundation: dependency: transitive description: @@ -1100,10 +1100,10 @@ packages: dependency: transitive description: name: shared_preferences_web - sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21" + sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.3.0" shared_preferences_windows: dependency: transitive description: @@ -1124,10 +1124,10 @@ packages: dependency: transitive description: name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" sky_engine: dependency: transitive description: flutter @@ -1177,18 +1177,18 @@ packages: dependency: transitive description: name: sqflite - sha256: a9016f495c927cb90557c909ff26a6d92d9bd54fc42ba92e19d4e79d61e798c6 + sha256: a43e5a27235518c03ca238e7b4732cf35eabe863a369ceba6cbefa537a66f16d url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.3.3+1" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: "28d8c66baee4968519fb8bd6cdbedad982d6e53359091f0b74544a9f32ec72d5" + sha256: "3da423ce7baf868be70e2c0976c28a1bb2f73644268b7ffa7d2e08eab71f16a4" url: "https://pub.dev" source: hosted - version: "2.5.3" + version: "2.5.4" stack_trace: dependency: transitive description: @@ -1305,10 +1305,10 @@ packages: dependency: transitive description: name: url_launcher_android - sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" + sha256: ceb2625f0c24ade6ef6778d1de0b2e44f2db71fded235eb52295247feba8c5cf url: "https://pub.dev" source: hosted - version: "6.3.2" + version: "6.3.3" url_launcher_ios: dependency: transitive description: @@ -1345,10 +1345,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b + sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.1" url_launcher_windows: dependency: transitive description: @@ -1393,18 +1393,26 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "24301d8c293ce6fe327ffe6f59d8fd8834735f0ec36e4fd383ec7ff8a64aa078" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.1.5" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276 url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "3.0.0" webview_flutter: dependency: "direct main" description: @@ -1417,10 +1425,10 @@ packages: dependency: "direct main" description: name: webview_flutter_android - sha256: "0d21cfc3bfdd2e30ab2ebeced66512b91134b39e72e97b43db2d47dda1c4e53a" + sha256: f42447ca49523f11d8f70abea55ea211b3cafe172dd7a0e7ac007bb35dd356dc url: "https://pub.dev" source: hosted - version: "3.16.3" + version: "3.16.4" webview_flutter_platform_interface: dependency: transitive description: @@ -1441,10 +1449,10 @@ packages: dependency: transitive description: name: win32 - sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" + sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4 url: "https://pub.dev" source: hosted - version: "5.2.0" + version: "5.5.1" xdg_directories: dependency: transitive description: @@ -1470,5 +1478,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.3.0 <4.0.0" - flutter: ">=3.18.0-18.0.pre.54" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" From abdb01dbc29d869c7784a3a37c211986bbe57706 Mon Sep 17 00:00:00 2001 From: Fahed Khan <127182880+12fahed@users.noreply.github.com> Date: Sun, 14 Jul 2024 13:31:44 +0530 Subject: [PATCH 2/3] guidlines Border fixed --- .../guidelines_screen/guidelinesscreen.dart | 45 +------------------ .../widgets/guidelines_card.dart | 29 +++++++++--- 2 files changed, 24 insertions(+), 50 deletions(-) diff --git a/lib/new_ui/screens/guidelines_screen/guidelinesscreen.dart b/lib/new_ui/screens/guidelines_screen/guidelinesscreen.dart index f3d4c274..1b4af9a4 100644 --- a/lib/new_ui/screens/guidelines_screen/guidelinesscreen.dart +++ b/lib/new_ui/screens/guidelines_screen/guidelinesscreen.dart @@ -67,17 +67,8 @@ class _GuideLinesScreenState extends State { width: size.width * 0.75, child: Text( "Railway Guidelines", - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.w700, - fontSize: 27, - shadows: [ - Shadow( - offset: Offset(1.0, 1.0), - blurRadius: 3.0, - color: Colors.blue, - ), - ], + style: TextStyle(color: Colors.white,fontWeight: FontWeight.w700,fontSize: 27, + shadows: [Shadow(offset: Offset(1.0, 1.0),blurRadius: 3.0,color: Colors.blue,),], ), ), ), @@ -141,38 +132,6 @@ class _GuideLinesScreenState extends State { return GuidelinesCard(inputGuideline: guideline); }, ), - // SizedBox( - // height: size.height * 0.01, - // ), - // Container( - // width: size.width * 0.85, - // child: Text( - // "FAQ", - // style: TextStyle( - // color: Colors.white, - // fontWeight: FontWeight.w700, - // fontSize: 25), - // ), - // ), - // SizedBox( - // height: size.height * 0.01, - // ), - // ListView.builder( - // padding: EdgeInsets.zero, - // itemCount: faqs.length, - // shrinkWrap: true, - // physics: const NeverScrollableScrollPhysics(), - // itemBuilder: (context, index) { - // Map faq = faqs[index]; - // return FAQCard( - // faqContent: faq["content"], - // faqTitle: faq["title"], - // ); - // }, - // ), - // SizedBox( - // height: size.height * 0.03, - // ), ], ), ) diff --git a/lib/new_ui/screens/guidelines_screen/widgets/guidelines_card.dart b/lib/new_ui/screens/guidelines_screen/widgets/guidelines_card.dart index 3b496147..947ab57c 100644 --- a/lib/new_ui/screens/guidelines_screen/widgets/guidelines_card.dart +++ b/lib/new_ui/screens/guidelines_screen/widgets/guidelines_card.dart @@ -11,6 +11,9 @@ class GuidelinesCard extends StatelessWidget { padding: const EdgeInsets.all(8.0), child: Card( color: commonbgLightblack, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.0), + side: BorderSide(color: timePickerBorder, width: 1.0,), + ), child: Padding( padding: const EdgeInsets.all(10.0), child: Column( @@ -65,15 +68,28 @@ class GuidelinesCard extends StatelessWidget { padding: const EdgeInsets.all(8.0), child: Text( inputGuideline['content'][index]['subPoints'][subindex]["words"], - style: TextStyle( - fontSize: 12, color: Colors.grey),), - ); + style: TextStyle(fontSize: 12, color: Colors.grey),),); } else { return Padding( - padding: const EdgeInsets.all(8.0), - child: Image.network(inputGuideline['content'][index]['subPoints'][subindex]["image"])); - + padding: const EdgeInsets.all(8.0), + child: Container( + decoration: BoxDecoration( + border: Border.all(color: Colors.grey), + borderRadius: BorderRadius.circular(8.0), + color: Colors.grey, // Box background color + ), + child: Padding( + padding: const EdgeInsets.all(3.0), + child: ClipRRect( + borderRadius: BorderRadius.circular(8.0), // Image corner radius + child: Image.network(inputGuideline['content'][index]['subPoints'][subindex]["image"], + fit: BoxFit.cover, + ), + ), + ), + ), + ); } }, ) @@ -82,7 +98,6 @@ class GuidelinesCard extends StatelessWidget { }, ) ] - ), ), ), From 24bc77b1492981e0ccf23a649dfd6004658d379c Mon Sep 17 00:00:00 2001 From: Fahed Khan <127182880+12fahed@users.noreply.github.com> Date: Sun, 14 Jul 2024 15:01:28 +0530 Subject: [PATCH 3/3] reason container ui, Pass Card logic improvised --- .../railway_screen/railway_screen.dart | 119 +++++++++++------- 1 file changed, 71 insertions(+), 48 deletions(-) diff --git a/lib/new_ui/screens/railway_screen/railway_screen.dart b/lib/new_ui/screens/railway_screen/railway_screen.dart index 7e48a6a0..83d8fbdc 100644 --- a/lib/new_ui/screens/railway_screen/railway_screen.dart +++ b/lib/new_ui/screens/railway_screen/railway_screen.dart @@ -523,27 +523,33 @@ class _RailwayConcessionScreenState StatusStepper(concessionStatus: concessionDetails?.status == null ? "" : concessionDetails!.status, concessionRequestData: concessionRequestData,), // SizedBox(height: 10), if(concessionRequestData!=null && concessionRequestData.statusMessage!=null && concessionRequestData.status=="rejected" && concessionRequestData.statusMessage!="") - Container( - child: RichText( - textAlign: TextAlign.center, - text: TextSpan( - children: [ - TextSpan( - text: "Reason: ", - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 20.0, - color: Colors.red, + FractionallySizedBox( + widthFactor: 0.9, + child: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 10.0), + decoration: BoxDecoration( + color: Colors.red[50], // Light red background + border: Border.all( + color: Colors.red, // Red border + width: 2.0, + ), + borderRadius: BorderRadius.circular(8.0), // Rounded corners + ), + child: RichText( + textAlign: TextAlign.left, + text: TextSpan( + children: [ + TextSpan( + text: "🚨 Reason: ", + style: TextStyle(fontWeight: FontWeight.bold,fontSize: 20.0,color: Colors.red[900], // Dark red text + ), ), - ), - TextSpan( - text: "${concessionRequestData!.statusMessage}", - style: TextStyle( - color: Colors.red, - fontSize: 16.0, + TextSpan( + text: "${concessionDetails!.statusMessage}", + style: TextStyle(color: Colors.red[700],fontSize: 16.0,), ), - ), - ], + ], + ), ), ), ), @@ -583,7 +589,7 @@ class _RailwayConcessionScreenState SizedBox( height: size.height * .075, ), - if (concessionDetails!= null && concessionDetails.status != null && (concessionDetails!.status == 'serviced' || concessionDetails!.status == 'unserviced')) + if (concessionDetails!= null && concessionDetails.status != null && (concessionDetails!.status == 'serviced' || concessionDetails!.status == 'unserviced' || concessionDetails!.status == 'rejected')) //Old UI Container /*Container( width: size.width * 0.8, @@ -684,7 +690,7 @@ class _RailwayConcessionScreenState child: Stack( alignment: Alignment.center, children: [ - if (concessionDetails!.status == "serviced" || concessionDetails!.status == 'unserviced') + if (concessionDetails!.status == "serviced" || concessionDetails!.status == 'unserviced' || concessionDetails!.status == 'rejected') Positioned(top: 50,child: Container( width: size.width, decoration: BoxDecoration( @@ -744,16 +750,29 @@ class _RailwayConcessionScreenState mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ + + //ROW FOR HEADER Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Column( children: [ - Text("Ongoing Pass", - style: TextStyle(fontSize: 20, color: Colors.white, fontWeight: FontWeight.bold), - ), + if (concessionDetails!.status == 'unserviced')...[ + Text("Requested Pass", + style: TextStyle(fontSize: 20, color: Colors.white, fontWeight: FontWeight.bold), + ), + ] else if(concessionDetails!.status == 'rejected')...[ + Text("Rejected Pass", + style: TextStyle(fontSize: 20, color: Colors.red[200], fontWeight: FontWeight.bold), + ), + ] else...[ + Text("Ongoing Pass", + style: TextStyle(fontSize: 20, color: Colors.white, fontWeight: FontWeight.bold), + ), + ] ] ), + if (concessionDetails!.status == 'serviced') Column( children: [ if (concessionRequestData?.passCollected != null && @@ -772,30 +791,32 @@ class _RailwayConcessionScreenState ], ), SizedBox(height: 30), - concessionDetails.status != "unserviced" - ? Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text("Certificate Number", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),), - Text("${concessionRequestData != null ? concessionRequestData.passNum : "not assigned"}", style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),), - ], - ), - Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Text("Date of Issue", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),), - Text(formattedDate, style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),), - ], - ) - ], - ) - : const SizedBox(), - concessionDetails.status != "unserviced" - ? const SizedBox(height: 35,) - : const SizedBox(), + + //ROW FOR CERTIFICATE NO AND DATE + if (concessionDetails.status == "serviced")...[ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text("Certificate Number", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),), + Text("${concessionRequestData != null ? concessionRequestData.passNum : "not assigned"}", style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),), + ], + ), + Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Text("Date of Issue", style: TextStyle(color: Color(0xffe3e3e3), fontSize: 12),), + Text(formattedDate, style: TextStyle(color: Colors.white, fontSize: 16, fontWeight: FontWeight.bold),), + ], + ) + ], + ), + const SizedBox(height: 35), + ], + + //ROW FOR LANE FROM AND TO Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -822,6 +843,8 @@ class _RailwayConcessionScreenState ) ], ), + + //ROW FOR DURATION AND CLASS const SizedBox(height: 35,), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween,