diff --git a/fonts/open-sans/LICENSE.txt b/fonts/open-sans/LICENSE.txt new file mode 100644 index 0000000..75b5248 --- /dev/null +++ b/fonts/open-sans/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/fonts/open-sans/OpenSans-Bold.ttf b/fonts/open-sans/OpenSans-Bold.ttf new file mode 100644 index 0000000..fd79d43 Binary files /dev/null and b/fonts/open-sans/OpenSans-Bold.ttf differ diff --git a/fonts/open-sans/OpenSans-BoldItalic.ttf b/fonts/open-sans/OpenSans-BoldItalic.ttf new file mode 100644 index 0000000..9bc8009 Binary files /dev/null and b/fonts/open-sans/OpenSans-BoldItalic.ttf differ diff --git a/fonts/open-sans/OpenSans-ExtraBold.ttf b/fonts/open-sans/OpenSans-ExtraBold.ttf new file mode 100644 index 0000000..21f6f84 Binary files /dev/null and b/fonts/open-sans/OpenSans-ExtraBold.ttf differ diff --git a/fonts/open-sans/OpenSans-ExtraBoldItalic.ttf b/fonts/open-sans/OpenSans-ExtraBoldItalic.ttf new file mode 100644 index 0000000..31cb688 Binary files /dev/null and b/fonts/open-sans/OpenSans-ExtraBoldItalic.ttf differ diff --git a/fonts/open-sans/OpenSans-Italic.ttf b/fonts/open-sans/OpenSans-Italic.ttf new file mode 100644 index 0000000..c90da48 Binary files /dev/null and b/fonts/open-sans/OpenSans-Italic.ttf differ diff --git a/fonts/open-sans/OpenSans-Light.ttf b/fonts/open-sans/OpenSans-Light.ttf new file mode 100644 index 0000000..0d38189 Binary files /dev/null and b/fonts/open-sans/OpenSans-Light.ttf differ diff --git a/fonts/open-sans/OpenSans-LightItalic.ttf b/fonts/open-sans/OpenSans-LightItalic.ttf new file mode 100644 index 0000000..68299c4 Binary files /dev/null and b/fonts/open-sans/OpenSans-LightItalic.ttf differ diff --git a/fonts/open-sans/OpenSans-Regular.ttf b/fonts/open-sans/OpenSans-Regular.ttf new file mode 100644 index 0000000..db43334 Binary files /dev/null and b/fonts/open-sans/OpenSans-Regular.ttf differ diff --git a/fonts/open-sans/OpenSans-Semibold.ttf b/fonts/open-sans/OpenSans-Semibold.ttf new file mode 100644 index 0000000..1a7679e Binary files /dev/null and b/fonts/open-sans/OpenSans-Semibold.ttf differ diff --git a/fonts/open-sans/OpenSans-SemiboldItalic.ttf b/fonts/open-sans/OpenSans-SemiboldItalic.ttf new file mode 100644 index 0000000..59b6d16 Binary files /dev/null and b/fonts/open-sans/OpenSans-SemiboldItalic.ttf differ diff --git a/lib/constants.dart b/lib/constants.dart index c528845..2a68742 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -1,10 +1,19 @@ import 'dart:ui'; -class Constants { - static Color k2color = Color.fromARGB(255, 0, 71, 132); +import 'package:flutter/material.dart'; - //static const url = "http://192.168.172.50:8082/api"; - static const url = 'http://192.168.2.143:8085/api'; +class Constants { + //static Color k2color = Color.fromARGB(255, 0, 71, 132); + static Color k2color = Colors.white; + static Color k2color1 = Color.fromARGB(255, 0, 71, 132); + + static Color cardtext = Color.fromARGB(255, 247, 247, 250); + static Color cardtextdark = const Color.fromARGB(255, 156, 154, 154); + static const Color bgcolor = Color(0xFFF2F3F8); + static Color bgcolor2 = const Color.fromARGB(255, 0, 112, 184); + + // static const url = "http://192.168.21.50:8081/api"; + static const url = 'http://192.168.2.143:8082/api'; //static const url = 'http://192.168.153.50:8082/api'; } diff --git a/lib/main.dart b/lib/main.dart index 6da1a80..de3af2a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,9 +1,11 @@ import 'package:discover_module/provider_class/affiliationsprovider.dart'; +import 'package:discover_module/provider_class/engagement_provider.dart'; import 'package:discover_module/provider_class/events_provider.dart'; import 'package:discover_module/provider_class/hcp%20_provider.dart'; import 'package:discover_module/provider_class/medicalinsightprovider.dart'; import 'package:discover_module/provider_class/publications_provider.dart'; import 'package:discover_module/provider_class/single_hcpprovider.dart'; +import 'package:discover_module/provider_class/speaker_provider.dart'; import 'package:discover_module/provider_class/trials_provider.dart'; import 'package:discover_module/ui_screen/contacts.dart'; import 'package:discover_module/ui_screen/discover.dart'; @@ -73,6 +75,9 @@ Future main() async { ChangeNotifierProvider(create: (_) => EventProvider()), ChangeNotifierProvider(create: (_) => TrialsProvider()), ChangeNotifierProvider(create: (_) => MediacalInsightProvider()), + ChangeNotifierProvider(create: (_) => SpekerEvalutionProvider()), + ChangeNotifierProvider(create: (_) => EnagagementProvider()), + //ChangeNotifierProvider(create: (_) => ConfigDataProvider()), ChangeNotifierProvider( create: (_) => HiveDataRepository( @@ -98,8 +103,15 @@ class _MyAppState extends State { return MaterialApp( debugShowCheckedModeBanner: false, title: 'Flutter Demo', + // theme: ThemeData( + // fontFamily: 'SourceSerif', + // appBarTheme: const AppBarTheme( + // backgroundColor: Color.fromARGB(255, 0, 71, 132), + // foregroundColor: Colors.white //here you can give the text color + // )), + theme: ThemeData( - fontFamily: 'SourceSerif', + fontFamily: 'OpenSans', appBarTheme: const AppBarTheme( backgroundColor: Color.fromARGB(255, 0, 71, 132), foregroundColor: Colors.white //here you can give the text color @@ -199,9 +211,6 @@ class _MyHomePageState extends State { } } - - - // import 'package:flutter/material.dart'; // class MyGridView extends StatefulWidget { @@ -257,3 +266,50 @@ class _MyHomePageState extends State { // home: MyGridView(), // )); // } + +// import 'package:flutter/material.dart'; + +// void main() { +// runApp(MyApp()); +// } + +// class MyApp extends StatelessWidget { +// @override +// Widget build(BuildContext context) { +// return MaterialApp( +// home: Scaffold( +// appBar: AppBar(title: Text('GridView Example')), +// body: Padding( +// padding: EdgeInsets.all(8.0), +// child: GridView.count( +// crossAxisCount: 2, +// crossAxisSpacing: 8.0, +// mainAxisSpacing: 8.0, +// shrinkWrap: true, // Make GridView as small as possible +// children: List.generate(10, (index) { +// return SizedBox( +// // height: 200, // Fixed height for each card +// child: Card( +// child: Center( +// child: Column( +// mainAxisAlignment: MainAxisAlignment.center, +// children: [ +// Text('Item $index'), +// Text('Item $index'), +// Text('Item $index'), +// Text('Item $index'), +// Text('Item $index'), +// Text('Item $index'), +// Text('Item $index'), +// ], +// ), +// ), +// ), +// ); +// }), +// ), +// ), +// ), +// ); +// } +// } diff --git a/lib/model_class/speaker.dart b/lib/model_class/speaker.dart new file mode 100644 index 0000000..68eba25 --- /dev/null +++ b/lib/model_class/speaker.dart @@ -0,0 +1,56 @@ +// To parse this JSON data, do +// +// final medicalInsight = medicalInsightFromJson(jsonString); + +import 'dart:convert'; + +List medicalInsightFromJson(String str) => + List.from( + json.decode(str).map((x) => MedicalInsight.fromJson(x))); + +String medicalInsightToJson(List data) => + json.encode(List.from(data.map((x) => x.toJson()))); + +class MedicalInsight { + int id; + String programtopic; + String speakername; + String role; + String evaluatorname; + String programdate; + DateTime createdAt; + DateTime updatedAt; + + MedicalInsight({ + required this.id, + required this.programtopic, + required this.speakername, + required this.role, + required this.evaluatorname, + required this.programdate, + required this.createdAt, + required this.updatedAt, + }); + + factory MedicalInsight.fromJson(Map json) => MedicalInsight( + id: json["id"], + programtopic: json["programtopic"], + speakername: json["speakername"], + role: json["role"], + evaluatorname: json["evaluatorname"], + programdate: json["programdate"], + createdAt: DateTime.parse(json["created_at"]), + updatedAt: DateTime.parse(json["updated_at"]), + ); + + Map toJson() => { + "id": id, + "programtopic": programtopic, + "speakername": speakername, + "role": role, + "evaluatorname": evaluatorname, + "programdate": programdate, + "created_at": createdAt.toIso8601String(), + "updated_at": updatedAt.toIso8601String(), + }; +} diff --git a/lib/provider_class/engagement_provider.dart b/lib/provider_class/engagement_provider.dart new file mode 100644 index 0000000..3544db5 --- /dev/null +++ b/lib/provider_class/engagement_provider.dart @@ -0,0 +1,79 @@ +import 'package:discover_module/service.dart/service.dart'; +import 'package:flutter/cupertino.dart'; + +class EnagagementProvider extends ChangeNotifier { + final callapi = Callapi(); + + List enagement = []; + List get engagementdata => enagement; + + List enagementhcpname = []; + List get engagementhcppname => enagementhcpname; + + List enagementhcpmain = []; + List get enagementhcppmain => enagementhcpmain; + + List enagementhcprel = []; + List get enagementhcpprel => enagementhcprel; + + List enagementhcplevel = []; + List get enagementhcpplevel => enagementhcplevel; + + getengagementdata() async { + final engdata = await callapi.getEngdata(); + enagement = engdata; + notifyListeners(); + } + + gethcpname() async { + if (enagementhcpname.isNotEmpty) { + enagementhcpname.clear(); + } + + for (var hname in engagementdata) { + enagementhcpname.add(hname['hcpname']); + + //print("checkin_eng: ${hname['hcpname']}"); + notifyListeners(); + } + } + + getmaintherepeutic() async { + if (enagementhcpmain.isNotEmpty) { + enagementhcpmain.clear(); + } + + for (var hname in engagementdata) { + enagementhcpmain.add(hname['main thereutic area']); + + //print("checkin_eng: ${hname['hcpname']}"); + notifyListeners(); + } + } + + getrelationship() async { + if (enagementhcprel.isNotEmpty) { + enagementhcprel.clear(); + } + + for (var hname in engagementdata) { + enagementhcprel.add(hname['relationship with chiesi']); + + //print("checkin_eng: ${hname['hcpname']}"); + notifyListeners(); + } + } + + getrelationlevel() async { + if (enagementhcplevel.isNotEmpty) { + enagementhcplevel.clear(); + } + + for (var hname in engagementdata) { + enagementhcplevel.add(hname['level of engagement']); + + //print("checkin_eng: ${hname['hcpname']}"); + notifyListeners(); + } + } +} diff --git a/lib/provider_class/speaker_provider.dart b/lib/provider_class/speaker_provider.dart new file mode 100644 index 0000000..b9ae7a8 --- /dev/null +++ b/lib/provider_class/speaker_provider.dart @@ -0,0 +1,17 @@ +import 'package:discover_module/service.dart/service.dart'; +import 'package:flutter/cupertino.dart'; + +class SpekerEvalutionProvider extends ChangeNotifier { + final callapi = Callapi(); + + List speaker_data = []; + + List get speaker => speaker_data; + + getspeakerdata() async { + final data = await callapi.getSpeakerdata(); + + speaker_data = data; + notifyListeners(); + } +} diff --git a/lib/service.dart/service.dart b/lib/service.dart/service.dart index 674367f..8c85dc4 100644 --- a/lib/service.dart/service.dart +++ b/lib/service.dart/service.dart @@ -166,4 +166,24 @@ class Callapi { final jsonresponse = response.data; return jsonresponse; } + + getSpeakerdata() async { + const url = '$curl/speaker'; + + final response = await Dio().get(url); + + final jsonresponse = response.data; + + return jsonresponse; + } + + getEngdata() async { + const url = '$curl/engagement'; + + final response = await Dio().get(url); + + final jsonresponse = response.data; + + return jsonresponse; + } } diff --git a/lib/ui_screen/bottom_sheet.dart b/lib/ui_screen/bottom_sheet.dart new file mode 100644 index 0000000..469a9ca --- /dev/null +++ b/lib/ui_screen/bottom_sheet.dart @@ -0,0 +1,461 @@ +import 'package:discover_module/ui_screen/interactionform/configprovider.dart'; +import 'package:discover_module/ui_screen/interactionform/interactionprovider.dart'; +import 'package:discover_module/ui_screen/interactionform/view_forms_list.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; +import 'package:provider/provider.dart'; + +class bsheet extends StatefulWidget { + const bsheet(this.publicationdata, {super.key}); + final publicationdata; + + @override + State createState() => _MyWidgetState(); +} + +class _MyWidgetState extends State { + String? field1, field2, field3, field4, field5, field6, field7; + String? subfield2, subfield3, subfield4, subfield5, subfield6, subfield7; + bool? f2, f3, f4, f5, f6, f7; + bool engbtn = false; + @override + void initState() { + // TODO: implement initState + super.initState(); + print("data-isssbottomshett: ${widget.publicationdata}"); + if (widget.publicationdata['artical_title'] != null) { + setState(() { + field1 = widget.publicationdata['artical_title']; + + subfield2 = "Journal Name"; + field2 = widget.publicationdata['journal_name']; + f2 = true; + + subfield3 = "Date"; + field3 = widget.publicationdata['date']; + f3 = true; + + subfield4 = "Author"; + field4 = widget.publicationdata['author']; + f4 = true; + + subfield5 = ""; + field5 = " "; + f5 = false; + + subfield6 = ""; + field6 = " "; + f6 = false; + + subfield7 = ""; + field7 = " "; + f7 = false; + }); + + //print("isssbottomshett123: ${widget.publicationdata['event_name']}"); + } else if (widget.publicationdata['event_name'] != null) { + setState(() { + field1 = widget.publicationdata['event_name']; + + subfield2 = "Session Type"; + field2 = widget.publicationdata['session_type']; + f2 = true; + + subfield3 = "Topic"; + field3 = widget.publicationdata['topic']; + f3 = true; + + subfield4 = "Role"; + field4 = widget.publicationdata['role']; + f4 = true; + + subfield5 = ""; + field5 = " "; + f5 = false; + + subfield6 = ""; + field6 = " "; + f6 = false; + + subfield7 = ""; + field7 = " "; + f7 = false; + }); + } else if (widget.publicationdata['trial_name'] != null) { + setState(() { + field1 = widget.publicationdata['trial_name']; + + subfield2 = "Status"; + field2 = widget.publicationdata['status']; + f2 = true; + + subfield3 = "Sponsors"; + field3 = widget.publicationdata['sponsors']; + f3 = true; + + subfield4 = "Condtion"; + field4 = widget.publicationdata['condition']; + f4 = true; + + subfield5 = "Intervention"; + field5 = widget.publicationdata['intervention']; + f5 = true; + + subfield6 = "Phase"; + field6 = widget.publicationdata['phase']; + f6 = true; + + subfield7 = ""; + field7 = " "; + f7 = false; + }); + } else if (widget.publicationdata['programtopic'] != null) { + setState(() { + field1 = widget.publicationdata['programtopic']; + + subfield2 = "Speaker Name"; + field2 = widget.publicationdata['speakername']; + f2 = true; + + subfield3 = "Role"; + field3 = widget.publicationdata['role']; + f3 = true; + + subfield4 = "Evalutor Name"; + field4 = widget.publicationdata['evaluatorname']; + f4 = true; + + subfield5 = "Date"; + field5 = widget.publicationdata['programdate']; + f5 = true; + + subfield6 = ""; + field6 = ""; + f6 = false; + + subfield7 = ""; + field7 = " "; + f7 = false; + }); + } else if (widget.publicationdata['hcpname'] != null) { + setState(() { + field1 = widget.publicationdata['hcpname']; + + subfield2 = "Main Therapeutic Area"; + field2 = widget.publicationdata['main thereutic area']; + f2 = true; + + subfield3 = "Relationship with Chiesi"; + field3 = widget.publicationdata['relationship with chiesi']; + f3 = true; + + subfield4 = "Level of Engagement"; + field4 = widget.publicationdata['level of engagement']; + f4 = true; + + subfield5 = "Date"; + field5 = widget.publicationdata['date']; + f5 = true; + + subfield6 = "Plan of Action"; + field6 = widget.publicationdata['plan of action']; + f6 = true; + + subfield7 = "Recorded By"; + field7 = widget.publicationdata['recorded by']; + f7 = true; + + engbtn = true; + }); + } + // print("data-isssbottomshett: ${widget.publicationdata['artical_title']}"); + } + + @override + Widget build(BuildContext context) { + return DraggableScrollableSheet( + expand: false, + // initialChildSize: + // 0.7, + // maxChildSize: + // 1, + // minChildSize: + // 0.5, + builder: (BuildContext context, ScrollController scrollController) { + return Container( + width: MediaQuery.of(context).size.width, + //color: Color.fromARGB(255, 246, 248, 252), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(0)), + child: Column( + children: [ + Expanded( + child: ListView.builder( + controller: scrollController, + itemCount: 1, + itemBuilder: (BuildContext context, int index) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SizedBox( + height: 18.0, + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.only(left: 18.0), + child: Text( + field1!, + softWrap: true, + style: TextStyle( + fontSize: 16.0, color: Colors.black), + ), + ), + ) + ], + ), + SizedBox( + height: 0.0, + ), + Visibility( + visible: engbtn, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(left: 18.0), + child: FittedBox( + fit: BoxFit.fill, + child: GestureDetector( + onTap: () async { + final ConfigDataProvider + configDataProvider = + ConfigDataProvider(); + await configDataProvider + .initConfigUIDataEng(); + + final provider = + Provider.of( + context, + listen: false); + + if (getCount( + provider + .intConfigDataList[index] + .name, + provider) != + 0) { + provider.savedList + .where((element) => + element.form == + provider + .intConfigDataList[index] + .name) + .toList(); + Navigator.push( + context, + MaterialPageRoute( + builder: + (BuildContext context) => + SavedFormListScreen( + formname: provider + .intConfigDataList[ + index] + .name, + ))); + } + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => + // const InteractionListScreen())); + }, + child: Text( + "View Engagement Form", + style: TextStyle( + fontSize: 14.0, + color: Colors.grey[700]), + ), + ), + ), + ) + ], + ), + ), + SizedBox( + height: 18.0, + ), + Divider(), + SizedBox( + height: 8.0, + ), + Visibility( + visible: f2!, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(left: 18.0), + child: Text( + subfield2!, + style: TextStyle(fontSize: 13.0), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 18.0), + child: Text( + field2!, + style: TextStyle( + fontSize: 15.0, + color: Colors.grey[700]), + ), + ) + ], + ), + ), + Visibility( + visible: f3!, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only( + left: 18.0, top: 18.0), + child: Text( + subfield3!, + style: TextStyle(fontSize: 13.0), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 18.0), + child: Text( + field3!, + style: TextStyle( + fontSize: 15.0, + color: Colors.grey[700]), + ), + ) + ], + ), + ), + Visibility( + visible: f4!, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only( + left: 18.0, top: 18.0), + child: Text( + subfield4!, + style: TextStyle(fontSize: 13.0), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 18.0), + child: Text( + field4!, + style: TextStyle( + fontSize: 15.0, + color: Colors.grey[700]), + ), + ) + ], + ), + ), + Visibility( + visible: f5!, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only( + left: 18.0, top: 18.0), + child: Text( + "Oraganization Type", + style: TextStyle(fontSize: 13.0), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 18.0), + child: Text( + "fff", + style: TextStyle( + fontSize: 15.0, + color: Colors.grey[700]), + ), + ) + ], + ), + ), + Visibility( + visible: f6!, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only( + left: 18.0, top: 18.0), + child: Text( + subfield6!, + style: TextStyle(fontSize: 13.0), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 18.0), + child: Text( + field6!, + style: TextStyle( + fontSize: 15.0, + color: Colors.grey[700]), + ), + ) + ], + ), + ), + Visibility( + visible: f7!, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only( + left: 18.0, top: 18.0), + child: Text( + subfield7!, + style: TextStyle(fontSize: 13.0), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 18.0), + child: Text( + field7!, + style: TextStyle( + fontSize: 15.0, + color: Colors.grey[700]), + ), + ) + ], + ), + ), + ], + ); + }), + ), + ], + ), + ); + }, + ); + } + + Future getCount(String form, InteractionProvider provider) async { + await provider.getRecords(); + + return provider.savedList.where((element) => element.form == form).length; + } +} diff --git a/lib/ui_screen/engagementlist.dart b/lib/ui_screen/engagementlist.dart new file mode 100644 index 0000000..7bdd0b2 --- /dev/null +++ b/lib/ui_screen/engagementlist.dart @@ -0,0 +1,1054 @@ +import 'dart:collection'; +import 'dart:convert'; + +import 'package:discover_module/constants.dart'; +import 'package:discover_module/provider_class/engagement_provider.dart'; +import 'package:discover_module/ui_screen/bottom_sheet.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; +import 'package:intl/intl.dart'; +import 'package:provider/provider.dart'; +import 'package:multi_dropdown/multiselect_dropdown.dart'; + +class EngagementList extends StatefulWidget { + const EngagementList({super.key}); + + @override + State createState() => _EngagementListState(); +} + +class _EngagementListState extends State { + List eng = []; + + List filteredList = []; + List hcpname = []; + List main = []; + List rel = []; + List level = []; + + DateTime? selectedDate; + final TextEditingController textController = TextEditingController(); + + bool calview = false; + String start = '', end = ''; + + TextEditingController _searchController = TextEditingController(); + + final TextEditingController startController = TextEditingController(); + final TextEditingController endController = TextEditingController(); + + String searchQuery = ''; + + List _dropDownValue1 = [], + _dropDownValue2 = [], + _dropDownValue3 = [], + _dropDownValue4 = [], + _dropDownValue5 = []; + + final TextEditingController textController1 = TextEditingController(); + + @override + void initState() { + // TODO: implement initState + super.initState(); + init(); + } + + Future init() async { + var engagement = + await Provider.of(context, listen: false); + final data = engagement.getengagementdata(); + + final data1 = engagement.engagementdata; + + engagement.gethcpname(); + hcpname = engagement.engagementhcppname; + + print("getnewData: ${hcpname}"); + + engagement.getmaintherepeutic(); + + engagement.getrelationship(); + + engagement.getrelationlevel(); + + setState(() { + eng = data1; + + filteredList = eng; + + main = engagement.enagementhcppmain; + + rel = engagement.enagementhcpprel; + level = engagement.enagementhcplevel; + }); + } + + void _filterList(String query) { + print('filteredList_is: $filteredList'); + setState(() { + searchQuery = query; + filteredList = eng + .where((item) => item['main thereutic area'] + .toLowerCase() + .contains(query.toLowerCase())) + .toList(); + }); + } + + void filtermulti(List query, List query2, List query3, + List query4, String startt, String endd) { + print("query: $query"); + print("query2: $query2"); + print("query3: $query3"); + print("query4: $query4"); + print("startt: $startt"); + print("endd: $endd"); + + // Apply Filters to Each List + // List filteredQuery1 = filterList(query); + // List filteredQuery2 = filterList(query2); + // List filteredQuery3 = filterList(query3); + // List filteredQuery4 = filterList(query4); + + // // Print Results + // print('Filtered Query 1: $filteredQuery1'); + // print('Filtered Query 2: $filteredQuery2'); + // print('Filtered Query 3: $filteredQuery3'); + // print('Filtered Query 4: $filteredQuery4'); + +// Function to filter a list based on each element being used as a keyword + +// filteredList = eng.where((map) { +// String value = map['main thereutic area']?.toLowerCase() ?? ''; +// return query.any((keyword) => value.contains(keyword.toLowerCase())); +// }).toList(); + + final DateFormat formatter = DateFormat('dd-MM-yyyy'); + + //DateTime itemDate = formatter.parse(map['date']); + + setState(() { + filteredList = eng + .where((map) => + // String value = map['main thereutic area'].toLowerCase(); + + //print("Vlaueee_isss: ${value} ${query2}"); + query2.any((keyword) => map['main thereutic area'] + .toLowerCase() + .contains(keyword.toLowerCase())) || + query.any((keyword) => map['hcpname'] + .toLowerCase() + .contains(keyword.toLowerCase())) || + query3.any((keyword) => map['relationship with chiesi'] + .toLowerCase() + .contains(keyword.toLowerCase())) || + query4.any((keyword) => map['level of engagement'] + .toLowerCase() + .contains(keyword.toLowerCase())) + //|| + // formatter + // .parse(map['date']) + // .isAfter(formatter.parse(startt)) && + // formatter + // .parse(map['date']) + // .isBefore(formatter.parse(endd)) + // || + // (DateTime.parse(map['date']).isAfter(DateTime.parse(startt)) && + // DateTime.parse(map['date']) + // .isBefore(DateTime.parse(endd).add(Duration(days: 1)))) + ) + .toList(); + }); + + // setState(() { + // filteredList = eng + // .where((map) => + // // String value = map['main thereutic area'].toLowerCase(); + + // //print("Vlaueee_isss: ${value} ${query2}"); + // query2.any((keyword) => map['main thereutic area'] + // .toLowerCase() + // .contains(keyword.toLowerCase())) || + // query.any((keyword) => map['hcpname'] + // .toLowerCase() + // .contains(keyword.toLowerCase())) || + // query3.any((keyword) => map['relationship with chiesi'] + // .toLowerCase() + // .contains(keyword.toLowerCase())) || + // query4.any((keyword) => map['level of engagement'] + // .toLowerCase() + // .contains(keyword.toLowerCase())) + // //|| + // // formatter + // // .parse(map['date']) + // // .isAfter(formatter.parse(startt)) && + // // formatter + // // .parse(map['date']) + // // .isBefore(formatter.parse(endd)) + // // || + // // (DateTime.parse(map['date']).isAfter(DateTime.parse(startt)) && + // // DateTime.parse(map['date']) + // // .isBefore(DateTime.parse(endd).add(Duration(days: 1)))) + // ) + // .toList(); + // // filteredList = eng + // // .where((item) => item['main thereutic area'].toLowerCase().contains( + // // query.where( + // // (item) => query.any((keyword) => item.contains(keyword)))) + // // // && + // // // item['hcpname'] + // // // .toLowerCase() + // // // .contains(query == null ? ' ' : query.toLowerCase()) && + // // // item['relationship with chiesi'] + // // // .toLowerCase() + // // // .contains(query3 == null ? ' ' : query3.toLowerCase()) + // // ) + // // .toList(); + // // filteredList = eng + // // .where((item) => + // // item['main thereutic area'] + // // .toLowerCase() + // // .contains(query2 == null ? ' ' : query2.toLowerCase()) && + // // item['hcpname'] + // // .toLowerCase() + // // .contains(query == null ? ' ' : query.toLowerCase()) && + // // item['relationship with chiesi'] + // // .toLowerCase() + // // .contains(query3 == null ? ' ' : query3.toLowerCase())) + // // .toList(); + // }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text("Enagagement"), + ), + endDrawer: Drawer( + child: ListView( + children: [ + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceAround, + // children: [ + // // OutlinedButton( + // // onPressed: () { + // // _selectDate(context); + // // }, + // // child: + // // start == null ? Text('Start Date') : Text(start!), + // // ), + // Expanded( + // flex: 1, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: TextFormField( + // controller: startController, + // decoration: InputDecoration( + // isDense: true, + // border: OutlineInputBorder(), + // enabledBorder: OutlineInputBorder( + // borderSide: BorderSide( + // color: Colors.black, + // //width: 2.0, + // ), + // ), + // hintText: "Start Date", + // labelText: startController.text ?? 'Start Date'), + // // focusNode: AlwaysDisabledFocusNode(), + // onTap: () { + // // _selectDate(context); + // }, + // ), + // ), + // ), + // Expanded( + // flex: 1, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: TextFormField( + // controller: endController, + // decoration: InputDecoration( + // isDense: true, + // border: OutlineInputBorder(), + // enabledBorder: OutlineInputBorder( + // borderSide: BorderSide( + // color: Colors.black, + // //width: 2.0, + // ), + // ), + // hintText: "End Date", + // labelText: endController.text ?? 'End Date'), + // // focusNode: AlwaysDisabledFocusNode(), + // onTap: () { + // _selectDate1(context); + // }, + // ), + // ), + // // child: OutlinedButton( + // // onPressed: () { + // // _selectDate1(context); + // // }, + // // child: end == null ? Text('Start Date') : Text(end!), + // // ), + // ), + // ], + // ), + + Row( + children: [ + Expanded( + flex: 1, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: TextFormField( + controller: startController, + readOnly: true, // Make the TextFormField read-only + decoration: InputDecoration( + isDense: true, + labelText: 'Start Date', + // suffixIcon: Icon(Icons.calendar_today), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.black), + borderRadius: BorderRadius.circular(10))), + onTap: () => + _selectDate(context), // Show date picker on tap + ), + ), + ), + Expanded( + flex: 1, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: TextFormField( + controller: endController, + readOnly: true, // Make the TextFormField read-only + decoration: InputDecoration( + isDense: true, + labelText: 'End Date', + // suffixIcon: Icon(Icons.calendar_today), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: Colors.black), + borderRadius: BorderRadius.circular(10))), + onTap: () => + _selectDate1(context), // Show date picker on tap + ), + ), + ), + ], + ), + + // Row( + // children: [ + // Expanded( + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: DropdownButton( + // hint: _dropDownValue1 == null + // ? Text('Dropdown') + // : Text( + // _dropDownValue1!, + // style: TextStyle(color: Colors.blue), + // ), + // isExpanded: true, + // iconSize: 30.0, + // style: TextStyle(color: Colors.blue), + // items: hcpname.map( + // (val) { + // return DropdownMenuItem( + // value: val, + // child: Text(val), + // ); + // }, + // ).toList(), + // onChanged: (val) { + // setState( + // () { + // _dropDownValue1 = val; + // }, + // ); + // }, + // ) + // // TextFormField( + // // controller: textController, + // // decoration: InputDecoration( + // // isDense: true, + // // border: OutlineInputBorder(), + // // hintText: "Employee name", + // // labelText: 'Employee name'), + // // // focusNode: AlwaysDisabledFocusNode(), + // // onTap: () { + // // _selectDate1(context); + // // }, + // // ), + // ), + // ), + // ], + // ), + // Row( + // children: [ + // Expanded( + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: DropdownButton( + // hint: _dropDownValue2 == null + // ? Text('Dropdown') + // : Text( + // _dropDownValue2!, + // style: TextStyle(color: Colors.blue), + // ), + // isExpanded: true, + // iconSize: 30.0, + // style: TextStyle(color: Colors.blue), + // items: main.map( + // (val) { + // return DropdownMenuItem( + // value: val, + // child: Text(val), + // ); + // }, + // ).toList(), + // onChanged: (val) { + // setState( + // () { + // _dropDownValue2 = val; + // }, + // ); + // }, + // ) + // // TextFormField( + // // controller: textController, + // // decoration: InputDecoration( + // // isDense: true, + // // border: OutlineInputBorder(), + // // hintText: "Employee name", + // // labelText: 'Employee name'), + // // // focusNode: AlwaysDisabledFocusNode(), + // // onTap: () { + // // _selectDate1(context); + // // }, + // // ), + // ), + // ), + // ], + // ), + // Row( + // children: [ + // Expanded( + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: DropdownButton( + // hint: _dropDownValue3 == null + // ? Text('Dropdown') + // : Text( + // _dropDownValue3!, + // style: TextStyle(color: Colors.blue), + // ), + // isExpanded: true, + // iconSize: 30.0, + // style: TextStyle(color: Colors.blue), + // items: rel.map( + // (val) { + // return DropdownMenuItem( + // value: val, + // child: Text(val), + // ); + // }, + // ).toList(), + // onChanged: (val) { + // setState( + // () { + // _dropDownValue3 = val; + // }, + // ); + // }, + // ) + // // TextFormField( + // // controller: textController, + // // decoration: InputDecoration( + // // isDense: true, + // // border: OutlineInputBorder(), + // // hintText: "Employee name", + // // labelText: 'Employee name'), + // // // focusNode: AlwaysDisabledFocusNode(), + // // onTap: () { + // // _selectDate1(context); + // // }, + // // ), + // ), + // ), + // ], + // ), + // Row( + // children: [ + // Expanded( + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: DropdownButton( + // hint: _dropDownValue4 == null + // ? Text('Dropdown') + // : Text( + // _dropDownValue4!, + // style: TextStyle(color: Colors.blue), + // ), + // isExpanded: true, + // iconSize: 30.0, + // style: TextStyle(color: Colors.blue), + // items: level.map( + // (val) { + // return DropdownMenuItem( + // value: val, + // child: Text(val), + // ); + // }, + // ).toList(), + // onChanged: (val) { + // setState( + // () { + // _dropDownValue4 = val; + // }, + // ); + // }, + // ) + // // TextFormField( + // // controller: textController, + // // decoration: InputDecoration( + // // isDense: true, + // // border: OutlineInputBorder(), + // // hintText: "Employee name", + // // labelText: 'Employee name'), + // // // focusNode: AlwaysDisabledFocusNode(), + // // onTap: () { + // // _selectDate1(context); + // // }, + // // ), + // ), + // ), + // ], + // ), + + Padding( + padding: const EdgeInsets.all(8.0), + child: MultiSelectDropDown.network( + borderColor: Colors.black, + fieldBackgroundColor: Colors.transparent, + hint: "Select Employee Name", + dropdownHeight: 300, + onOptionSelected: (options) { + debugPrint("checkking" + options.toString()); + + // String label = options[0].label; + List label1 = []; + + // var label; + // debugPrint("checkking " + label); + + // for (var option in options) { + // label1.add(option.label); + // debugPrint("Selected label: $label"); + // } + + for (var option in options) { + print("Options_isssssss: ${option}"); + if (option.label.isNotEmpty) { + label1.add(option.label); + } else { + label1.clear(); + } + debugPrint("Selected label: $label1, ${option.label}"); + } + setState(() { + _dropDownValue1 = label1; + }); + }, + searchEnabled: true, + networkConfig: NetworkConfig( + url: '${Constants.url}/engagement', + method: RequestMethod.get, + headers: { + 'Content-Type': 'application/json', + }, + ), + chipConfig: const ChipConfig(wrapType: WrapType.wrap), + responseParser: (response) { + final list = (response as List).map((e) { + final item = e as Map; + return ValueItem( + label: item['hcpname'], + value: item['id'].toString(), + ); + }).toList(); + + return Future.value(list); + }, + responseErrorBuilder: ((context, body) { + return const Padding( + padding: EdgeInsets.all(16.0), + child: Text('Error fetching the data'), + ); + }), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: MultiSelectDropDown.network( + borderColor: Colors.black, + fieldBackgroundColor: Colors.transparent, + hint: "Select Main Therapeutic Area", + dropdownHeight: 300, + onOptionSelected: (options) { + debugPrint(options.toString()); + + // String label = options[0].label; + List label1 = []; + + // var label; + // debugPrint("checkking " + label); + + // for (var option in options) { + // label1.add(option.label); + // debugPrint("Selected label: $label"); + // } + + for (var option in options) { + print("Options_isssssss: ${option}"); + if (option.label.isNotEmpty) { + label1.add(option.label); + } else { + label1.clear(); + } + debugPrint("Selected label: $label1, ${option.label}"); + } + setState(() { + _dropDownValue2 = label1; + }); + }, + searchEnabled: true, + networkConfig: NetworkConfig( + url: '${Constants.url}/engagement', + method: RequestMethod.get, + headers: { + 'Content-Type': 'application/json', + }, + ), + chipConfig: const ChipConfig(wrapType: WrapType.wrap), + responseParser: (response) { + final list = (response as List).map((e) { + final item = e as Map; + return ValueItem( + label: item['main thereutic area'], + value: item['id'].toString(), + ); + }).toList(); + + return Future.value(list); + }, + responseErrorBuilder: ((context, body) { + return const Padding( + padding: EdgeInsets.all(16.0), + child: Text('Error fetching the data'), + ); + }), + ), + ), + + Padding( + padding: const EdgeInsets.all(8.0), + child: MultiSelectDropDown.network( + borderColor: Colors.black, + fieldBackgroundColor: Colors.transparent, + hint: "Select Relationship with Chiesi", + dropdownHeight: 300, + onOptionSelected: (options) { + debugPrint(options.toString()); + + // String label = options[0].label; + List label1 = []; + + // var label; + // debugPrint("checkking " + label); + + // for (var option in options) { + // label1.add(option.label); + // debugPrint("Selected label: $label"); + // } + for (var option in options) { + print("Options_isssssss: ${option}"); + if (option.label.isNotEmpty) { + label1.add(option.label); + } else { + label1.clear(); + } + debugPrint("Selected label: $label1, ${option.label}"); + } + + setState(() { + _dropDownValue3 = label1; + }); + }, + searchEnabled: true, + networkConfig: NetworkConfig( + url: '${Constants.url}/engagement', + method: RequestMethod.get, + headers: { + 'Content-Type': 'application/json', + }, + ), + chipConfig: const ChipConfig(wrapType: WrapType.wrap), + responseParser: (response) { + final list = (response as List).map((e) { + final item = e as Map; + return ValueItem( + label: item['relationship with chiesi'], + value: item['id'].toString(), + ); + }).toList(); + + return Future.value(list); + }, + responseErrorBuilder: ((context, body) { + return const Padding( + padding: EdgeInsets.all(16.0), + child: Text('Error fetching the data'), + ); + }), + ), + ), + + Padding( + padding: const EdgeInsets.all(8.0), + child: MultiSelectDropDown.network( + borderColor: Colors.black, + fieldBackgroundColor: Colors.transparent, + hint: "Select Level of Engagement", + dropdownHeight: 300, + onOptionSelected: (options) { + debugPrint(options.toString()); + + // String label = options[0].label.toString(); + List label1 = []; + + // var label; + // debugPrint("checkking " + label); + //debugPrint("checkking " + label.isNotEmpty); + + // if (label.isNotEmpty) { + for (var option in options) { + print("Options_isssssss: ${option}"); + if (option.label.isNotEmpty) { + label1.add(option.label); + } else { + label1.clear(); + } + debugPrint("Selected label: $label1, ${option.label}"); + } + // } else { + // debugPrint("DESelected label: $label"); + + // label1.clear(); + // } + + setState(() { + _dropDownValue4 = label1; + }); + }, + searchEnabled: true, + networkConfig: NetworkConfig( + url: '${Constants.url}/engagement', + method: RequestMethod.get, + headers: { + 'Content-Type': 'application/json', + }, + ), + chipConfig: const ChipConfig(wrapType: WrapType.wrap), + responseParser: (response) { + final list = (response as List).map((e) { + final item = e as Map; + return ValueItem( + label: item['level of engagement'], + value: item['id'].toString(), + ); + }).toList(); + + return Future.value(list); + }, + responseErrorBuilder: ((context, body) { + return const Padding( + padding: EdgeInsets.all(16.0), + child: Text('Error fetching the data'), + ); + }), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: OutlinedButton( + onPressed: () { + print( + "$_dropDownValue1 , $_dropDownValue2, $_dropDownValue3, $_dropDownValue4"); + + filtermulti(_dropDownValue1, _dropDownValue2, _dropDownValue3, + _dropDownValue4, start, end); + // filtermulti(_dropDownValue1 ?? null, _dropDownValue2 ?? null, + // _dropDownValue3 ?? null, _dropDownValue4 ?? null); + + // setState(() { + // // searchQuery = query; + + // filteredList = eng + // .where((item) => item['level of engagement'] + // .toLowerCase() + // .contains(_dropDownValue4!.toLowerCase())|| + // item['relationship with chiesi'].toLowerCase().contains(_dropDownValue3!.toLowerCase()) || + // item['main thereutic area'].toLowerCase().contains(_dropDownValue2!.toLowerCase())|| + // item['recorded by'].toLowerCase().contains(_dropDownValue1!.toLowerCase()) ) + // .toList(); + // }); + }, + child: Text( + 'Apply Filters', + style: TextStyle(color: Constants.k2color), + ), + style: OutlinedButton.styleFrom( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + ), + ), + ), + ), + ], + ), + //child: // Populate the Drawer in the next step. + ), + body: Column(children: [ + Padding( + padding: const EdgeInsets.only( + top: 15.0, bottom: 0.0, left: 20.0, right: 20.0), + child: Center( + child: TextField( + controller: _searchController, + onChanged: _filterList, + decoration: InputDecoration( + fillColor: Constants.k2color, + contentPadding: EdgeInsets.symmetric(vertical: 9.0), + border: OutlineInputBorder(), + labelText: ' Search', + prefixIcon: Icon( + Icons.search, + ), + ), + ), + ), + ), + Scrollbar( + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Container( + // width: + // MediaQuery.of(context) + // .size + // .width, + constraints: + BoxConstraints(minWidth: MediaQuery.of(context).size.width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: false, + columns: const [ + // DataColumn( + // label: Expanded( + // child: Text( + // '', + // softWrap: + // true))), + DataColumn( + label: Expanded( + child: Text( + 'Main Therapeutic Area', + style: TextStyle(fontWeight: FontWeight.w600), + ), + )), + // DataColumn( + // label: Expanded( + // child: Text( + // 'Department'))), + // DataColumn( + // label: Expanded( + // child: Text( + // 'Role'))), + DataColumn( + label: Expanded( + child: Text('Date', + style: TextStyle(fontWeight: FontWeight.w600)))), + // DataColumn( + // label: Expanded( + // child: Text( + // 'Org Type'))), + // DataColumn( + // label: Expanded( + // child: Text( + // 'Eng Type'))), + + // Add more columns as needed + ], + rows: List.generate( + filteredList.length, + (index) => DataRow( + onSelectChanged: (value) { + // =======> Use onSelectChanged for tab + // print("message ${eng[index]}"); + + // bsheet( + // publication_data[ + // index]); + showModalBottomSheet( + useRootNavigator: true, + isScrollControlled: false, + enableDrag: true, + useSafeArea: true, + constraints: const BoxConstraints( + maxWidth: double.infinity, + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.vertical( + top: Radius.circular(0), + ), + ), + clipBehavior: Clip.antiAliasWithSaveLayer, + context: context, + builder: (context) { + return bsheet(filteredList[index]); + }, + ); + // showBottomSheet( + // context: + // context, + // builder: + // (BuildContext + // context) { + // return bsheet( + // publication_data[ + // index]); // returns your BottomSheet widget + // }); + }, + color: MaterialStateProperty.resolveWith( + (Set states) { + if (index.isEven) { + return Colors.grey.withOpacity(0.1); + } + return null; + }), + cells: [ + // DataCell(Text( + // affiliation_data[ + // index] + // ['id'] + // .toString(), + // softWrap: + // true)), + DataCell(Text( + filteredList[index]['main thereutic area'].toString(), + softWrap: true)), + // DataCell(Text( + // affiliation_data[ + // index] + // [ + // 'dept'] + // .toString(), + // softWrap: + // true)), + // DataCell(Text( + // affiliation_data[ + // index] + // [ + // 'role'] + // .toString(), + // softWrap: + // true)), + DataCell(Text(filteredList[index]['date'].toString(), + softWrap: true)), + // DataCell(Text( + // affiliation_data[ + // index] + // [ + // 'org_type'] + // .toString(), + // softWrap: + // true)), + // DataCell(Text( + // affiliation_data[ + // index] + // [ + // 'emg_type'] + // .toString(), + // softWrap: + // true)), + + // Add more DataCells as needed + ], + ), + ), + ), + ), + ), + ), + ]), + ); + } + + Future _selectDate(BuildContext context) async { + final DateTime? picked = await showDatePicker( + context: context, + initialDate: selectedDate, + firstDate: DateTime(1901, 1), + lastDate: DateTime(2100)); + if (picked != null && picked != selectedDate) { + setState(() { + selectedDate = picked; + String convertedDateTime = + "${picked.day.toString().padLeft(2, '0')}-${picked.month.toString().padLeft(2, '0')}-${picked.year.toString()}"; + // widget.textController.value = TextEditingValue(text: picked.toString()); + startController.value = TextEditingValue(text: convertedDateTime); + // textController1.value = TextEditingValue(text: convertedDateTime); + + start = convertedDateTime; + + print("Iam__Start: $start"); + }); + } + } + + Future _selectDate1(BuildContext context) async { + final DateTime? picked = await showDatePicker( + context: context, + initialDate: selectedDate, + firstDate: DateTime(1901, 1), + lastDate: DateTime(2100)); + if (picked != null && picked != selectedDate) { + setState(() { + selectedDate = picked; + String convertedDateTime = + "${picked.day.toString().padLeft(2, '0')}-${picked.month.toString().padLeft(2, '0')}-${picked.year.toString()}"; + // widget.textController.value = TextEditingValue(text: picked.toString()); + endController.value = TextEditingValue(text: convertedDateTime); + + end = convertedDateTime; + }); + } + } + + String _convertDateStringToISO(String dateString) { + DateTime dateTime = DateTime.parse(DateTime.tryParse( + dateString.split('/').reversed.join('-') + 'T00:00:00Z')! + .toIso8601String()); + + print("dateTimedateTime: $dateTime"); + return dateTime.toIso8601String(); + } + // List filterList(List list) { + // return list + // .where((item) => list.any((keyword) => item.contains(keyword))) + // .toList(); + // } +} diff --git a/lib/ui_screen/interactionform/model/engagement_interaction.dart b/lib/ui_screen/interactionform/model/engagement_interaction.dart new file mode 100644 index 0000000..274b08e --- /dev/null +++ b/lib/ui_screen/interactionform/model/engagement_interaction.dart @@ -0,0 +1,121 @@ +// import 'package:discover_module/ui_screen/interactionform/model/interaction_data.dart'; +// import 'package:hive_flutter/hive_flutter.dart'; +// // import 'package:pwa_ios/model/interaction_data.dart'; + +// part 'interaction_config_data.g.dart'; + +// class UIDataResponse { +// bool success; +// String message; + +// List formFields; + +// UIDataResponse({ +// required this.success, +// required this.message, +// required this.formFields, +// }); + +// factory UIDataResponse.fromJson(Map json) => UIDataResponse( +// success: json["success"], +// message: json["message"], +// formFields: List.from( +// json["data"].map((x) => FormFieldData.fromJson(x))), +// ); + +// Map toJson() => { +// "success": success, +// "message": message, +// "form-fields": List.from(formFields.map((x) => x.toJson())), +// }; + +// @override +// String toString() { +// // TODO: implement toString +// return List.from(formFields.map((x) => x.toJson())).toString(); +// } +// } + +// @HiveType(typeId: 19) +// class InteractionConfigData { +// @HiveField(1) +// InteractionResultData widgets; +// @HiveField(2) +// String id; +// @HiveField(3) +// String name; + +// InteractionConfigData({ +// required this.widgets, +// required this.id, +// required this.name, +// }); + +// Map toJson() => {"widgets": widgets}; +// } + +//pooja + +import 'package:discover_module/ui_screen/interactionform/model/interaction_data.dart'; +import 'package:hive_flutter/hive_flutter.dart'; +// import 'package:pwa_ios/model/interaction_data.dart'; + +part 'engagement_interaction.g.dart'; + +class UIDataResponse { + bool success; + String message; + + List formFields; + + String? formtype; + + UIDataResponse({ + required this.success, + required this.message, + required this.formFields, + this.formtype, + }); + + factory UIDataResponse.fromJson(Map json) => UIDataResponse( + success: json["success"], + message: json["message"], + formtype: json["formtype"], + formFields: List.from( + json["data"].map((x) => FormFieldData.fromJson(x))), + ); + + Map toJson() => { + "success": success, + "message": message, + "formtype": formtype, + "form-fields": List.from(formFields.map((x) => x.toJson())), + }; + + @override + String toString() { + // TODO: implement toString + return List.from(formFields.map((x) => x.toJson())).toString(); + } +} + +@HiveType(typeId: 29) +class InteractionConfigDataEng { + @HiveField(1) + InteractionConfigDataEng widgets; + @HiveField(2) + String id; + @HiveField(3) + String name; + @HiveField(4) + String? formtype; + + InteractionConfigDataEng({ + required this.widgets, + required this.id, + required this.name, + this.formtype, + }); + + Map toJson() => {"widgets": widgets}; +} diff --git a/lib/ui_screen/interactionform/model/engagement_interaction.g.dart b/lib/ui_screen/interactionform/model/engagement_interaction.g.dart new file mode 100644 index 0000000..7bbea37 --- /dev/null +++ b/lib/ui_screen/interactionform/model/engagement_interaction.g.dart @@ -0,0 +1,51 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'engagement_interaction.dart'; + +// ************************************************************************** +// TypeAdapterGenerator +// ************************************************************************** + +class InteractionConfigDataAdapter + extends TypeAdapter { + @override + final int typeId = 19; + + @override + InteractionConfigDataEng read(BinaryReader reader) { + final numOfFields = reader.readByte(); + final fields = { + for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), + }; + return InteractionConfigDataEng( + widgets: fields[1] as InteractionConfigDataEng, + id: fields[2] as String, + name: fields[3] as String, + formtype: fields[4] as String?, + ); + } + + @override + void write(BinaryWriter writer, InteractionConfigDataEng obj) { + writer + ..writeByte(4) + ..writeByte(1) + ..write(obj.widgets) + ..writeByte(2) + ..write(obj.id) + ..writeByte(3) + ..write(obj.name) + ..writeByte(4) + ..write(obj.formtype); + } + + @override + int get hashCode => typeId.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is InteractionConfigDataAdapter && + runtimeType == other.runtimeType && + typeId == other.typeId; +} diff --git a/lib/ui_screen/new_contacts.dart b/lib/ui_screen/new_contacts.dart index 77b9626..e02bd5a 100644 --- a/lib/ui_screen/new_contacts.dart +++ b/lib/ui_screen/new_contacts.dart @@ -593,6 +593,8 @@ import 'package:discover_module/constants.dart'; import 'package:discover_module/provider_class/hcp%20_provider.dart'; +import 'package:discover_module/ui_screen/filters_menu.dart'; +import 'package:dropdownfield2/dropdownfield2.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; @@ -618,25 +620,56 @@ class _Contacts1State extends State { final TextEditingController _searchController = TextEditingController(); + List ddlist = ["aaaa", 'bbb']; + + // List ddlist = ['Option 1', 'Option 2', 'Option 3']; + + String _selectedValue = ''; + + String dropdownvalue = 'Profile Type'; + + // List of items in our dropdown menu + var items = [ + 'Profile Type', + 'HCP Name', + 'Speciality', + 'Country', + 'Region', + 'State', + 'City', + 'List', + 'Organization', + 'Event', + ]; + @override void initState() { super.initState(); - setupConnectivityListener(); Provider.of(context, listen: false).getHCPProvider(); } - Future setupConnectivityListener() async { - // Your connectivity setup code - } - @override Widget build(BuildContext context) { + print("ProfileType $dropdownvalue"); + + if (dropdownvalue == "Profile Type") { + print("PPPP"); + setState(() { + ddlist = [ + "All Profile", + 'Full Profile', + 'Basic Profile', + ]; + }); + } + SystemChrome.setSystemUIOverlayStyle( SystemUiOverlayStyle(statusBarColor: Color.fromARGB(255, 0, 71, 132))); return SafeArea( child: Scaffold( - backgroundColor: const Color.fromARGB(255, 246, 248, 252), + // backgroundColor: const Color.fromARGB(255, 246, 248, 252), + // backgroundColor: Color.fromARGB(255, 255, 242, 0.92), appBar: AppBar( automaticallyImplyLeading: false, title: SvgPicture.asset( @@ -646,6 +679,10 @@ class _Contacts1State extends State { colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn), ), ), + endDrawer: Drawer( + // width: MediaQuery.of(context).size.width * 99.2, + child: listdata(), + ), body: Consumer( builder: (context, hcpProvider, child) { List displayedHCPList = @@ -763,9 +800,12 @@ class _Contacts1State extends State { ) : ClipOval( child: SizedBox.fromSize( - size: Size.fromRadius(25), - child: Image.network(data["img_path"], - fit: BoxFit.fill), + size: Size.fromRadius(35), + child: AspectRatio( + aspectRatio: 16 / 9, + child: Image.network(data["img_path"], + fit: BoxFit.fill), + ), ), ), trailing: Icon( @@ -793,20 +833,45 @@ class _Contacts1State extends State { ), ], ), - Row( - children: [ - Text( - "Added by Pooja k\nAdded on 01/07/2023", - style: const TextStyle( - fontSize: 12.0, - fontWeight: FontWeight.normal, - ), - ) - ], - ) + // Row( + // children: [ + // Text( + // "Added by Pooja k\nAdded on 01/07/2023", + // style: const TextStyle( + // fontSize: 12.0, + // fontWeight: FontWeight.normal, + // ), + // ) + // ], + // ) ], ), ), + const Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Padding( + padding: EdgeInsets.only(left: 10.0), + child: Text( + "Added by Pooja k", + style: TextStyle( + fontSize: 12.0, + fontWeight: FontWeight.normal, + ), + ), + ), + Padding( + padding: EdgeInsets.only(right: 10.0), + child: Text( + "Added on 01/07/2023", + style: TextStyle( + fontSize: 12.0, + fontWeight: FontWeight.normal, + ), + ), + ) + ], + ), Divider(), ], ); @@ -820,4 +885,917 @@ class _Contacts1State extends State { ), ); } + + listdata() { + return ListView( + children: [ + // DrawerHeader removed + ListTile( + title: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Icon( + Icons.filter_alt, + size: 30.0, + ), + const Text( + "Filters", + style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold), + ), + GestureDetector( + onTap: () { + Navigator.pop(context); + // print("hiii"); + }, + child: const Icon(Icons.cancel)) + ], + ), + ), + ), + + ListTile( + title: SizedBox( + width: MediaQuery.of(context).size.width, + child: DropdownButtonFormField( + decoration: InputDecoration( + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide(width: 1, color: Colors.black)), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10), + borderSide: BorderSide(width: 1, color: Colors.black), + ), + ), + + value: dropdownvalue, + + items: items.map((String items) { + return DropdownMenuItem( + value: items, + child: Text( + items, + style: TextStyle(fontSize: 14.0), + ), + ); + }).toList(), + // After selecting the desired option,it will + // change button value to selected value + onChanged: (String? newValue) { + setState(() { + dropdownvalue = newValue!; + }); + }, + ), + ), + ), + + ListTile( + title: Container( + decoration: BoxDecoration( + border: Border.all(color: Colors.black), + borderRadius: BorderRadius.circular(10)), + child: Padding( + padding: const EdgeInsets.all(3.5), + child: DropDownField( + hintText: 'Select an option', + items: ddlist, + onValueChanged: (newValue) { + setState(() { + _selectedValue = newValue; + }); + }, + value: _selectedValue, + ), + ), + ), + ), + ], + ); + } } + +// // // import 'package:discover_module/provider_class/hcp%20_provider.dart'; +// // // import 'package:discover_module/ui_screen/interactionform/NewtworkConnectivity.dart'; +// // // import 'package:discover_module/ui_screen/new_profile.dart'; +// // // import 'package:flutter/cupertino.dart'; +// // // import 'package:flutter/material.dart'; +// // // import 'package:flutter_profile_picture/flutter_profile_picture.dart'; +// // // import 'package:hive_flutter/hive_flutter.dart'; +// // // import 'package:provider/provider.dart'; +// // // import 'package:flutter/services.dart'; +// // // import 'package:discover_module/ui_screen/profile.dart'; + +// // // class Contacts1 extends StatefulWidget { +// // // const Contacts1({Key? key}) : super(key: key); + +// // // @override +// // // State createState() => _Contacts1State(); +// // // } + +// // // class _Contacts1State extends State { +// // // final _contactBox = Hive.box("mycontact"); +// // // bool _switchValue = false; +// // // bool isOnline2 = true; + +// // // final TextEditingController _searchController = TextEditingController(); + +// // // @override +// // // void initState() { +// // // super.initState(); +// // // setupConnectivityListener(); +// // // getCall(); +// // // } + +// // // Future setupConnectivityListener() async { +// // // while (true) { +// // // bool isOnline = await NetworkConnectivity().isInternetAvailable(); +// // // print('Internet contact available: $isOnline'); +// // // await Future.delayed(Duration(seconds: 2)); +// // // if (mounted) { +// // // setState(() { +// // // isOnline2 = isOnline; +// // // }); +// // // } +// // // } +// // // } + +// // // // @override +// // // // void dispose() { +// // // // // TODO: implement dispose +// // // // } +// // // void getCall() async { +// // // await Provider.of(context, listen: false).getHCPProvider(); +// // // } + +// // // @override +// // // Widget build(BuildContext context) { +// // // SystemChrome.setSystemUIOverlayStyle( +// // // SystemUiOverlayStyle(statusBarColor: Color.fromARGB(255, 0, 71, 132))); + +// // // return SafeArea( +// // // child: Scaffold( +// // // body: Consumer( +// // // builder: (context, value, child) { +// // // return Column( +// // // children: [ +// // // Row( +// // // mainAxisAlignment: MainAxisAlignment.center, +// // // children: [ +// // // Expanded( +// // // child: Padding( +// // // padding: const EdgeInsets.only(left: 45.0), +// // // child: Text( +// // // _switchValue ? "My Contacts" : "All Contacts", +// // // textAlign: TextAlign.center, +// // // style: TextStyle( +// // // fontSize: 20.0, +// // // fontWeight: FontWeight.w500, +// // // ), +// // // ), +// // // ), +// // // ), +// // // Row( +// // // mainAxisSize: MainAxisSize.min, +// // // children: [ +// // // _switchValue +// // // ? const Text( +// // // 'All', +// // // style: TextStyle( +// // // fontSize: 12, +// // // decoration: TextDecoration.lineThrough, +// // // decorationThickness: 0.85, +// // // ), +// // // ) +// // // : const Text( +// // // 'All', +// // // style: TextStyle( +// // // fontSize: 12, +// // // ), +// // // ), +// // // CupertinoSwitch( +// // // activeColor: Color.fromARGB(255, 0, 71, 132), +// // // value: _switchValue, +// // // onChanged: (value) { +// // // setState(() { +// // // _switchValue = value; +// // // }); +// // // }, +// // // ), +// // // Padding( +// // // padding: const EdgeInsets.only(right: 8.0), +// // // child: !_switchValue +// // // ? const Text( +// // // 'My', +// // // style: TextStyle( +// // // fontSize: 12, +// // // decoration: TextDecoration.lineThrough, +// // // decorationThickness: 0.85, +// // // ), +// // // ) +// // // : const Text( +// // // 'My', +// // // style: TextStyle( +// // // fontSize: 12, +// // // ), +// // // ), +// // // ) +// // // ], +// // // ), +// // // ], +// // // ), + +// // // Padding( +// // // padding: const EdgeInsets.only( +// // // top: 8.0, bottom: 8.0, left: 20.0, right: 20.0), +// // // child: Center( +// // // child: TextField( +// // // controller: _searchController, +// // // onChanged: (value) { +// // // setState(() { +// // // Provider.of(context, listen: false) +// // // .getHCPProvider(); +// // // // Provider.of(context, +// // // // listen: false) +// // // // .searchInHive( +// // // // value); // Update the search results +// // // }); +// // // }, +// // // // ignore: prefer_const_constructors +// // // decoration: InputDecoration( +// // // contentPadding: const EdgeInsets.symmetric( +// // // vertical: 9.0), // Adjust the vertical padding + +// // // border: const OutlineInputBorder(), +// // // labelText: ' Search', +// // // prefixIcon: const Icon(Icons.search), +// // // )), +// // // ), +// // // ), +// // // !_switchValue ? Listdisplay(value) : Listdisplay1(_contactBox) +// // // // Expanded( +// // // // child: ListView.builder( +// // // // itemCount: _contactBox.values.length, +// // // // itemBuilder: (BuildContext context, int index) { +// // // // var data = _contactBox.get(index); +// // // // print(":data_is: $data"); +// // // // return ListTile( +// // // // onTap: () { +// // // // Navigator.push( +// // // // context, +// // // // MaterialPageRoute( +// // // // builder: (context) => NewProfile( +// // // // text: data!, +// // // // ), +// // // // ), +// // // // ); +// // // // }, +// // // // leading: ProfilePicture( +// // // // name: data["name"], +// // // // radius: 20, +// // // // fontsize: 12, +// // // // ), +// // // // title: Text( +// // // // data["name"], +// // // // style: TextStyle( +// // // // fontSize: 18.0, +// // // // fontWeight: FontWeight.bold, +// // // // ), +// // // // ), +// // // // subtitle: Text( +// // // // "Added by Pooja.K", +// // // // style: TextStyle( +// // // // fontSize: 14.0, +// // // // fontWeight: FontWeight.normal, +// // // // ), +// // // // ), +// // // // ); +// // // // }, +// // // // ), +// // // // ), +// // // ], +// // // ); +// // // }, +// // // ), +// // // ), +// // // ); +// // // } + +// // // Listdisplay(hcpProvider value) { +// // // return Expanded( +// // // child: ListView.builder( +// // // itemCount: value.list.length, +// // // itemBuilder: (BuildContext context, int index) { +// // // var data = value.list[index]; +// // // return Column( +// // // children: [ +// // // ListTile( +// // // onTap: () { +// // // // Navigator.push( +// // // // context, +// // // // MaterialPageRoute( +// // // // builder: (context) => Profile( +// // // // text: data, +// // // // ), +// // // // ), +// // // // ); + +// // // Navigator.push( +// // // context, +// // // MaterialPageRoute( +// // // builder: (_) => NewProfile(text: data))); +// // // }, +// // // leading: data["img_path"] == null +// // // ? ProfilePicture( +// // // name: data["name"], +// // // radius: 20, +// // // fontsize: 12, +// // // ) +// // // : ClipOval( +// // // child: SizedBox.fromSize( +// // // size: Size.fromRadius(20), +// // // child: Image.network(data["img_path"], +// // // fit: BoxFit.cover), +// // // ), +// // // ), +// // // trailing: Text("Added by\nPooja k"), +// // // title: Text( +// // // "${data["name"]}", +// // // style: const TextStyle( +// // // fontSize: 18.0, +// // // fontWeight: FontWeight.bold, +// // // ), +// // // ), +// // // subtitle: Text( +// // // "${data["speciality"]}\n${data["addr"]},", +// // // style: const TextStyle( +// // // fontSize: 14.0, +// // // fontWeight: FontWeight.normal, +// // // ), +// // // ), +// // // ), +// // // Divider(), +// // // ], +// // // ); +// // // }, +// // // ), +// // // ); +// // // } + +// // // Listdisplay1(Box value) { +// // // return Expanded( +// // // child: ListView.builder( +// // // itemCount: value.values.length, +// // // itemBuilder: (BuildContext context, int index) { +// // // var data = value.get(index); +// // // return Column( +// // // children: [ +// // // ListTile( +// // // onTap: () { +// // // // Navigator.push( +// // // // context, +// // // // MaterialPageRoute( +// // // // builder: (context) => Profile( +// // // // text: data, +// // // // ), +// // // // ), +// // // // ); + +// // // Navigator.push( +// // // context, +// // // MaterialPageRoute( +// // // builder: (_) => NewProfile(text: data))); +// // // }, +// // // leading: data["img_path"] == null +// // // ? ProfilePicture( +// // // name: data["name"], +// // // radius: 20, +// // // fontsize: 12, +// // // ) +// // // : ClipOval( +// // // child: SizedBox.fromSize( +// // // size: Size.fromRadius(20), +// // // child: Image.network(data["img_path"], +// // // fit: BoxFit.cover), +// // // ), +// // // ), +// // // trailing: Text("Added by\nPooja k"), +// // // title: Text( +// // // "${data["name"]}", +// // // style: const TextStyle( +// // // fontSize: 18.0, +// // // fontWeight: FontWeight.bold, +// // // ), +// // // ), +// // // subtitle: Text( +// // // "${data["speciality"]}\n${data["addr"]},", +// // // style: const TextStyle( +// // // fontSize: 14.0, +// // // fontWeight: FontWeight.normal, +// // // ), +// // // ), +// // // ), +// // // Divider(), +// // // ], +// // // ); +// // // }, +// // // ), +// // // ); +// // // } +// // // } +// // import 'package:flutter/material.dart'; +// // import 'package:flutter/cupertino.dart'; +// // import 'package:flutter_profile_picture/flutter_profile_picture.dart'; +// // import 'package:hive_flutter/hive_flutter.dart'; +// // import 'package:provider/provider.dart'; +// // import 'package:flutter/services.dart'; +// // import 'package:discover_module/provider_class/hcp%20_provider.dart'; +// // import 'package:discover_module/ui_screen/profile.dart'; +// // import 'package:discover_module/ui_screen/new_profile.dart'; +// // import 'package:discover_module/ui_screen/interactionform/NewtworkConnectivity.dart'; + +// // class Contacts1 extends StatefulWidget { +// // const Contacts1({Key? key}) : super(key: key); + +// // @override +// // State createState() => _Contacts1State(); +// // } + +// // class _Contacts1State extends State { +// // final _contactBox = Hive.box("mycontact"); +// // bool _switchValue = false; +// // bool isOnline2 = true; + +// // final TextEditingController _searchController = TextEditingController(); + +// // @override +// // void initState() { +// // super.initState(); +// // setupConnectivityListener(); +// // getCall(); +// // } + +// // Future setupConnectivityListener() async { +// // while (true) { +// // bool isOnline = await NetworkConnectivity().isInternetAvailable(); +// // print('Internet contact available: $isOnline'); +// // await Future.delayed(Duration(seconds: 2)); +// // if (mounted) { +// // setState(() { +// // isOnline2 = isOnline; +// // }); +// // } +// // } +// // } + +// // void getCall() async { +// // await Provider.of(context, listen: false).getHCPProvider(); +// // } + +// // @override +// // Widget build(BuildContext context) { +// // SystemChrome.setSystemUIOverlayStyle( +// // SystemUiOverlayStyle(statusBarColor: Color.fromARGB(255, 0, 71, 132))); + +// // return SafeArea( +// // child: Scaffold( +// // body: Consumer( +// // builder: (context, value, child) { +// // return Column( +// // children: [ +// // Row( +// // mainAxisAlignment: MainAxisAlignment.center, +// // children: [ +// // Expanded( +// // child: Padding( +// // padding: const EdgeInsets.only(left: 45.0), +// // child: Text( +// // _switchValue ? "My Contacts" : "All Contacts", +// // textAlign: TextAlign.center, +// // style: TextStyle( +// // fontSize: 20.0, +// // fontWeight: FontWeight.w500, +// // ), +// // ), +// // ), +// // ), +// // Row( +// // mainAxisSize: MainAxisSize.min, +// // children: [ +// // _switchValue +// // ? const Text( +// // 'All', +// // style: TextStyle( +// // fontSize: 12, +// // decoration: TextDecoration.lineThrough, +// // decorationThickness: 0.85, +// // ), +// // ) +// // : const Text( +// // 'All', +// // style: TextStyle( +// // fontSize: 12, +// // ), +// // ), +// // CupertinoSwitch( +// // activeColor: Color.fromARGB(255, 0, 71, 132), +// // value: _switchValue, +// // onChanged: (value) { +// // setState(() { +// // _switchValue = value; +// // }); +// // }, +// // ), +// // Padding( +// // padding: const EdgeInsets.only(right: 8.0), +// // child: !_switchValue +// // ? const Text( +// // 'My', +// // style: TextStyle( +// // fontSize: 12, +// // decoration: TextDecoration.lineThrough, +// // decorationThickness: 0.85, +// // ), +// // ) +// // : const Text( +// // 'My', +// // style: TextStyle( +// // fontSize: 12, +// // ), +// // ), +// // ) +// // ], +// // ), +// // ], +// // ), +// // Padding( +// // padding: const EdgeInsets.only( +// // top: 8.0, bottom: 8.0, left: 20.0, right: 20.0), +// // child: Center( +// // child: TextField( +// // controller: _searchController, +// // onChanged: (value) { +// // setState(() { +// // Provider.of(context, listen: false) +// // .getHCPProvider1(query: value); +// // }); +// // }, +// // decoration: InputDecoration( +// // contentPadding: +// // const EdgeInsets.symmetric(vertical: 9.0), +// // border: const OutlineInputBorder(), +// // labelText: ' Search', +// // prefixIcon: const Icon(Icons.search), +// // ), +// // ), +// // ), +// // ), +// // !_switchValue ? Listdisplay(value) : Listdisplay1(_contactBox), +// // ], +// // ); +// // }, +// // ), +// // ), +// // ); +// // } + +// // Widget Listdisplay(hcpProvider value) { +// // return Expanded( +// // child: ListView.builder( +// // itemCount: value.list.length, +// // itemBuilder: (BuildContext context, int index) { +// // var data = value.list[index]; +// // return Column( +// // children: [ +// // ListTile( +// // onTap: () { +// // Navigator.push( +// // context, +// // MaterialPageRoute( +// // builder: (context) => NewProfile(text: data), +// // ), +// // ); +// // }, +// // leading: data["img_path"] == null +// // ? ProfilePicture( +// // name: data["name"], +// // radius: 20, +// // fontsize: 12, +// // ) +// // : ClipOval( +// // child: SizedBox.fromSize( +// // size: Size.fromRadius(20), +// // child: Image.network(data["img_path"], +// // fit: BoxFit.cover), +// // ), +// // ), +// // trailing: Text("Added by\nPooja k"), +// // title: Text( +// // "${data["name"]}", +// // style: const TextStyle( +// // fontSize: 18.0, +// // fontWeight: FontWeight.bold, +// // ), +// // ), +// // subtitle: Text( +// // "${data["speciality"]}\n${data["addr"]},", +// // style: const TextStyle( +// // fontSize: 14.0, +// // fontWeight: FontWeight.normal, +// // ), +// // ), +// // ), +// // Divider(), +// // ], +// // ); +// // }, +// // ), +// // ); +// // } + +// // Widget Listdisplay1(Box value) { +// // return Expanded( +// // child: ListView.builder( +// // itemCount: value.values.length, +// // itemBuilder: (BuildContext context, int index) { +// // var data = value.get(index); +// // return Column( +// // children: [ +// // ListTile( +// // onTap: () { +// // Navigator.push( +// // context, +// // MaterialPageRoute( +// // builder: (context) => NewProfile(text: data), +// // ), +// // ); +// // }, +// // leading: data["img_path"] == null +// // ? ProfilePicture( +// // name: data["name"], +// // radius: 20, +// // fontsize: 12, +// // ) +// // : ClipOval( +// // child: SizedBox.fromSize( +// // size: Size.fromRadius(20), +// // child: Image.network(data["img_path"], +// // fit: BoxFit.cover), +// // ), +// // ), +// // trailing: Text("Added by\nPooja k"), +// // title: Text( +// // "${data["name"]}", +// // style: const TextStyle( +// // fontSize: 18.0, +// // fontWeight: FontWeight.bold, +// // ), +// // ), +// // subtitle: Text( +// // "${data["speciality"]}\n${data["addr"]},", +// // style: const TextStyle( +// // fontSize: 14.0, +// // fontWeight: FontWeight.normal, +// // ), +// // ), +// // ), +// // Divider(), +// // ], +// // ); +// // }, +// // ), +// // ); +// // } +// // } + +// import 'package:discover_module/constants.dart'; +// import 'package:discover_module/provider_class/hcp%20_provider.dart'; +// import 'package:flutter/cupertino.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter_svg/svg.dart'; +// import 'package:provider/provider.dart'; +// import 'package:flutter/services.dart'; +// import 'package:flutter_profile_picture/flutter_profile_picture.dart'; +// import 'package:hive_flutter/hive_flutter.dart'; +// import 'package:discover_module/ui_screen/profile.dart'; +// import 'package:discover_module/ui_screen/new_profile.dart'; +// import 'package:discover_module/ui_screen/interactionform/NewtworkConnectivity.dart'; + +// class Contacts1 extends StatefulWidget { +// const Contacts1({Key? key}) : super(key: key); + +// @override +// State createState() => _Contacts1State(); +// } + +// class _Contacts1State extends State { +// final _contactBox = Hive.box("mycontact"); +// bool _switchValue = false; +// bool isOnline2 = true; + +// final TextEditingController _searchController = TextEditingController(); + +// @override +// void initState() { +// super.initState(); +// setupConnectivityListener(); +// Provider.of(context, listen: false).getHCPProvider(); +// } + +// Future setupConnectivityListener() async { +// // Your connectivity setup code +// } + +// @override +// Widget build(BuildContext context) { +// SystemChrome.setSystemUIOverlayStyle( +// SystemUiOverlayStyle(statusBarColor: Color.fromARGB(255, 0, 71, 132))); + +// return SafeArea( +// child: Scaffold( +// backgroundColor: const Color.fromARGB(255, 246, 248, 252), +// appBar: AppBar( +// automaticallyImplyLeading: false, +// title: SvgPicture.asset( +// 'assets/konectar_white_logo.svg', +// width: 100.0, +// // color: Colors.white, +// colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn), +// ), +// ), +// body: Consumer( +// builder: (context, hcpProvider, child) { +// List displayedHCPList = +// hcpProvider.searchHCP(_searchController.text); + +// return Column( +// children: [ +// Row( +// mainAxisAlignment: MainAxisAlignment.center, +// children: [ +// Expanded( +// child: Padding( +// padding: const EdgeInsets.only(left: 45.0), +// child: Text( +// _switchValue ? "My Contacts" : "All Contacts", +// textAlign: TextAlign.center, +// style: TextStyle( +// fontSize: 20.0, +// fontWeight: FontWeight.w500, +// ), +// ), +// ), +// ), +// Row( +// mainAxisSize: MainAxisSize.min, +// children: [ +// _switchValue +// ? const Text( +// 'All', +// style: TextStyle( +// fontSize: 12, +// decoration: TextDecoration.lineThrough, +// decorationThickness: 0.85, +// ), +// ) +// : const Text( +// 'All', +// style: TextStyle( +// fontSize: 12, +// ), +// ), +// CupertinoSwitch( +// activeColor: Color.fromARGB(255, 0, 71, 132), +// value: _switchValue, +// onChanged: (value) { +// setState(() { +// _switchValue = value; +// }); +// }, +// ), +// Padding( +// padding: const EdgeInsets.only(right: 8.0), +// child: !_switchValue +// ? const Text( +// 'My', +// style: TextStyle( +// fontSize: 12, +// decoration: TextDecoration.lineThrough, +// decorationThickness: 0.85, +// ), +// ) +// : const Text( +// 'My', +// style: TextStyle( +// fontSize: 12, +// ), +// ), +// ) +// ], +// ), +// ], +// ), +// Padding( +// padding: const EdgeInsets.only( +// top: 8.0, bottom: 8.0, left: 20.0, right: 20.0), +// child: Center( +// child: TextField( +// controller: _searchController, +// onChanged: (value) { +// setState(() {}); +// }, +// decoration: InputDecoration( +// fillColor: Constants.k2color, +// contentPadding: EdgeInsets.symmetric(vertical: 9.0), +// border: OutlineInputBorder(), +// labelText: ' Search', +// prefixIcon: Icon( +// Icons.search, +// ), +// ), +// ), +// ), +// ), +// Expanded( +// child: ListView.builder( +// itemCount: displayedHCPList.length, +// itemBuilder: (BuildContext context, int index) { +// var data = displayedHCPList[index]; +// return Column( +// children: [ +// ListTile( +// onTap: () { +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => NewProfile(text: data), +// ), +// ); +// }, +// leading: data["img_path"] == null +// ? ProfilePicture( +// name: data["name"], +// radius: 20, +// fontsize: 12, +// ) +// : ClipOval( +// child: SizedBox.fromSize( +// size: Size.fromRadius(25), +// child: Image.network(data["img_path"], +// fit: BoxFit.fill), +// ), +// ), +// trailing: Icon( +// Icons.person_add_rounded, +// color: Constants.k2color, +// size: 30.0, +// ), +// title: Text( +// "${data["name"]}", +// style: const TextStyle( +// fontSize: 18.0, +// fontWeight: FontWeight.bold, +// ), +// ), +// subtitle: Column( +// children: [ +// Row( +// children: [ +// Text( +// "${data["speciality"]}\n${data["addr"]},", +// style: const TextStyle( +// fontSize: 14.0, +// fontWeight: FontWeight.normal, +// ), +// ), +// ], +// ), +// Row( +// children: [ +// Text( +// "Added by Pooja k\nAdded on 01/07/2023", +// style: const TextStyle( +// fontSize: 12.0, +// fontWeight: FontWeight.normal, +// ), +// ) +// ], +// ) +// ], +// ), +// ), +// Divider(), +// ], +// ); +// }, +// ), +// ), +// ], +// ); +// }, +// ), +// ), +// ); +// } +// } diff --git a/lib/ui_screen/new_editinteraction.dart b/lib/ui_screen/new_editinteraction.dart index 3894a4e..3b6243b 100644 --- a/lib/ui_screen/new_editinteraction.dart +++ b/lib/ui_screen/new_editinteraction.dart @@ -191,245 +191,176 @@ class _EditInteractionScreenState extends State { print("Item_sectionListt: ${item.sectionList}"); return ListView( children: [ + Padding( + padding: const EdgeInsets.all(10.0), + child: Text( + item.sectionName, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.black, + fontWeight: FontWeight.normal, + fontSize: 18.0), + ), + ), Container( - //elevation: 4, - // shape: RoundedRectangleBorder( - // borderRadius: BorderRadius.circular(0.0), - // ), - color: Constants.k2color, - child: ExpansionTile( - maintainState: true, - // backgroundColor: Colors.white, - backgroundColor: Constants.k2color, - - // collapsedBackgroundColor: Color(0xFF2b9af3), - initiallyExpanded: true, - title: Stack( - alignment: AlignmentDirectional.center, - children: [ - Container( - // height: double.infinity, - width: double.infinity, - padding: - const EdgeInsets.all(0.0), - decoration: BoxDecoration( - // color: Color(0xFF2b9af3), - color: Constants.k2color), - child: Text( - item.sectionName, - style: const TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontSize: 18.0), - )), - item.multiple - ? Align( - alignment: - Alignment.centerRight, - child: IconButton( - onPressed: () { - provider.getSectionItem( - item.sectionName); - // print("index is $listIndex"); - setState(() { - // for (var item - }); - }, - icon: const Icon( - Icons.add_circle_outline, - size: 30, - color: Colors.white, - ), - ), - ) - : const SizedBox.shrink() - ]), + color: Colors.white, + child: Padding( + padding: const EdgeInsets.only(top: 0.0), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.center, children: [ - Container( - color: Colors.white, - child: Padding( - padding: - const EdgeInsets.only(top: 8.0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.center, - children: [ - GridView.count( - physics: - const NeverScrollableScrollPhysics(), - // crossAxisCount: - // context.responsive( - // 1, - // sm: 1, // small - // md: 1, // medium - // lg: sectionList.length == 1 - // ? 1 - // : 4, // large - // xl: 3, // extra large screen - // ), - crossAxisCount: - context.responsive( - 1, - sm: 1, // small - md: 2, // medium - lg: sectionList.length == 1 - ? 1 - : 3, // large - xl: 3, // extra large screen - ), - mainAxisSpacing: - sectionList.length == 1 || - !isTablet - ? 1 - : 3.5, - shrinkWrap: true, - padding: EdgeInsets.zero, + GridView.count( + physics: + const NeverScrollableScrollPhysics(), + // crossAxisCount: + // context.responsive( + // 1, + // sm: 1, // small + // md: 1, // medium + // lg: sectionList.length == 1 + // ? 1 + // : 4, // large + // xl: 3, // extra large screen + // ), + crossAxisCount: context.responsive( + 1, + sm: 1, // small + md: 2, // medium + lg: sectionList.length == 1 + ? 1 + : 3, // large + xl: 3, // extra large screen + ), + mainAxisSpacing: + sectionList.length == 1 || !isTablet + ? 1 + : 3.5, + shrinkWrap: true, + padding: EdgeInsets.zero, - childAspectRatio: - sectionList.length == 1 - ? orientation == - Orientation - .landscape - ? 10 - : 4.8 - : isTablet - ? 2.8 - : 3.5, - children: List.generate( - sectionList.length, - (i) { - // print(sectionList); - SectionList sectionItem = - sectionList[i]; - dropdownvalue = sectionItem - .widget == + childAspectRatio: + sectionList.length == 1 + ? orientation == + Orientation.landscape + ? 10 + : 4.8 + : isTablet + ? 2.8 + : 3.5, + children: List.generate( + sectionList.length, + (i) { + // print(sectionList); + SectionList sectionItem = + sectionList[i]; + dropdownvalue = sectionItem + .widget == + InteractionWidget.DROPDOWN + ? sectionItem.value ?? "Select" + : ' '; + List list = sectionItem + .widget == + InteractionWidget + .DROPDOWN || + sectionItem.widget == + InteractionWidget + .AUTOCOMPLETE || + sectionItem.widget == + InteractionWidget + .MULTISELECT + ? provider.getData2(sectionItem) + : []; + provider.checkboxlist = sectionItem + .widget == + InteractionWidget.CHECKBOX + ? provider.getData2(sectionItem) + : []; + + return Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + sectionItem.widget == InteractionWidget - .DROPDOWN - ? sectionItem.value ?? - "Select" - : ' '; - List< - InputClass> list = sectionItem - .widget == - InteractionWidget - .DROPDOWN || - sectionItem - .widget == - InteractionWidget - .AUTOCOMPLETE || - sectionItem - .widget == - InteractionWidget - .MULTISELECT - ? provider.getData2( - sectionItem) - : []; - provider.checkboxlist = - sectionItem.widget == - InteractionWidget - .CHECKBOX - ? provider.getData2( - sectionItem) - : []; - - return Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - sectionItem.widget == - InteractionWidget - .BUTTON && - sectionItem - .input == - 'add' - ? const SizedBox - .shrink() - : Padding( - padding: - const EdgeInsets - .only( - left: - 8.0, - right: - 8.0), - // child: Text( - // '${sectionItem.name}:*', - // style: TextStyle( - // color: Colors - // .orange - // .shade800, - // fontSize: - // isTablet - // ? 18 - // : 12, - // ), - // ), - child: Text( - sectionItem - .isRequired - ? '${sectionItem.name}:*' - : '${sectionItem.name}:', - style: - TextStyle( - color: Colors - .orange - .shade800, - fontSize: - 18.0, - // fontSize: isTablet - // ? 18 - // : 12, - ), - ), - ), - // SizedBox( - // height: - // isTablet ? 15 : 5, + .BUTTON && + sectionItem.input == + 'add' + ? const SizedBox.shrink() + : Padding( + padding: + const EdgeInsets + .only( + left: 8.0, + right: 8.0), + // child: Text( + // '${sectionItem.name}:*', + // style: TextStyle( + // color: Colors + // .orange + // .shade800, + // fontSize: + // isTablet + // ? 18 + // : 12, + // ), // ), - returnWidget( - sectionItem: - sectionItem, - item: item, - provider: provider, - list: list, - gridIndex: i, - listIndex: 0, - widgetData: - sectionItem - .widget!, - multiple: false), - // SizedBox( - // height: isTablet ? 15 : 5, - // ), - ], - ); - }, - ), - ), - // SizedBox( - // height: isTablet ? 15 : 5, - // ), - item.multiple - ? gridViewWidget( - provider, - item.sectionName, - item.multipleList ?? [], - orientation, - item, - 0) - : const SizedBox.shrink(), - provider.interactionReponseList - .length == - 0 - 1 - ? saveActions(provider) - : const SizedBox.shrink() - //const Spacer(), - ], - ), + child: Text( + sectionItem.isRequired + ? '${sectionItem.name}:*' + : '${sectionItem.name}:', + style: TextStyle( + color: Colors.orange + .shade800, + fontSize: 18.0, + // fontSize: isTablet + // ? 18 + // : 12, + ), + ), + ), + // SizedBox( + // height: + // isTablet ? 15 : 5, + // ), + returnWidget( + sectionItem: sectionItem, + item: item, + provider: provider, + list: list, + gridIndex: i, + listIndex: 0, + widgetData: + sectionItem.widget!, + multiple: false), + // SizedBox( + // height: isTablet ? 15 : 5, + // ), + ], + ); + }, ), ), - ]), + // SizedBox( + // height: isTablet ? 15 : 5, + // ), + item.multiple + ? gridViewWidget( + provider, + item.sectionName, + item.multipleList ?? [], + orientation, + item, + 0) + : const SizedBox.shrink(), + provider.interactionReponseList.length == + 0 - 1 + ? saveActions(provider) + : const SizedBox.shrink() + //const Spacer(), + ], + ), + ), ), ], ); diff --git a/lib/ui_screen/new_profile.dart b/lib/ui_screen/new_profile.dart index efd3210..2fb6b19 100644 --- a/lib/ui_screen/new_profile.dart +++ b/lib/ui_screen/new_profile.dart @@ -1,34 +1,33 @@ import 'package:discover_module/constants.dart'; import 'package:discover_module/custom_widget/text.dart'; -import 'package:discover_module/hive_fun.dart'; import 'package:discover_module/provider_class/affiliationsprovider.dart'; +import 'package:discover_module/provider_class/engagement_provider.dart'; import 'package:discover_module/provider_class/events_provider.dart'; import 'package:discover_module/provider_class/medicalinsightprovider.dart'; import 'package:discover_module/provider_class/publications_provider.dart'; +import 'package:discover_module/provider_class/speaker_provider.dart'; import 'package:discover_module/provider_class/trials_provider.dart'; import 'package:discover_module/ui_screen/affiliation_data.dart'; +import 'package:discover_module/ui_screen/bottom_sheet.dart'; +import 'package:discover_module/ui_screen/engagementlist.dart'; import 'package:discover_module/ui_screen/events_data.dart'; import 'package:discover_module/ui_screen/interactionform/NewtworkConnectivity.dart'; import 'package:discover_module/ui_screen/interactionform/configprovider.dart'; import 'package:discover_module/ui_screen/interactionform/edit_interaction_screen.dart'; -import 'package:discover_module/ui_screen/interactionform/interaction_screen.dart'; -import 'package:discover_module/ui_screen/interactionform/interactionlistscreen.dart'; import 'package:discover_module/ui_screen/interactionform/interactionprovider.dart'; -import 'package:discover_module/ui_screen/interactionform/model/medical_insight.dart'; import 'package:discover_module/ui_screen/interactionform/model/save_interaction.dart'; -import 'package:discover_module/ui_screen/interactionform/util.dart'; import 'package:discover_module/ui_screen/interactionform/view_forms_list.dart'; import 'package:discover_module/ui_screen/interactionform/view_interaction_screen.dart'; import 'package:discover_module/ui_screen/interactionform/viewinteractionprovider.dart'; import 'package:discover_module/ui_screen/medical_insight.dart'; -import 'package:discover_module/ui_screen/new_editinteraction.dart'; import 'package:discover_module/ui_screen/newformlist.dart'; import 'package:discover_module/ui_screen/publication_data.dart'; -import 'package:expandable/expandable.dart'; import 'package:flutter/cupertino.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; +import 'package:flutter_carousel_widget/flutter_carousel_widget.dart'; import 'package:flutter_profile_picture/flutter_profile_picture.dart'; import 'package:provider/provider.dart'; @@ -47,15 +46,21 @@ class _NewProfileState extends State { List event_data = []; List trial_data = []; List medinsightData = []; + List speaker = []; + List eng = []; + + // final PageController _controller = PageController(viewportFraction: 0.8); + final ScrollController _scrollController = ScrollController(); List viewformData = []; bool _isExpanded = false; var item; - // final ScrollController controller = ScrollController(); - // final ScrollController controller2 = ScrollController(); + List widgetList = ['Geeks', 'for', 'Geeks']; + + TextEditingController firstNameController = TextEditingController(); @override void initState() { @@ -112,6 +117,17 @@ class _NewProfileState extends State { await med.medicalinsightdata(); final medlist = med.trialsinfo; + var speaker11 = + Provider.of(context, listen: false); + + await speaker11.getspeakerdata(); + + final speakerlist = speaker11.speaker; + + var engtype = Provider.of(context, listen: false); + await engtype.getengagementdata(); + final engtypelist = engtype.engagementdata; + setState(() { affiliation_data = affilist; publication_data = publist; @@ -119,6 +135,8 @@ class _NewProfileState extends State { viewformData = form.savedList; trial_data = trialslist; medinsightData = medlist; + speaker = speakerlist; + eng = engtypelist; }); print("Affiliations_data_is: $affilist"); @@ -139,517 +157,2310 @@ class _NewProfileState extends State { @override Widget build(BuildContext context) { - return SafeArea( - child: Scaffold( - backgroundColor: Color.fromARGB(255, 246, 248, 252), + var size = MediaQuery.of(context).size; + + /*24 is for notification bar on Android*/ + final double itemHeight = (size.height - kToolbarHeight - 24) / 2; + final double itemWidth = size.width / 2; + return Scaffold( + // backgroundColor: Color.fromARGB(255, 246, 248, 252), + backgroundColor: Constants.bgcolor, + body: SafeArea( // backgroundColor: Color.fromARGB(255, 237, 230, 230), - appBar: AppBar( - // backgroundColor: Color.fromARGB(255, 246, 248, 252), - //title: const Text('Profile'), - ), - body: ListView( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.center, - mainAxisSize: MainAxisSize.min, - children: [ - // Padding( - // padding: EdgeInsets.all(8.0), - // child: ProfilePicture( - // name: widget.text!["name"], - // radius: 38, - // fontsize: 21, - // ), + // appBar: AppBar( + // // backgroundColor: Color.fromARGB(255, 246, 248, 252), + // //title: const Text('Profile'), + // ), + child: NestedScrollView( + headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) { + return [ + SliverAppBar( + backgroundColor: Colors.white, + // expandedHeight: 335.0, + expandedHeight: MediaQuery.of(context).size.height * 0.37, + floating: false, + pinned: true, + stretch: true, + snap: false, + // bottom: PreferredSize( // Add this code + // preferredSize: Size.fromHeight(60.0), // Add this code + // child: Text(''), // Add this code // ), - Padding( - padding: EdgeInsets.all(8.0), - child: widget.text!["img_path"] == null - ? ProfilePicture( - name: widget.text!["name"], - radius: 38, - fontsize: 21, - ) - : ClipOval( - child: SizedBox.fromSize( - size: Size.fromRadius(48), // Image radius - child: Image.network(widget.text!["img_path"], - fit: BoxFit.fill), - ), - )), - Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - // Text( - // "Gerosa, Gino", - // style: TextStyle( - // fontSize: 22.0, - // color: Colors.black, - // ), - // ), - Text1( - title: "Dr " + widget.text!["name"], - txtcolor: Colors.black, - fontweight: FontWeight.normal, - txtfont: 22.0), - // Text( - // "Cardiac Surgery", - // style: TextStyle( - // fontWeight: FontWeight.bold, fontSize: 14.0), - // ), - Text1( - title: widget.text!["speciality"], - txtcolor: Colors.black, - fontweight: FontWeight.normal, - txtfont: 15.0), - ], - ), - SizedBox( - height: 15.0, - ), - Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.only(left: 15.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, + + flexibleSpace: FlexibleSpaceBar( + centerTitle: true, + collapseMode: CollapseMode.parallax, + + // title: const Text("Collapsing Appbar", + // style: TextStyle( + // color: Colors.white, + // fontSize: 16.0, + // )), + // background: Image.network( + // "https://images.pexels.com/photos/417173/pexels-photo-417173.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260", + // fit: BoxFit.cover, + // ) + + background: ColoredBox( + //height: MediaQuery.of(context).size.height * 0.3, + color: const Color.fromARGB(255, 246, 248, 252), + child: ListView( + children: [ + Column( children: [ - const Icon( - Icons.location_city_sharp, - color: Color.fromARGB(255, 0, 71, 132), + Padding( + padding: EdgeInsets.all(8.0), + child: widget.text!["img_path"] == null + ? ProfilePicture( + name: widget.text!["name"], + radius: 38, + fontsize: 21, + ) + : ClipOval( + child: SizedBox.fromSize( + size: Size.fromRadius( + 48), // Image radius + child: Image.network( + widget.text!["img_path"], + fit: BoxFit.fill), + ), + )), + Text1( + title: "Dr " + widget.text!["name"], + txtcolor: Colors.black, + fontweight: FontWeight.normal, + txtfont: 22.0), + Text1( + title: widget.text!["speciality"], + txtcolor: Colors.black, + fontweight: FontWeight.normal, + txtfont: 15.0), + SizedBox( + height: 8.0, + ), + Padding( + padding: const EdgeInsets.only(left: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon( + Icons.location_city_sharp, + color: Color.fromARGB(255, 0, 71, 132), + ), + const SizedBox( + width: 3.0, + ), + Expanded( + child: Text1( + title: + //widget.text!["addr"] ?? + "Florida Hospital Medical Group Inc", + txtcolor: Colors.black, + txtfont: 15.0, + fontweight: FontWeight.normal, + ), + // child: RichText( + // text: TextSpan( + // text: widget.text!["addr"] ?? + // "Azienda Ospedaliera di Padova", + // style: TextStyle( + // fontSize: 16.0, color: Colors.black), + // ), + // ), + ), + ]), ), const SizedBox( - width: 3.0, + height: 8.0, ), - Expanded( - // child: Text( - // "Azienda Ospedaliera di Padova", + Padding( + padding: const EdgeInsets.only(left: 8.0), + child: Row(children: [ + const Icon( + Icons.location_pin, + color: Color.fromARGB(255, 0, 71, 132), + ), + const SizedBox( + width: 3.0, + ), + Expanded( + // child: Text( + // "Via Giustiniani, 2, Padova, Veneto 35128, Italy", + // style: TextStyle( + // fontWeight: FontWeight.bold, fontSize: 14.0), + // ), + child: Text1( + title: widget.text!["adrr"] ?? + "Via Giustiniani, 2, Padova, Veneto 35128, Italy", + txtcolor: Colors.black, + fontweight: FontWeight.normal, + txtfont: 15.0), + + // child: RichText( + // text: TextSpan( + // text: widget.text!["adrr"] ?? + // "Via Giustiniani, 2, Padova, Veneto 35128, Italy", + // style: TextStyle( + // fontSize: 16.0, color: Colors.black), + // ), + // ), + ), + ]), + ), + const SizedBox( + height: 8.0, + ), + + Padding( + padding: const EdgeInsets.only(left: 8.0), + child: Row(children: [ + const Icon( + Icons.email, + color: Color.fromARGB(255, 0, 71, 132), + ), + const SizedBox( + width: 3.0, + ), + Expanded( + child: Text1( + title: widget.text!["email"], + txtcolor: Colors.black, + fontweight: FontWeight.normal, + txtfont: 15.0), + ), + ]), + ), + + SizedBox( + height: 8.0, + ), + Padding( + padding: const EdgeInsets.only(left: 8.0), + child: Row(children: [ + const Icon( + Icons.phone, + color: Color.fromARGB(255, 0, 71, 132), + ), + const SizedBox( + width: 3.0, + ), + // Text( + // "+390498212410 X 12", // style: TextStyle( // fontWeight: FontWeight.bold, fontSize: 14.0), // ), - child: Text1( - title: widget.text!["addr"] ?? - "Azienda Ospedaliera di Padova", - txtcolor: Colors.black, - txtfont: 15.0, - fontweight: FontWeight.normal, - )), - ]), - ), - const SizedBox( - height: 8.0, - ), - Padding( - padding: const EdgeInsets.only(left: 15.0), - child: Row(children: [ - const Icon( - Icons.location_pin, - color: Color.fromARGB(255, 0, 71, 132), - ), - const SizedBox( - width: 3.0, - ), - Expanded( - // child: Text( - // "Via Giustiniani, 2, Padova, Veneto 35128, Italy", - // style: TextStyle( - // fontWeight: FontWeight.bold, fontSize: 14.0), - // ), - child: Text1( - title: widget.text!["adrr"] ?? - "Via Giustiniani, 2, Padova, Veneto 35128, Italy", - txtcolor: Colors.black, - fontweight: FontWeight.normal, - txtfont: 15.0), - ), - ]), - ), - const SizedBox( - height: 8.0, - ), - Padding( - padding: const EdgeInsets.only(left: 15.0), - child: Row(children: [ - const Icon( - Icons.phone, - color: Color.fromARGB(255, 0, 71, 132), - ), - const SizedBox( - width: 3.0, - ), - // Text( - // "+390498212410 X 12", - // style: TextStyle( - // fontWeight: FontWeight.bold, fontSize: 14.0), - // ), - Text1( - title: widget.text!["phone_no"].toString(), - txtcolor: Colors.black, - fontweight: FontWeight.normal, - txtfont: 15.0), - ]), - ), - const SizedBox( - height: 8.0, - ), - Padding( - padding: const EdgeInsets.only(left: 15.0), - child: Row(children: [ - const Icon( - Icons.call, - color: Color.fromARGB(255, 0, 71, 132), - ), - const SizedBox( - width: 3.0, - ), - Text1( - title: widget.text!["phone_no"].toString(), - txtcolor: Colors.black, - fontweight: FontWeight.normal, - txtfont: 15.0), - ]), - ), - const SizedBox( - height: 8.0, - ), - Padding( - padding: const EdgeInsets.only(left: 15.0), - child: Row(children: [ - const Icon( - Icons.email, - color: Color.fromARGB(255, 0, 71, 132), - ), - const SizedBox( - width: 3.0, - ), - Text1( - title: widget.text!["email"], - txtcolor: Colors.black, - fontweight: FontWeight.normal, - txtfont: 15.0), - ]), - ), - const SizedBox( - height: 15.0, - ), - Align( - alignment: Alignment.centerLeft, - child: Padding( - padding: const EdgeInsets.only(left: 15.0), - child: Text1( - title: "Profile Summarry", - txtcolor: Colors.black, - fontweight: FontWeight.normal, - txtfont: 18.0), - ), - ), + Text1( + title: widget.text!["phone_no"].toString(), + txtcolor: Colors.black, + fontweight: FontWeight.normal, + txtfont: 15.0), + ]), + ), + + const SizedBox( + height: 8.0, + ), - Align( - alignment: Alignment.centerLeft, - child: Padding( - padding: const EdgeInsets.all(15.0), - child: Text1( - title: widget.text!["summarry"], - txtcolor: Colors.black, - fontweight: FontWeight.normal, - txtfont: 15.0), - ), - ), - // isonline - // ? - Container( - width: MediaQuery.of(context).size.width, - child: Padding( - padding: const EdgeInsets.all(0.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ Padding( - padding: EdgeInsets.all(0.0), + padding: const EdgeInsets.only(left: 8.0), + child: Row(children: [ + const Icon( + Icons.call, + color: Color.fromARGB(255, 0, 71, 132), + ), + const SizedBox( + width: 3.0, + ), + Expanded( + child: Text1( + title: + widget.text!["phone_no"].toString(), + txtcolor: Colors.black, + fontweight: FontWeight.normal, + txtfont: 15.0), + ), + ]), + ), + //const SizedBox( + // height: 8.0, + // ), + + // const SizedBox( + // height: 10.0, + // ), + ], + ), + ], + ), + ), + ), + ), + ]; + }, + body: ListView( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.min, + children: [ + Align( + alignment: Alignment.centerLeft, + child: Padding( + padding: const EdgeInsets.only(left: 8.0), + child: Text1( + title: "Profile Summarry", + txtcolor: Colors.black, + fontweight: FontWeight.normal, + txtfont: 18.0), + ), + ), + const SizedBox( + height: 5.0, + ), + Align( + alignment: Alignment.centerLeft, + child: Padding( + padding: const EdgeInsets.only(left: 8.0), + child: Text1( + title: widget.text!["summarry"], + txtcolor: Colors.black, + fontweight: FontWeight.normal, + txtfont: 15.0), + ), + ), + // Column( + // children: [ + // SizedBox( + // height: MediaQuery.sizeOf(context).height * 0.28, + // child: PageView.builder( + // itemBuilder: (context, pageIndex) { + // // final items = _pages[pageIndex]; + + // return GridView.builder( + // controller: _scrollController, + // scrollDirection: Axis.horizontal, + // gridDelegate: + // const SliverGridDelegateWithFixedCrossAxisCount( + // crossAxisCount: 1, + // crossAxisSpacing: 4.0, + // mainAxisSpacing: 4.0, + // ), + // itemCount: 5, + // itemBuilder: (context, index) { + // return Center( + // child: Flexible( + // child: Card( + // margin: EdgeInsets.all(1.0), + + // // elevation: 5.0, + // surfaceTintColor: + // Color.fromARGB(255, 255, 254, 254), + // //surfaceTintColor: Colors.red, + // child: Padding( + // padding: EdgeInsets.all(10.0), + // child: Column( + // mainAxisSize: MainAxisSize.min, + // crossAxisAlignment: + // CrossAxisAlignment.start, + // children: [ + // const Text( + // "Top Event Topics", + // style: TextStyle( + // fontSize: 16.0, + // fontWeight: + // FontWeight.bold), + // ), + // const SizedBox( + // height: 10.0, + // ), + + // Row( + // children: [ + // Container( + // decoration: BoxDecoration( + // color: + // Constants.cardtext, + // borderRadius: + // BorderRadius + // .circular(10)), + // // color: Colors.grey[300], + // child: Padding( + // padding: + // const EdgeInsets.all( + // 5.0), + // child: Row( + // children: [ + // Text( + // "Angina Pectoris"), + // SizedBox( + // width: 5.0, + // ), + // Container( + // decoration: BoxDecoration( + // color: Constants + // .cardtextdark, + // borderRadius: + // BorderRadius + // .circular( + // 5)), + // child: Padding( + // padding: + // const EdgeInsets + // .all( + // 0.0), + // child: Text( + // "378", + // style: TextStyle( + // color: Colors + // .white), + // ), + // )), + // ], + // ), + // ), + // ), + // // Container( + // // color: Colors.grey, + // // child: Padding( + // // padding: const EdgeInsets.all(5.0), + // // child: Text("378")), + // // ), + // ], + // ), + + // SizedBox( + // height: 5, + // ), + // Row( + // children: [ + // Container( + // decoration: BoxDecoration( + // color: + // Constants.cardtext, + // borderRadius: + // BorderRadius + // .circular(5)), + // // color: Colors.grey[300], + // child: Padding( + // padding: + // const EdgeInsets.all( + // 5.0), + // child: Row( + // children: [ + // Text( + // "Coronary Artery Disease", + // softWrap: true, + // ), + // SizedBox( + // width: 5.0, + // ), + // Container( + // decoration: BoxDecoration( + // color: Constants + // .cardtextdark, + // borderRadius: + // BorderRadius + // .circular( + // 5)), + // child: Text( + // "378", + // style: TextStyle( + // color: Colors + // .white), + // )), + // ], + // ), + // ), + // ), + // // Container( + // // color: Colors.grey, + // // child: Padding( + // // padding: const EdgeInsets.all(5.0), + // // child: Text("378")), + // // ), + // ], + // ), + + // SizedBox( + // height: 5, + // ), + // Row( + // children: [ + // Container( + // decoration: BoxDecoration( + // color: + // Constants.cardtext, + // borderRadius: + // BorderRadius + // .circular(5)), + // // color: Colors.grey[300], + // child: Padding( + // padding: + // const EdgeInsets.all( + // 5.0), + // child: Row( + // children: [ + // Text("Hypertension"), + // SizedBox( + // width: 5.0, + // ), + // Container( + // decoration: BoxDecoration( + // color: Constants + // .cardtextdark, + // borderRadius: + // BorderRadius + // .circular( + // 5)), + // child: Text( + // "378", + // style: TextStyle( + // color: Colors + // .white), + // )), + // ], + // ), + // ), + // ), + // // Container( + // // color: Colors.grey, + // // child: Padding( + // // padding: const EdgeInsets.all(5.0), + // // child: Text("378")), + // // ), + // ], + // ), + + // //Text(" 378") + // ], + // ), + // )), + // ), + // ); + // }, + // ); + // }) + // // }, + // ), + // // Text('Pooooo') + + // _buildPaginationDots() + // ], + // ), + + SizedBox( + height: MediaQuery.sizeOf(context).height * 0.21, + child: ExpandableCarousel( + options: CarouselOptions( + slideIndicator: CircularWaveSlideIndicator( + alignment: Alignment.bottomCenter, + currentIndicatorColor: Constants.k2color, + indicatorBackgroundColor: Colors.grey), + autoPlay: true, + autoPlayInterval: const Duration(seconds: 2), + ), + items: [1, 2, 3, 4, 5].map((i) { + return Builder( + builder: (BuildContext context) { + return Center( child: Padding( - padding: const EdgeInsets.all(0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Flexible( - flex: 1, + padding: const EdgeInsets.all(8.0), + child: Flexible( + child: Card( + margin: EdgeInsets.all(1.0), + + // elevation: 5.0, + surfaceTintColor: + Color.fromARGB(255, 255, 254, 254), + //surfaceTintColor: Colors.red, child: Padding( - padding: const EdgeInsets.only( - left: 1.0, right: 1.0), - child: Card( - elevation: 5, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(0.0), - ), - color: const Color.fromARGB( - 255, 0, 71, 137), - child: ExpansionTile( - maintainState: true, - onExpansionChanged: - (bool expanded) { - setState(() { - _isExpanded = expanded; - }); - }, - backgroundColor: - const Color.fromARGB( - 255, 0, 71, 137), - trailing: Icon( - _isExpanded - ? Icons.keyboard_arrow_up - : Icons - .keyboard_arrow_down, - color: Colors.white), - // backgroundColor: Colors.white, - // collapsedBackgroundColor: Color(0xFF2b9af3), - initiallyExpanded: true, - title: Row( - mainAxisAlignment: - MainAxisAlignment.start, - // mainAxisSize: MainAxisSize.min, - children: [ - Text1( - title: "Affiliations", - txtcolor: Colors.white, - fontweight: - FontWeight.normal, - txtfont: 17.0), - const SizedBox( - width: 8.0, - ), - Text1( - title: "(4)", - txtcolor: Colors.white, - fontweight: - FontWeight.normal, - txtfont: 17.0), - ], - ), + padding: EdgeInsets.all(10.0), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + const Text( + "Top Event Topics", + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold), + ), + const SizedBox( + height: 10.0, + ), + + Row( children: [ - Scrollbar( - child: SingleChildScrollView( - scrollDirection: - Axis.horizontal, - child: Container( - // width: - // MediaQuery.of(context) - // .size - // .width, - constraints: BoxConstraints( - minWidth: - MediaQuery.of( - context) - .size - .width), - color: Colors.white, - child: DataTable( - showCheckboxColumn: - false, - columns: const [ - // DataColumn( - // label: Expanded( - // child: Text( - // '', - // softWrap: - // true))), - DataColumn( - label: Expanded( - child: Text( - 'Organization Name', - style: TextStyle( - fontWeight: - FontWeight - .w600), - ), - )), - // DataColumn( - // label: Expanded( - // child: Text( - // 'Department'))), - // DataColumn( - // label: Expanded( - // child: Text( - // 'Role'))), - DataColumn( - label: Expanded( - child: Text( - 'Time Frame', - style: TextStyle( - fontWeight: - FontWeight.w600)))), - // DataColumn( - // label: Expanded( - // child: Text( - // 'Org Type'))), - // DataColumn( - // label: Expanded( - // child: Text( - // 'Eng Type'))), - - // Add more columns as needed - ], - rows: List.generate( - affiliation_data - .length, - (index) => DataRow( - onSelectChanged: - (value) { - // =======> Use onSelectChanged for tab - print( - "message ${affiliation_data[index]}"); - - bottomshet( - affiliation_data[ - index]); - }, - color: MaterialStateProperty - .resolveWith< - Color?>((Set< - MaterialState> - states) { - if (index - .isEven) { - return Colors - .grey - .withOpacity( - 0.1); - } - return null; - }), - cells: [ - // DataCell(Text( - // affiliation_data[ - // index] - // ['id'] - // .toString(), - // softWrap: - // true)), - DataCell(Text( - affiliation_data[ - index] - [ - 'org_name'] - .toString(), - softWrap: - true)), - // DataCell(Text( - // affiliation_data[ - // index] - // [ - // 'dept'] - // .toString(), - // softWrap: - // true)), - // DataCell(Text( - // affiliation_data[ - // index] - // [ - // 'role'] - // .toString(), - // softWrap: - // true)), - DataCell(Text( - affiliation_data[ - index] - [ - 'time_frame'] - .toString(), - softWrap: - true)), - // DataCell(Text( - // affiliation_data[ - // index] - // [ - // 'org_type'] - // .toString(), - // softWrap: - // true)), - // DataCell(Text( - // affiliation_data[ - // index] - // [ - // 'emg_type'] - // .toString(), - // softWrap: - // true)), - - // Add more DataCells as needed - ], - ), + Container( + decoration: BoxDecoration( + color: Constants.cardtext, + borderRadius: + BorderRadius.circular( + 10)), + // color: Colors.grey[300], + child: Padding( + padding: + const EdgeInsets.all( + 5.0), + child: Row( + children: [ + Text("Angina Pectoris"), + SizedBox( + width: 5.0, ), - ), + Container( + decoration: BoxDecoration( + color: Constants + .cardtextdark, + borderRadius: + BorderRadius + .circular( + 5)), + child: Padding( + padding: + const EdgeInsets + .all(0.0), + child: Text( + "378", + style: TextStyle( + color: Colors + .white), + ), + )), + ], ), ), ), + // Container( + // color: Colors.grey, + // child: Padding( + // padding: const EdgeInsets.all(5.0), + // child: Text("378")), + // ), + ], + ), + + SizedBox( + height: 5, + ), + Row( + children: [ Container( - color: Colors.white, - child: Align( - alignment: Alignment.center, - child: Padding( - padding: - const EdgeInsets.all( - 8.0), - child: OutlinedButton( - onPressed: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => - AffiliationsData())); - }, - child: Text( - 'Show More', - style: TextStyle( - color: Constants - .k2color), + decoration: BoxDecoration( + color: Constants.cardtext, + borderRadius: + BorderRadius.circular( + 5)), + // color: Colors.grey[300], + child: Padding( + padding: + const EdgeInsets.all( + 5.0), + child: Row( + children: [ + Text( + "Coronary Artery Disease", + softWrap: true, ), - style: OutlinedButton - .styleFrom( - shape: - RoundedRectangleBorder( - borderRadius: - BorderRadius - .circular( - 12), + SizedBox( + width: 5.0, + ), + Container( + decoration: BoxDecoration( + color: Constants + .cardtextdark, + borderRadius: + BorderRadius + .circular( + 5)), + child: Text( + "378", + style: TextStyle( + color: Colors + .white), + )), + ], + ), + ), + ), + // Container( + // color: Colors.grey, + // child: Padding( + // padding: const EdgeInsets.all(5.0), + // child: Text("378")), + // ), + ], + ), + + SizedBox( + height: 5, + ), + Row( + children: [ + Container( + decoration: BoxDecoration( + color: Constants.cardtext, + borderRadius: + BorderRadius.circular( + 5)), + // color: Colors.grey[300], + child: Padding( + padding: + const EdgeInsets.all( + 5.0), + child: Row( + children: [ + Text("Hypertension"), + SizedBox( + width: 5.0, + ), + Container( + decoration: BoxDecoration( + color: Constants + .cardtextdark, + borderRadius: + BorderRadius + .circular( + 5)), + child: Text( + "378", + style: TextStyle( + color: Colors + .white), + )), + ], + ), + ), + ), + // Container( + // color: Colors.grey, + // child: Padding( + // padding: const EdgeInsets.all(5.0), + // child: Text("378")), + // ), + ], + ), + + //Text(" 378") + ], + ), + )), + ), + ), + ); + }, + ); + }).toList(), + ), + ), + Container( + height: 100, + width: MediaQuery.of(context).size.width, + + // height: 100, + child: ListView( + children: [ + const Padding( + padding: EdgeInsets.only( + top: 10.0, + left: 8.0, + right: 8.0, + ), + child: Text( + "Sentiment", + style: TextStyle( + fontSize: 16.0, fontWeight: FontWeight.bold), + ), + ), + + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: + const EdgeInsets.only(left: 8.0, right: 8.0), + child: Card( + margin: EdgeInsets.all(1.0), + // elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + // collapsedBackgroundColor: Color(0xFF2b9af3), + onExpansionChanged: (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + backgroundColor: Constants.k2color, + trailing: Icon( + _isExpanded + ? Icons.keyboard_arrow_up + : Icons.keyboard_arrow_down, + color: Colors.black), + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: "Sentiment Score", + txtcolor: Colors.black, + fontweight: FontWeight.normal, + txtfont: 17.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(3)", + txtcolor: Colors.black, + fontweight: FontWeight.normal, + txtfont: 17.0), + // Text1( + // title: widget + // .text![ + // "publications_count"] + // .toString(), + // txtfont: 18.0, + // txtcolor: Color + // .fromARGB( + // 255, + // 0, + // 71, + // 137), + // ) + ], + ), + children: [ + Scrollbar( + //isAlwaysShown: true, + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Container( + // width: MediaQuery.of( + // context) + // .size + // .width, + constraints: BoxConstraints( + minWidth: MediaQuery.of(context) + .size + .width), + + color: Colors.white, + child: DataTable( + showCheckboxColumn: false, + columns: const [ + // DataColumn( + // label: Expanded( + // child: Text( + // 'sl no'))), + // DataColumn( + // label: Expanded( + // child: Text( + // ''))), + DataColumn( + label: Expanded( + child: Text('Product', + style: TextStyle( + fontWeight: + FontWeight.w600), + softWrap: true), + )), + // DataColumn( + // label: Expanded( + // child: Text( + // 'Journal Name', + // softWrap: + // true, + // style: TextStyle( + // fontWeight: + // FontWeight.w600)))), + // DataColumn( + // label: Expanded( + // child: Text( + // 'Date', + // style: TextStyle( + // fontWeight: + // FontWeight.w600)))), + DataColumn( + label: Expanded( + child: Text( + 'Aissel Engagement', + style: TextStyle( + fontWeight: + FontWeight + .w600)))), + + // Add more columns as needed + ], + rows: List.generate( + publication_data.length, + (index) => DataRow( + onSelectChanged: (value) { + // =======> Use onSelectChanged for tab + print( + "message ${publication_data[index]}"); + + // bsheet( + // publication_data[ + // index]); + showModalBottomSheet( + useRootNavigator: true, + isScrollControlled: false, + enableDrag: true, + useSafeArea: true, + constraints: + const BoxConstraints( + maxWidth: + double.infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .vertical( + top: Radius.circular( + 0), + ), + ), + clipBehavior: Clip + .antiAliasWithSaveLayer, + context: context, + builder: (context) { + return bsheet( + publication_data[ + index]); + }, + ); + // showBottomSheet( + // context: + // context, + // builder: + // (BuildContext + // context) { + // return bsheet( + // publication_data[ + // index]); // returns your BottomSheet widget + // }); + }, + cells: [ + // DataCell(Text( + // publication_data[index] + // [ + // 'id'] + // .toString(), + // softWrap: + // true)), + DataCell(Text( + publication_data[index][ + 'artical_title'] + .toString(), + softWrap: true)), + // DataCell(Text( + // publication_data[index] + // [ + // 'journal_name'] + // .toString(), + // softWrap: + // true)), + // DataCell(Text( + // publication_data[index] + // [ + // 'date'] + // .toString(), + // softWrap: + // true)), + DataCell(Text( + publication_data[index] + ['author'] + .toString(), + softWrap: true)), + + // Add more DataCells as needed + ], + ), + ), + ), + ), + ), + ), + Container( + color: Colors.white, + child: Align( + alignment: Alignment.center, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (_) => + PublicationsData())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants.k2color), + ), + style: OutlinedButton.styleFrom( + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), + ), + ), // adds spacing between the text and image + ], + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + height: MediaQuery.sizeOf(context).height, + child: DefaultTabController( + length: 3, + // child: Scaffold( + // appBar: AppBar( + // title: const Text('GeeksForGeeks'), + // backgroundColor: Colors.green, + // ), + child: Column( + children: [ + // Other widgets above TabBar + + // TabBar + Container( + color: Constants.bgcolor2, + child: TabBar( + labelColor: Colors + .white, // Color of the selected tab text + unselectedLabelColor: Colors.black, + tabs: [ + // Tab(text: "Sentiment"), + Tab(text: "Related "), + Tab(text: "Activity "), + Tab(text: "Engagement "), + + // Tab(icon: Icon(Icons.email)), + ], + ), + ), + // TabBarView + Expanded( + child: TabBarView( + children: [ + ListView(children: [ + const Padding( + padding: EdgeInsets.only( + top: 10.0, + left: 8.0, + right: 8.0, + ), + child: Text( + "Related Details", + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold), + ), + ), + + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Container( + child: Card( + margin: EdgeInsets.all(1.0), + //elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + backgroundColor: + Constants.k2color, + initiallyExpanded: false, + maintainState: true, + // backgroundColor: Colors.white, + // collapsedBackgroundColor: Color(0xFF2b9af3), + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: "Locations", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 16.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(3)", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 16.0), + ], + ), + children: [ + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + constraints: BoxConstraints( + minWidth: + MediaQuery.of( + context) + .size + .width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: + Expanded( + child: Text( + 'Name', + style: TextStyle( + fontWeight: + FontWeight + .w600), + softWrap: + true), + )), + DataColumn( + label: Expanded( + child: Text( + 'Type', + style: + TextStyle(fontWeight: FontWeight.w600)))), + ], + rows: List.generate( + publication_data + .length, + (index) => + DataRow( + onSelectChanged: + (value) { + print( + "message ${publication_data[index]}"); + + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: + double + .infinity, + ), + shape: + const RoundedRectangleBorder( + borderRadius: + BorderRadius + .vertical( + top: Radius + .circular(0), + ), + ), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + publication_data[ + index]); + }, + ); + }, + cells: [ + DataCell(Text( + publication_data[index] + [ + 'Institution'] + .toString(), + softWrap: + true)), + DataCell(Text( + publication_data[index] + [ + 'Address'] + .toString(), + softWrap: + true)), + ], + ), + ), ), ), ), ), - ), - ) - ]), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: + (_) => + PublicationsData())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: + OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), ), ), ), // adds spacing between the text and image - SizedBox( - height: 10.0, + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Container( + child: Card( + margin: EdgeInsets.all(1.0), + // elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + backgroundColor: + Constants.k2color, + initiallyExpanded: false, + maintainState: true, + // backgroundColor: Colors.white, + // collapsedBackgroundColor: Color(0xFF2b9af3), + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: + "Phone Numbers", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 16.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(3)", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 16.0), + ], + ), + children: [ + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + constraints: BoxConstraints( + minWidth: + MediaQuery.of( + context) + .size + .width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: + Expanded( + child: Text( + 'phone Type', + style: TextStyle( + fontWeight: + FontWeight + .w600), + softWrap: + true), + )), + DataColumn( + label: Expanded( + child: Text( + 'Location', + style: + TextStyle(fontWeight: FontWeight.w600)))), + ], + rows: List.generate( + publication_data + .length, + (index) => + DataRow( + onSelectChanged: + (value) { + print( + "message ${publication_data[index]}"); + + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: + double + .infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .vertical( + top: Radius + .circular(0), + ), + ), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + publication_data[ + index]); + }, + ); + }, + cells: [ + DataCell(Text( + publication_data[index] + [ + 'Institution'] + .toString(), + softWrap: + true)), + DataCell(Text( + publication_data[index] + [ + 'Address'] + .toString(), + softWrap: + true)), + ], + ), + ), + ), + ), + ), + ), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: + (_) => + PublicationsData())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: + OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), + ), + ), + ), // adds spacing between the text and image + + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Container( + child: Card( + margin: EdgeInsets.all(1.0), + //elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + backgroundColor: + Constants.k2color, + initiallyExpanded: false, + maintainState: true, + // backgroundColor: Colors.white, + // collapsedBackgroundColor: Color(0xFF2b9af3), + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: "Emails", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 16.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(3)", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 16.0), + ], + ), + children: [ + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + constraints: BoxConstraints( + minWidth: + MediaQuery.of( + context) + .size + .width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: + Expanded( + child: Text( + 'Email Type', + style: TextStyle( + fontWeight: + FontWeight + .w600), + softWrap: + true), + )), + DataColumn( + label: Expanded( + child: Text( + 'Email', + style: + TextStyle(fontWeight: FontWeight.w600)))), + ], + rows: List.generate( + publication_data + .length, + (index) => + DataRow( + onSelectChanged: + (value) { + print( + "message ${publication_data[index]}"); + + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: + double + .infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .vertical( + top: Radius + .circular(0), + ), + ), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + publication_data[ + index]); + }, + ); + }, + cells: [ + DataCell(Text( + publication_data[index] + [ + 'Institution'] + .toString(), + softWrap: + true)), + DataCell(Text( + publication_data[index] + [ + 'Address'] + .toString(), + softWrap: + true)), + ], + ), + ), + ), + ), + ), + ), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: + (_) => + PublicationsData())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: + OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), + ), + ), + ), // adds spacing between the text and image + + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Container( + child: Card( + margin: EdgeInsets.all(1.0), + // elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + backgroundColor: + Constants.k2color, + initiallyExpanded: false, + maintainState: true, + // backgroundColor: Colors.white, + // collapsedBackgroundColor: Color(0xFF2b9af3), + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: + "Staff/Assistant", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 16.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(3)", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 16.0), + ], + ), + children: [ + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + constraints: BoxConstraints( + minWidth: + MediaQuery.of( + context) + .size + .width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: + Expanded( + child: Text( + 'Title', + style: TextStyle( + fontWeight: + FontWeight + .w600), + softWrap: + true), + )), + DataColumn( + label: Expanded( + child: Text( + 'Location', + style: + TextStyle(fontWeight: FontWeight.w600)))), + ], + rows: List.generate( + publication_data + .length, + (index) => + DataRow( + onSelectChanged: + (value) { + print( + "message ${publication_data[index]}"); + + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: + double + .infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .vertical( + top: Radius + .circular(0), + ), + ), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + publication_data[ + index]); + }, + ); + }, + cells: [ + DataCell(Text( + publication_data[index] + [ + 'Institution'] + .toString(), + softWrap: + true)), + DataCell(Text( + publication_data[index] + [ + 'Address'] + .toString(), + softWrap: + true)), + ], + ), + ), + ), + ), + ), + ), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: + (_) => + PublicationsData())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: + OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), + ), + ), + ), // adds spacing between the text and image + + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Container( + child: Card( + margin: EdgeInsets.all(1.0), + + ///elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + backgroundColor: + Constants.k2color, + initiallyExpanded: false, + maintainState: true, + // backgroundColor: Colors.white, + // collapsedBackgroundColor: Color(0xFF2b9af3), + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: + "State License", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 16.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(3)", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 16.0), + ], + ), + children: [ + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + constraints: BoxConstraints( + minWidth: + MediaQuery.of( + context) + .size + .width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: + Expanded( + child: Text( + 'License No', + style: TextStyle( + fontWeight: + FontWeight + .w600), + softWrap: + true), + )), + DataColumn( + label: Expanded( + child: Text( + 'State', + style: + TextStyle(fontWeight: FontWeight.w600)))), + ], + rows: List.generate( + publication_data + .length, + (index) => + DataRow( + onSelectChanged: + (value) { + print( + "message ${publication_data[index]}"); + + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: + double + .infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .vertical( + top: Radius + .circular(0), + ), + ), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + publication_data[ + index]); + }, + ); + }, + cells: [ + DataCell(Text( + publication_data[index] + [ + 'Institution'] + .toString(), + softWrap: + true)), + DataCell(Text( + publication_data[index] + [ + 'Address'] + .toString(), + softWrap: + true)), + ], + ), + ), + ), + ), + ), + ), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: + (_) => + PublicationsData())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: + OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), + ), + ), + ), // ], + ]), + ListView(children: [ + const Padding( + padding: EdgeInsets.only( + top: 10.0, + left: 8.0, + right: 8.0, + ), + child: Text( + "Activity Details", + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold), + ), ), - Flexible( - flex: 1, - // height: - // 200, // Set a fixed height or use constraints as needed - - child: Padding( - padding: const EdgeInsets.only( - left: 1.0, right: 1.0), - child: Container( + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), child: Card( - elevation: 5, + margin: EdgeInsets.all(1.0), + // elevation: 5, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(0.0), ), - color: const Color.fromARGB( - 255, 0, 71, 137), + color: Constants.k2color, child: ExpansionTile( + initiallyExpanded: false, + maintainState: true, + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + backgroundColor: + Constants.k2color, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + // backgroundColor: Colors.white, + // collapsedBackgroundColor: Color(0xFF2b9af3), + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: "Affiliations", + txtcolor: Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(4)", + txtcolor: Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + ], + ), + children: [ + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + // width: + // MediaQuery.of(context) + // .size + // .width, + constraints: BoxConstraints( + minWidth: + MediaQuery.of( + context) + .size + .width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: Expanded( + child: Text( + 'Organization Name', + style: TextStyle( + fontWeight: + FontWeight + .w600), + ), + )), + DataColumn( + label: Expanded( + child: Text( + 'Time Frame', + style: TextStyle( + fontWeight: + FontWeight.w600)))), + ], + rows: List.generate( + affiliation_data + .length, + (index) => DataRow( + onSelectChanged: + (value) { + // =======> Use onSelectChanged for tab + print( + "message ${affiliation_data[index]}"); + + bottomshet( + affiliation_data[ + index]); + }, + color: MaterialStateProperty + .resolveWith< + Color?>((Set< + MaterialState> + states) { + if (index + .isEven) { + return Colors + .grey + .withOpacity( + 0.1); + } + return null; + }), + cells: [ + DataCell(Text( + affiliation_data[index] + [ + 'org_name'] + .toString(), + softWrap: + true)), + + DataCell(Text( + affiliation_data[index] + [ + 'time_frame'] + .toString(), + softWrap: + true)), + + // Add more DataCells as needed + ], + ), + ), + ), + ), + ), + ), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (_) => + AffiliationsData())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), + ), + ), // adds spacing between the text and image + + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Card( + margin: EdgeInsets.all(1.0), + // elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + initiallyExpanded: false, maintainState: true, // backgroundColor: Colors.white, // collapsedBackgroundColor: Color(0xFF2b9af3), @@ -668,8 +2479,7 @@ class _NewProfileState extends State { .keyboard_arrow_up : Icons .keyboard_arrow_down, - color: Colors.white), - initiallyExpanded: true, + color: Colors.black), title: Row( mainAxisAlignment: MainAxisAlignment.start, @@ -677,7 +2487,7 @@ class _NewProfileState extends State { children: [ Text1( title: "Publications", - txtcolor: Colors.white, + txtcolor: Colors.black, fontweight: FontWeight.normal, txtfont: 17.0), @@ -686,23 +2496,10 @@ class _NewProfileState extends State { ), Text1( title: "(3)", - txtcolor: Colors.white, + txtcolor: Colors.black, fontweight: FontWeight.normal, txtfont: 17.0), - // Text1( - // title: widget - // .text![ - // "publications_count"] - // .toString(), - // txtfont: 18.0, - // txtcolor: Color - // .fromARGB( - // 255, - // 0, - // 71, - // 137), - // ) ], ), children: [ @@ -713,28 +2510,17 @@ class _NewProfileState extends State { scrollDirection: Axis.horizontal, child: Container( - // width: MediaQuery.of( - // context) - // .size - // .width, constraints: BoxConstraints( minWidth: MediaQuery.of( context) .size .width), - color: Colors.white, child: DataTable( + showCheckboxColumn: + false, columns: const [ - // DataColumn( - // label: Expanded( - // child: Text( - // 'sl no'))), - // DataColumn( - // label: Expanded( - // child: Text( - // ''))), DataColumn( label: Expanded( child: Text( @@ -746,22 +2532,7 @@ class _NewProfileState extends State { softWrap: true), )), - DataColumn( - label: Expanded( - child: Text( - 'Journal Name', - softWrap: - true, - style: TextStyle( - fontWeight: - FontWeight.w600)))), - DataColumn( - label: Expanded( - child: Text( - 'Date', - style: TextStyle( - fontWeight: - FontWeight.w600)))), + DataColumn( label: Expanded( child: Text( @@ -776,14 +2547,49 @@ class _NewProfileState extends State { publication_data .length, (index) => DataRow( + onSelectChanged: + (value) { + // =======> Use onSelectChanged for tab + print( + "message ${publication_data[index]}"); + + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: double + .infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .vertical( + top: Radius + .circular( + 0), + ), + ), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + publication_data[ + index]); + }, + ); + }, cells: [ - // DataCell(Text( - // publication_data[index] - // [ - // 'id'] - // .toString(), - // softWrap: - // true)), DataCell(Text( publication_data[index] [ @@ -791,20 +2597,7 @@ class _NewProfileState extends State { .toString(), softWrap: true)), - DataCell(Text( - publication_data[index] - [ - 'journal_name'] - .toString(), - softWrap: - true)), - DataCell(Text( - publication_data[index] - [ - 'date'] - .toString(), - softWrap: - true)), + DataCell(Text( publication_data[index] [ @@ -864,958 +2657,739 @@ class _NewProfileState extends State { ), ), // adds spacing between the text and image - const SizedBox(height: 10), - - Flexible( - flex: 1, - // height: - // 200, // Set a fixed height or use constraints as needed - - child: Padding( - padding: const EdgeInsets.only( - left: 1.0, right: 1.0), - child: Card( - elevation: 5, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(0.0), - ), - color: const Color.fromARGB( - 255, 0, 71, 137), - child: ExpansionTile( - maintainState: true, - onExpansionChanged: - (bool expanded) { - setState(() { - _isExpanded = expanded; - }); - }, - backgroundColor: - const Color.fromARGB( - 255, 0, 71, 137), - trailing: Icon( - _isExpanded - ? Icons.keyboard_arrow_up - : Icons - .keyboard_arrow_down, - color: Colors.white), - // backgroundColor: Colors.white, - // collapsedBackgroundColor: Color(0xFF2b9af3), - initiallyExpanded: true, - title: Row( - mainAxisAlignment: - MainAxisAlignment.start, - // mainAxisSize: MainAxisSize.min, - children: [ - Text1( - title: "Events", - txtcolor: Colors.white, - fontweight: - FontWeight.normal, - txtfont: 17.0), - const SizedBox( - width: 8.0, - ), - Text1( - title: "(4)", - txtcolor: Colors.white, - fontweight: - FontWeight.normal, - txtfont: 17.0), - ], - ), - children: [ - Scrollbar( - child: SingleChildScrollView( - scrollDirection: - Axis.horizontal, - child: Container( - // width: - // MediaQuery.of(context) - // .size - // .width, - constraints: - BoxConstraints( - minWidth: MediaQuery.of( - context) - .size - .width, - ), - color: Colors.white, - child: DataTable( - columns: const [ - // DataColumn( - // label: Expanded( - // child: Text( - // '', - // softWrap: - // true))), - DataColumn( - label: Expanded( - child: Text( - 'Event Name', - softWrap: true, - style: TextStyle( - fontWeight: - FontWeight - .w600)), - )), - DataColumn( - label: Expanded( - child: Text( - 'Session Type', - softWrap: - true, - style: TextStyle( - fontWeight: - FontWeight.w600)))), - DataColumn( - label: Expanded( - child: Text( - 'Topic', - softWrap: - true, - style: TextStyle( - fontWeight: - FontWeight.w600)))), - DataColumn( - label: Expanded( - child: Text( - 'Role', - softWrap: - true, - style: TextStyle( - fontWeight: - FontWeight.w600)))), - - // Add more columns as needed - ], - rows: List.generate( - event_data.length, - (index) => DataRow( - cells: [ - // DataCell(Text( - // event_data[index] - // ['id'] - // .toString(), - // softWrap: - // true)), - DataCell(Text( - event_data[index] - [ - 'event_name'] - .toString(), - softWrap: - true)), - DataCell(Text( - event_data[index] - [ - 'session_type'] - .toString(), - softWrap: - true)), - DataCell(Text( - event_data[index] - [ - 'topic'] - .toString(), - softWrap: - true)), - DataCell(Text( - event_data[index] - [ - 'role'] - .toString(), - softWrap: - true)), - - // Add more DataCells as needed - ], - ), - ), - ), + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Card( + margin: EdgeInsets.all(1.0), + elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + initiallyExpanded: false, + maintainState: true, + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + backgroundColor: + Constants.k2color, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: "Events", + txtcolor: Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + const SizedBox( + width: 8.0, ), - ), + Text1( + title: "(4)", + txtcolor: Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + ], ), - Container( - color: Colors.white, - child: Align( - alignment: Alignment.center, - child: Padding( - padding: - const EdgeInsets.all( - 8.0), - child: OutlinedButton( - onPressed: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => - EventsData())); - }, - child: Text( - 'Show More', - style: TextStyle( - color: Constants - .k2color), - ), - style: OutlinedButton - .styleFrom( - shape: - RoundedRectangleBorder( - borderRadius: - BorderRadius - .circular( - 12), - ), - ), - ), - ), - ), - ) - ]), - ), - ), - ), // adds spacing between the text and image - - SizedBox( - height: 10.0, - ), - - Flexible( - flex: 1, - // height: - // 200, // Set a fixed height or use constraints as needed - - child: Padding( - padding: const EdgeInsets.only( - left: 1.0, right: 1.0), - child: Card( - elevation: 5, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(0.0), - ), - color: const Color.fromARGB( - 255, 0, 71, 137), - child: ExpansionTile( - maintainState: true, - onExpansionChanged: - (bool expanded) { - setState(() { - _isExpanded = expanded; - }); - }, - backgroundColor: - const Color.fromARGB( - 255, 0, 71, 137), - trailing: Icon( - _isExpanded - ? Icons.keyboard_arrow_up - : Icons - .keyboard_arrow_down, - color: Colors.white), - // backgroundColor: Colors.white, - // collapsedBackgroundColor: Color(0xFF2b9af3), - initiallyExpanded: true, - title: Row( - mainAxisAlignment: - MainAxisAlignment.start, - // mainAxisSize: MainAxisSize.min, children: [ - Text1( - title: "Trials", - txtcolor: Colors.white, - fontweight: - FontWeight.normal, - txtfont: 17.0), - const SizedBox( - width: 8.0, - ), - Text1( - title: "(4)", - txtcolor: Colors.white, - fontweight: - FontWeight.normal, - txtfont: 17.0), - ], - ), - children: [ - Scrollbar( - child: SingleChildScrollView( - scrollDirection: - Axis.horizontal, - child: Container( - // width: - // MediaQuery.of(context) - // .size - // .width, - constraints: BoxConstraints( + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + constraints: + BoxConstraints( minWidth: MediaQuery.of( context) .size - .width), - color: Colors.white, - child: DataTable( - columns: const [ - // DataColumn( - // label: Expanded( - // child: Text( - // '', - // softWrap: - // true))), - DataColumn( - label: Expanded( - child: Text( - 'Trial Name', - softWrap: true, - style: TextStyle( - fontWeight: - FontWeight - .w600)), - )), + .width, + ), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: Expanded( + child: Text( + 'Event Name', + softWrap: + true, + style: TextStyle( + fontWeight: + FontWeight + .w600)), + )), - DataColumn( - label: Expanded( - child: Text( - 'Status', - softWrap: - true, - style: TextStyle( - fontWeight: - FontWeight.w600)))), - DataColumn( - label: Expanded( - child: Text( - 'Sponsers', - softWrap: - true, - style: TextStyle( - fontWeight: - FontWeight.w600)))), - DataColumn( - label: Expanded( - child: Text( - 'Condition', - softWrap: - true, - style: TextStyle( - fontWeight: - FontWeight.w600)))), - DataColumn( - label: Expanded( - child: Text( - 'Intervention', - softWrap: - true, - style: TextStyle( - fontWeight: - FontWeight.w600)))), - DataColumn( - label: Expanded( - child: Text( - 'Phase', - softWrap: - true, - style: TextStyle( - fontWeight: - FontWeight.w600)))), + DataColumn( + label: Expanded( + child: Text( + 'Role', + softWrap: + true, + style: TextStyle( + fontWeight: + FontWeight.w600)))), - // Add more columns as needed - ], - rows: List.generate( - trial_data.length, - (index) => DataRow( - cells: [ - // DataCell(Text( - // trial_data[index] - // ['id'] - // .toString(), - // softWrap: - // true)), - DataCell(Text( - trial_data[index] - [ - 'trial_name'] - .toString(), - softWrap: - true)), - DataCell(Text( - trial_data[index] - [ - 'status'] - .toString(), - softWrap: - true)), - DataCell(Text( - trial_data[index] - [ - 'sponsors'] - .toString(), - softWrap: - true)), - DataCell(Text( - trial_data[index] - [ - 'condition'] - .toString(), - softWrap: - true)), - DataCell(Text( - trial_data[index] - [ - 'intervention'] - .toString(), - softWrap: - true)), - DataCell(Text( - trial_data[index] - [ - 'phase'] - .toString(), - softWrap: - true)), + // Add more columns as needed + ], + rows: List.generate( + event_data.length, + (index) => DataRow( + onSelectChanged: + (value) { + // =======> Use onSelectChanged for tab + print( + "message ${event_data[index]}"); - // Add more DataCells as needed - ], + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: double + .infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .vertical( + top: Radius + .circular( + 0), + ), + ), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + event_data[ + index]); + }, + ); + }, + cells: [ + DataCell(Text( + event_data[index] + [ + 'event_name'] + .toString(), + softWrap: + true)), + + DataCell(Text( + event_data[index] + [ + 'role'] + .toString(), + softWrap: + true)), + + // Add more DataCells as needed + ], + ), ), ), ), ), ), - ), - Container( - color: Colors.white, - child: Align( - alignment: Alignment.center, - child: Padding( - padding: - const EdgeInsets.all( - 8.0), - child: OutlinedButton( - onPressed: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => - EventsData())); - }, - child: Text( - 'Show More', - style: TextStyle( - color: Constants - .k2color), - ), - style: OutlinedButton - .styleFrom( - shape: - RoundedRectangleBorder( - borderRadius: - BorderRadius - .circular( - 12), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (_) => + EventsData())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), ), ), ), ), - ), - ) - ]), + ) + ]), + ), ), ), ), // adds spacing between the text and image - SizedBox( - height: 10.0, - ), - - Flexible( - flex: 1, - child: Padding( - padding: const EdgeInsets.only( - left: 1.0, right: 1.0), - child: Card( - elevation: 5, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(0.0), - ), - color: const Color.fromARGB( - 255, 0, 71, 137), - child: ExpansionTile( - maintainState: true, - onExpansionChanged: - (bool expanded) { - setState(() { - _isExpanded = expanded; - }); - }, - backgroundColor: - const Color.fromARGB( - 255, 0, 71, 137), - trailing: Icon( - _isExpanded - ? Icons.keyboard_arrow_up - : Icons - .keyboard_arrow_down, - color: Colors.white), - // collapsedBackgroundColor: Color(0xFF2b9af3), - initiallyExpanded: true, - // initiallyExpanded: true, - title: Row( - mainAxisAlignment: - MainAxisAlignment.start, - // mainAxisSize: MainAxisSize.min, + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Card( + margin: EdgeInsets.all(1.0), + elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + initiallyExpanded: false, + maintainState: true, + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + backgroundColor: + Constants.k2color, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + // backgroundColor: Colors.white, + // collapsedBackgroundColor: Color(0xFF2b9af3), + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: "Trials", + txtcolor: Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(4)", + txtcolor: Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + ], + ), children: [ - Text1( - title: "Medical Insight", - txtcolor: Colors.white, - fontweight: - FontWeight.normal, - txtfont: 17.0), - const SizedBox( - width: 8.0, - ), - Text1( - title: "(3)", - txtcolor: Colors.white, - fontweight: - FontWeight.normal, - txtfont: 17.0), - ], - ), - children: [ - Container( - width: MediaQuery.of(context) - .size - .width, + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + constraints: BoxConstraints( + minWidth: + MediaQuery.of( + context) + .size + .width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: Expanded( + child: Text( + 'Trial Name', + softWrap: + true, + style: TextStyle( + fontWeight: + FontWeight + .w600)), + )), + DataColumn( + label: Expanded( + child: Text( + 'Status', + softWrap: + true, + style: TextStyle( + fontWeight: + FontWeight.w600)))), + ], + rows: List.generate( + trial_data.length, + (index) => DataRow( + onSelectChanged: + (value) { + // =======> Use onSelectChanged for tab + print( + "message ${trial_data[index]}"); - /// 5, - color: Colors.white, - child: Consumer< - MediacalInsightProvider>( - builder: - (BuildContext context, - value, - Widget? child) { - print( - "med1 : ${value.med.length}"); - - if (value.med.length != 0) { - return ListView.builder( - physics: - const ScrollPhysics(), - // scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: value.med - .take(2) - .length, - itemBuilder: - (context, index) { - item = value - .med[index]; - - print( - "Item_Medical_insight ${item['Therapeutic Area']}"); - return Padding( - padding: - const EdgeInsets - .all(8.0), - child: Card( - margin: - EdgeInsets - .zero, - - elevation: 4, - surfaceTintColor: - Colors - .white, - shape: - RoundedRectangleBorder( - borderRadius: - BorderRadius - .zero, - ), - - // shape: RoundedRectangleBorder( - // side: BorderSide(color: Colors.black, width: 1), - // borderRadius: BorderRadius.only( - // bottomRight: Radius.circular(30)), - // ), - child: SizedBox( - width: MediaQuery - .sizeOf( - context) - .width, - child: - ListTile( - dense: true, - title: - Column( - // crossAxisAlignment: CrossAxisAlignment.center, - children: [ - // Text( - // "Acute neurology is the therapeutic area of the medical insight for Product A. The age of treatment is the topic of interest for this source type publication."), - - RichText( - text: - TextSpan( - text: - '', - style: - DefaultTextStyle.of(context).style, - children: const [ - TextSpan(text: 'Acute neurology ', style: TextStyle(fontWeight: FontWeight.bold)), - // TextSpan( - // text: ' therapeutic area ', - // style: TextStyle( - // fontWeight: - // FontWeight.bold)), - TextSpan(text: 'is the therapeutic area of the medical insight for '), - TextSpan(text: 'Product A. The age of treatment', style: TextStyle(fontWeight: FontWeight.bold)), - TextSpan(text: ' is the topic of interest for this source type'), - TextSpan(text: ' publication.', style: TextStyle(fontWeight: FontWeight.bold)), - ], - ), - ), - - const Padding( - padding: - EdgeInsets.all(8.0), - child: - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Icon( - Icons.person, - size: 20, - ), - Text( - "pooja", - style: TextStyle(fontSize: 14.0), - ) - ], - ), - Row( - children: [ - Icon( - Icons.calendar_today, - size: 20, - ), - Text( - "11/11/2022 ", - style: TextStyle(fontSize: 14.0), - ) - ], - ) - ], - ), - ), - ], + // bsheet( + // publication_data[ + // index]); + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: double + .infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .vertical( + top: Radius + .circular( + 0), ), ), - ), - // shape: BorderRadius.only(bottomRight: Radius.circular(50)), - ), - ); - }); - } else { - return Container( - color: Colors.white, - width: MediaQuery.of( - context) - .size - .width, - child: Column( - children: [ - Text("No records"), - ], - ), - ); - } - }), - ), - Container( - color: Colors.white, - child: Align( - alignment: Alignment.center, - child: Padding( - padding: - const EdgeInsets.all( - 8.0), - child: OutlinedButton( - onPressed: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => - const MedicalInsight1())); - }, - child: Text( - 'Show More', - style: TextStyle( - color: Constants - .k2color), - ), - style: OutlinedButton - .styleFrom( - shape: - RoundedRectangleBorder( - borderRadius: - BorderRadius - .circular( - 12), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + trial_data[ + index]); + }, + ); + }, + cells: [ + DataCell(Text( + trial_data[index] + [ + 'trial_name'] + .toString(), + softWrap: + true)), + DataCell(Text( + trial_data[index] + [ + 'status'] + .toString(), + softWrap: + true)), + ], + ), ), ), ), ), ), - ) - ]), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (_) => + EventsData())); + }, + style: OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + ), + ), + ), + ) + ]), + ), ), ), - ), + ), // adds spacing between the text and image + ]), - SizedBox( - height: 10.0, - ), - Flexible( - flex: 1, - child: Padding( - padding: const EdgeInsets.only( - left: 1.0, right: 1.0), - child: Card( - elevation: 5, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(0.0), - ), - color: const Color.fromARGB( - 255, 0, 71, 137), - child: ExpansionTile( - maintainState: true, - onExpansionChanged: - (bool expanded) { - setState(() { - _isExpanded = expanded; - }); - }, - backgroundColor: - const Color.fromARGB( - 255, 0, 71, 137), - trailing: Icon( - _isExpanded - ? Icons.keyboard_arrow_up - : Icons - .keyboard_arrow_down, - color: Colors.white), - // collapsedBackgroundColor: Color(0xFF2b9af3), - initiallyExpanded: true, - title: Row( - //mainAxisSize: MainAxisSize.min, - children: [ - GestureDetector( - onTap: () async { - final provider = Provider - .of( - context, - listen: false); - if (getCount( - provider - .intConfigDataList[ - 0] - .name, - provider) != - 0) { - provider.savedList - .where((element) => - element.form == - provider - .intConfigDataList[ - 0] - .name) - .toList(); - Navigator.push( - context, - MaterialPageRoute( - builder: (BuildContext - context) => - SavedFormListScreen( - formname: provider - .intConfigDataList[ - 0] - .name, - ))); - } - }, - child: Text1( - title: - "Interaction Form", - txtcolor: Colors.white, - fontweight: - FontWeight.normal, - txtfont: 17.0), - ), - const SizedBox( - width: 8.0, - ), - ], + // + ListView( + children: [ + Padding( + padding: EdgeInsets.only( + top: 10.0, + left: 8.0, + right: 8.0, + ), + child: Text( + "Engagement Details", + style: TextStyle( + fontSize: 16.0, + fontWeight: FontWeight.bold), + ), + ), + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Card( + margin: EdgeInsets.all(1.0), + //elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), ), - children: [ - Container( - height: MediaQuery.of(context) - .size - .height / - 5, - color: Colors.white, - child: Consumer< - ViewInteractionProvider>( - builder: - (BuildContext context, - provider, + color: Constants.k2color, + child: ExpansionTile( + initiallyExpanded: false, + maintainState: true, + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + backgroundColor: + Constants.k2color, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + // collapsedBackgroundColor: Color(0xFF2b9af3), + // initiallyExpanded: true, + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: + "Medical Insight", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(3)", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + ], + ), + children: [ + Container( + width: + MediaQuery.of(context) + .size + .width, + + /// 5, + color: Colors.white, + child: Consumer< + MediacalInsightProvider>( + builder: (BuildContext + context, + value, Widget? child) { - print( - "P_leangth : ${provider.savedList.length}"); + print( + "med1 : ${value.med.length}"); - if (provider - .savedList.length != - 0) { - return ListView.builder( - shrinkWrap: true, - physics: - NeverScrollableScrollPhysics(), - itemCount: provider - .savedList - .take(2) - .length, - itemBuilder: - (context, index) { - print( - "Indexxxxxx $index"); - return Column( + if (value.med.length != + 0) { + return ListView + .builder( + physics: + const ScrollPhysics(), + // scrollDirection: Axis.vertical, + shrinkWrap: + true, + itemCount: value + .med + .take(2) + .length, + itemBuilder: + (context, + index) { + item = value + .med[ + index]; + + print( + "Item_Medical_insight ${item['Therapeutic Area']}"); + return Padding( + padding: const EdgeInsets + .all( + 8.0), + child: + Card( + margin: + EdgeInsets.zero, + + elevation: + 4, + surfaceTintColor: + Colors.white, + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius.zero, + ), + + child: + SizedBox( + width: + MediaQuery.sizeOf(context).width, + child: + ListTile( + dense: + true, + title: + Column( + // crossAxisAlignment: CrossAxisAlignment.center, + children: [ + // Text( + // "Acute neurology is the therapeutic area of the medical insight for Product A. The age of treatment is the topic of interest for this source type publication."), + + RichText( + text: TextSpan( + text: '', + style: DefaultTextStyle.of(context).style, + children: const [ + TextSpan(text: 'Acute neurology ', style: TextStyle(fontWeight: FontWeight.bold)), + // TextSpan( + // text: ' therapeutic area ', + // style: TextStyle( + // fontWeight: + // FontWeight.bold)), + TextSpan(text: 'is the therapeutic area of the medical insight for '), + TextSpan(text: 'Product A. The age of treatment', style: TextStyle(fontWeight: FontWeight.bold)), + TextSpan(text: ' is the topic of interest for this source type'), + TextSpan(text: ' publication.', style: TextStyle(fontWeight: FontWeight.bold)), + ], + ), + ), + + const Padding( + padding: EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Icon( + Icons.person, + size: 20, + ), + Text( + "pooja", + style: TextStyle(fontSize: 14.0), + ) + ], + ), + Row( + children: [ + Icon( + Icons.calendar_today, + size: 20, + ), + Text( + "11/11/2022 ", + style: TextStyle(fontSize: 14.0), + ) + ], + ) + ], + ), + ), + ], + ), + ), + ), + // shape: BorderRadius.only(bottomRight: Radius.circular(50)), + ), + ); + }); + } else { + return Container( + color: Colors.white, + width: + MediaQuery.of( + context) + .size + .width, + child: Column( children: [ - ListTile( - subtitle: - Text( - 'Updated on ${provider.savedList[index].updatedTime}', - //style: TextStyle(fontStyle: FontStyle.italic), - ), - title: Text( - provider - .savedList[ - index] - .id, - ), - trailing: - SizedBox( - width: 150, - child: Row( - children: [ - IconButton( - onPressed: - () { - Navigator.push( - context, - MaterialPageRoute( - builder: (BuildContext context) => ViewInteractionScreen( - saveInteraction: provider.savedList[index], - ))); - }, - icon: - const Icon( - Icons.info_outline, - size: 24, - color: Color.fromARGB(255, 8, 39, 92), - ), - ), - IconButton( - onPressed: - () async { - await provider.initConfigData().then({ - Navigator.push( - context, - MaterialPageRoute( - builder: (BuildContext context) => EditInteractionScreen( - saveInteraction: provider.savedList[index], - ))) - }); - }, - icon: - const Icon( - Icons.edit, - size: 24, - color: Color.fromARGB(255, 8, 39, 92), - ), - ), - IconButton( - onPressed: - () { - showDeleteRecordAlertDialog(context, provider.savedList[index].id, provider.savedList[index]); - }, - icon: - const Icon( - Icons.delete, - size: 24, - color: Color.fromARGB(255, 8, 39, 92), - ), - ), - ]), - ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (BuildContext context) => ViewInteractionScreen( - saveInteraction: provider.savedList[index], - ))); - }, - ), - const Divider(), + Text( + "No records"), ], - ); - }); - } else { - return Container( - color: Colors.white, - width: MediaQuery.of( - context) - .size - .width, - child: Column( - children: [ - Text("No records"), - ], + ), + ); + } + }), + ), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: + (_) => + const MedicalInsight1())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: + OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), ), - ); - } - }), - ), + ), + ) + ]), + ), + ), + ), + ), - // SingleChildScrollView( - // scrollDirection: - // Axis.horizontal, - // child: Container( - // width: MediaQuery.of( - // context) - // .size - // .width, - // color: Colors.white, - // child: Text("hiiiiii")), - // ), - Container( - color: Colors.white, - child: Align( - alignment: Alignment.center, - child: Padding( - padding: - const EdgeInsets.all( - 8.0), - child: OutlinedButton( - onPressed: () { + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Card( + margin: EdgeInsets.all(1.0), + // elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + initiallyExpanded: false, + maintainState: true, + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + backgroundColor: + Constants.k2color, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + // collapsedBackgroundColor: Color(0xFF2b9af3), + title: Row( + //mainAxisSize: MainAxisSize.min, + children: [ + GestureDetector( + onTap: () async { final provider = Provider .of( context, @@ -1849,58 +3423,5766 @@ class _NewProfileState extends State { ))); } }, - child: - Text('Show More'), - style: OutlinedButton - .styleFrom( - shape: - RoundedRectangleBorder( - borderRadius: - BorderRadius - .circular( - 12), + child: Text1( + title: + "Interactions", + txtcolor: + Colors.black, + fontweight: + FontWeight + .normal, + txtfont: 17.0), + ), + const SizedBox( + width: 8.0, + ), + ], + ), + children: [ + Container( + height: + MediaQuery.of(context) + .size + .height / + 5, + color: Colors.white, + child: Consumer< + ViewInteractionProvider>( + builder: (BuildContext + context, + provider, + Widget? child) { + print( + "P_leangth : ${provider.savedList.length}"); + + if (provider.savedList + .length != + 0) { + return ListView + .builder( + shrinkWrap: + true, + physics: + NeverScrollableScrollPhysics(), + itemCount: provider + .savedList + .take(2) + .length, + itemBuilder: + (context, + index) { + print( + "Indexxxxxx $index"); + return Column( + children: [ + ListTile( + subtitle: + Text( + 'Updated on ${provider.savedList[index].updatedTime}', + //style: TextStyle(fontStyle: FontStyle.italic), + ), + title: + Text( + provider.savedList[index].id, + ), + trailing: + SizedBox( + width: + 150, + child: + Row(children: [ + IconButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => ViewInteractionScreen( + saveInteraction: provider.savedList[index], + ))); + }, + icon: const Icon( + Icons.info_outline, + size: 24, + color: Color.fromARGB(255, 8, 39, 92), + ), + ), + IconButton( + onPressed: () async { + await provider.initConfigData().then({ + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => EditInteractionScreen( + saveInteraction: provider.savedList[index], + ))) + }); + }, + icon: const Icon( + Icons.edit, + size: 24, + color: Color.fromARGB(255, 8, 39, 92), + ), + ), + IconButton( + onPressed: () { + showDeleteRecordAlertDialog(context, provider.savedList[index].id, provider.savedList[index]); + }, + icon: const Icon( + Icons.delete, + size: 24, + color: Color.fromARGB(255, 8, 39, 92), + ), + ), + ]), + ), + onTap: + () { + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext context) => ViewInteractionScreen( + saveInteraction: provider.savedList[index], + ))); + }, + ), + const Divider(), + ], + ); + }); + } else { + return Container( + color: Colors.white, + width: + MediaQuery.of( + context) + .size + .width, + child: Column( + children: [ + Text( + "No records"), + ], + ), + ); + } + }), + ), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + final provider = + Provider.of< + InteractionProvider>( + context, + listen: + false); + if (getCount( + provider + .intConfigDataList[ + 0] + .name, + provider) != + 0) { + provider + .savedList + .where((element) => + element + .form == + provider + .intConfigDataList[0] + .name) + .toList(); + Navigator.push( + context, + MaterialPageRoute( + builder: (BuildContext + context) => + SavedFormListScreen( + formname: provider.intConfigDataList[0].name, + ))); + } + }, + child: Text( + 'Show More'), + style: + OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), + ), + ), + + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Card( + margin: EdgeInsets.all(1.0), + // elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + initiallyExpanded: false, + maintainState: true, + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + backgroundColor: + Constants.k2color, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + // backgroundColor: Colors.white, + // collapsedBackgroundColor: Color(0xFF2b9af3), + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: + "Speaker Evalution", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(4)", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + ], + ), + children: [ + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + constraints: BoxConstraints( + minWidth: + MediaQuery.of( + context) + .size + .width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: + Expanded( + child: Text( + 'Program Topic', + style: TextStyle( + fontWeight: + FontWeight + .w600), + ), + )), + DataColumn( + label: Expanded( + child: Text( + 'Speaker Name', + style: + TextStyle(fontWeight: FontWeight.w600)))), + ], + rows: List.generate( + speaker.length, + (index) => + DataRow( + onSelectChanged: + (value) { + // =======> Use onSelectChanged for tab + print( + "message ${speaker[index]}"); + + // bsheet( + // publication_data[ + // index]); + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: + double + .infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .vertical( + top: Radius + .circular(0), + ), + ), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + speaker[ + index]); + }, + ); + }, + color: MaterialStateProperty + .resolveWith< + Color?>((Set< + MaterialState> + states) { + if (index + .isEven) { + return Colors + .grey + .withOpacity( + 0.1); + } + return null; + }), + cells: [ + DataCell(Text( + speaker[index] + [ + 'programtopic'] + .toString(), + softWrap: + true)), + DataCell(Text( + speaker[index] + [ + 'speakername'] + .toString(), + softWrap: + true)), + ], + ), + ), ), ), ), ), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // AffiliationsData())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: + OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), + ), + ), // adds spacing between the text and image + + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Card( + margin: EdgeInsets.all(1.0), + // elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + initiallyExpanded: false, + maintainState: true, + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + backgroundColor: + Constants.k2color, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + // backgroundColor: Colors.white, + // collapsedBackgroundColor: Color(0xFF2b9af3), + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: "Engagement", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(3)", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + ], ), - ) - ]), + children: [ + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + constraints: BoxConstraints( + minWidth: + MediaQuery.of( + context) + .size + .width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: + Expanded( + child: Text( + 'Main Therapeutic Area', + style: TextStyle( + fontWeight: + FontWeight + .w600), + ), + )), + DataColumn( + label: Expanded( + child: Text( + 'Date', + style: + TextStyle(fontWeight: FontWeight.w600)))), + ], + rows: List.generate( + eng + .take(2) + .length, + (index) => + DataRow( + onSelectChanged: + (value) { + // =======> Use onSelectChanged for tab + print( + "message ${eng[index]}"); + + // bsheet( + // publication_data[ + // index]); + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: + double + .infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .vertical( + top: Radius + .circular(0), + ), + ), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + eng[index]); + }, + ); + }, + color: MaterialStateProperty + .resolveWith< + Color?>((Set< + MaterialState> + states) { + if (index + .isEven) { + return Colors + .grey + .withOpacity( + 0.1); + } + return null; + }), + cells: [ + DataCell(Text( + eng[index] + [ + 'main thereutic area'] + .toString(), + softWrap: + true)), + DataCell(Text( + eng[index] + [ + 'date'] + .toString(), + softWrap: + true)), + ], + ), + ), + ), + ), + ), + ), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: + (_) => + EngagementList())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: + OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), ), ), - ), - ], - ), + + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Card( + margin: EdgeInsets.all(1.0), + //elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + initiallyExpanded: false, + maintainState: true, + // backgroundColor: Colors.white, + // collapsedBackgroundColor: Color(0xFF2b9af3), + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + backgroundColor: + Constants.k2color, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: "NIH Grants", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(3)", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + ], + ), + children: [ + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + constraints: BoxConstraints( + minWidth: + MediaQuery.of( + context) + .size + .width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: + Expanded( + child: Text( + 'NIH Center', + style: TextStyle( + fontWeight: + FontWeight + .w600), + softWrap: + true), + )), + DataColumn( + label: Expanded( + child: Text( + 'Organization Name', + style: + TextStyle(fontWeight: FontWeight.w600)))), + ], + rows: List.generate( + publication_data + .length, + (index) => + DataRow( + onSelectChanged: + (value) { + print( + "message ${publication_data[index]}"); + + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: + double + .infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .vertical( + top: Radius + .circular(0), + ), + ), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + publication_data[ + index]); + }, + ); + }, + cells: [ + DataCell(Text( + publication_data[index] + [ + 'artical_title'] + .toString(), + softWrap: + true)), + DataCell(Text( + publication_data[index] + [ + 'author'] + .toString(), + softWrap: + true)), + ], + ), + ), + ), + ), + ), + ), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: + (_) => + PublicationsData())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: + OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), + ), + ), // adds spacing between the text and image + + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Card( + margin: EdgeInsets.all(1.0), + // elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + initiallyExpanded: false, + maintainState: true, + // backgroundColor: Colors.white, + // collapsedBackgroundColor: Color(0xFF2b9af3), + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + backgroundColor: + Constants.k2color, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: "Procedures", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(3)", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + ], + ), + children: [ + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + constraints: BoxConstraints( + minWidth: + MediaQuery.of( + context) + .size + .width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: + Expanded( + child: Text( + 'Program Year', + style: TextStyle( + fontWeight: + FontWeight + .w600), + softWrap: + true), + )), + DataColumn( + label: Expanded( + child: Text( + 'Procedure', + style: + TextStyle(fontWeight: FontWeight.w600)))), + ], + rows: List.generate( + publication_data + .length, + (index) => + DataRow( + onSelectChanged: + (value) { + print( + "message ${publication_data[index]}"); + + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: + double + .infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .vertical( + top: Radius + .circular(0), + ), + ), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + publication_data[ + index]); + }, + ); + }, + cells: [ + DataCell(Text( + publication_data[index] + [ + 'artical_title'] + .toString(), + softWrap: + true)), + DataCell(Text( + publication_data[index] + [ + 'author'] + .toString(), + softWrap: + true)), + ], + ), + ), + ), + ), + ), + ), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: + (_) => + PublicationsData())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: + OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), + ), + ), // adds spacing between the text and image + + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Card( + margin: EdgeInsets.all(1.0), + // elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + initiallyExpanded: false, + maintainState: true, + // backgroundColor: Colors.white, + // collapsedBackgroundColor: Color(0xFF2b9af3), + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + backgroundColor: + Constants.k2color, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: "Patents", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(3)", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 17.0), + ], + ), + children: [ + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + constraints: BoxConstraints( + minWidth: + MediaQuery.of( + context) + .size + .width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: + Expanded( + child: Text( + 'Patent Title', + style: TextStyle( + fontWeight: + FontWeight + .w600), + softWrap: + true), + )), + DataColumn( + label: Expanded( + child: Text( + 'Status', + style: + TextStyle(fontWeight: FontWeight.w600)))), + ], + rows: List.generate( + publication_data + .length, + (index) => + DataRow( + onSelectChanged: + (value) { + print( + "message ${publication_data[index]}"); + + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: + double + .infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .vertical( + top: Radius + .circular(0), + ), + ), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + publication_data[ + index]); + }, + ); + }, + cells: [ + DataCell(Text( + publication_data[index] + [ + 'artical_title'] + .toString(), + softWrap: + true)), + DataCell(Text( + publication_data[index] + [ + 'author'] + .toString(), + softWrap: + true)), + ], + ), + ), + ), + ), + ), + ), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: + (_) => + PublicationsData())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: + OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), + ), + ), + + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Container( + child: Card( + margin: EdgeInsets.all(1.0), + //elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular( + 0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + initiallyExpanded: false, + maintainState: true, + // backgroundColor: Colors.white, + // collapsedBackgroundColor: Color(0xFF2b9af3), + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + backgroundColor: + Constants.k2color, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + title: Row( + mainAxisAlignment: + MainAxisAlignment + .start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: + "Patient Referrals", + txtcolor: + Colors.black, + fontweight: + FontWeight + .normal, + txtfont: 16.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(3)", + txtcolor: + Colors.black, + fontweight: + FontWeight + .normal, + txtfont: 17.0), + ], + ), + children: [ + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + constraints: BoxConstraints( + minWidth: + MediaQuery.of( + context) + .size + .width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: + Expanded( + child: Text( + 'Referred By', + style: TextStyle( + fontWeight: FontWeight + .w600), + softWrap: + true), + )), + DataColumn( + label: Expanded( + child: Text( + 'Type of Referrals', + style: + TextStyle(fontWeight: FontWeight.w600)))), + ], + rows: + List.generate( + publication_data + .length, + (index) => + DataRow( + onSelectChanged: + (value) { + print( + "message ${publication_data[index]}"); + + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: + double.infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius.vertical( + top: Radius.circular( + 0), + ), + ), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + publication_data[index]); + }, + ); + }, + cells: [ + DataCell(Text( + publication_data[index]['artical_title'] + .toString(), + softWrap: + true)), + DataCell(Text( + publication_data[index]['author'] + .toString(), + softWrap: + true)), + ], + ), + ), + ), + ), + ), + ), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: + OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: + (_) => + PublicationsData())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: + OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), + ), + ), + ), // adds spacing between the text and image + + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Card( + margin: EdgeInsets.all(1.0), + elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular(0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + initiallyExpanded: false, + maintainState: true, + // backgroundColor: Colors.white, + // collapsedBackgroundColor: Color(0xFF2b9af3), + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + backgroundColor: + const Color.fromARGB( + 255, 0, 71, 137), + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + title: Row( + mainAxisAlignment: + MainAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: "Training", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 16.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(3)", + txtcolor: + Colors.black, + fontweight: + FontWeight.normal, + txtfont: 16.0), + ], + ), + children: [ + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + constraints: BoxConstraints( + minWidth: + MediaQuery.of( + context) + .size + .width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: + Expanded( + child: Text( + 'Institute Name', + style: TextStyle( + fontWeight: + FontWeight + .w600), + softWrap: + true), + )), + DataColumn( + label: Expanded( + child: Text( + 'Degree', + style: + TextStyle(fontWeight: FontWeight.w600)))), + ], + rows: List.generate( + publication_data + .length, + (index) => + DataRow( + onSelectChanged: + (value) { + print( + "message ${publication_data[index]}"); + + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: + double + .infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .vertical( + top: Radius + .circular(0), + ), + ), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + publication_data[ + index]); + }, + ); + }, + cells: [ + DataCell(Text( + publication_data[index] + [ + 'artical_title'] + .toString(), + softWrap: + true)), + DataCell(Text( + publication_data[index] + [ + 'author'] + .toString(), + softWrap: + true)), + ], + ), + ), + ), + ), + ), + ), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: + (_) => + PublicationsData())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: + OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), + ), + ), // adds spacing between the text and image + + ListTileTheme( + dense: true, + child: Flexible( + flex: 1, + child: Padding( + padding: const EdgeInsets.only( + left: 8.0, right: 8.0), + child: Container( + child: Card( + margin: EdgeInsets.all(1.0), + // elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.circular( + 0.0), + ), + color: Constants.k2color, + child: ExpansionTile( + backgroundColor: + Constants.k2color, + initiallyExpanded: false, + maintainState: true, + // backgroundColor: Colors.white, + // collapsedBackgroundColor: Color(0xFF2b9af3), + onExpansionChanged: + (bool expanded) { + setState(() { + _isExpanded = expanded; + }); + }, + trailing: Icon( + _isExpanded + ? Icons + .keyboard_arrow_up + : Icons + .keyboard_arrow_down, + color: Colors.black), + title: Row( + mainAxisAlignment: + MainAxisAlignment + .start, + // mainAxisSize: MainAxisSize.min, + children: [ + Text1( + title: "Case", + txtcolor: + Colors.black, + fontweight: + FontWeight + .normal, + txtfont: 16.0), + const SizedBox( + width: 8.0, + ), + Text1( + title: "(3)", + txtcolor: + Colors.black, + fontweight: + FontWeight + .normal, + txtfont: 16.0), + ], + ), + children: [ + Scrollbar( + child: + SingleChildScrollView( + scrollDirection: + Axis.horizontal, + child: Container( + constraints: BoxConstraints( + minWidth: + MediaQuery.of( + context) + .size + .width), + color: Colors.white, + child: DataTable( + showCheckboxColumn: + false, + columns: const [ + DataColumn( + label: + Expanded( + child: Text( + 'Name', + style: TextStyle( + fontWeight: FontWeight + .w600), + softWrap: + true), + )), + DataColumn( + label: Expanded( + child: Text( + 'Type', + style: + TextStyle(fontWeight: FontWeight.w600)))), + ], + rows: + List.generate( + publication_data + .length, + (index) => + DataRow( + onSelectChanged: + (value) { + print( + "message ${publication_data[index]}"); + + showModalBottomSheet( + useRootNavigator: + true, + isScrollControlled: + false, + enableDrag: + true, + useSafeArea: + true, + constraints: + const BoxConstraints( + maxWidth: + double.infinity, + ), + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius.vertical( + top: Radius.circular( + 0), + ), + ), + clipBehavior: + Clip.antiAliasWithSaveLayer, + context: + context, + builder: + (context) { + return bsheet( + publication_data[index]); + }, + ); + }, + cells: [ + DataCell(Text( + publication_data[index]['artical_title'] + .toString(), + softWrap: + true)), + DataCell(Text( + publication_data[index]['author'] + .toString(), + softWrap: + true)), + ], + ), + ), + ), + ), + ), + ), + Container( + color: Colors.white, + child: Align( + alignment: + Alignment.center, + child: Padding( + padding: + const EdgeInsets + .all(8.0), + child: + OutlinedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: + (_) => + PublicationsData())); + }, + child: Text( + 'Show More', + style: TextStyle( + color: Constants + .k2color), + ), + style: + OutlinedButton + .styleFrom( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 12), + ), + ), + ), + ), + ), + ) + ]), + ), + ), + ), + ), + ), // adds spacing between the text and image + ], + ), + // Center(child: Icon(Icons.email)), + ], ), - // ) - ) + ), + // Other widgets below TabBarView ], ), + // ), ), - ) - ], - ), - ], - ), - ], - ), - floatingActionButton: Visibility( - visible: true, - child: FloatingActionButton( - onPressed: () async { - // final ConfigDataProvider configDataProvider = - // ConfigDataProvider(); + ), + ), - // await configDataProvider.initConfigUIData(); - Navigator.push( - context, MaterialPageRoute(builder: (context) => FormList())); - }, - foregroundColor: Colors.white, - backgroundColor: const Color.fromARGB(255, 0, 71, 132), - child: new Icon(Icons.add), + // Container( + // width: MediaQuery.of(context).size.width, + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // mainAxisSize: MainAxisSize.min, + // children: [ + // const Padding( + // padding: EdgeInsets.only( + // top: 10.0, + // left: 8.0, + // right: 8.0, + // ), + // child: Text( + // "Sentiment", + // style: TextStyle( + // fontSize: 16.0, fontWeight: FontWeight.bold), + // ), + // ), + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: const Color.fromARGB(255, 0, 71, 137), + // child: ExpansionTile( + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // backgroundColor: + // const Color.fromARGB(255, 0, 71, 137), + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Sentiment Score", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(3)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // // Text1( + // // title: widget + // // .text![ + // // "publications_count"] + // // .toString(), + // // txtfont: 18.0, + // // txtcolor: Color + // // .fromARGB( + // // 255, + // // 0, + // // 71, + // // 137), + // // ) + // ], + // ), + // children: [ + // Scrollbar( + // //isAlwaysShown: true, + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // // width: MediaQuery.of( + // // context) + // // .size + // // .width, + // constraints: BoxConstraints( + // minWidth: MediaQuery.of(context) + // .size + // .width), + + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // // DataColumn( + // // label: Expanded( + // // child: Text( + // // 'sl no'))), + // // DataColumn( + // // label: Expanded( + // // child: Text( + // // ''))), + // DataColumn( + // label: Expanded( + // child: Text('Product', + // style: TextStyle( + // fontWeight: + // FontWeight.w600), + // softWrap: true), + // )), + // // DataColumn( + // // label: Expanded( + // // child: Text( + // // 'Journal Name', + // // softWrap: + // // true, + // // style: TextStyle( + // // fontWeight: + // // FontWeight.w600)))), + // // DataColumn( + // // label: Expanded( + // // child: Text( + // // 'Date', + // // style: TextStyle( + // // fontWeight: + // // FontWeight.w600)))), + // DataColumn( + // label: Expanded( + // child: Text( + // 'Aissel Engagement', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + + // // Add more columns as needed + // ], + // rows: List.generate( + // publication_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // // =======> Use onSelectChanged for tab + // print( + // "message ${publication_data[index]}"); + + // // bsheet( + // // publication_data[ + // // index]); + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // publication_data[ + // index]); + // }, + // ); + // // showBottomSheet( + // // context: + // // context, + // // builder: + // // (BuildContext + // // context) { + // // return bsheet( + // // publication_data[ + // // index]); // returns your BottomSheet widget + // // }); + // }, + // cells: [ + // // DataCell(Text( + // // publication_data[index] + // // [ + // // 'id'] + // // .toString(), + // // softWrap: + // // true)), + // DataCell(Text( + // publication_data[index][ + // 'artical_title'] + // .toString(), + // softWrap: true)), + // // DataCell(Text( + // // publication_data[index] + // // [ + // // 'journal_name'] + // // .toString(), + // // softWrap: + // // true)), + // // DataCell(Text( + // // publication_data[index] + // // [ + // // 'date'] + // // .toString(), + // // softWrap: + // // true)), + // DataCell(Text( + // publication_data[index] + // ['author'] + // .toString(), + // softWrap: true)), + + // // Add more DataCells as needed + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // PublicationsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular(12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), // adds spacing between the text and image + + // const Padding( + // padding: EdgeInsets.only( + // top: 10.0, + // left: 8.0, + // right: 8.0, + // ), + // child: Text( + // "Related Details", + // style: TextStyle( + // fontSize: 16.0, fontWeight: FontWeight.bold), + // ), + // ), + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Container( + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: Constants.k2color, + // child: ExpansionTile( + // backgroundColor: Constants.k2color, + // initiallyExpanded: false, + // maintainState: true, + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Locations", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 16.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(3)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 16.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: + // MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text('Name', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600), + // softWrap: true), + // )), + // DataColumn( + // label: Expanded( + // child: Text('Type', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + // ], + // rows: List.generate( + // publication_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // print( + // "message ${publication_data[index]}"); + + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: + // false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // const RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: + // Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // publication_data[ + // index]); + // }, + // ); + // }, + // cells: [ + // DataCell(Text( + // publication_data[ + // index][ + // 'Institution'] + // .toString(), + // softWrap: true)), + // DataCell(Text( + // publication_data[ + // index] + // ['Address'] + // .toString(), + // softWrap: true)), + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: + // const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // PublicationsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular( + // 12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), + // ), // adds spacing between the text and image + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Container( + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: Constants.k2color, + // child: ExpansionTile( + // backgroundColor: Constants.k2color, + // initiallyExpanded: false, + // maintainState: true, + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Phone Numbers", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 16.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(3)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 16.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: + // MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text('phone Type', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600), + // softWrap: true), + // )), + // DataColumn( + // label: Expanded( + // child: Text( + // 'Location', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + // ], + // rows: List.generate( + // publication_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // print( + // "message ${publication_data[index]}"); + + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: + // false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: + // Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // publication_data[ + // index]); + // }, + // ); + // }, + // cells: [ + // DataCell(Text( + // publication_data[ + // index][ + // 'Institution'] + // .toString(), + // softWrap: true)), + // DataCell(Text( + // publication_data[ + // index] + // ['Address'] + // .toString(), + // softWrap: true)), + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: + // const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // PublicationsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular( + // 12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), + // ), // adds spacing between the text and image + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Container( + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: Constants.k2color, + // child: ExpansionTile( + // backgroundColor: Constants.k2color, + // initiallyExpanded: false, + // maintainState: true, + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Emails", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 16.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(3)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 16.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: + // MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text('Email Type', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600), + // softWrap: true), + // )), + // DataColumn( + // label: Expanded( + // child: Text('Email', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + // ], + // rows: List.generate( + // publication_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // print( + // "message ${publication_data[index]}"); + + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: + // false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: + // Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // publication_data[ + // index]); + // }, + // ); + // }, + // cells: [ + // DataCell(Text( + // publication_data[ + // index][ + // 'Institution'] + // .toString(), + // softWrap: true)), + // DataCell(Text( + // publication_data[ + // index] + // ['Address'] + // .toString(), + // softWrap: true)), + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: + // const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // PublicationsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular( + // 12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), + // ), // adds spacing between the text and image + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Container( + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: Constants.k2color, + // child: ExpansionTile( + // backgroundColor: Constants.k2color, + // initiallyExpanded: false, + // maintainState: true, + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Staff/Assistant", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 16.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(3)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 16.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: + // MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text('Title', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600), + // softWrap: true), + // )), + // DataColumn( + // label: Expanded( + // child: Text( + // 'Location', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + // ], + // rows: List.generate( + // publication_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // print( + // "message ${publication_data[index]}"); + + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: + // false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: + // Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // publication_data[ + // index]); + // }, + // ); + // }, + // cells: [ + // DataCell(Text( + // publication_data[ + // index][ + // 'Institution'] + // .toString(), + // softWrap: true)), + // DataCell(Text( + // publication_data[ + // index] + // ['Address'] + // .toString(), + // softWrap: true)), + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: + // const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // PublicationsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular( + // 12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), + // ), // adds spacing between the text and image + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Container( + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: Constants.k2color, + // child: ExpansionTile( + // backgroundColor: Constants.k2color, + // initiallyExpanded: false, + // maintainState: true, + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "State License", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 16.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(3)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 16.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: + // MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text('License No', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600), + // softWrap: true), + // )), + // DataColumn( + // label: Expanded( + // child: Text('State', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + // ], + // rows: List.generate( + // publication_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // print( + // "message ${publication_data[index]}"); + + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: + // false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: + // Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // publication_data[ + // index]); + // }, + // ); + // }, + // cells: [ + // DataCell(Text( + // publication_data[ + // index][ + // 'Institution'] + // .toString(), + // softWrap: true)), + // DataCell(Text( + // publication_data[ + // index] + // ['Address'] + // .toString(), + // softWrap: true)), + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: + // const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // PublicationsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular( + // 12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), + // ), // adds spacing between the text and image + + // const Padding( + // padding: EdgeInsets.only( + // top: 10.0, + // left: 8.0, + // right: 8.0, + // ), + // child: Text( + // "Engagement Details", + // style: TextStyle( + // fontSize: 16.0, fontWeight: FontWeight.bold), + // ), + // ), + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: const Color.fromARGB(255, 0, 71, 137), + // child: ExpansionTile( + // initiallyExpanded: false, + // maintainState: true, + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // backgroundColor: + // const Color.fromARGB(255, 0, 71, 137), + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // // initiallyExpanded: true, + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Medical Insight", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(3)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // ], + // ), + // children: [ + // Container( + // width: + // MediaQuery.of(context).size.width, + + // /// 5, + // color: Colors.white, + // child: + // Consumer( + // builder: (BuildContext context, + // value, Widget? child) { + // print("med1 : ${value.med.length}"); + + // if (value.med.length != 0) { + // return ListView.builder( + // physics: const ScrollPhysics(), + // // scrollDirection: Axis.vertical, + // shrinkWrap: true, + // itemCount: + // value.med.take(2).length, + // itemBuilder: (context, index) { + // item = value.med[index]; + + // print( + // "Item_Medical_insight ${item['Therapeutic Area']}"); + // return Padding( + // padding: + // const EdgeInsets.all( + // 8.0), + // child: Card( + // margin: EdgeInsets.zero, + + // elevation: 4, + // surfaceTintColor: + // Colors.white, + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius.zero, + // ), + + // child: SizedBox( + // width: + // MediaQuery.sizeOf( + // context) + // .width, + // child: ListTile( + // dense: true, + // title: Column( + // // crossAxisAlignment: CrossAxisAlignment.center, + // children: [ + // // Text( + // // "Acute neurology is the therapeutic area of the medical insight for Product A. The age of treatment is the topic of interest for this source type publication."), + + // RichText( + // text: TextSpan( + // text: '', + // style: DefaultTextStyle.of( + // context) + // .style, + // children: const [ + // TextSpan( + // text: + // 'Acute neurology ', + // style: TextStyle( + // fontWeight: + // FontWeight.bold)), + // // TextSpan( + // // text: ' therapeutic area ', + // // style: TextStyle( + // // fontWeight: + // // FontWeight.bold)), + // TextSpan( + // text: + // 'is the therapeutic area of the medical insight for '), + // TextSpan( + // text: + // 'Product A. The age of treatment', + // style: TextStyle( + // fontWeight: + // FontWeight.bold)), + // TextSpan( + // text: + // ' is the topic of interest for this source type'), + // TextSpan( + // text: + // ' publication.', + // style: TextStyle( + // fontWeight: + // FontWeight.bold)), + // ], + // ), + // ), + + // const Padding( + // padding: + // EdgeInsets + // .all( + // 8.0), + // child: Row( + // mainAxisAlignment: + // MainAxisAlignment + // .spaceBetween, + // children: [ + // Row( + // children: [ + // Icon( + // Icons + // .person, + // size: + // 20, + // ), + // Text( + // "pooja", + // style: + // TextStyle(fontSize: 14.0), + // ) + // ], + // ), + // Row( + // children: [ + // Icon( + // Icons + // .calendar_today, + // size: + // 20, + // ), + // Text( + // "11/11/2022 ", + // style: + // TextStyle(fontSize: 14.0), + // ) + // ], + // ) + // ], + // ), + // ), + // ], + // ), + // ), + // ), + // // shape: BorderRadius.only(bottomRight: Radius.circular(50)), + // ), + // ); + // }); + // } else { + // return Container( + // color: Colors.white, + // width: MediaQuery.of(context) + // .size + // .width, + // child: Column( + // children: [ + // Text("No records"), + // ], + // ), + // ); + // } + // }), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // const MedicalInsight1())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular(12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: const Color.fromARGB(255, 0, 71, 137), + // child: ExpansionTile( + // initiallyExpanded: false, + // maintainState: true, + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // backgroundColor: + // const Color.fromARGB(255, 0, 71, 137), + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // title: Row( + // //mainAxisSize: MainAxisSize.min, + // children: [ + // GestureDetector( + // onTap: () async { + // final provider = Provider.of< + // InteractionProvider>( + // context, + // listen: false); + // if (getCount( + // provider + // .intConfigDataList[0] + // .name, + // provider) != + // 0) { + // provider.savedList + // .where((element) => + // element.form == + // provider + // .intConfigDataList[0] + // .name) + // .toList(); + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (BuildContext + // context) => + // SavedFormListScreen( + // formname: provider + // .intConfigDataList[ + // 0] + // .name, + // ))); + // } + // }, + // child: Text1( + // title: "Interactions", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // ), + // const SizedBox( + // width: 8.0, + // ), + // ], + // ), + // children: [ + // Container( + // height: + // MediaQuery.of(context).size.height / + // 5, + // color: Colors.white, + // child: + // Consumer( + // builder: (BuildContext context, + // provider, Widget? child) { + // print( + // "P_leangth : ${provider.savedList.length}"); + + // if (provider.savedList.length != 0) { + // return ListView.builder( + // shrinkWrap: true, + // physics: + // NeverScrollableScrollPhysics(), + // itemCount: provider.savedList + // .take(2) + // .length, + // itemBuilder: (context, index) { + // print("Indexxxxxx $index"); + // return Column( + // children: [ + // ListTile( + // subtitle: Text( + // 'Updated on ${provider.savedList[index].updatedTime}', + // //style: TextStyle(fontStyle: FontStyle.italic), + // ), + // title: Text( + // provider + // .savedList[index] + // .id, + // ), + // trailing: SizedBox( + // width: 150, + // child: Row(children: [ + // IconButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (BuildContext + // context) => + // ViewInteractionScreen( + // saveInteraction: provider.savedList[index], + // ))); + // }, + // icon: const Icon( + // Icons + // .info_outline, + // size: 24, + // color: Color + // .fromARGB( + // 255, + // 8, + // 39, + // 92), + // ), + // ), + // IconButton( + // onPressed: + // () async { + // await provider + // .initConfigData() + // .then({ + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (BuildContext context) => EditInteractionScreen( + // saveInteraction: provider.savedList[index], + // ))) + // }); + // }, + // icon: const Icon( + // Icons.edit, + // size: 24, + // color: Color + // .fromARGB( + // 255, + // 8, + // 39, + // 92), + // ), + // ), + // IconButton( + // onPressed: () { + // showDeleteRecordAlertDialog( + // context, + // provider + // .savedList[ + // index] + // .id, + // provider.savedList[ + // index]); + // }, + // icon: const Icon( + // Icons.delete, + // size: 24, + // color: Color + // .fromARGB( + // 255, + // 8, + // 39, + // 92), + // ), + // ), + // ]), + // ), + // onTap: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (BuildContext + // context) => + // ViewInteractionScreen( + // saveInteraction: + // provider.savedList[index], + // ))); + // }, + // ), + // const Divider(), + // ], + // ); + // }); + // } else { + // return Container( + // color: Colors.white, + // width: MediaQuery.of(context) + // .size + // .width, + // child: Column( + // children: [ + // Text("No records"), + // ], + // ), + // ); + // } + // }), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // final provider = Provider.of< + // InteractionProvider>( + // context, + // listen: false); + // if (getCount( + // provider + // .intConfigDataList[ + // 0] + // .name, + // provider) != + // 0) { + // provider.savedList + // .where((element) => + // element.form == + // provider + // .intConfigDataList[ + // 0] + // .name) + // .toList(); + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (BuildContext + // context) => + // SavedFormListScreen( + // formname: provider + // .intConfigDataList[ + // 0] + // .name, + // ))); + // } + // }, + // child: Text('Show More'), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular(12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: const Color.fromARGB(255, 0, 71, 137), + // child: ExpansionTile( + // initiallyExpanded: false, + // maintainState: true, + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // backgroundColor: + // const Color.fromARGB(255, 0, 71, 137), + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Speaker Evalution", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(4)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text( + // 'Program Topic', + // style: TextStyle( + // fontWeight: + // FontWeight.w600), + // ), + // )), + // DataColumn( + // label: Expanded( + // child: Text( + // 'Speaker Name', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + // ], + // rows: List.generate( + // speaker.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // // =======> Use onSelectChanged for tab + // print( + // "message ${speaker[index]}"); + + // // bsheet( + // // publication_data[ + // // index]); + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // speaker[index]); + // }, + // ); + // }, + // color: MaterialStateProperty + // .resolveWith( + // (Set + // states) { + // if (index.isEven) { + // return Colors.grey + // .withOpacity(0.1); + // } + // return null; + // }), + // cells: [ + // DataCell(Text( + // speaker[index] + // ['programtopic'] + // .toString(), + // softWrap: true)), + // DataCell(Text( + // speaker[index] + // ['speakername'] + // .toString(), + // softWrap: true)), + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // // Navigator.push( + // // context, + // // MaterialPageRoute( + // // builder: (_) => + // // AffiliationsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular(12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), // adds spacing between the text and image + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: const Color.fromARGB(255, 0, 71, 137), + // child: ExpansionTile( + // initiallyExpanded: false, + // maintainState: true, + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // backgroundColor: + // const Color.fromARGB(255, 0, 71, 137), + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Engagement", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(3)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text( + // 'Main Therapeutic Area', + // style: TextStyle( + // fontWeight: + // FontWeight.w600), + // ), + // )), + // DataColumn( + // label: Expanded( + // child: Text('Date', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + // ], + // rows: List.generate( + // eng.take(2).length, + // (index) => DataRow( + // onSelectChanged: (value) { + // // =======> Use onSelectChanged for tab + // print( + // "message ${eng[index]}"); + + // // bsheet( + // // publication_data[ + // // index]); + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // eng[index]); + // }, + // ); + // }, + // color: MaterialStateProperty + // .resolveWith( + // (Set + // states) { + // if (index.isEven) { + // return Colors.grey + // .withOpacity(0.1); + // } + // return null; + // }), + // cells: [ + // DataCell(Text( + // eng[index][ + // 'main thereutic area'] + // .toString(), + // softWrap: true)), + // DataCell(Text( + // eng[index]['date'] + // .toString(), + // softWrap: true)), + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // EngagementList())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular(12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: const Color.fromARGB(255, 0, 71, 137), + // child: ExpansionTile( + // initiallyExpanded: false, + // maintainState: true, + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // backgroundColor: + // const Color.fromARGB(255, 0, 71, 137), + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "NIH Grants", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(3)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text('NIH Center', + // style: TextStyle( + // fontWeight: + // FontWeight.w600), + // softWrap: true), + // )), + // DataColumn( + // label: Expanded( + // child: Text( + // 'Organization Name', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + // ], + // rows: List.generate( + // publication_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // print( + // "message ${publication_data[index]}"); + + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // publication_data[ + // index]); + // }, + // ); + // }, + // cells: [ + // DataCell(Text( + // publication_data[index][ + // 'artical_title'] + // .toString(), + // softWrap: true)), + // DataCell(Text( + // publication_data[index] + // ['author'] + // .toString(), + // softWrap: true)), + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // PublicationsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular(12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), // adds spacing between the text and image + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: const Color.fromARGB(255, 0, 71, 137), + // child: ExpansionTile( + // initiallyExpanded: false, + // maintainState: true, + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // backgroundColor: + // const Color.fromARGB(255, 0, 71, 137), + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Procedures", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(3)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text('Program Year', + // style: TextStyle( + // fontWeight: + // FontWeight.w600), + // softWrap: true), + // )), + // DataColumn( + // label: Expanded( + // child: Text('Procedure', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + // ], + // rows: List.generate( + // publication_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // print( + // "message ${publication_data[index]}"); + + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // publication_data[ + // index]); + // }, + // ); + // }, + // cells: [ + // DataCell(Text( + // publication_data[index][ + // 'artical_title'] + // .toString(), + // softWrap: true)), + // DataCell(Text( + // publication_data[index] + // ['author'] + // .toString(), + // softWrap: true)), + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // PublicationsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular(12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), // adds spacing between the text and image + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: const Color.fromARGB(255, 0, 71, 137), + // child: ExpansionTile( + // initiallyExpanded: false, + // maintainState: true, + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // backgroundColor: + // const Color.fromARGB(255, 0, 71, 137), + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Patents", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(3)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text('Patent Title', + // style: TextStyle( + // fontWeight: + // FontWeight.w600), + // softWrap: true), + // )), + // DataColumn( + // label: Expanded( + // child: Text('Status', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + // ], + // rows: List.generate( + // publication_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // print( + // "message ${publication_data[index]}"); + + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // publication_data[ + // index]); + // }, + // ); + // }, + // cells: [ + // DataCell(Text( + // publication_data[index][ + // 'artical_title'] + // .toString(), + // softWrap: true)), + // DataCell(Text( + // publication_data[index] + // ['author'] + // .toString(), + // softWrap: true)), + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // PublicationsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular(12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Container( + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: const Color.fromARGB(255, 0, 71, 137), + // child: ExpansionTile( + // initiallyExpanded: false, + // maintainState: true, + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // backgroundColor: + // const Color.fromARGB(255, 0, 71, 137), + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Patient Referrals", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 16.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(3)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: + // MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text('Referred By', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600), + // softWrap: true), + // )), + // DataColumn( + // label: Expanded( + // child: Text( + // 'Type of Referrals', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + // ], + // rows: List.generate( + // publication_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // print( + // "message ${publication_data[index]}"); + + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: + // false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: + // Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // publication_data[ + // index]); + // }, + // ); + // }, + // cells: [ + // DataCell(Text( + // publication_data[ + // index][ + // 'artical_title'] + // .toString(), + // softWrap: true)), + // DataCell(Text( + // publication_data[ + // index] + // ['author'] + // .toString(), + // softWrap: true)), + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: + // const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // PublicationsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular( + // 12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), + // ), // adds spacing between the text and image + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: const Color.fromARGB(255, 0, 71, 137), + // child: ExpansionTile( + // initiallyExpanded: false, + // maintainState: true, + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // backgroundColor: + // const Color.fromARGB(255, 0, 71, 137), + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Training", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 16.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(3)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 16.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text('Institute Name', + // style: TextStyle( + // fontWeight: + // FontWeight.w600), + // softWrap: true), + // )), + // DataColumn( + // label: Expanded( + // child: Text('Degree', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + // ], + // rows: List.generate( + // publication_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // print( + // "message ${publication_data[index]}"); + + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // publication_data[ + // index]); + // }, + // ); + // }, + // cells: [ + // DataCell(Text( + // publication_data[index][ + // 'artical_title'] + // .toString(), + // softWrap: true)), + // DataCell(Text( + // publication_data[index] + // ['author'] + // .toString(), + // softWrap: true)), + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // PublicationsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular(12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), // adds spacing between the text and image + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Container( + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: Constants.k2color, + // child: ExpansionTile( + // backgroundColor: Constants.k2color, + // initiallyExpanded: false, + // maintainState: true, + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Case", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 16.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(3)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 16.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: + // MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text('Name', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600), + // softWrap: true), + // )), + // DataColumn( + // label: Expanded( + // child: Text('Type', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + // ], + // rows: List.generate( + // publication_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // print( + // "message ${publication_data[index]}"); + + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: + // false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: + // Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // publication_data[ + // index]); + // }, + // ); + // }, + // cells: [ + // DataCell(Text( + // publication_data[ + // index][ + // 'artical_title'] + // .toString(), + // softWrap: true)), + // DataCell(Text( + // publication_data[ + // index] + // ['author'] + // .toString(), + // softWrap: true)), + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: + // const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // PublicationsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular( + // 12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), + // ), // adds spacing between the text and image + + // const Padding( + // padding: EdgeInsets.only( + // top: 10.0, + // left: 8.0, + // right: 8.0, + // ), + // child: Text( + // "Activity Details", + // style: TextStyle( + // fontSize: 16.0, fontWeight: FontWeight.bold), + // ), + // ), + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: const Color.fromARGB(255, 0, 71, 137), + // child: ExpansionTile( + // initiallyExpanded: false, + // maintainState: true, + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // backgroundColor: + // const Color.fromARGB(255, 0, 71, 137), + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Affiliations", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(4)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // // width: + // // MediaQuery.of(context) + // // .size + // // .width, + // constraints: BoxConstraints( + // minWidth: MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text( + // 'Organization Name', + // style: TextStyle( + // fontWeight: + // FontWeight.w600), + // ), + // )), + // DataColumn( + // label: Expanded( + // child: Text( + // 'Time Frame', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + // ], + // rows: List.generate( + // affiliation_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // // =======> Use onSelectChanged for tab + // print( + // "message ${affiliation_data[index]}"); + + // bottomshet(affiliation_data[ + // index]); + // }, + // color: MaterialStateProperty + // .resolveWith( + // (Set + // states) { + // if (index.isEven) { + // return Colors.grey + // .withOpacity(0.1); + // } + // return null; + // }), + // cells: [ + // DataCell(Text( + // affiliation_data[index] + // ['org_name'] + // .toString(), + // softWrap: true)), + + // DataCell(Text( + // affiliation_data[index] + // ['time_frame'] + // .toString(), + // softWrap: true)), + + // // Add more DataCells as needed + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // AffiliationsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular(12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), // adds spacing between the text and image + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: const Color.fromARGB(255, 0, 71, 137), + // child: ExpansionTile( + // initiallyExpanded: false, + // maintainState: true, + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // backgroundColor: + // const Color.fromARGB(255, 0, 71, 137), + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Publications", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(3)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // ], + // ), + // children: [ + // Scrollbar( + // //isAlwaysShown: true, + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text('Artical Title', + // style: TextStyle( + // fontWeight: + // FontWeight.w600), + // softWrap: true), + // )), + + // DataColumn( + // label: Expanded( + // child: Text('Authors', + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + + // // Add more columns as needed + // ], + // rows: List.generate( + // publication_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // // =======> Use onSelectChanged for tab + // print( + // "message ${publication_data[index]}"); + + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // publication_data[ + // index]); + // }, + // ); + // }, + // cells: [ + // DataCell(Text( + // publication_data[index][ + // 'artical_title'] + // .toString(), + // softWrap: true)), + + // DataCell(Text( + // publication_data[index] + // ['author'] + // .toString(), + // softWrap: true)), + + // // Add more DataCells as needed + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // PublicationsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular(12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), // adds spacing between the text and image + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: const Color.fromARGB(255, 0, 71, 137), + // child: ExpansionTile( + // initiallyExpanded: false, + // maintainState: true, + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // backgroundColor: + // const Color.fromARGB(255, 0, 71, 137), + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Events", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(4)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: MediaQuery.of(context) + // .size + // .width, + // ), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text('Event Name', + // softWrap: true, + // style: TextStyle( + // fontWeight: + // FontWeight.w600)), + // )), + + // DataColumn( + // label: Expanded( + // child: Text('Role', + // softWrap: true, + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + + // // Add more columns as needed + // ], + // rows: List.generate( + // event_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // // =======> Use onSelectChanged for tab + // print( + // "message ${event_data[index]}"); + + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // event_data[index]); + // }, + // ); + // }, + // cells: [ + // DataCell(Text( + // event_data[index] + // ['event_name'] + // .toString(), + // softWrap: true)), + + // DataCell(Text( + // event_data[index] + // ['role'] + // .toString(), + // softWrap: true)), + + // // Add more DataCells as needed + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // EventsData())); + // }, + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular(12), + // ), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), // adds spacing between the text and image + + // ListTileTheme( + // dense: true, + // child: Flexible( + // flex: 1, + // child: Padding( + // padding: + // const EdgeInsets.only(left: 8.0, right: 8.0), + // child: Card( + // margin: EdgeInsets.all(1.0), + // elevation: 5, + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(0.0), + // ), + // color: const Color.fromARGB(255, 0, 71, 137), + // child: ExpansionTile( + // initiallyExpanded: false, + // maintainState: true, + // onExpansionChanged: (bool expanded) { + // setState(() { + // _isExpanded = expanded; + // }); + // }, + // backgroundColor: + // const Color.fromARGB(255, 0, 71, 137), + // trailing: Icon( + // _isExpanded + // ? Icons.keyboard_arrow_up + // : Icons.keyboard_arrow_down, + // color: Colors.white), + // // backgroundColor: Colors.white, + // // collapsedBackgroundColor: Color(0xFF2b9af3), + // title: Row( + // mainAxisAlignment: + // MainAxisAlignment.start, + // // mainAxisSize: MainAxisSize.min, + // children: [ + // Text1( + // title: "Trials", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // const SizedBox( + // width: 8.0, + // ), + // Text1( + // title: "(4)", + // txtcolor: Colors.white, + // fontweight: FontWeight.normal, + // txtfont: 17.0), + // ], + // ), + // children: [ + // Scrollbar( + // child: SingleChildScrollView( + // scrollDirection: Axis.horizontal, + // child: Container( + // constraints: BoxConstraints( + // minWidth: MediaQuery.of(context) + // .size + // .width), + // color: Colors.white, + // child: DataTable( + // showCheckboxColumn: false, + // columns: const [ + // DataColumn( + // label: Expanded( + // child: Text('Trial Name', + // softWrap: true, + // style: TextStyle( + // fontWeight: + // FontWeight.w600)), + // )), + // DataColumn( + // label: Expanded( + // child: Text('Status', + // softWrap: true, + // style: TextStyle( + // fontWeight: + // FontWeight + // .w600)))), + // ], + // rows: List.generate( + // trial_data.length, + // (index) => DataRow( + // onSelectChanged: (value) { + // // =======> Use onSelectChanged for tab + // print( + // "message ${trial_data[index]}"); + + // // bsheet( + // // publication_data[ + // // index]); + // showModalBottomSheet( + // useRootNavigator: true, + // isScrollControlled: false, + // enableDrag: true, + // useSafeArea: true, + // constraints: + // const BoxConstraints( + // maxWidth: + // double.infinity, + // ), + // shape: + // RoundedRectangleBorder( + // borderRadius: + // BorderRadius + // .vertical( + // top: Radius.circular( + // 0), + // ), + // ), + // clipBehavior: Clip + // .antiAliasWithSaveLayer, + // context: context, + // builder: (context) { + // return bsheet( + // trial_data[index]); + // }, + // ); + // }, + // cells: [ + // DataCell(Text( + // trial_data[index] + // ['trial_name'] + // .toString(), + // softWrap: true)), + // DataCell(Text( + // trial_data[index] + // ['status'] + // .toString(), + // softWrap: true)), + // ], + // ), + // ), + // ), + // ), + // ), + // ), + // Container( + // color: Colors.white, + // child: Align( + // alignment: Alignment.center, + // child: Padding( + // padding: const EdgeInsets.all(8.0), + // child: OutlinedButton( + // onPressed: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (_) => + // EventsData())); + // }, + // style: OutlinedButton.styleFrom( + // shape: RoundedRectangleBorder( + // borderRadius: + // BorderRadius.circular(12), + // ), + // ), + // child: Text( + // 'Show More', + // style: TextStyle( + // color: Constants.k2color), + // ), + // ), + // ), + // ), + // ) + // ]), + // ), + // ), + // ), + // ), // adds spacing between the text and image + // ], + // ), + // ), + ], + ), + ], ), ), ), + floatingActionButton: Visibility( + visible: true, + child: FloatingActionButton( + onPressed: () async { + // final ConfigDataProvider configDataProvider = + // ConfigDataProvider(); + + // await configDataProvider.initConfigUIData(); + Navigator.push( + context, MaterialPageRoute(builder: (context) => FormList())); + }, + foregroundColor: Colors.white, + backgroundColor: const Color.fromARGB(255, 0, 71, 132), + child: new Icon(Icons.add), + ), + ), ); } @@ -1993,7 +9275,7 @@ class _NewProfileState extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.vertical( - top: Radius.circular(20), + top: Radius.circular(0), ), ), clipBehavior: Clip.antiAliasWithSaveLayer, @@ -2004,12 +9286,6 @@ class _NewProfileState extends State { // child: DraggableScrollableSheet( expand: false, - // initialChildSize: - // 0.7, - // maxChildSize: - // 1, - // minChildSize: - // 0.5, builder: (BuildContext context, ScrollController scrollController) { return Container( width: MediaQuery.of(context).size.width, @@ -2031,162 +9307,7 @@ class _NewProfileState extends State { controller: scrollController, itemCount: 1, itemBuilder: (BuildContext context, int index) { - return - // Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // mainAxisSize: MainAxisSize.min, - // mainAxisAlignment: MainAxisAlignment.center, - // children: [ - // // Row( - // // children: [ - // // Text( - // // "Affiliation", - // // style: TextStyle(fontSize: 20.0), - // // ) - // // ], - // // ), - // Row( - // crossAxisAlignment: CrossAxisAlignment.start, - // // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // // Padding( - // // padding: const EdgeInsets.only( - // // left: 8.0, top: 28.0), - // // child: Text( - // // "Organization Name", - // // style: TextStyle(fontSize: 14.0), - // // ), - // // ), - // Padding( - // padding: const EdgeInsets.all(28.0), - // child: Text( - // affiliation_data['org_name'], - // style: TextStyle(fontSize: 18.0), - // ), - // ) - // ], - // ), - // Container( - // color: Colors.grey.withOpacity(0.1), - // child: Row( - // // crossAxisAlignment: CrossAxisAlignment.start, - // mainAxisAlignment: - // MainAxisAlignment.spaceBetween, - // children: [ - // Padding( - // padding: const EdgeInsets.only( - // left: 28.0, top: 18.0), - // child: Text( - // "Department", - // style: TextStyle(fontSize: 14.0), - // ), - // ), - // Padding( - // padding: const EdgeInsets.only(right: 8.0), - // child: Text( - // affiliation_data['dept'], - // style: TextStyle(fontSize: 14.0), - // ), - // ) - // ], - // ), - // ), - // Row( - // // crossAxisAlignment: CrossAxisAlignment.start, - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // Padding( - // padding: const EdgeInsets.only( - // left: 8.0, top: 18.0), - // child: Text( - // "Role", - // style: TextStyle(fontSize: 14.0), - // ), - // ), - // Padding( - // padding: const EdgeInsets.only(right: 8.0), - // child: Text( - // affiliation_data['role'], - // style: TextStyle(fontSize: 14.0), - // ), - // ) - // ], - // ), - // Container( - // color: Colors.grey.withOpacity(0.1), - // child: Row( - // // crossAxisAlignment: CrossAxisAlignment.start, - // mainAxisAlignment: - // MainAxisAlignment.spaceBetween, - // children: [ - // Padding( - // padding: const EdgeInsets.only( - // left: 8.0, top: 18.0), - // child: Text( - // "Time Frame", - // style: TextStyle(fontSize: 14.0), - // ), - // ), - // Padding( - // padding: const EdgeInsets.only(right: 8.0), - // child: Text( - // affiliation_data['time_frame'], - // style: TextStyle(fontSize: 14.0), - // ), - // ) - // ], - // ), - // ), - // Row( - // // crossAxisAlignment: CrossAxisAlignment.start, - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // Padding( - // padding: const EdgeInsets.only( - // left: 8.0, top: 18.0, bottom: 18.0), - // child: Text( - // "Oraganization Type", - // style: TextStyle(fontSize: 14.0), - // ), - // ), - // Padding( - // padding: const EdgeInsets.only(right: 8.0), - // child: Text( - // affiliation_data['org_type'], - // style: TextStyle(fontSize: 14.0), - // ), - // ) - // ], - // ), - // Container( - // color: Colors.grey.withOpacity(0.1), - // child: Row( - // // crossAxisAlignment: CrossAxisAlignment.start, - // mainAxisAlignment: - // MainAxisAlignment.spaceBetween, - // children: [ - // Padding( - // padding: const EdgeInsets.only( - // left: 8.0, top: 18.0, bottom: 18.0), - // child: Text( - // "Eng Type", - // style: TextStyle(fontSize: 14.0), - // ), - // ), - // Padding( - // padding: const EdgeInsets.only(right: 8.0), - // child: Text( - // affiliation_data['emg_type'], - // style: TextStyle(fontSize: 14.0), - // ), - // ) - // ], - // ), - // ), - // ], - // ); - - Column( + return Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, @@ -2207,11 +9328,55 @@ class _NewProfileState extends State { children: [ Padding( padding: const EdgeInsets.only(left: 18.0), - child: Text( - affiliation_data['org_name'], - style: TextStyle( - fontSize: 18.0, - color: Colors.grey[700]), + child: GestureDetector( + onTap: () async { + final ConfigDataProvider + configDataProvider = + ConfigDataProvider(); + await configDataProvider + .initConfigUIDataEng(); + + final provider = + Provider.of( + context, + listen: false); + + if (getCount( + provider.intConfigDataList[index] + .name, + provider) != + 0) { + provider.savedList + .where((element) => + element.form == + provider + .intConfigDataList[index] + .name) + .toList(); + Navigator.push( + context, + MaterialPageRoute( + builder: + (BuildContext context) => + SavedFormListScreen( + formname: provider + .intConfigDataList[ + index] + .name, + ))); + } + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => + // const InteractionListScreen())); + }, + child: Text( + affiliation_data['org_name'], + style: TextStyle( + fontSize: 18.0, + color: Colors.grey[700]), + ), ), ) ], @@ -2335,153 +9500,11 @@ class _NewProfileState extends State { ), ], ); - // Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // mainAxisSize: MainAxisSize.min, - // mainAxisAlignment: MainAxisAlignment.center, - // children: [ - // // Row( - // // children: [ - // // Text( - // // "Affiliation", - // // style: TextStyle(fontSize: 20.0), - // // ) - // // ], - // // ), - // Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Padding( - // padding: const EdgeInsets.only( - // left: 8.0, top: 28.0), - // child: Text( - // "Organization Name", - // style: TextStyle(fontSize: 13.0), - // ), - // ), - // Padding( - // padding: const EdgeInsets.only(left: 8.0), - // child: Text( - // affiliation_data['org_name'], - // style: TextStyle(fontSize: 16.0), - // ), - // ) - // ], - // ), - // Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Padding( - // padding: const EdgeInsets.only( - // left: 8.0, top: 18.0), - // child: Text( - // "Department", - // style: TextStyle(fontSize: 12.0), - // ), - // ), - // Padding( - // padding: const EdgeInsets.only(left: 8.0), - // child: Text( - // affiliation_data['dept'], - // style: TextStyle(fontSize: 14.0), - // ), - // ) - // ], - // ), - // Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Padding( - // padding: const EdgeInsets.only( - // left: 8.0, top: 18.0), - // child: Text( - // "Role", - // style: TextStyle(fontSize: 12.0), - // ), - // ), - // Padding( - // padding: const EdgeInsets.only(left: 8.0), - // child: Text( - // affiliation_data['role'], - // style: TextStyle(fontSize: 14.0), - // ), - // ) - // ], - // ), - // Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Padding( - // padding: const EdgeInsets.only( - // left: 8.0, top: 18.0), - // child: Text( - // "Time Frame", - // style: TextStyle(fontSize: 12.0), - // ), - // ), - // Padding( - // padding: const EdgeInsets.only(left: 8.0), - // child: Text( - // affiliation_data['time_frame'], - // style: TextStyle(fontSize: 14.0), - // ), - // ) - // ], - // ), - // Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Padding( - // padding: const EdgeInsets.only( - // left: 8.0, top: 18.0), - // child: Text( - // "Oraganization Type", - // style: TextStyle(fontSize: 12.0), - // ), - // ), - // Padding( - // padding: const EdgeInsets.only(left: 8.0), - // child: Text( - // affiliation_data['org_type'], - // style: TextStyle(fontSize: 14.0), - // ), - // ) - // ], - // ), - // Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Padding( - // padding: const EdgeInsets.only( - // left: 8.0, top: 18.0), - // child: Text( - // "Eng Type", - // style: TextStyle(fontSize: 12.0), - // ), - // ), - // Padding( - // padding: const EdgeInsets.only(left: 8.0), - // child: Text( - // affiliation_data['emg_type'], - // style: TextStyle(fontSize: 14.0), - // ), - // ) - // ], - // ), - // ], - // ); }, ), ), ], ), - // child: ListView.builder( - // controller: scrollController, - // itemCount: 1, - // itemBuilder: (BuildContext context, int index) { - // return ListTile(title: Text(affiliation_data['org_name'])); - // }, - // ), ); }, ); @@ -2489,35 +9512,60 @@ class _NewProfileState extends State { }, ); } + + Widget _buildPaginationDots() { + return Container( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: List.generate(10, (index) { + return Container( + margin: EdgeInsets.symmetric(horizontal: 4.0), + width: 8.0, + height: 8.0, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: 1 == index ? Colors.blue : Colors.grey, + ), + ); + }), + ), + ); + } + + @override + void dispose() { + //_pageController.dispose(); + super.dispose(); + } } // import 'package:discover_module/constants.dart'; // import 'package:discover_module/custom_widget/text.dart'; -// import 'package:discover_module/hive_fun.dart'; // import 'package:discover_module/provider_class/affiliationsprovider.dart'; +// import 'package:discover_module/provider_class/engagement_provider.dart'; // import 'package:discover_module/provider_class/events_provider.dart'; // import 'package:discover_module/provider_class/medicalinsightprovider.dart'; // import 'package:discover_module/provider_class/publications_provider.dart'; +// import 'package:discover_module/provider_class/speaker_provider.dart'; // import 'package:discover_module/provider_class/trials_provider.dart'; // import 'package:discover_module/ui_screen/affiliation_data.dart'; +// import 'package:discover_module/ui_screen/bottom_sheet.dart'; +// import 'package:discover_module/ui_screen/engagementlist.dart'; // import 'package:discover_module/ui_screen/events_data.dart'; // import 'package:discover_module/ui_screen/interactionform/NewtworkConnectivity.dart'; // import 'package:discover_module/ui_screen/interactionform/configprovider.dart'; // import 'package:discover_module/ui_screen/interactionform/edit_interaction_screen.dart'; -// import 'package:discover_module/ui_screen/interactionform/interaction_screen.dart'; -// import 'package:discover_module/ui_screen/interactionform/interactionlistscreen.dart'; // import 'package:discover_module/ui_screen/interactionform/interactionprovider.dart'; -// import 'package:discover_module/ui_screen/interactionform/model/medical_insight.dart'; // import 'package:discover_module/ui_screen/interactionform/model/save_interaction.dart'; // import 'package:discover_module/ui_screen/interactionform/view_forms_list.dart'; // import 'package:discover_module/ui_screen/interactionform/view_interaction_screen.dart'; // import 'package:discover_module/ui_screen/interactionform/viewinteractionprovider.dart'; // import 'package:discover_module/ui_screen/medical_insight.dart'; -// import 'package:discover_module/ui_screen/new_editinteraction.dart'; // import 'package:discover_module/ui_screen/newformlist.dart'; // import 'package:discover_module/ui_screen/publication_data.dart'; -// import 'package:expandable/expandable.dart'; // import 'package:flutter/cupertino.dart'; +// import 'package:flutter/foundation.dart'; // import 'package:flutter/material.dart'; // import 'package:flutter/rendering.dart'; // import 'package:flutter/widgets.dart'; @@ -2539,15 +9587,18 @@ class _NewProfileState extends State { // List event_data = []; // List trial_data = []; // List medinsightData = []; +// List speaker = []; +// List eng = []; // List viewformData = []; // bool _isExpanded = false; // var item; -// // final ScrollController controller = ScrollController(); -// // final ScrollController controller2 = ScrollController(); +// List widgetList = ['Geeks', 'for', 'Geeks']; + +// TextEditingController firstNameController = TextEditingController(); // @override // void initState() { @@ -2604,6 +9655,17 @@ class _NewProfileState extends State { // await med.medicalinsightdata(); // final medlist = med.trialsinfo; +// var speaker11 = +// Provider.of(context, listen: false); + +// await speaker11.getspeakerdata(); + +// final speakerlist = speaker11.speaker; + +// var engtype = Provider.of(context, listen: false); +// await engtype.getengagementdata(); +// final engtypelist = engtype.engagementdata; + // setState(() { // affiliation_data = affilist; // publication_data = publist; @@ -2611,6 +9673,8 @@ class _NewProfileState extends State { // viewformData = form.savedList; // trial_data = trialslist; // medinsightData = medlist; +// speaker = speakerlist; +// eng = engtypelist; // }); // print("Affiliations_data_is: $affilist"); @@ -2631,6 +9695,11 @@ class _NewProfileState extends State { // @override // Widget build(BuildContext context) { +// var size = MediaQuery.of(context).size; + +// /*24 is for notification bar on Android*/ +// final double itemHeight = (size.height - kToolbarHeight - 24) / 2; +// final double itemWidth = size.width / 2; // return SafeArea( // child: Scaffold( // backgroundColor: Color.fromARGB(255, 246, 248, 252), @@ -2825,7 +9894,7 @@ class _NewProfileState extends State { // ]), // ), // const SizedBox( -// height: 8.0, +// height: 15.0, // ), // Align( // alignment: Alignment.centerLeft, @@ -2838,11 +9907,13 @@ class _NewProfileState extends State { // txtfont: 18.0), // ), // ), - +// const SizedBox( +// height: 5.0, +// ), // Align( // alignment: Alignment.centerLeft, // child: Padding( -// padding: const EdgeInsets.all(15.0), +// padding: const EdgeInsets.only(left: 15.0), // child: Text1( // title: widget.text!["summarry"], // txtcolor: Colors.black, @@ -2850,8 +9921,138 @@ class _NewProfileState extends State { // txtfont: 15.0), // ), // ), -// // isonline -// // ? + +// // SizedBox( +// // child: ListView.builder( +// // itemCount: 3, +// // itemBuilder: (context, int index) { +// // return Card( +// // child: Padding( +// // padding: const EdgeInsets.all(10.0), +// // child: Column( +// // mainAxisSize: MainAxisSize.min, +// // crossAxisAlignment: CrossAxisAlignment.start, +// // children: [ +// // Text("Top Event Topics"), +// // Text("Angina Pectoris 378"), +// // Text("Coronary Artery Disease 378"), +// // Text("Hypertension 378") +// // ], +// // ), +// // )); +// // }), +// // ), + +// Padding( +// padding: const EdgeInsets.all(5.0), +// child: Container( +// width: double.infinity, +// child: Card( +// child: Padding( +// padding: const EdgeInsets.all(10.0), +// child: Column( +// mainAxisSize: MainAxisSize.min, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text("Top Event Topics"), +// Text("Angina Pectoris 378"), +// Text("Coronary Artery Disease 378"), +// Text("Hypertension 378") +// ], +// ), +// )), +// ), +// ), +// Padding( +// padding: const EdgeInsets.all(5.0), +// child: Container( +// width: double.infinity, +// child: Card( +// child: Padding( +// padding: const EdgeInsets.all(10.0), +// child: Column( +// mainAxisSize: MainAxisSize.min, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text("Top Event Topics"), +// Text("Angina Pectoris 378"), +// Text("Coronary Artery Disease 378"), +// Text("Hypertension 378") +// ], +// ), +// )), +// ), +// ), +// Padding( +// padding: const EdgeInsets.all(5.0), +// child: Container( +// width: double.infinity, +// child: const Card( +// child: Padding( +// padding: EdgeInsets.all(10.0), +// child: Column( +// mainAxisSize: MainAxisSize.min, +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text("Top Event Topics"), +// Text("Angina Pectoris 378"), +// Text("Coronary Artery Disease 378"), +// Text("Hypertension 378") +// ], +// ), +// )), +// ), +// ), +// // // isonline +// // // ? +// Padding( +// padding: const EdgeInsets.all(8.0), +// child: TextFormField( +// style: const TextStyle( +// color: Colors.black, +// ), +// decoration: InputDecoration( +// labelText: "Note", +// floatingLabelStyle: const TextStyle( +// color: Color(0xFF1cbb7c), +// fontWeight: FontWeight.w600, +// ), +// labelStyle: TextStyle( +// color: Colors.grey.shade500, +// fontWeight: FontWeight.w600, +// ), +// enabledBorder: OutlineInputBorder( +// borderRadius: BorderRadius.circular(10), +// borderSide: const BorderSide( +// width: 1, +// color: Colors.grey, +// ), +// ), +// focusedBorder: OutlineInputBorder( +// borderRadius: BorderRadius.circular(10), +// borderSide: const BorderSide( +// width: 2, +// color: Colors.grey, +// ), +// ), +// border: OutlineInputBorder( +// borderRadius: BorderRadius.circular(10), +// borderSide: BorderSide.none, +// ), +// contentPadding: +// const EdgeInsets.fromLTRB(20, 15, 20, 15), +// fillColor: Colors.transparent, +// filled: true, +// ), +// controller: firstNameController, +// keyboardType: TextInputType.name, +// onSaved: (value) { +// firstNameController.text = value!; +// }, +// textInputAction: TextInputAction.done, +// ), +// ), + // Container( // width: MediaQuery.of(context).size.width, // child: Padding( @@ -2859,28 +10060,6 @@ class _NewProfileState extends State { // child: Column( // crossAxisAlignment: CrossAxisAlignment.start, // children: [ -// // const Text( -// // "Profile Summarry", -// // style: TextStyle( -// // fontSize: 20.0, fontWeight: FontWeight.bold), -// // ), -// // Padding( -// // padding: const EdgeInsets.all(12.0), -// // child: Text1( -// // title: "Profile Summarry", -// // txtcolor: Colors.black, -// // fontweight: FontWeight.normal, -// // txtfont: 18.0), -// // ), - -// // Padding( -// // padding: const EdgeInsets.all(12.0), -// // child: Text1( -// // title: widget.text!["summarry"], -// // txtcolor: Colors.black, -// // fontweight: FontWeight.normal, -// // txtfont: 15.0), -// // ), // Padding( // padding: EdgeInsets.all(0.0), @@ -2890,203 +10069,8 @@ class _NewProfileState extends State { // crossAxisAlignment: CrossAxisAlignment.start, // mainAxisSize: MainAxisSize.min, // children: [ -// // const SizedBox(height: 10), -// // Flexible( -// // flex: 1, -// // child: Padding( -// // padding: const EdgeInsets.only( -// // left: 1.0, right: 1.0), -// // child: Card( -// // elevation: 5, -// // shape: RoundedRectangleBorder( -// // borderRadius: -// // BorderRadius.circular(0.0), -// // ), -// // color: const Color.fromARGB( -// // 255, 0, 71, 137), -// // child: ExpansionTile( -// // maintainState: true, -// // // onExpansionChanged: -// // // (bool expanded) { -// // // setState(() { -// // // _isExpanded = expanded; -// // // }); -// // // }, -// // backgroundColor: -// // const Color.fromARGB( -// // 255, 0, 71, 137), -// // collapsedIconColor: Colors.white, -// // // trailing: Icon( -// // // _isExpanded -// // // ? Icons.keyboard_arrow_up -// // // : Icons -// // // .keyboard_arrow_down, -// // // color: Colors.white), -// // // collapsedBackgroundColor: Color(0xFF2b9af3), -// // initiallyExpanded: true, -// // title: Row( -// // //mainAxisSize: MainAxisSize.min, -// // children: [ -// // Text1( -// // title: "Affiliations", -// // txtcolor: Colors.white, -// // fontweight: -// // FontWeight.normal, -// // txtfont: 17.0), -// // const SizedBox( -// // width: 8.0, -// // ), -// // // Text1( -// // // title: widget -// // // .text![ -// // // "affiliations_count"] -// // // .toString(), -// // // txtfont: 18.0, -// // // txtcolor: -// // // const Color -// // // .fromARGB( -// // // 255, -// // // 60, -// // // 82, -// // // 102), -// // // ) -// // ], -// // ), -// // children: [ -// // SingleChildScrollView( -// // scrollDirection: -// // Axis.horizontal, -// // child: Container( -// // width: -// // MediaQuery.of(context) -// // .size -// // .width, -// // color: Colors.white, -// // child: DataTable( -// // columns: const [ -// // DataColumn( -// // label: Expanded( -// // child: Text( -// // 'sl no'))), -// // DataColumn( -// // label: Expanded( -// // child: Text( -// // 'Organization Name'), -// // )), -// // DataColumn( -// // label: Expanded( -// // child: Text( -// // 'Department'))), -// // DataColumn( -// // label: Expanded( -// // child: Text( -// // 'Role'))), -// // DataColumn( -// // label: Expanded( -// // child: Text( -// // 'Time Frame'))), -// // DataColumn( -// // label: Expanded( -// // child: Text( -// // 'Org Type'))), -// // DataColumn( -// // label: Expanded( -// // child: Text( -// // 'Eng Type'))), -// // // Add more columns as needed -// // ], -// // rows: List.generate( -// // affiliation_data.length, -// // (index) => DataRow( -// // cells: [ -// // DataCell(Text( -// // affiliation_data[ -// // index] -// // ['id'] -// // .toString())), -// // DataCell(Text( -// // affiliation_data[ -// // index] -// // [ -// // 'org_name'] -// // .toString())), -// // DataCell(Text( -// // affiliation_data[ -// // index] -// // ['dept'] -// // .toString())), -// // DataCell(Text( -// // affiliation_data[ -// // index] -// // ['role'] -// // .toString())), -// // DataCell(Text( -// // affiliation_data[ -// // index] -// // [ -// // 'time_frame'] -// // .toString())), -// // DataCell(Text( -// // affiliation_data[ -// // index] -// // [ -// // 'org_type'] -// // .toString())), -// // DataCell(Text( -// // affiliation_data[ -// // index] -// // [ -// // 'emg_type'] -// // .toString())), -// // // Add more DataCells as needed -// // ], -// // ), -// // ), -// // ), -// // ), -// // ), -// // Container( -// // color: Colors.white, -// // child: Align( -// // alignment: Alignment.center, -// // child: Padding( -// // padding: -// // const EdgeInsets.all( -// // 8.0), -// // child: OutlinedButton( -// // onPressed: () { -// // Navigator.push( -// // context, -// // MaterialPageRoute( -// // builder: (_) => -// // AffiliationsData())); -// // }, -// // child: -// // Text('Show More'), -// // style: OutlinedButton -// // .styleFrom( -// // shape: -// // RoundedRectangleBorder( -// // borderRadius: -// // BorderRadius -// // .circular( -// // 12), -// // ), -// // ), -// // ), -// // ), -// // ), -// // ) -// // ]), -// // ), -// // ), -// // ), - // Flexible( // flex: 1, -// // height: -// // 200, // Set a fixed height or use constraints as needed - // child: Padding( // padding: const EdgeInsets.only( // left: 1.0, right: 1.0), @@ -3099,6 +10083,7 @@ class _NewProfileState extends State { // color: const Color.fromARGB( // 255, 0, 71, 137), // child: ExpansionTile( +// initiallyExpanded: false, // maintainState: true, // onExpansionChanged: // (bool expanded) { @@ -3117,7 +10102,6 @@ class _NewProfileState extends State { // color: Colors.white), // // backgroundColor: Colors.white, // // collapsedBackgroundColor: Color(0xFF2b9af3), -// initiallyExpanded: true, // title: Row( // mainAxisAlignment: // MainAxisAlignment.start, @@ -3133,7 +10117,7 @@ class _NewProfileState extends State { // width: 8.0, // ), // Text1( -// title: "4", +// title: "(4)", // txtcolor: Colors.white, // fontweight: // FontWeight.normal, @@ -3158,38 +10142,48 @@ class _NewProfileState extends State { // .width), // color: Colors.white, // child: DataTable( +// showCheckboxColumn: +// false, // columns: const [ -// DataColumn( -// label: Expanded( -// child: Text( -// '', -// softWrap: -// true))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // '', +// // softWrap: +// // true))), // DataColumn( // label: Expanded( // child: Text( -// 'Organization Name'), +// 'Organization Name', +// style: TextStyle( +// fontWeight: +// FontWeight +// .w600), +// ), // )), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Department'))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Role'))), // DataColumn( // label: Expanded( // child: Text( -// 'Department'))), -// DataColumn( -// label: Expanded( -// child: Text( -// 'Role'))), -// DataColumn( -// label: Expanded( -// child: Text( -// 'Time Frame'))), -// DataColumn( -// label: Expanded( -// child: Text( -// 'Org Type'))), -// DataColumn( -// label: Expanded( -// child: Text( -// 'Eng Type'))), +// 'Time Frame', +// style: TextStyle( +// fontWeight: +// FontWeight.w600)))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Org Type'))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Eng Type'))), // // Add more columns as needed // ], @@ -3197,14 +10191,38 @@ class _NewProfileState extends State { // affiliation_data // .length, // (index) => DataRow( -// cells: [ -// DataCell(Text( +// onSelectChanged: +// (value) { +// // =======> Use onSelectChanged for tab +// print( +// "message ${affiliation_data[index]}"); + +// bottomshet( // affiliation_data[ -// index] -// ['id'] -// .toString(), -// softWrap: -// true)), +// index]); +// }, +// color: MaterialStateProperty +// .resolveWith< +// Color?>((Set< +// MaterialState> +// states) { +// if (index +// .isEven) { +// return Colors +// .grey +// .withOpacity( +// 0.1); +// } +// return null; +// }), +// cells: [ +// // DataCell(Text( +// // affiliation_data[ +// // index] +// // ['id'] +// // .toString(), +// // softWrap: +// // true)), // DataCell(Text( // affiliation_data[ // index] @@ -3213,22 +10231,22 @@ class _NewProfileState extends State { // .toString(), // softWrap: // true)), -// DataCell(Text( -// affiliation_data[ -// index] -// [ -// 'dept'] -// .toString(), -// softWrap: -// true)), -// DataCell(Text( -// affiliation_data[ -// index] -// [ -// 'role'] -// .toString(), -// softWrap: -// true)), +// // DataCell(Text( +// // affiliation_data[ +// // index] +// // [ +// // 'dept'] +// // .toString(), +// // softWrap: +// // true)), +// // DataCell(Text( +// // affiliation_data[ +// // index] +// // [ +// // 'role'] +// // .toString(), +// // softWrap: +// // true)), // DataCell(Text( // affiliation_data[ // index] @@ -3237,22 +10255,22 @@ class _NewProfileState extends State { // .toString(), // softWrap: // true)), -// DataCell(Text( -// affiliation_data[ -// index] -// [ -// 'org_type'] -// .toString(), -// softWrap: -// true)), -// DataCell(Text( -// affiliation_data[ -// index] -// [ -// 'emg_type'] -// .toString(), -// softWrap: -// true)), +// // DataCell(Text( +// // affiliation_data[ +// // index] +// // [ +// // 'org_type'] +// // .toString(), +// // softWrap: +// // true)), +// // DataCell(Text( +// // affiliation_data[ +// // index] +// // [ +// // 'emg_type'] +// // .toString(), +// // softWrap: +// // true)), // // Add more DataCells as needed // ], @@ -3303,9 +10321,9 @@ class _NewProfileState extends State { // ), // ), // adds spacing between the text and image -// SizedBox( -// height: 10.0, -// ), +// // SizedBox( +// // height: 10.0, +// // ), // Flexible( // flex: 1, @@ -3325,6 +10343,7 @@ class _NewProfileState extends State { // color: const Color.fromARGB( // 255, 0, 71, 137), // child: ExpansionTile( +// initiallyExpanded: false, // maintainState: true, // // backgroundColor: Colors.white, // // collapsedBackgroundColor: Color(0xFF2b9af3), @@ -3344,7 +10363,6 @@ class _NewProfileState extends State { // : Icons // .keyboard_arrow_down, // color: Colors.white), -// initiallyExpanded: true, // title: Row( // mainAxisAlignment: // MainAxisAlignment.start, @@ -3360,7 +10378,7 @@ class _NewProfileState extends State { // width: 8.0, // ), // Text1( -// title: "3", +// title: "(3)", // txtcolor: Colors.white, // fontweight: // FontWeight.normal, @@ -3401,36 +10419,51 @@ class _NewProfileState extends State { // color: Colors.white, // child: DataTable( +// showCheckboxColumn: +// false, // columns: const [ // // DataColumn( // // label: Expanded( // // child: Text( // // 'sl no'))), -// DataColumn( -// label: Expanded( -// child: Text( -// ''))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // ''))), // DataColumn( // label: Expanded( // child: Text( // 'Artical Title', +// style: TextStyle( +// fontWeight: +// FontWeight +// .w600), // softWrap: // true), // )), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Journal Name', +// // softWrap: +// // true, +// // style: TextStyle( +// // fontWeight: +// // FontWeight.w600)))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Date', +// // style: TextStyle( +// // fontWeight: +// // FontWeight.w600)))), // DataColumn( // label: Expanded( // child: Text( -// 'Journal Name', -// softWrap: true, -// ))), -// DataColumn( -// label: Expanded( -// child: Text( -// 'Date'))), -// DataColumn( -// label: Expanded( -// child: Text( -// 'Authors'))), +// 'Authors', +// style: TextStyle( +// fontWeight: +// FontWeight.w600)))), // // Add more columns as needed // ], @@ -3438,14 +10471,69 @@ class _NewProfileState extends State { // publication_data // .length, // (index) => DataRow( +// onSelectChanged: +// (value) { +// // =======> Use onSelectChanged for tab +// print( +// "message ${publication_data[index]}"); + +// // bsheet( +// // publication_data[ +// // index]); +// showModalBottomSheet( +// useRootNavigator: +// true, +// isScrollControlled: +// false, +// enableDrag: +// true, +// useSafeArea: +// true, +// constraints: +// const BoxConstraints( +// maxWidth: double +// .infinity, +// ), +// shape: +// RoundedRectangleBorder( +// borderRadius: +// BorderRadius +// .vertical( +// top: Radius +// .circular( +// 0), +// ), +// ), +// clipBehavior: +// Clip.antiAliasWithSaveLayer, +// context: +// context, +// builder: +// (context) { +// return bsheet( +// publication_data[ +// index]); +// }, +// ); +// // showBottomSheet( +// // context: +// // context, +// // builder: +// // (BuildContext +// // context) { +// // return bsheet( +// // publication_data[ +// // index]); // returns your BottomSheet widget +// // }); +// }, // cells: [ -// DataCell(Text( -// publication_data[index] -// [ -// 'id'] -// .toString(), -// softWrap: -// true)), +// // DataCell(Text( +// // publication_data[index] +// // [ +// // 'id'] +// // .toString(), +// // softWrap: +// // true)), // DataCell(Text( // publication_data[index] // [ @@ -3453,20 +10541,20 @@ class _NewProfileState extends State { // .toString(), // softWrap: // true)), -// DataCell(Text( -// publication_data[index] -// [ -// 'journal_name'] -// .toString(), -// softWrap: -// true)), -// DataCell(Text( -// publication_data[index] -// [ -// 'date'] -// .toString(), -// softWrap: -// true)), +// // DataCell(Text( +// // publication_data[index] +// // [ +// // 'journal_name'] +// // .toString(), +// // softWrap: +// // true)), +// // DataCell(Text( +// // publication_data[index] +// // [ +// // 'date'] +// // .toString(), +// // softWrap: +// // true)), // DataCell(Text( // publication_data[index] // [ @@ -3526,7 +10614,7 @@ class _NewProfileState extends State { // ), // ), // adds spacing between the text and image -// const SizedBox(height: 10), +// // const SizedBox(height: 10), // Flexible( // flex: 1, @@ -3545,6 +10633,7 @@ class _NewProfileState extends State { // color: const Color.fromARGB( // 255, 0, 71, 137), // child: ExpansionTile( +// initiallyExpanded: false, // maintainState: true, // onExpansionChanged: // (bool expanded) { @@ -3563,7 +10652,6 @@ class _NewProfileState extends State { // color: Colors.white), // // backgroundColor: Colors.white, // // collapsedBackgroundColor: Color(0xFF2b9af3), -// initiallyExpanded: true, // title: Row( // mainAxisAlignment: // MainAxisAlignment.start, @@ -3579,7 +10667,7 @@ class _NewProfileState extends State { // width: 8.0, // ), // Text1( -// title: "4", +// title: "(4)", // txtcolor: Colors.white, // fontweight: // FontWeight.normal, @@ -3605,50 +10693,120 @@ class _NewProfileState extends State { // ), // color: Colors.white, // child: DataTable( +// showCheckboxColumn: +// false, // columns: const [ -// DataColumn( -// label: Expanded( -// child: Text( -// '', -// softWrap: -// true))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // '', +// // softWrap: +// // true))), // DataColumn( // label: Expanded( // child: Text( // 'Event Name', -// softWrap: true), +// softWrap: true, +// style: TextStyle( +// fontWeight: +// FontWeight +// .w600)), // )), -// DataColumn( -// label: Expanded( -// child: Text( -// 'Session Type', -// softWrap: -// true))), -// DataColumn( -// label: Expanded( -// child: Text( -// 'Topic', -// softWrap: -// true))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Session Type', +// // softWrap: +// // true, +// // style: TextStyle( +// // fontWeight: +// // FontWeight.w600)))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Topic', +// // softWrap: +// // true, +// // style: TextStyle( +// // fontWeight: +// // FontWeight.w600)))), // DataColumn( // label: Expanded( // child: Text( // 'Role', // softWrap: -// true))), +// true, +// style: TextStyle( +// fontWeight: +// FontWeight.w600)))), // // Add more columns as needed // ], // rows: List.generate( // event_data.length, // (index) => DataRow( +// onSelectChanged: +// (value) { +// // =======> Use onSelectChanged for tab +// print( +// "message ${event_data[index]}"); + +// // bsheet( +// // publication_data[ +// // index]); +// showModalBottomSheet( +// useRootNavigator: +// true, +// isScrollControlled: +// false, +// enableDrag: +// true, +// useSafeArea: +// true, +// constraints: +// const BoxConstraints( +// maxWidth: double +// .infinity, +// ), +// shape: +// RoundedRectangleBorder( +// borderRadius: +// BorderRadius +// .vertical( +// top: Radius +// .circular( +// 0), +// ), +// ), +// clipBehavior: Clip +// .antiAliasWithSaveLayer, +// context: +// context, +// builder: +// (context) { +// return bsheet( +// event_data[ +// index]); +// }, +// ); +// // showBottomSheet( +// // context: +// // context, +// // builder: +// // (BuildContext +// // context) { +// // return bsheet( +// // publication_data[ +// // index]); // returns your BottomSheet widget +// // }); +// }, // cells: [ -// DataCell(Text( -// event_data[index] -// ['id'] -// .toString(), -// softWrap: -// true)), +// // DataCell(Text( +// // event_data[index] +// // ['id'] +// // .toString(), +// // softWrap: +// // true)), // DataCell(Text( // event_data[index] // [ @@ -3656,20 +10814,20 @@ class _NewProfileState extends State { // .toString(), // softWrap: // true)), -// DataCell(Text( -// event_data[index] -// [ -// 'session_type'] -// .toString(), -// softWrap: -// true)), -// DataCell(Text( -// event_data[index] -// [ -// 'topic'] -// .toString(), -// softWrap: -// true)), +// // DataCell(Text( +// // event_data[index] +// // [ +// // 'session_type'] +// // .toString(), +// // softWrap: +// // true)), +// // DataCell(Text( +// // event_data[index] +// // [ +// // 'topic'] +// // .toString(), +// // softWrap: +// // true)), // DataCell(Text( // event_data[index] // [ @@ -3727,9 +10885,9 @@ class _NewProfileState extends State { // ), // ), // adds spacing between the text and image -// SizedBox( -// height: 10.0, -// ), +// // SizedBox( +// // height: 10.0, +// // ), // Flexible( // flex: 1, @@ -3748,6 +10906,7 @@ class _NewProfileState extends State { // color: const Color.fromARGB( // 255, 0, 71, 137), // child: ExpansionTile( +// initiallyExpanded: false, // maintainState: true, // onExpansionChanged: // (bool expanded) { @@ -3766,7 +10925,6 @@ class _NewProfileState extends State { // color: Colors.white), // // backgroundColor: Colors.white, // // collapsedBackgroundColor: Color(0xFF2b9af3), -// initiallyExpanded: true, // title: Row( // mainAxisAlignment: // MainAxisAlignment.start, @@ -3782,7 +10940,7 @@ class _NewProfileState extends State { // width: 8.0, // ), // Text1( -// title: "4", +// title: "(4)", // txtcolor: Colors.white, // fontweight: // FontWeight.normal, @@ -3807,18 +10965,24 @@ class _NewProfileState extends State { // .width), // color: Colors.white, // child: DataTable( +// showCheckboxColumn: +// false, // columns: const [ -// DataColumn( -// label: Expanded( -// child: Text( -// '', -// softWrap: -// true))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // '', +// // softWrap: +// // true))), // DataColumn( // label: Expanded( // child: Text( // 'Trial Name', -// softWrap: true), +// softWrap: true, +// style: TextStyle( +// fontWeight: +// FontWeight +// .w600)), // )), // DataColumn( @@ -3826,44 +10990,114 @@ class _NewProfileState extends State { // child: Text( // 'Status', // softWrap: -// true))), -// DataColumn( -// label: Expanded( -// child: Text( -// 'Sponsers', -// softWrap: -// true))), -// DataColumn( -// label: Expanded( -// child: Text( -// 'Condition', -// softWrap: -// true))), -// DataColumn( -// label: Expanded( -// child: Text( -// 'Intervention', -// softWrap: -// true))), -// DataColumn( -// label: Expanded( -// child: Text( -// 'Phase', -// softWrap: -// true))), +// true, +// style: TextStyle( +// fontWeight: +// FontWeight.w600)))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Sponsers', +// // softWrap: +// // true, +// // style: TextStyle( +// // fontWeight: +// // FontWeight.w600)))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Condition', +// // softWrap: +// // true, +// // style: TextStyle( +// // fontWeight: +// // FontWeight.w600)))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Intervention', +// // softWrap: +// // true, +// // style: TextStyle( +// // fontWeight: +// // FontWeight.w600)))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Phase', +// // softWrap: +// // true, +// // style: TextStyle( +// // fontWeight: +// // FontWeight.w600)))), // // Add more columns as needed // ], // rows: List.generate( // trial_data.length, // (index) => DataRow( +// onSelectChanged: +// (value) { +// // =======> Use onSelectChanged for tab +// print( +// "message ${trial_data[index]}"); + +// // bsheet( +// // publication_data[ +// // index]); +// showModalBottomSheet( +// useRootNavigator: +// true, +// isScrollControlled: +// false, +// enableDrag: +// true, +// useSafeArea: +// true, +// constraints: +// const BoxConstraints( +// maxWidth: double +// .infinity, +// ), +// shape: +// RoundedRectangleBorder( +// borderRadius: +// BorderRadius +// .vertical( +// top: Radius +// .circular( +// 0), +// ), +// ), +// clipBehavior: Clip +// .antiAliasWithSaveLayer, +// context: +// context, +// builder: +// (context) { +// return bsheet( +// trial_data[ +// index]); +// }, +// ); +// // showBottomSheet( +// // context: +// // context, +// // builder: +// // (BuildContext +// // context) { +// // return bsheet( +// // publication_data[ +// // index]); // returns your BottomSheet widget +// // }); +// }, // cells: [ -// DataCell(Text( -// trial_data[index] -// ['id'] -// .toString(), -// softWrap: -// true)), +// // DataCell(Text( +// // trial_data[index] +// // ['id'] +// // .toString(), +// // softWrap: +// // true)), // DataCell(Text( // trial_data[index] // [ @@ -3878,34 +11112,34 @@ class _NewProfileState extends State { // .toString(), // softWrap: // true)), -// DataCell(Text( -// trial_data[index] -// [ -// 'sponsors'] -// .toString(), -// softWrap: -// true)), -// DataCell(Text( -// trial_data[index] -// [ -// 'condition'] -// .toString(), -// softWrap: -// true)), -// DataCell(Text( -// trial_data[index] -// [ -// 'intervention'] -// .toString(), -// softWrap: -// true)), -// DataCell(Text( -// trial_data[index] -// [ -// 'phase'] -// .toString(), -// softWrap: -// true)), +// // DataCell(Text( +// // trial_data[index] +// // [ +// // 'sponsors'] +// // .toString(), +// // softWrap: +// // true)), +// // DataCell(Text( +// // trial_data[index] +// // [ +// // 'condition'] +// // .toString(), +// // softWrap: +// // true)), +// // DataCell(Text( +// // trial_data[index] +// // [ +// // 'intervention'] +// // .toString(), +// // softWrap: +// // true)), +// // DataCell(Text( +// // trial_data[index] +// // [ +// // 'phase'] +// // .toString(), +// // softWrap: +// // true)), // // Add more DataCells as needed // ], @@ -3931,12 +11165,6 @@ class _NewProfileState extends State { // builder: (_) => // EventsData())); // }, -// child: Text( -// 'Show More', -// style: TextStyle( -// color: Constants -// .k2color), -// ), // style: OutlinedButton // .styleFrom( // shape: @@ -3947,6 +11175,12 @@ class _NewProfileState extends State { // 12), // ), // ), +// child: Text( +// 'Show More', +// style: TextStyle( +// color: Constants +// .k2color), +// ), // ), // ), // ), @@ -3956,234 +11190,8 @@ class _NewProfileState extends State { // ), // ), // adds spacing between the text and image -// SizedBox( -// height: 10.0, -// ), - -// // Flexible( -// // flex: 1, -// // child: Padding( -// // padding: const EdgeInsets.only( -// // left: 1.0, right: 1.0), -// // child: Card( -// // elevation: 5, -// // shape: RoundedRectangleBorder( -// // borderRadius: -// // BorderRadius.circular(0.0), -// // ), -// // color: const Color.fromARGB( -// // 255, 0, 71, 137), -// // child: ExpansionTile( -// // maintainState: true, -// // onExpansionChanged: -// // (bool expanded) { -// // setState(() { -// // _isExpanded = expanded; -// // }); -// // }, -// // backgroundColor: -// // const Color.fromARGB( -// // 255, 0, 71, 137), -// // trailing: Icon( -// // _isExpanded -// // ? Icons.keyboard_arrow_up -// // : Icons -// // .keyboard_arrow_down, -// // color: Colors.white), -// // // collapsedBackgroundColor: Color(0xFF2b9af3), -// // initiallyExpanded: true, -// // title: Row( -// // //mainAxisSize: MainAxisSize.min, -// // children: [ -// // // GestureDetector( - -// // Text1( -// // title: "Medical Insight", -// // txtcolor: Colors.white, -// // fontweight: -// // FontWeight.normal, -// // txtfont: 17.0), -// // // ), -// // const SizedBox( -// // width: 8.0, -// // ), -// // Text1( -// // title: "4", -// // txtfont: 18.0, -// // txtcolor: -// // const Color.fromARGB( -// // 255, 60, 82, 102), -// // ) -// // ], -// // ), -// // children: [ -// // Container( -// // height: MediaQuery.of(context) -// // .size -// // .height, -// // color: Colors.white, -// // child: Consumer< -// // MediacalInsightProvider>( -// // builder: (context, value, -// // child) { -// // return Column( -// // children: [ -// // Expanded( -// // child: -// // ListView.builder( -// // physics: -// // const ScrollPhysics(), -// // // scrollDirection: Axis.vertical, -// // shrinkWrap: -// // true, -// // itemCount: value -// // .med -// // .length, -// // itemBuilder: -// // (context, -// // index) { -// // item = value -// // .med[ -// // index]; - -// // print( -// // "Item_Medical_insight ${item['Therapeutic Area']}"); -// // return Padding( -// // padding: const EdgeInsets -// // .all( -// // 8.0), -// // child: -// // Card( -// // margin: -// // EdgeInsets.zero, - -// // elevation: -// // 4, -// // surfaceTintColor: -// // Colors.white, -// // shape: -// // RoundedRectangleBorder( -// // borderRadius: -// // BorderRadius.zero, -// // ), - -// // // shape: RoundedRectangleBorder( -// // // side: BorderSide(color: Colors.black, width: 1), -// // // borderRadius: BorderRadius.only( -// // // bottomRight: Radius.circular(30)), -// // // ), -// // child: -// // SizedBox( -// // width: -// // MediaQuery.sizeOf(context).width, -// // child: -// // ListTile( -// // dense: -// // true, -// // title: -// // Column( -// // // crossAxisAlignment: CrossAxisAlignment.center, -// // children: [ -// // // Text( -// // // "Acute neurology is the therapeutic area of the medical insight for Product A. The age of treatment is the topic of interest for this source type publication."), - -// // RichText( -// // text: TextSpan( -// // text: '', -// // style: DefaultTextStyle.of(context).style, -// // children: const [ -// // TextSpan(text: 'Acute neurology ', style: TextStyle(fontWeight: FontWeight.bold)), -// // // TextSpan( -// // // text: ' therapeutic area ', -// // // style: TextStyle( -// // // fontWeight: -// // // FontWeight.bold)), -// // TextSpan(text: 'is the therapeutic area of the medical insight for '), -// // TextSpan(text: 'Product A. The age of treatment', style: TextStyle(fontWeight: FontWeight.bold)), -// // TextSpan(text: ' is the topic of interest for this source type'), -// // TextSpan(text: ' publication.', style: TextStyle(fontWeight: FontWeight.bold)), -// // ], -// // ), -// // ), - -// // const Padding( -// // padding: EdgeInsets.all(8.0), -// // child: Row( -// // mainAxisAlignment: MainAxisAlignment.spaceBetween, -// // children: [ -// // Row( -// // children: [ -// // Icon( -// // Icons.person, -// // size: 20, -// // ), -// // Text( -// // "pooja", -// // style: TextStyle(fontSize: 14.0), -// // ) -// // ], -// // ), -// // Row( -// // children: [ -// // Icon( -// // Icons.calendar_today, -// // size: 20, -// // ), -// // Text( -// // "11/11/2022 ", -// // style: TextStyle(fontSize: 14.0), -// // ) -// // ], -// // ) -// // ], -// // ), -// // ), -// // ], -// // ), -// // ), -// // ), -// // // shape: BorderRadius.only(bottomRight: Radius.circular(50)), -// // ), -// // ); -// // }), -// // ) -// // ], -// // ); -// // }), -// // ), -// // Container( -// // color: Colors.white, -// // child: Align( -// // alignment: Alignment.center, -// // child: Padding( -// // padding: -// // const EdgeInsets.all( -// // 8.0), -// // child: OutlinedButton( -// // onPressed: () {}, -// // child: Text( -// // 'Show More', -// // style: TextStyle( -// // color: Constants -// // .k2color), -// // ), -// // style: OutlinedButton -// // .styleFrom( -// // shape: -// // RoundedRectangleBorder( -// // borderRadius: -// // BorderRadius -// // .circular( -// // 12), -// // ), -// // ), -// // ), -// // ), -// // ), -// // ) -// // ]), -// // ), -// // ), +// // SizedBox( +// // height: 10.0, // // ), // Flexible( @@ -4200,6 +11208,7 @@ class _NewProfileState extends State { // color: const Color.fromARGB( // 255, 0, 71, 137), // child: ExpansionTile( +// initiallyExpanded: false, // maintainState: true, // onExpansionChanged: // (bool expanded) { @@ -4217,7 +11226,6 @@ class _NewProfileState extends State { // .keyboard_arrow_down, // color: Colors.white), // // collapsedBackgroundColor: Color(0xFF2b9af3), -// initiallyExpanded: true, // // initiallyExpanded: true, // title: Row( // mainAxisAlignment: @@ -4234,7 +11242,7 @@ class _NewProfileState extends State { // width: 8.0, // ), // Text1( -// title: "3", +// title: "(3)", // txtcolor: Colors.white, // fontweight: // FontWeight.normal, @@ -4436,9 +11444,9 @@ class _NewProfileState extends State { // ), // ), -// SizedBox( -// height: 10.0, -// ), +// // SizedBox( +// // height: 10.0, +// // ), // Flexible( // flex: 1, // child: Padding( @@ -4453,6 +11461,7 @@ class _NewProfileState extends State { // color: const Color.fromARGB( // 255, 0, 71, 137), // child: ExpansionTile( +// initiallyExpanded: false, // maintainState: true, // onExpansionChanged: // (bool expanded) { @@ -4470,7 +11479,6 @@ class _NewProfileState extends State { // .keyboard_arrow_down, // color: Colors.white), // // collapsedBackgroundColor: Color(0xFF2b9af3), -// initiallyExpanded: true, // title: Row( // //mainAxisSize: MainAxisSize.min, // children: [ @@ -4519,20 +11527,6 @@ class _NewProfileState extends State { // const SizedBox( // width: 8.0, // ), -// // Text1( -// // title: widget -// // .text![ -// // "affiliations_count"] -// // .toString(), -// // txtfont: 18.0, -// // txtcolor: -// // const Color -// // .fromARGB( -// // 255, -// // 60, -// // 82, -// // 102), -// // ) // ], // ), // children: [ @@ -4740,314 +11734,591 @@ class _NewProfileState extends State { // ), // ), -// // Flexible( -// // flex: 1, -// // child: Padding( -// // padding: const EdgeInsets.only( -// // left: 1.0, right: 1.0), -// // child: Card( -// // elevation: 5, -// // shape: RoundedRectangleBorder( -// // borderRadius: -// // BorderRadius.circular(0.0), -// // ), -// // color: const Color.fromARGB( -// // 255, 0, 71, 137), -// // child: ExpansionTile( -// // maintainState: true, -// // onExpansionChanged: -// // (bool expanded) { -// // setState(() { -// // _isExpanded = expanded; -// // }); -// // }, -// // backgroundColor: -// // const Color.fromARGB( -// // 255, 0, 71, 137), -// // trailing: Icon( -// // _isExpanded -// // ? Icons.keyboard_arrow_up -// // : Icons -// // .keyboard_arrow_down, -// // color: Colors.white), -// // // collapsedBackgroundColor: Color(0xFF2b9af3), -// // initiallyExpanded: true, -// // title: Row( -// // //mainAxisSize: MainAxisSize.min, -// // children: [ -// // GestureDetector( -// // onTap: () async { -// // final provider = Provider -// // .of( -// // context, -// // listen: false); -// // print( -// // "CheckkkkkProvider : ${(getCount(provider.intConfigDataList[0].name, provider) != 0)}"); -// // if (getCount( -// // provider -// // .intConfigDataList[ -// // 0] -// // .name, -// // provider) != -// // 0) { -// // provider.savedList -// // .where((element) => -// // element.form == -// // provider -// // .intConfigDataList[ -// // 0] -// // .name) -// // .toList(); -// // Navigator.push( -// // context, -// // MaterialPageRoute( -// // builder: (BuildContext -// // context) => -// // SavedFormListScreen( -// // formname: provider -// // .intConfigDataList[ -// // 0] -// // .name, -// // ))); -// // } -// // }, -// // child: Text1( -// // title: -// // "Interaction Form", -// // txtcolor: Colors.white, -// // fontweight: -// // FontWeight.normal, -// // txtfont: 17.0), -// // ), -// // const SizedBox( -// // width: 8.0, -// // ), -// // // Text1( -// // // title: widget -// // // .text![ -// // // "affiliations_count"] -// // // .toString(), -// // // txtfont: 18.0, -// // // txtcolor: -// // // const Color -// // // .fromARGB( -// // // 255, -// // // 60, -// // // 82, -// // // 102), -// // // ) -// // ], -// // ), -// // children: [ -// // Container( -// // width: MediaQuery.of(context) -// // .size -// // .width, +// Flexible( +// flex: 1, +// child: Padding( +// padding: const EdgeInsets.only( +// left: 1.0, right: 1.0), +// child: Card( +// elevation: 5, +// shape: RoundedRectangleBorder( +// borderRadius: +// BorderRadius.circular(0.0), +// ), +// color: const Color.fromARGB( +// 255, 0, 71, 137), +// child: ExpansionTile( +// initiallyExpanded: false, +// maintainState: true, +// onExpansionChanged: +// (bool expanded) { +// setState(() { +// _isExpanded = expanded; +// }); +// }, +// backgroundColor: +// const Color.fromARGB( +// 255, 0, 71, 137), +// trailing: Icon( +// _isExpanded +// ? Icons.keyboard_arrow_up +// : Icons +// .keyboard_arrow_down, +// color: Colors.white), +// // backgroundColor: Colors.white, +// // collapsedBackgroundColor: Color(0xFF2b9af3), +// title: Row( +// mainAxisAlignment: +// MainAxisAlignment.start, +// // mainAxisSize: MainAxisSize.min, +// children: [ +// Text1( +// title: +// "Speaker Evalution", +// txtcolor: Colors.white, +// fontweight: +// FontWeight.normal, +// txtfont: 17.0), +// const SizedBox( +// width: 8.0, +// ), +// Text1( +// title: "(4)", +// txtcolor: Colors.white, +// fontweight: +// FontWeight.normal, +// txtfont: 17.0), +// ], +// ), +// children: [ +// Scrollbar( +// child: SingleChildScrollView( +// scrollDirection: +// Axis.horizontal, +// child: Container( +// // width: +// // MediaQuery.of(context) +// // .size +// // .width, +// constraints: BoxConstraints( +// minWidth: +// MediaQuery.of( +// context) +// .size +// .width), +// color: Colors.white, +// child: DataTable( +// showCheckboxColumn: +// false, +// columns: const [ +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // '', +// // softWrap: +// // true))), +// DataColumn( +// label: Expanded( +// child: Text( +// 'Program Topic', +// style: TextStyle( +// fontWeight: +// FontWeight +// .w600), +// ), +// )), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Department'))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Role'))), +// DataColumn( +// label: Expanded( +// child: Text( +// 'Speaker Name', +// style: TextStyle( +// fontWeight: +// FontWeight.w600)))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Org Type'))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Eng Type'))), -// // ///5, -// // color: Colors.white, -// // child: Consumer< -// // ViewInteractionProvider>( -// // builder: -// // (BuildContext context, -// // provider, -// // Widget? child) { -// // print( -// // "P_leangth : ${provider.savedList.length}"); +// // Add more columns as needed +// ], +// rows: List.generate( +// speaker.length, +// (index) => DataRow( +// onSelectChanged: +// (value) { +// // =======> Use onSelectChanged for tab +// print( +// "message ${speaker[index]}"); -// // if (provider -// // .savedList.length != -// // 0) { -// // return ListView.builder( -// // shrinkWrap: true, -// // physics: -// // NeverScrollableScrollPhysics(), -// // itemCount: provider -// // .savedList -// // .take(2) -// // .length, -// // itemBuilder: -// // (context, index) { -// // return Column( -// // children: [ -// // ListTile( -// // subtitle: -// // Text( -// // 'Updated on ${provider.savedList[index].updatedTime}', -// // //style: TextStyle(fontStyle: FontStyle.italic), -// // ), -// // title: Text( -// // provider -// // .savedList[ -// // index] -// // .id, -// // ), -// // trailing: -// // SizedBox( -// // width: 150, -// // child: Row( -// // children: [ -// // IconButton( -// // onPressed: -// // () { -// // Navigator.push( -// // context, -// // MaterialPageRoute( -// // builder: (BuildContext context) => ViewInteractionScreen( -// // saveInteraction: provider.savedList[index], -// // ))); -// // }, -// // icon: -// // const Icon( -// // Icons.info_outline, -// // size: 24, -// // color: Color.fromARGB(255, 8, 39, 92), -// // ), -// // ), -// // IconButton( -// // onPressed: -// // () async { -// // await provider.initConfigData().then({ -// // Navigator.push( -// // context, -// // MaterialPageRoute( -// // builder: (BuildContext context) => EditInteractionScreen1( -// // saveInteraction: provider.savedList[index], -// // ))) -// // }); -// // }, -// // icon: -// // const Icon( -// // Icons.edit, -// // size: 24, -// // color: Color.fromARGB(255, 8, 39, 92), -// // ), -// // ), -// // IconButton( -// // onPressed: -// // () { -// // showDeleteRecordAlertDialog(context, provider.savedList[index].id, provider.savedList[index]); -// // }, -// // icon: -// // const Icon( -// // Icons.delete, -// // size: 24, -// // color: Color.fromARGB(255, 8, 39, 92), -// // ), -// // ), -// // ]), -// // ), -// // onTap: () { -// // Navigator.push( -// // context, -// // MaterialPageRoute( -// // builder: (BuildContext context) => ViewInteractionScreen( -// // saveInteraction: provider.savedList[index], -// // ))); -// // }, -// // ), -// // const Divider(), -// // ], -// // ); -// // }); -// // } else { -// // return Container( -// // color: Colors.white, -// // width: MediaQuery.of( -// // context) -// // .size -// // .width, -// // child: Column( -// // children: [ -// // Padding( -// // padding: -// // const EdgeInsets -// // .all(8.0), -// // child: Text( -// // "No records"), -// // ), -// // ], -// // ), -// // ); -// // } -// // }), -// // ), -// // // InteractionProvider() -// // // .savedList -// // // .length != -// // // 0 -// // // ? -// // Container( -// // color: Colors.white, -// // child: Align( -// // alignment: Alignment.center, -// // child: Padding( -// // padding: -// // const EdgeInsets.all( -// // 8.0), -// // child: OutlinedButton( -// // onPressed: () { -// // final provider = Provider -// // .of( -// // context, -// // listen: -// // false); +// // bsheet( +// // publication_data[ +// // index]); +// showModalBottomSheet( +// useRootNavigator: +// true, +// isScrollControlled: +// false, +// enableDrag: +// true, +// useSafeArea: +// true, +// constraints: +// const BoxConstraints( +// maxWidth: double +// .infinity, +// ), +// shape: +// RoundedRectangleBorder( +// borderRadius: +// BorderRadius +// .vertical( +// top: Radius +// .circular( +// 0), +// ), +// ), +// clipBehavior: Clip +// .antiAliasWithSaveLayer, +// context: +// context, +// builder: +// (context) { +// return bsheet( +// speaker[ +// index]); +// }, +// ); +// // showBottomSheet( +// // context: +// // context, +// // builder: +// // (BuildContext +// // context) { +// // return bsheet( +// // publication_data[ +// // index]); // returns your BottomSheet widget +// // }); +// }, +// color: MaterialStateProperty +// .resolveWith< +// Color?>((Set< +// MaterialState> +// states) { +// if (index +// .isEven) { +// return Colors +// .grey +// .withOpacity( +// 0.1); +// } +// return null; +// }), +// cells: [ +// // DataCell(Text( +// // affiliation_data[ +// // index] +// // ['id'] +// // .toString(), +// // softWrap: +// // true)), +// DataCell(Text( +// speaker[index] +// [ +// 'programtopic'] +// .toString(), +// softWrap: +// true)), +// // DataCell(Text( +// // affiliation_data[ +// // index] +// // [ +// // 'dept'] +// // .toString(), +// // softWrap: +// // true)), +// // DataCell(Text( +// // affiliation_data[ +// // index] +// // [ +// // 'role'] +// // .toString(), +// // softWrap: +// // true)), +// DataCell(Text( +// speaker[index] +// [ +// 'speakername'] +// .toString(), +// softWrap: +// true)), +// // DataCell(Text( +// // affiliation_data[ +// // index] +// // [ +// // 'org_type'] +// // .toString(), +// // softWrap: +// // true)), +// // DataCell(Text( +// // affiliation_data[ +// // index] +// // [ +// // 'emg_type'] +// // .toString(), +// // softWrap: +// // true)), -// // print( -// // "showwCheckkkk_isss: ${(getCount(provider.intConfigDataList[0].name, provider) != 0)}"); -// // if (getCount( -// // provider -// // .intConfigDataList[ -// // 0] -// // .name, -// // provider) != -// // 0) { -// // provider.savedList -// // .where((element) => -// // element -// // .form == -// // provider -// // .intConfigDataList[ -// // 0] -// // .name) -// // .toList(); -// // Navigator.push( -// // context, -// // MaterialPageRoute( -// // builder: (BuildContext -// // context) => -// // SavedFormListScreen( -// // formname: provider -// // .intConfigDataList[0] -// // .name, -// // ))); -// // } -// // }, -// // child: Text( -// // 'Show More', -// // style: TextStyle( -// // color: Constants -// // .k2color), -// // ), -// // style: OutlinedButton -// // .styleFrom( -// // shape: -// // RoundedRectangleBorder( -// // borderRadius: -// // BorderRadius -// // .circular( -// // 12), -// // ), -// // ), -// // ), -// // ), -// // ), -// // ) -// // // : SizedBox.shrink() -// // ]), -// // ), -// // ), -// // ), +// // Add more DataCells as needed +// ], +// ), +// ), +// ), +// ), +// ), +// ), +// Container( +// color: Colors.white, +// child: Align( +// alignment: Alignment.center, +// child: Padding( +// padding: +// const EdgeInsets.all( +// 8.0), +// child: OutlinedButton( +// onPressed: () { +// // Navigator.push( +// // context, +// // MaterialPageRoute( +// // builder: (_) => +// // AffiliationsData())); +// }, +// child: Text( +// 'Show More', +// style: TextStyle( +// color: Constants +// .k2color), +// ), +// style: OutlinedButton +// .styleFrom( +// shape: +// RoundedRectangleBorder( +// borderRadius: +// BorderRadius +// .circular( +// 12), +// ), +// ), +// ), +// ), +// ), +// ) +// ]), +// ), +// ), +// ), // adds spacing between the text and image + +// Flexible( +// flex: 1, +// child: Padding( +// padding: const EdgeInsets.only( +// left: 1.0, right: 1.0), +// child: Card( +// elevation: 5, +// shape: RoundedRectangleBorder( +// borderRadius: +// BorderRadius.circular(0.0), +// ), +// color: const Color.fromARGB( +// 255, 0, 71, 137), +// child: ExpansionTile( +// initiallyExpanded: false, +// maintainState: true, +// onExpansionChanged: +// (bool expanded) { +// setState(() { +// _isExpanded = expanded; +// }); +// }, +// backgroundColor: +// const Color.fromARGB( +// 255, 0, 71, 137), +// trailing: Icon( +// _isExpanded +// ? Icons.keyboard_arrow_up +// : Icons +// .keyboard_arrow_down, +// color: Colors.white), +// // backgroundColor: Colors.white, +// // collapsedBackgroundColor: Color(0xFF2b9af3), +// title: Row( +// mainAxisAlignment: +// MainAxisAlignment.start, +// // mainAxisSize: MainAxisSize.min, +// children: [ +// Text1( +// title: "Engagement", +// txtcolor: Colors.white, +// fontweight: +// FontWeight.normal, +// txtfont: 17.0), +// const SizedBox( +// width: 8.0, +// ), +// Text1( +// title: "(3)", +// txtcolor: Colors.white, +// fontweight: +// FontWeight.normal, +// txtfont: 17.0), +// ], +// ), +// children: [ +// Scrollbar( +// child: SingleChildScrollView( +// scrollDirection: +// Axis.horizontal, +// child: Container( +// // width: +// // MediaQuery.of(context) +// // .size +// // .width, +// constraints: BoxConstraints( +// minWidth: +// MediaQuery.of( +// context) +// .size +// .width), +// color: Colors.white, +// child: DataTable( +// showCheckboxColumn: +// false, +// columns: const [ +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // '', +// // softWrap: +// // true))), +// DataColumn( +// label: Expanded( +// child: Text( +// 'Main Therapeutic Area', +// style: TextStyle( +// fontWeight: +// FontWeight +// .w600), +// ), +// )), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Department'))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Role'))), +// DataColumn( +// label: Expanded( +// child: Text( +// 'Date', +// style: TextStyle( +// fontWeight: +// FontWeight.w600)))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Org Type'))), +// // DataColumn( +// // label: Expanded( +// // child: Text( +// // 'Eng Type'))), + +// // Add more columns as needed +// ], +// rows: List.generate( +// eng.take(2).length, +// (index) => DataRow( +// onSelectChanged: +// (value) { +// // =======> Use onSelectChanged for tab +// print( +// "message ${eng[index]}"); + +// // bsheet( +// // publication_data[ +// // index]); +// showModalBottomSheet( +// useRootNavigator: +// true, +// isScrollControlled: +// false, +// enableDrag: +// true, +// useSafeArea: +// true, +// constraints: +// const BoxConstraints( +// maxWidth: double +// .infinity, +// ), +// shape: +// RoundedRectangleBorder( +// borderRadius: +// BorderRadius +// .vertical( +// top: Radius +// .circular( +// 0), +// ), +// ), +// clipBehavior: Clip +// .antiAliasWithSaveLayer, +// context: +// context, +// builder: +// (context) { +// return bsheet( +// eng[index]); +// }, +// ); +// // showBottomSheet( +// // context: +// // context, +// // builder: +// // (BuildContext +// // context) { +// // return bsheet( +// // publication_data[ +// // index]); // returns your BottomSheet widget +// // }); +// }, +// color: MaterialStateProperty +// .resolveWith< +// Color?>((Set< +// MaterialState> +// states) { +// if (index +// .isEven) { +// return Colors +// .grey +// .withOpacity( +// 0.1); +// } +// return null; +// }), +// cells: [ +// // DataCell(Text( +// // affiliation_data[ +// // index] +// // ['id'] +// // .toString(), +// // softWrap: +// // true)), +// DataCell(Text( +// eng[index][ +// 'main thereutic area'] +// .toString(), +// softWrap: +// true)), +// // DataCell(Text( +// // affiliation_data[ +// // index] +// // [ +// // 'dept'] +// // .toString(), +// // softWrap: +// // true)), +// // DataCell(Text( +// // affiliation_data[ +// // index] +// // [ +// // 'role'] +// // .toString(), +// // softWrap: +// // true)), +// DataCell(Text( +// eng[index][ +// 'date'] +// .toString(), +// softWrap: +// true)), +// // DataCell(Text( +// // affiliation_data[ +// // index] +// // [ +// // 'org_type'] +// // .toString(), +// // softWrap: +// // true)), +// // DataCell(Text( +// // affiliation_data[ +// // index] +// // [ +// // 'emg_type'] +// // .toString(), +// // softWrap: +// // true)), + +// // Add more DataCells as needed +// ], +// ), +// ), +// ), +// ), +// ), +// ), +// Container( +// color: Colors.white, +// child: Align( +// alignment: Alignment.center, +// child: Padding( +// padding: +// const EdgeInsets.all( +// 8.0), +// child: OutlinedButton( +// onPressed: () { +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (_) => +// EngagementList())); +// }, +// child: Text( +// 'Show More', +// style: TextStyle( +// color: Constants +// .k2color), +// ), +// style: OutlinedButton +// .styleFrom( +// shape: +// RoundedRectangleBorder( +// borderRadius: +// BorderRadius +// .circular( +// 12), +// ), +// ), +// ), +// ), +// ), +// ) +// ]), +// ), +// ), +// ), // adds spacing between the text and image // ], // ), // ), @@ -5142,4 +12413,567 @@ class _NewProfileState extends State { // ScaffoldMessenger.of(context).showSnackBar(snackBar); // //scaffoldKeyLogin.currentState!.showSnackBar(snackBar); // } + +// Widget makeDismissible({required DraggableScrollableSheet child}) { +// return GestureDetector( +// behavior: HitTestBehavior.opaque, +// onTap: () => Navigator.of(context).pop(), +// child: GestureDetector( +// onTap: () {}, +// child: child, +// ), +// ); +// } + +// void bottomshet(affiliation_data) { +// // print("Aff_index_data: ${affiliation_data}"); +// showModalBottomSheet( +// // isScrollControlled: +// // true, + +// context: context, + +// useRootNavigator: true, +// isScrollControlled: false, +// enableDrag: true, +// useSafeArea: true, +// constraints: const BoxConstraints( +// maxWidth: double.infinity, +// ), + +// shape: RoundedRectangleBorder( +// borderRadius: BorderRadius.vertical( +// top: Radius.circular(0), +// ), +// ), +// clipBehavior: Clip.antiAliasWithSaveLayer, +// // sheetAnimationStyle: _animationStyle, +// builder: (BuildContext context) { +// return +// // makeDismissible( +// // child: +// DraggableScrollableSheet( +// expand: false, +// // initialChildSize: +// // 0.7, +// // maxChildSize: +// // 1, +// // minChildSize: +// // 0.5, +// builder: (BuildContext context, ScrollController scrollController) { +// return Container( +// width: MediaQuery.of(context).size.width, +// //color: Colors.white, +// color: Color.fromARGB(255, 246, 248, 252), + +// // decoration: +// // BoxDecoration(borderRadius: BorderRadius.circular(10)), +// // child: ListView( +// // children: [ + +// // ], +// // ), + +// child: Column( +// children: [ +// Expanded( +// child: ListView.builder( +// controller: scrollController, +// itemCount: 1, +// itemBuilder: (BuildContext context, int index) { +// return +// // Column( +// // crossAxisAlignment: CrossAxisAlignment.start, +// // mainAxisSize: MainAxisSize.min, +// // mainAxisAlignment: MainAxisAlignment.center, +// // children: [ +// // // Row( +// // // children: [ +// // // Text( +// // // "Affiliation", +// // // style: TextStyle(fontSize: 20.0), +// // // ) +// // // ], +// // // ), +// // Row( +// // crossAxisAlignment: CrossAxisAlignment.start, +// // // mainAxisAlignment: MainAxisAlignment.spaceBetween, +// // children: [ +// // // Padding( +// // // padding: const EdgeInsets.only( +// // // left: 8.0, top: 28.0), +// // // child: Text( +// // // "Organization Name", +// // // style: TextStyle(fontSize: 14.0), +// // // ), +// // // ), +// // Padding( +// // padding: const EdgeInsets.all(28.0), +// // child: Text( +// // affiliation_data['org_name'], +// // style: TextStyle(fontSize: 18.0), +// // ), +// // ) +// // ], +// // ), +// // Container( +// // color: Colors.grey.withOpacity(0.1), +// // child: Row( +// // // crossAxisAlignment: CrossAxisAlignment.start, +// // mainAxisAlignment: +// // MainAxisAlignment.spaceBetween, +// // children: [ +// // Padding( +// // padding: const EdgeInsets.only( +// // left: 28.0, top: 18.0), +// // child: Text( +// // "Department", +// // style: TextStyle(fontSize: 14.0), +// // ), +// // ), +// // Padding( +// // padding: const EdgeInsets.only(right: 8.0), +// // child: Text( +// // affiliation_data['dept'], +// // style: TextStyle(fontSize: 14.0), +// // ), +// // ) +// // ], +// // ), +// // ), +// // Row( +// // // crossAxisAlignment: CrossAxisAlignment.start, +// // mainAxisAlignment: MainAxisAlignment.spaceBetween, +// // children: [ +// // Padding( +// // padding: const EdgeInsets.only( +// // left: 8.0, top: 18.0), +// // child: Text( +// // "Role", +// // style: TextStyle(fontSize: 14.0), +// // ), +// // ), +// // Padding( +// // padding: const EdgeInsets.only(right: 8.0), +// // child: Text( +// // affiliation_data['role'], +// // style: TextStyle(fontSize: 14.0), +// // ), +// // ) +// // ], +// // ), +// // Container( +// // color: Colors.grey.withOpacity(0.1), +// // child: Row( +// // // crossAxisAlignment: CrossAxisAlignment.start, +// // mainAxisAlignment: +// // MainAxisAlignment.spaceBetween, +// // children: [ +// // Padding( +// // padding: const EdgeInsets.only( +// // left: 8.0, top: 18.0), +// // child: Text( +// // "Time Frame", +// // style: TextStyle(fontSize: 14.0), +// // ), +// // ), +// // Padding( +// // padding: const EdgeInsets.only(right: 8.0), +// // child: Text( +// // affiliation_data['time_frame'], +// // style: TextStyle(fontSize: 14.0), +// // ), +// // ) +// // ], +// // ), +// // ), +// // Row( +// // // crossAxisAlignment: CrossAxisAlignment.start, +// // mainAxisAlignment: MainAxisAlignment.spaceBetween, +// // children: [ +// // Padding( +// // padding: const EdgeInsets.only( +// // left: 8.0, top: 18.0, bottom: 18.0), +// // child: Text( +// // "Oraganization Type", +// // style: TextStyle(fontSize: 14.0), +// // ), +// // ), +// // Padding( +// // padding: const EdgeInsets.only(right: 8.0), +// // child: Text( +// // affiliation_data['org_type'], +// // style: TextStyle(fontSize: 14.0), +// // ), +// // ) +// // ], +// // ), +// // Container( +// // color: Colors.grey.withOpacity(0.1), +// // child: Row( +// // // crossAxisAlignment: CrossAxisAlignment.start, +// // mainAxisAlignment: +// // MainAxisAlignment.spaceBetween, +// // children: [ +// // Padding( +// // padding: const EdgeInsets.only( +// // left: 8.0, top: 18.0, bottom: 18.0), +// // child: Text( +// // "Eng Type", +// // style: TextStyle(fontSize: 14.0), +// // ), +// // ), +// // Padding( +// // padding: const EdgeInsets.only(right: 8.0), +// // child: Text( +// // affiliation_data['emg_type'], +// // style: TextStyle(fontSize: 14.0), +// // ), +// // ) +// // ], +// // ), +// // ), +// // ], +// // ); + +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// mainAxisSize: MainAxisSize.min, +// mainAxisAlignment: MainAxisAlignment.center, +// children: [ +// // Row( +// // children: [ +// // Text( +// // "Affiliation", +// // style: TextStyle(fontSize: 20.0), +// // ) +// // ], +// // ), +// SizedBox( +// height: 18.0, +// ), +// Row( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Padding( +// padding: const EdgeInsets.only(left: 18.0), +// child: GestureDetector( +// onTap: () async { +// final ConfigDataProvider +// configDataProvider = +// ConfigDataProvider(); +// await configDataProvider +// .initConfigUIDataEng(); + +// final provider = +// Provider.of( +// context, +// listen: false); + +// if (getCount( +// provider.intConfigDataList[index] +// .name, +// provider) != +// 0) { +// provider.savedList +// .where((element) => +// element.form == +// provider +// .intConfigDataList[index] +// .name) +// .toList(); +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: +// (BuildContext context) => +// SavedFormListScreen( +// formname: provider +// .intConfigDataList[ +// index] +// .name, +// ))); +// } +// // Navigator.push( +// // context, +// // MaterialPageRoute( +// // builder: (context) => +// // const InteractionListScreen())); +// }, +// child: Text( +// affiliation_data['org_name'], +// style: TextStyle( +// fontSize: 18.0, +// color: Colors.grey[700]), +// ), +// ), +// ) +// ], +// ), +// SizedBox( +// height: 18.0, +// ), +// Divider(), +// SizedBox( +// height: 8.0, +// ), + +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Padding( +// padding: const EdgeInsets.only(left: 18.0), +// child: Text( +// "Department", +// style: TextStyle(fontSize: 13.0), +// ), +// ), +// Padding( +// padding: const EdgeInsets.only(left: 18.0), +// child: Text( +// affiliation_data['dept'], +// style: TextStyle( +// fontSize: 15.0, +// color: Colors.grey[700]), +// ), +// ) +// ], +// ), +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Padding( +// padding: const EdgeInsets.only( +// left: 18.0, top: 18.0), +// child: Text( +// "Role", +// style: TextStyle(fontSize: 13.0), +// ), +// ), +// Padding( +// padding: const EdgeInsets.only(left: 18.0), +// child: Text( +// affiliation_data['role'], +// style: TextStyle( +// fontSize: 15.0, +// color: Colors.grey[700]), +// ), +// ) +// ], +// ), +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Padding( +// padding: const EdgeInsets.only( +// left: 18.0, top: 18.0), +// child: Text( +// "Time Frame", +// style: TextStyle(fontSize: 13.0), +// ), +// ), +// Padding( +// padding: const EdgeInsets.only(left: 18.0), +// child: Text( +// affiliation_data['time_frame'], +// style: TextStyle( +// fontSize: 15.0, +// color: Colors.grey[700]), +// ), +// ) +// ], +// ), +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Padding( +// padding: const EdgeInsets.only( +// left: 18.0, top: 18.0), +// child: Text( +// "Oraganization Type", +// style: TextStyle(fontSize: 13.0), +// ), +// ), +// Padding( +// padding: const EdgeInsets.only(left: 18.0), +// child: Text( +// affiliation_data['org_type'], +// style: TextStyle( +// fontSize: 15.0, +// color: Colors.grey[700]), +// ), +// ) +// ], +// ), +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Padding( +// padding: const EdgeInsets.only( +// left: 18.0, top: 18.0), +// child: Text( +// "Eng Type", +// style: TextStyle(fontSize: 13.0), +// ), +// ), +// Padding( +// padding: const EdgeInsets.only(left: 18.0), +// child: Text( +// affiliation_data['emg_type'], +// style: TextStyle( +// fontSize: 15.0, +// color: Colors.grey[700]), +// ), +// ) +// ], +// ), +// ], +// ); +// // Column( +// // crossAxisAlignment: CrossAxisAlignment.start, +// // mainAxisSize: MainAxisSize.min, +// // mainAxisAlignment: MainAxisAlignment.center, +// // children: [ +// // // Row( +// // // children: [ +// // // Text( +// // // "Affiliation", +// // // style: TextStyle(fontSize: 20.0), +// // // ) +// // // ], +// // // ), +// // Column( +// // crossAxisAlignment: CrossAxisAlignment.start, +// // children: [ +// // Padding( +// // padding: const EdgeInsets.only( +// // left: 8.0, top: 28.0), +// // child: Text( +// // "Organization Name", +// // style: TextStyle(fontSize: 13.0), +// // ), +// // ), +// // Padding( +// // padding: const EdgeInsets.only(left: 8.0), +// // child: Text( +// // affiliation_data['org_name'], +// // style: TextStyle(fontSize: 16.0), +// // ), +// // ) +// // ], +// // ), +// // Column( +// // crossAxisAlignment: CrossAxisAlignment.start, +// // children: [ +// // Padding( +// // padding: const EdgeInsets.only( +// // left: 8.0, top: 18.0), +// // child: Text( +// // "Department", +// // style: TextStyle(fontSize: 12.0), +// // ), +// // ), +// // Padding( +// // padding: const EdgeInsets.only(left: 8.0), +// // child: Text( +// // affiliation_data['dept'], +// // style: TextStyle(fontSize: 14.0), +// // ), +// // ) +// // ], +// // ), +// // Column( +// // crossAxisAlignment: CrossAxisAlignment.start, +// // children: [ +// // Padding( +// // padding: const EdgeInsets.only( +// // left: 8.0, top: 18.0), +// // child: Text( +// // "Role", +// // style: TextStyle(fontSize: 12.0), +// // ), +// // ), +// // Padding( +// // padding: const EdgeInsets.only(left: 8.0), +// // child: Text( +// // affiliation_data['role'], +// // style: TextStyle(fontSize: 14.0), +// // ), +// // ) +// // ], +// // ), +// // Column( +// // crossAxisAlignment: CrossAxisAlignment.start, +// // children: [ +// // Padding( +// // padding: const EdgeInsets.only( +// // left: 8.0, top: 18.0), +// // child: Text( +// // "Time Frame", +// // style: TextStyle(fontSize: 12.0), +// // ), +// // ), +// // Padding( +// // padding: const EdgeInsets.only(left: 8.0), +// // child: Text( +// // affiliation_data['time_frame'], +// // style: TextStyle(fontSize: 14.0), +// // ), +// // ) +// // ], +// // ), +// // Column( +// // crossAxisAlignment: CrossAxisAlignment.start, +// // children: [ +// // Padding( +// // padding: const EdgeInsets.only( +// // left: 8.0, top: 18.0), +// // child: Text( +// // "Oraganization Type", +// // style: TextStyle(fontSize: 12.0), +// // ), +// // ), +// // Padding( +// // padding: const EdgeInsets.only(left: 8.0), +// // child: Text( +// // affiliation_data['org_type'], +// // style: TextStyle(fontSize: 14.0), +// // ), +// // ) +// // ], +// // ), +// // Column( +// // crossAxisAlignment: CrossAxisAlignment.start, +// // children: [ +// // Padding( +// // padding: const EdgeInsets.only( +// // left: 8.0, top: 18.0), +// // child: Text( +// // "Eng Type", +// // style: TextStyle(fontSize: 12.0), +// // ), +// // ), +// // Padding( +// // padding: const EdgeInsets.only(left: 8.0), +// // child: Text( +// // affiliation_data['emg_type'], +// // style: TextStyle(fontSize: 14.0), +// // ), +// // ) +// // ], +// // ), +// // ], +// // ); +// }, +// ), +// ), +// ], +// ), +// ); +// }, +// ); +// //); +// }, +// ); +// } // } diff --git a/pubspec.lock b/pubspec.lock index 6a56b0c..2287f41 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -521,7 +521,7 @@ packages: source: hosted version: "4.1.7" intl: - dependency: transitive + dependency: "direct main" description: name: intl sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" @@ -640,6 +640,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" + multi_dropdown: + dependency: "direct main" + description: + name: multi_dropdown + sha256: b63ff339fcc875d667f8688c8ef62853545b580dd2b6fe78b73339783268afd8 + url: "https://pub.dev" + source: hosted + version: "2.1.4" nested: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 64376be..79c97d8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -65,6 +65,8 @@ dependencies: carousel_slider: ^4.2.1 popup_menu: ^2.0.0 adoptive_calendar: ^0.1.8 + multi_dropdown: ^2.1.4 + intl: ^0.17.0 @@ -110,8 +112,8 @@ flutter: fonts: - family: SourceSerif fonts: - - asset: fonts/SourceSerif4-Regular.ttf - - asset: fonts/SourceSerif4-Italic.ttf + - asset: fonts/open-sans/OpenSans-Regular.ttf + - asset: fonts/open-sans/OpenSans-Italic.ttf style: italic # - asset: fonts/Schyler-Italic.ttf # style: italic