This commit is contained in:
poojakhatawate 2024-08-30 17:54:54 +05:30
parent 4a4245a147
commit 5072100b96
67 changed files with 92633 additions and 18712 deletions

View File

@ -1,10 +1,19 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA" />
<application <application
android:label="discover_module" android:label="Konectar Contacts"
android:name="${applicationName}" android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"> android:usesCleartextTraffic="true"
android:icon="@mipmap/launcher_icon">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"
@ -42,5 +51,20 @@
<action android:name="android.intent.action.PROCESS_TEXT"/> <action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/> <data android:mimeType="text/plain"/>
</intent> </intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="sms" />
</intent>
<!-- If your app checks for call support -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="tel" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="mailto" />
</intent>
</queries> </queries>
</manifest> </manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

300
assets/contact.json Normal file
View File

@ -0,0 +1,300 @@
[
{
"uid": 1,
"id": 1447203401,
"Salutation": "Dr.",
"First Name": "Roxana",
"Middle Name": "",
"Last Name": "Mehran",
"name": "Dr. Roxana Mehran",
"p_suffix": "MD,FACC,FACP,FCCP,FESC,FAHA,FSCAI",
"speciality": "Cardiovascular Disease (Cardiology)",
"sub_speciality": "",
"OrgName": "Icahn School of Medicine at Mount Sinai",
"Division": "",
"Title": "",
"License #": "NY: 185790",
"NPI Number": 1447203401,
"Profile Type": "Basic Profile",
"Url": "",
"Org ID": 256884,
"summarry": "• 41 Years of experience\n• Studied in New York University, St. George's University Medical School\n• Icahn School Of Medicine At Mount Sinai, Medstar Washington Hospital Center and 111 other affiliations\n• Speaker in 442 sessions in conferences\n• 909 Publications with 274 articles as lead author\n• Investigator in 23 clinical studies\n• Received payments from Abbott Laboratories, Amgen Inc., Astrazeneca Pharmaceuticals Lp and 23 other companies\n• Is Opioid Prescribing - No\n• Sanction(s): None",
"phone_no": "+12127317822",
"Fax": "+12127317822",
"email": "roxana.mehran@mountsinai.org",
"Address1": "1 Gustave L Levy Pl",
"Address2": "",
"City": "New York",
"State": "New York",
"PostalCode": 10029,
"Country": "United States",
"img_path": "",
"event_topics": "Heart Failure | Heart Diseases | Heart Failure, Systolic",
"pub_topics": "Heart Failure | Diabetes Mellitus, Type 2 | Cardiovascular Diseases",
"products_discussed": "VERQUVO | JARDIANCE | JARDIANCE",
"disease_conditions": "",
"drugs": "",
"topdata": [
{
"title": "Top Event Topics",
"name1": "Heart Failure",
"name2": "Heart Diseases",
"name3": "Heart Failure, Systolic"
},
{
"title": "Top Publication Topics",
"name1": "Heart Failure",
"name2": "Diabetes Mellitus, Type 2",
"name3": "Cardiovascular Diseases"
},
{
"title": "Top Products Discussed",
"name1": "VERQUVO",
"name2": "JARDIANCE",
"name3": "JARDIANCE"
}
]
},
{
"uid": 2,
"id": 1639100928,
"Salutation": "Dr.",
"First Name": "Javed",
"Middle Name": "",
"Last Name": "Butler",
"name": "Dr. Javed Butler",
"p_suffix": "MD,MPH,MBA,FACC,FAHA",
"speciality": "Cardiovascular Disease (Cardiology)",
"sub_speciality": "Advanced Heart Failure And Transplant Cardiology",
"OrgName": "Baylor Scott & White Health",
"Division": "",
"Title": "",
"License #": "MS: 26174,TN: 31361",
"NPI Number": 1639100928,
"Profile Type": "Basic Profile",
"Url": "",
"Org ID": 23726,
"summarry": "• 34 Years of experience\n• Studied in Emory University Goizueta Business School, Harvard T.h. Chan School Of Public Health\n• Baylor Scott & White Health, University Of Mississippi Medical Center and 38 other affiliations\n• Speaker in 209 sessions in conferences\n• 1087 Publications with 299 articles as lead author\n• Investigator in 10 clinical studies\n• Received payments from Abbott Laboratories, American Regent, Amgen Inc. and 61 other companies\n• Is Opioid Prescribing - No\n• Sanction(s): None\n• Patent(s): 1 Patents",
"phone_no": "+12148202687",
"Fax": "+16316384170",
"email": "javed.butler@bswhealth.org",
"Address1": "3434 Live Oak St",
"Address2": "",
"City": "Dallas",
"State": "Texas",
"PostalCode": 75204,
"Country": "United States",
"img_path": "https://cardio-staging.konectar.io/images/kol_images/resized/1639100928.jpeg",
"event_topics": "Atherosclerosis | Coronary Artery Disease | Computed Tomography Angiography",
"pub_topics": "Coronary Artery Disease | Atherosclerosis | Vascular Calcification",
"products_discussed": "VERQUVO | FARXIGA | Rybelsus",
"disease_conditions": "Angina Pectoris | Coronary Artery Disease | Heart Diseases",
"drugs": "Amlodipine Besylate | Metoprolol Succinate | Atorvastatin Calcium",
"topdata": [
{
"title": "Top Event Topics",
"name1": "Atherosclerosis",
"name2": "Coronary Artery Disease",
"name3": "Computed Tomography Angiography"
},
{
"title": "Top Publication Topics",
"name1": "Coronary Artery Disease",
"name2": "Atherosclerosis",
"name3": "Vascular Calcification"
},
{
"title": "Top Products Discussed",
"name1": "VERQUVO",
"name2": "FARXIGA",
"name3": "Rybelsus"
},
{
"title": "Condition Treated",
"name1": "Angina Pectoris",
"name2": "Coronary Artery Disease",
"name3": "Heart Diseases"
},
{
"title": "Drugs Prescribed",
"name1": "Amlodipine Besylate",
"name2": "Metoprolol Succinate",
"name3": "Atorvastatin Calcium"
}
]
},
{
"uid": 3,
"id": 1811967433,
"Salutation": "Dr.",
"First Name": "Matthew",
"Middle Name": "J",
"Last Name": "Budoff",
"name": "Dr. Matthew J Budoff",
"p_suffix": "MD,FACC,FAHA",
"speciality": "Cardiovascular Disease (Cardiology)",
"sub_speciality": "",
"OrgName": "UCLA Santa Monica Medical Center",
"Division": "",
"Title": "",
"License #": "CA: G72496",
"NPI Number": 1811967433,
"Profile Type": "Basic Profile",
"Url": "",
"Org ID": 20514,
"summarry": "• 34 Years of experience\n• Studied in George Washington University School Of Medicine And Health Sciences, University Of California, Riverside\n• UCLA Santa Monica Medical Center, Prairie Du Chien Memorial Hospital Association, Inc. and 32 other affiliations\n• Speaker in 179 sessions in conferences\n• 992 Publications with 306 articles as lead author\n• Investigator in 25 clinical studies\n• Received payments from Abbott Laboratories, Actelion Pharmaceuticals Us, Inc., Actelion Pharmaceuticals, Ltd and 44 other companies\n• Is Opioid Prescribing - No\n• Sanction(s): None\n• Patent(s): 1 Patents",
"phone_no": "+16083572000",
"Fax": "+13102224107",
"email": "Budoff@ucla.edu",
"Address1": "10833 Le Conte Ave",
"Address2": "",
"City": "Los Angeles",
"State": "California",
"PostalCode": 90095,
"Country": "United States",
"img_path": "https://cardio-staging.konectar.io/images/kol_images/resized/1811967433.jpeg",
"event_topics": "Tricuspid Valve Insufficiency | Transcatheter Aortic Valve Replacement | Tricuspid Valve",
"pub_topics": "Aortic Valve Stenosis | Tricuspid Valve Insufficiency | Mitral Valve Insufficiency",
"products_discussed": "(9520) IGT Devices Undivided | VersaCross Access Solution | MITRACLIP",
"disease_conditions": "",
"drugs": "",
"topdata": [
{
"title": "Top Event Topics",
"name1": "Tricuspid Valve Insufficiency",
"name2": "Transcatheter Aortic Valve Replacement",
"name3": "Tricuspid Valve"
},
{
"title": "Top Publication Topics",
"name1": "Aortic Valve Stenosis",
"name2": "Tricuspid Valve Insufficiency",
"name3": "Mitral Valve Insufficiency"
},
{
"title": "Top Products Discussed",
"name1": "(9520) IGT Devices Undivided",
"name2": "VersaCross Access Solution",
"name3": "MITRACLIP"
}
]
},
{
"uid": 4,
"id": 1497893077,
"Salutation": "Dr.",
"First Name": "Rebecca",
"Middle Name": "Tung",
"Last Name": "Hahn",
"name": "Dr. Rebecca Tung Hahn",
"p_suffix": "MD",
"speciality": "Cardiovascular Disease (Cardiology)",
"sub_speciality": "Internal Medicine",
"OrgName": "Columbia University Irving Medical Center",
"Division": "",
"Title": "",
"License #": "NY: 163707",
"NPI Number": 1497893077,
"Profile Type": "Basic Profile",
"Url": "",
"Org ID": 22909,
"summarry": "• 40 Years of experience\n• Studied in Washington University School Of Medicine In St. Louis, Harvard University\n• Columbia University Irving Medical Center, Newyork-presbyterian Queens Hospital and 23 other affiliations\n• Speaker in 549 sessions in conferences\n• 427 Publications with 136 articles as lead author\n• Investigator in 7 clinical studies\n• Received payments from Abbott Laboratories, Baylis Medical Company Inc, Boston Scientific Corporation and 5 other companies\n• Is Opioid Prescribing - No\n• Sanction(s): None",
"phone_no": "+12123420444",
"Fax": "",
"email": "rth2@cumc.columbia.edu",
"Address1": "161 Fort Washington Avenue",
"Address2": "",
"City": "New York",
"State": "New York",
"PostalCode": 10032,
"Country": "United States",
"img_path": "https://cardio-staging.konectar.io/images/kol_images/resized/1497893077.jpeg",
"event_topics": "",
"pub_topics": "",
"products_discussed": "",
"disease_conditions": "",
"drugs": "",
"topdata": [
{
"title": "Top Event Topics",
"name1": "Tricuspid Valve Insufficiency",
"name2": "Transcatheter Aortic Valve Replacement",
"name3": "Tricuspid Valve"
},
{
"title": "Top Publication Topics",
"name1": "Aortic Valve Stenosis",
"name2": "Tricuspid Valve Insufficiency",
"name3": "Mitral Valve Insufficiency"
}
]
},
{
"uid": 5,
"id": 1841382421,
"Salutation": "Dr.",
"First Name": "Andrea",
"Middle Name": "",
"Last Name": "Natale",
"name": "Dr. Andrea Natale",
"p_suffix": "MD",
"speciality": "Clinical Cardiac Electrophysiology",
"sub_speciality": "Cardiovascular Disease (Cardiology), Internal Medicine",
"OrgName": "Texas Cardiac Arrhythmia Institute",
"Division": "",
"Title": "",
"License #": "CA: C50726,TX: M9533,OH: 35076775N",
"NPI Number": 1841382421,
"Profile Type": "Basic Profile",
"Url": "",
"Org ID": 24328,
"summarry": "• 39 Years of experience\n• Studied in Università Degli Studi Di Firenze Facoltà Di Medicina E Chirurgia\n• Texas Cardiac Arrhythmia Institute, Golden State Providers, A Medical Corporation and 110 other affiliations\n• Speaker in 1091 sessions in conferences\n• 542 Publications with 213 articles as lead author\n• Investigator in 80 clinical studies\n• Received payments from Abbott Laboratories, Acclarent, Inc, Acutus Medical, Inc. and 32 other companies\n• Is Opioid Prescribing - No\n• Sanction(s): None\n• Patent(s): 1 Patents",
"phone_no": "+15128073150",
"Fax": "+15124587879",
"email": "andrea.natale@hcahealthcare.com",
"Address1": "3000 N. IH-35",
"Address2": "Suite 720",
"City": "Austin",
"State": "Texas",
"PostalCode": 78705,
"Country": "United States",
"img_path": "",
"event_topics": "Ablation Techniques | Atrial Fibrillation | Catheter Ablation",
"pub_topics": "Atrial Fibrillation | Recurrence | Tachycardia, Ventricular",
"products_discussed": "CARTO 3 | WATCHMAN Access System | ENSITE PRECISION",
"disease_conditions": "Angina Pectoris | Coronary Artery Disease | Hypertension",
"drugs": "Eliquis | Xarelto | Furosemide",
"topdata": [
{
"title": "Top Event Topics",
"name1": "Ablation Techniques",
"name2": "Atrial Fibrillation",
"name3": "Catheter Ablation"
},
{
"title": "Top Publication Topics",
"name1": "CARTO 3",
"name2": "WATCHMAN Access System",
"name3": "ENSITE PRECISION"
},
{
"title": "Top Products Discussed",
"name1": "CARTO 3",
"name2": "WATCHMAN Access System",
"name3": "RybeENSITE PRECISIONlsus"
},
{
"title": "Condition Treated",
"name1": "Angina Pectoris",
"name2": "Coronary Artery Disease",
"name3": "Hypertension"
},
{
"title": "Drugs Prescribed",
"name1": "Eliquis",
"name2": "Xarelto",
"name3": "Furosemide"
}
]
}
]

57395
assets/section.json Normal file

File diff suppressed because one or more lines are too long

View File

@ -45,5 +45,13 @@
<true/> <true/>
<key>UIApplicationSupportsIndirectInputEvents</key> <key>UIApplicationSupportsIndirectInputEvents</key>
<true/> <true/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>sms</string>
<string>tel</string>
<string>mailto</string>
</array>
</dict> </dict>
</plist> </plist>

View File

@ -1,546 +1,230 @@
// // import 'package:flutter/material.dart';
// // class MyHomePage11 extends StatelessWidget {
// // @override
// // Widget build(BuildContext context) {
// // return MaterialApp(
// // title: 'Dynamic App Bar',
// // theme: ThemeData(
// // primarySwatch: Colors.blue,
// // ),
// // home: DynamicAppBar(),
// // );
// // }
// // }
// // class DynamicAppBar extends StatefulWidget {
// // @override
// // _DynamicAppBarState createState() => _DynamicAppBarState();
// // }
// // class _DynamicAppBarState extends State<DynamicAppBar> {
// // final ScrollController _scrollController = ScrollController();
// // double _listHeight = 0.0; // Variable to store list height
// // @override
// // void initState() {
// // super.initState();
// // _scrollController.addListener(() {
// // // Check if the list has changed and update the height if necessary
// // if (_scrollController.hasClients) {
// // // Trigger rebuild to recalculate height
// // WidgetsBinding.instance?.addPostFrameCallback((_) {
// // final double newHeight = _scrollController.position.maxScrollExtent;
// // if (newHeight != _listHeight) {
// // setState(() {
// // _listHeight = newHeight;
// // });
// // }
// // });
// // }
// // });
// // }
// // @override
// // Widget build(BuildContext context) {
// // final double appBarHeight = 250.0; // Default height for the app bar
// // final double adjustedHeight = _listHeight > 500.0
// // ? appBarHeight
// // : appBarHeight - 50.0; // Adjust height based on list size
// // return Scaffold(
// // body: CustomScrollView(
// // controller: _scrollController,
// // slivers: <Widget>[
// // SliverAppBar(
// // expandedHeight: adjustedHeight,
// // flexibleSpace: FlexibleSpaceBar(
// // centerTitle: true,
// // collapseMode: CollapseMode.parallax,
// // title: Text(
// // 'Dynamic App Bar',
// // style: TextStyle(
// // color: Colors.white,
// // fontSize:
// // MediaQuery.of(context).size.width < 600 ? 16.0 : 22.0,
// // ),
// // ),
// // background: ColoredBox(
// // color: const Color.fromARGB(255, 246, 248, 252),
// // child: Column(
// // mainAxisAlignment: MainAxisAlignment.center,
// // children: [
// // Padding(
// // padding: EdgeInsets.all(8.0),
// // child: Icon(
// // Icons.person,
// // size: MediaQuery.of(context).size.width < 600 ? 48 : 72,
// // color: Colors.grey,
// // ),
// // ),
// // Text(
// // 'Dr. John Doe',
// // style: TextStyle(
// // fontSize: MediaQuery.of(context).size.width < 600
// // ? 20.0
// // : 28.0,
// // fontWeight: FontWeight.bold,
// // color: Colors.black,
// // ),
// // ),
// // SizedBox(height: 8.0),
// // Text(
// // 'Specialist',
// // style: TextStyle(
// // fontSize: MediaQuery.of(context).size.width < 600
// // ? 14.0
// // : 18.0,
// // color: Colors.black,
// // ),
// // ),
// // ],
// // ),
// // ),
// // ),
// // floating: false,
// // pinned: true,
// // snap: false,
// // ),
// // SliverList(
// // delegate: SliverChildBuilderDelegate(
// // (BuildContext context, int index) {
// // return ListTile(
// // title: Text('Item #$index'),
// // );
// // },
// // //childCount: 50, // Number of items in the list
// // ),
// // ),
// // ],
// // ),
// // );
// // }
// // }
// import 'package:flutter/material.dart'; // import 'package:flutter/material.dart';
// class MyHomePage11 extends StatefulWidget { // class ModalBottomSheetDemo extends StatelessWidget {
// @override // const ModalBottomSheetDemo({Key? key}) : super(key: key);
// _MyHomePageState createState() => _MyHomePageState();
// }
// class _MyHomePageState extends State<MyHomePage11>
// with SingleTickerProviderStateMixin {
// late TabController _tabController;
// final ScrollController _scrollController = ScrollController();
// final double adjustedHeight = 250.0; // Adjust as needed
// @override
// void initState() {
// super.initState();
// _tabController = TabController(length: 3, vsync: this);
// }
// @override
// void dispose() {
// _tabController.dispose();
// super.dispose();
// }
// @override // @override
// Widget build(BuildContext context) { // Widget build(BuildContext context) {
// return Scaffold( // return Center(
// body: CustomScrollView( // child: ElevatedButton(
// controller: _scrollController, // child: const Text('showModalBottomSheet'),
// slivers: <Widget>[ // onPressed: () {
// SliverAppBar( // // when raised button is pressed
// automaticallyImplyLeading: false, // // we display showModalBottomSheet
// expandedHeight: adjustedHeight, // showModalBottomSheet<dynamic>(
// flexibleSpace: FlexibleSpaceBar( // isScrollControlled: true,
// centerTitle: true, // // context and builder are
// collapseMode: CollapseMode.parallax, // // required properties in this widget
// title: Text( // context: context,
// 'Dynamic App Bar', // builder: (BuildContext context) {
// style: TextStyle( // // we set up a container inside which
// color: Colors.white, // // we create center column and display text
// fontSize:
// MediaQuery.of(context).size.width < 600 ? 16.0 : 22.0, // // Returning SizedBox instead of a Container
// ), // return Container(
// ), // width: double.infinity,
// background: ColoredBox( // child: Wrap(
// color: const Color.fromARGB(255, 246, 248, 252), // // mainAxisSize: MainAxisSize.max,
// children: [
// Expanded(
// child: SingleChildScrollView(
// child: Column( // child: Column(
// mainAxisAlignment: MainAxisAlignment.center, // //mainAxisAlignment: MainAxisAlignment.center,
// children: <Widget>[
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// Text('GeeksforGeeks'),
// // ListView(
// // children: [
// // ...List.generate(
// // 10,
// // (index) => Text('GeeksforGeeks'),
// // )
// // ],
// // )
// ],
// ),
// ),
// ),
// ],
// ),
// );
// },
// );
// },
// ),
// );
// }
// }
// import 'package:flutter/material.dart';
// // Define your number of items
// const int numberOfItems = 5; // Replace with the desired number
// class MyCarousel extends StatelessWidget {
// @override
// Widget build(BuildContext context) {
// return Scaffold(
// body: ExpandableCarousel(
// options: CarouselOptions(
// showIndicator: false,
// slideIndicator: CircularWaveSlideIndicator(
// alignment: Alignment.bottomCenter,
// currentIndicatorColor: Colors.blue, // Replace with your color
// indicatorBackgroundColor: Colors.grey,
// ),
// autoPlay: true,
// autoPlayInterval: const Duration(seconds: 2),
// ),
// items: List.generate(numberOfItems, (index) {
// return Builder(
// builder: (BuildContext context) {
// return Center(
// child: Padding(
// padding: const EdgeInsets.all(8.0),
// child: Card(
// margin: EdgeInsets.all(1.0),
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10),
// ),
// child: Container(
// decoration: BoxDecoration(
// color: Colors.blueAccent, // Replace with your gradient or color
// borderRadius: BorderRadius.circular(10),
// ),
// child: Padding(
// padding: EdgeInsets.all(10.0),
// child: Column(
// mainAxisSize: MainAxisSize.min,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [ // children: [
// Padding(
// padding: EdgeInsets.all(8.0),
// child: Icon(
// Icons.person,
// size: MediaQuery.of(context).size.width < 600 ? 48 : 72,
// color: Colors.grey,
// ),
// ),
// Text( // Text(
// 'Dr. John Doe', // index == 0
// ? "Top Event Topics"
// : index == 1
// ? "Top Publication Topics"
// : index == 2
// ? "Top Products Discussed"
// : index == 3
// ? "Drugs Prescribed"
// : "Condition Treated",
// style: TextStyle( // style: TextStyle(
// fontSize: MediaQuery.of(context).size.width < 600 // fontSize: 16.0,
// ? 20.0
// : 28.0,
// fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
// color: Colors.black, // color: Colors.white,
// ), // ),
// ), // ),
// SizedBox(height: 8.0), // const SizedBox(height: 10.0),
// Text( // // Example content, you can replace this with your dynamic data
// 'Specialist', // Row(
// style: TextStyle(
// fontSize: MediaQuery.of(context).size.width < 600
// ? 14.0
// : 18.0,
// color: Colors.black,
// ),
// ),
// Text(
// 'Specialist',
// style: TextStyle(
// fontSize: MediaQuery.of(context).size.width < 600
// ? 14.0
// : 18.0,
// color: Colors.black,
// ),
// ),
// Text(
// 'Specialist',
// style: TextStyle(
// fontSize: MediaQuery.of(context).size.width < 600
// ? 14.0
// : 18.0,
// color: Colors.black,
// ),
// ),
// Text(
// 'Specialist',
// style: TextStyle(
// fontSize: MediaQuery.of(context).size.width < 600
// ? 14.0
// : 18.0,
// color: Colors.black,
// ),
// ),
// Text(
// 'Specialist',
// style: TextStyle(
// fontSize: MediaQuery.of(context).size.width < 600
// ? 14.0
// : 18.0,
// color: Colors.black,
// ),
// ),
// Text(
// 'Specialist',
// style: TextStyle(
// fontSize: MediaQuery.of(context).size.width < 600
// ? 14.0
// : 18.0,
// color: Colors.black,
// ),
// ),
// Text(
// 'Specialist',
// style: TextStyle(
// fontSize: MediaQuery.of(context).size.width < 600
// ? 14.0
// : 18.0,
// color: Colors.black,
// ),
// ),
// Text(
// 'Specialist',
// style: TextStyle(
// fontSize: MediaQuery.of(context).size.width < 600
// ? 14.0
// : 18.0,
// color: Colors.black,
// ),
// ),
// Text(
// 'Specialist',
// style: TextStyle(
// fontSize: MediaQuery.of(context).size.width < 600
// ? 14.0
// : 18.0,
// color: Colors.black,
// ),
// ),
// Text(
// 'Specialist',
// style: TextStyle(
// fontSize: MediaQuery.of(context).size.width < 600
// ? 14.0
// : 18.0,
// color: Colors.black,
// ),
// ),
// Text(
// 'Specialist',
// style: TextStyle(
// fontSize: MediaQuery.of(context).size.width < 600
// ? 14.0
// : 18.0,
// color: Colors.black,
// ),
// ),
// Text(
// 'Specialist',
// style: TextStyle(
// fontSize: MediaQuery.of(context).size.width < 600
// ? 14.0
// : 18.0,
// color: Colors.black,
// ),
// ),
// ],
// ),
// ),
// ),
// floating: false,
// pinned: true,
// snap: false,
// bottom: TabBar(
// controller: _tabController,
// tabs: [
// Tab(text: 'Tab 1'),
// Tab(text: 'Tab 2'),
// Tab(text: 'Tab 3'),
// ],
// ),
// ),
// SliverFillRemaining(
// child: TabBarView(
// controller: _tabController,
// children: [ // children: [
// ListView.builder( // Container(
// itemCount: 50, // decoration: BoxDecoration(
// itemBuilder: (context, index) { // color: Colors.grey[800], // Replace with your color
// return ListTile( // borderRadius: BorderRadius.circular(10),
// title: Text('Item #$index in Tab 1'),
// );
// },
// ), // ),
// ListView.builder( // child: Padding(
// itemCount: 50, // padding: const EdgeInsets.all(5.0),
// itemBuilder: (context, index) { // child: Row(
// return ListTile( // children: [
// title: Text('Item #$index in Tab 2'), // Icon(
// ); // Icons.circle,
// }, // color: Colors.white,
// size: 13.0,
// ),
// SizedBox(width: 5.0),
// Text(
// "Item $index",
// style: TextStyle(
// fontSize: 14.0,
// color: Colors.white,
// ),
// ),
// SizedBox(width: 5.0),
// Container(
// decoration: BoxDecoration(
// color: Colors.black, // Replace with your color
// borderRadius: BorderRadius.circular(5),
// ),
// child: Padding(
// padding: const EdgeInsets.all(1.0),
// child: Text(
// "(378)",
// style: TextStyle(
// fontSize: 14.0,
// color: Colors.white,
// ), // ),
// ListView.builder(
// itemCount: 50,
// itemBuilder: (context, index) {
// return ListTile(
// title: Text('Item #$index in Tab 3'),
// );
// },
// ), // ),
// ],
// ), // ),
// ), // ),
// ], // ],
// ), // ),
// ),
// ),
// ],
// ),
// ],
// ),
// ),
// ),
// ),
// ),
// );
// },
// );
// }).toList(),
// ),
// ); // );
// } // }
// } // }
import 'package:flutter/material.dart';
import 'package:flutter_carousel_widget/flutter_carousel_widget.dart'; // Make sure you have this package
class Constants {
static const cardtext = Colors.blue; // Example color
static const cardtextdark = Colors.black; // Example color
static const k2color1 = Colors.blue; // Example color
}
class MyCarousel extends StatelessWidget {
@override
Widget build(BuildContext context) {
// Define different gradients
final List<Gradient> gradients = [
LinearGradient(colors: [Colors.red, Colors.orange]),
LinearGradient(colors: [Colors.green, Colors.yellow]),
LinearGradient(colors: [Colors.blue, Colors.purple]),
LinearGradient(colors: [Colors.pink, Colors.redAccent]),
LinearGradient(colors: [Colors.teal, Colors.blueAccent]),
];
return Directionality(
textDirection: TextDirection.ltr,
child: SizedBox(
// height: MediaQuery.sizeOf(context).height * 0.21,
child: ExpandableCarousel(
options: CarouselOptions(
slideIndicator: CircularWaveSlideIndicator(
alignment: Alignment.bottomCenter,
currentIndicatorColor: Constants.k2color1,
indicatorBackgroundColor: Colors.grey),
autoPlay: true,
autoPlayInterval: const Duration(seconds: 2),
),
items: [1, 2, 3, 4, 5].asMap().entries.map((entry) {
int index = entry.key;
return Builder(
builder: (BuildContext context) {
return Center(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Flexible(
child: Card(
margin: EdgeInsets.all(1.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
child: Container(
decoration: BoxDecoration(
gradient: gradients[
index % gradients.length], // Apply gradient
borderRadius: BorderRadius.circular(10),
),
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),
),
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(1.0),
child: Text(
"378",
style: TextStyle(
color: Colors.white),
),
),
),
],
),
),
),
],
),
SizedBox(height: 5),
Row(
children: [
Container(
decoration: BoxDecoration(
color: Constants.cardtext,
borderRadius: BorderRadius.circular(5),
),
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: Padding(
padding:
const EdgeInsets.all(1.0),
child: Text(
"378",
style: TextStyle(
color: Colors.white),
),
),
),
],
),
),
),
],
),
SizedBox(height: 5),
Row(
children: [
Container(
decoration: BoxDecoration(
color: Constants.cardtext,
borderRadius: BorderRadius.circular(5),
),
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: Padding(
padding:
const EdgeInsets.all(1.0),
child: Text(
"378",
style: TextStyle(
color: Colors.white),
),
),
),
],
),
),
),
],
),
],
),
),
),
),
),
),
);
},
);
}).toList(),
),
),
);
}
}

View File

@ -1,260 +1,25 @@
import 'dart:ui'; import 'dart:ui';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class Constants { class Constants {
//static Color k2color = Color.fromARGB(255, 0, 71, 132);
static Color k2color = Color.fromARGB(255, 0, 71, 132); static Color k2color = Color.fromARGB(255, 0, 71, 132);
static Color k2color1 = Color.fromARGB(255, 0, 71, 132); static Color k2color1 = Color.fromARGB(255, 0, 71, 132);
// static Color cardtext = Color.fromARGB(255, 247, 247, 250);
static Color cardtext = Colors.transparent; static Color cardtext = Colors.transparent;
static Color cardtextdark = Colors.transparent; static Color cardtextdark = Colors.transparent;
// static Color cardtextdark = const Color.fromARGB(255, 156, 154, 154);
static const Color bgcolor = Color(0xFFF2F3F8); static const Color bgcolor = Color(0xFFF2F3F8);
static Color bgcolor2 = const Color.fromARGB(255, 0, 112, 184); static Color bgcolor2 = const Color.fromARGB(255, 0, 112, 184);
static Color k2color11 = Colors.white; static Color k2color11 = Colors.white;
//static const url = "http://192.168.21.50:8082/api"; static final Future<String> response =
static const url = 'http://192.168.2.143:8084/api'; rootBundle.loadString('assets/section.json');
static const Color tabbgColor = Color.fromARGB(255, 0, 112, 184);
static const url = "http://192.168.21.50:8084/api";
//static const url = 'http://192.168.2.143:8085/api';
//static const url = 'http://192.168.153.50:8082/api'; //static const url = 'http://192.168.153.50:8082/api';
} }
// 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(
// 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 /
// 5,
// 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 <b> therapeutic </b> 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>[
// 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,
// ),

View File

@ -12,6 +12,29 @@ class HiveFunctions {
_contactbox.add(data); _contactbox.add(data);
} }
static List getAllUsers11() {
final data = _contactbox.keys.map((key) {
final value = _contactbox.get(key);
print("Checking_Name : $value");
return {
"inid": value["inid"],
"id": value["id"],
"name": value["name"],
"org": value["org"],
"addr": value["addr"],
"phone": value["phone"],
"phone_no": value["phone_no"],
"email": value["email"],
"summarry": value["summarry"],
"speciality": value["speciality"],
"sub_speciality": value["sub_speciality"],
"img_path": value["img_path"]
};
}).toList();
return data.reversed.toList();
}
static List getAllUsers() { static List getAllUsers() {
final data = _contactbox.keys.map((key) { final data = _contactbox.keys.map((key) {
final value = _contactbox.get(key); final value = _contactbox.get(key);
@ -32,11 +55,12 @@ class HiveFunctions {
"license_no": value["license_no"], "license_no": value["license_no"],
"p_suffix": value["p_suffix"], "p_suffix": value["p_suffix"],
"speciality": value["speciality"], "speciality": value["speciality"],
"sub_speciality": value["sub_speciality"] "sub_speciality": value["sub_speciality"],
"img_path": value["img_path"]
}; };
}).toList(); }).toList();
return data.reversed.toList(); return data;
} }
static List getindexUsers() { static List getindexUsers() {
@ -59,27 +83,107 @@ class HiveFunctions {
return data.reversed.toList(); return data.reversed.toList();
} }
//static deleteUser112(row) {}
static addno(int selectedRowId) { static deleteUser11(id) {
// final box1 = Hive.box("mycontact"); print("Hive_id: $id");
final value1 = _contactbox.delete(id);
print("SelectedStoredvaluessss: $selectedRowId"); print("Getted_valueee: $value1");
box1.add(selectedRowId);
} }
static getno() { static Future<void> deleteUser(int selectedremoveIndic) async {
// final box1 = Hive.box("mycontact"); print("storeddelData_id: ${selectedremoveIndic}");
return box1.values; // final userId = "some_user_id"; // Replace with the actual ID you want to query
final value = _contactbox.get(selectedremoveIndic - 1);
print("ValueeeGet: $value");
if (value == null) {
final value1 = _contactbox.get(selectedremoveIndic);
print("Valueee11Get: $value1");
print("UniqueId11 : ${value["inid"]}");
} else {
final value1 = _contactbox.get(2);
print("Valueee11Get: $value1");
print("UniqueId111 : ${value["inid"]}");
} }
// print(await _contactbox.getAt(selectedremoveIndic));
// int data = selectedremoveIndic;
// final storeddelData = _contactbox.get(data);
// print("storeddelData_iss: $storeddelData");
// if (storeddelData != null) {
// print("I_amNotnull ${storeddelData["id"]}");
// _contactbox.deleteAt(storeddelData["id"]);
//}
// _hiveBox.delete(dataDel.id);
// _contactbox.deleteAt(selectedremoveIndic);
// final data = _contactbox.keys.map((_contactbox) {
// final value = _contactbox.get(selectedremoveIndic);
// print("Del_valuee_is: ${value}");
// });
}
// void deleteUser(String userId) {
// var _contactbox = Hive.box('contactBox');
// // Find the key corresponding to the userId
// for (var key in _contactbox.keys) {
// final value = _contactbox.get(key);
// if (value["id"] == userId) {
// _contactbox.delete(key);
// print("Deleted user with id: $userId");
// break; // Exit the loop once the item is deleted
// }
// }
// }
// static void deleteUser(int selectedremoveIndic) {
// print("I_Am: selectedremoveIndic: ${selectedremoveIndic}");
// // final data = _contactbox.keys.map((key) {
// final value = _contactbox.get(selectedremoveIndic);
// _contactbox.deleteAt(selectedremoveIndic);
// // if (value["id"] == selectedremoveIndic) {
// // print("I_Am: selectedremoveIndicnew: ${value["name"]}");
// // }
// // });
// }
// static addno(int selectedRowId) {
// // final box1 = Hive.box("mycontact");
// print("SelectedStoredvaluessss: $selectedRowId");
// box1.add(selectedRowId);
// }
// static removeno(int selectedRowId) {
// // final box1 = Hive.box("mycontact");
// print("SelectedStoredvaluessss: $selectedRowId");
// box1.deleteAt(selectedRowId);
// }
// static getno() {
// // final box1 = Hive.box("mycontact");
// return box1.values;
// }
static storehcpdata(Map data) { static storehcpdata(Map data) {
apihcpdata.add(data); apihcpdata.add(data);
} }
static gethcpdata() { static gethcpdata() {
return apihcpdata.values; return apihcpdata.values.toList();
} }
static Future<List> getindexUser(String text) async { static Future<List> getindexUser(String text) async {
@ -112,4 +216,27 @@ class HiveFunctions {
// print("Check_data_is: $data"); // print("Check_data_is: $data");
return value.toList(); return value.toList();
} }
static getuser(int selectedremoveIndic) {
final data = _contactbox.keys.map((selectedremoveIndic) {
final value = _contactbox.get(selectedremoveIndic);
print("Checking_Name111 : $value");
return {
"inid": value["inid"],
"id": value["id"],
"name": value["name"],
"org": value["org"],
"addr": value["addr"],
"phone": value["phone"],
"phone_no": value["phone_no"],
"email": value["email"],
"summarry": value["summarry"],
"speciality": value["speciality"],
"sub_speciality": value["sub_speciality"],
"img_path": value["img_path"]
};
}).toList();
return data;
}
} }

View File

@ -1,12 +1,22 @@
import 'package:discover_module/check.dart'; import 'package:discover_module/check.dart';
import 'package:discover_module/provider_class/affiliationsprovider.dart'; import 'package:discover_module/provider_class/affiliationsprovider.dart';
import 'package:discover_module/provider_class/award_provider.dart';
import 'package:discover_module/provider_class/certificate_provider.dart';
import 'package:discover_module/provider_class/educationprovider.dart';
import 'package:discover_module/provider_class/email_provider.dart';
import 'package:discover_module/provider_class/engagement_provider.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/events_provider.dart';
import 'package:discover_module/provider_class/hcp%20_provider.dart'; import 'package:discover_module/provider_class/hcp%20_provider.dart';
import 'package:discover_module/provider_class/location_provider.dart';
import 'package:discover_module/provider_class/medicalinsightprovider.dart'; import 'package:discover_module/provider_class/medicalinsightprovider.dart';
import 'package:discover_module/provider_class/nih_provider.dart';
import 'package:discover_module/provider_class/patent_provider.dart';
import 'package:discover_module/provider_class/phoneno_provider.dart';
import 'package:discover_module/provider_class/procedureprovider.dart';
import 'package:discover_module/provider_class/publications_provider.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/single_hcpprovider.dart';
import 'package:discover_module/provider_class/speaker_provider.dart'; import 'package:discover_module/provider_class/speaker_provider.dart';
import 'package:discover_module/provider_class/training_provider.dart';
import 'package:discover_module/provider_class/trials_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/contacts.dart';
import 'package:discover_module/ui_screen/discover.dart'; import 'package:discover_module/ui_screen/discover.dart';
@ -78,6 +88,16 @@ Future<void> main() async {
ChangeNotifierProvider(create: (_) => MediacalInsightProvider()), ChangeNotifierProvider(create: (_) => MediacalInsightProvider()),
ChangeNotifierProvider(create: (_) => SpekerEvalutionProvider()), ChangeNotifierProvider(create: (_) => SpekerEvalutionProvider()),
ChangeNotifierProvider(create: (_) => EnagagementProvider()), ChangeNotifierProvider(create: (_) => EnagagementProvider()),
ChangeNotifierProvider(create: (_) => LocationProvider()),
ChangeNotifierProvider(create: (_) => PhonenoProvider()),
ChangeNotifierProvider(create: (_) => EmailProvider()),
ChangeNotifierProvider(create: (_) => PatentProvider()),
ChangeNotifierProvider(create: (_) => TrainigProvider()),
ChangeNotifierProvider(create: (_) => EducationProvider()),
ChangeNotifierProvider(create: (_) => AwardProvider()),
ChangeNotifierProvider(create: (_) => CertificateProvider()),
ChangeNotifierProvider(create: (_) => NIHGrantsProvider()),
ChangeNotifierProvider(create: (_) => ProcedureProvider()),
//ChangeNotifierProvider(create: (_) => ConfigDataProvider()), //ChangeNotifierProvider(create: (_) => ConfigDataProvider()),
ChangeNotifierProvider<HiveDataRepository>( ChangeNotifierProvider<HiveDataRepository>(
@ -87,7 +107,7 @@ Future<void> main() async {
child: MyApp(), child: MyApp(),
// child: MaterialApp( // child: MaterialApp(
// home: MyHomePage11(), // home: MyWidget(),
// ), // ),
)); ));
} }
@ -118,8 +138,10 @@ class _MyAppState extends State<MyApp> {
fontFamily: 'OpenSans', fontFamily: 'OpenSans',
appBarTheme: const AppBarTheme( appBarTheme: const AppBarTheme(
backgroundColor: Color.fromARGB(255, 0, 71, 132), backgroundColor: Color.fromARGB(255, 0, 71, 132),
foregroundColor: Colors.white //here you can give the text color elevation: 0.0,
)), foregroundColor: Colors.white, //here you can give the text color
),
),
home: Contacts1(), home: Contacts1(),
// home: const MyHomePage(title: 'Discover Module'), // home: const MyHomePage(title: 'Discover Module'),
// home: const MedicalInsight(), // home: const MedicalInsight(),

View File

@ -0,0 +1,103 @@
class Publication {
int id;
int userId;
String articleTitle;
String journalName;
DateTime date;
String author;
DateTime? createdAt;
DateTime? updatedAt;
Publication({
required this.id,
required this.userId,
required this.articleTitle,
required this.journalName,
required this.date,
required this.author,
this.createdAt,
this.updatedAt,
});
// Convert a Publication to a Map
Map<String, dynamic> toMap() {
return {
'id': id,
'user_id': userId,
'article_title': articleTitle,
'journal_name': journalName,
'date': date.toIso8601String(),
'author': author,
'created_at': createdAt?.toIso8601String(),
'updated_at': updatedAt?.toIso8601String(),
};
}
// Create a Publication from a Map
factory Publication.fromMap(Map<String, dynamic> map) {
return Publication(
id: map['id'],
userId: map['user_id'],
articleTitle: map['article_title'],
journalName: map['journal_name'],
date: DateTime.parse(map['date']),
author: map['author'],
createdAt:
map['created_at'] != null ? DateTime.parse(map['created_at']) : null,
updatedAt:
map['updated_at'] != null ? DateTime.parse(map['updated_at']) : null,
);
}
}
class Affiliation {
int id;
int userId;
String articleTitle;
String journalName;
DateTime date;
String author;
DateTime? createdAt;
DateTime? updatedAt;
Affiliation({
required this.id,
required this.userId,
required this.articleTitle,
required this.journalName,
required this.date,
required this.author,
this.createdAt,
this.updatedAt,
});
// Convert an Affiliation to a Map
Map<String, dynamic> toMap() {
return {
'id': id,
'user_id': userId,
'article_title': articleTitle,
'journal_name': journalName,
'date': date.toIso8601String(),
'author': author,
'created_at': createdAt?.toIso8601String(),
'updated_at': updatedAt?.toIso8601String(),
};
}
// Create an Affiliation from a Map
factory Affiliation.fromMap(Map<String, dynamic> map) {
return Affiliation(
id: map['id'],
userId: map['user_id'],
articleTitle: map['article_title'],
journalName: map['journal_name'],
date: DateTime.parse(map['date']),
author: map['author'],
createdAt:
map['created_at'] != null ? DateTime.parse(map['created_at']) : null,
updatedAt:
map['updated_at'] != null ? DateTime.parse(map['updated_at']) : null,
);
}
}

View File

@ -1,4 +1,7 @@
import 'dart:convert';
import 'package:discover_module/model_class/affiliations.dart'; import 'package:discover_module/model_class/affiliations.dart';
import 'package:discover_module/model_class/section.dart';
import 'package:discover_module/service.dart/service.dart'; import 'package:discover_module/service.dart/service.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -11,12 +14,18 @@ class AffiliationsProvider extends ChangeNotifier {
List get adddta => affiliations1; List get adddta => affiliations1;
List get affiliationsAll => allaffiliations1; List get affiliationsAll => allaffiliations1;
getAffiliationsdata() async { getAffiliationsdata(text) async {
print("Affiliations_is: "); print("Affiliations_is: ${text}");
final affdata = await affapi.getaffiliationsdata(); final affdata = await affapi.getaffiliationsdata(text);
print("Affiliations_is after:$affdata "); print("Affiliations_is after:$affdata ");
// final Map<String, dynamic> jsonData = json.decode(affdata);
// // final List<dynamic> affiliations = jsonData['Affiliations'];
// print("Affiliations_is return:$jsonData ");
affiliations1 = affdata; affiliations1 = affdata;
// print("Affiliations_is return:$affiliations1 ");
notifyListeners(); notifyListeners();
} }

View File

@ -0,0 +1,16 @@
import 'package:discover_module/service.dart/service.dart';
import 'package:flutter/cupertino.dart';
class AwardProvider extends ChangeNotifier {
final apicall = Callapi();
List awalist = [];
List get awardlist => awalist;
awainfo(text) async {
print("Location_Text");
final email_result = await apicall.getawarddata(text);
awalist = email_result;
notifyListeners();
}
}

View File

@ -0,0 +1,16 @@
import 'package:discover_module/service.dart/service.dart';
import 'package:flutter/cupertino.dart';
class CertificateProvider extends ChangeNotifier {
final apicall = Callapi();
List cerlist = [];
List get certificatelist => cerlist;
certificateinfo(text) async {
print("Location_Text");
final email_result = await apicall.getcerlistdata(text);
cerlist = email_result;
notifyListeners();
}
}

View File

@ -0,0 +1,16 @@
import 'package:discover_module/service.dart/service.dart';
import 'package:flutter/cupertino.dart';
class EducationProvider extends ChangeNotifier {
final apicall = Callapi();
List edulist = [];
List get educationlist => edulist;
eduinfo(text) async {
print("Location_Text");
final email_result = await apicall.getedulistdata(text);
edulist = email_result;
notifyListeners();
}
}

View File

@ -0,0 +1,16 @@
import 'package:discover_module/service.dart/service.dart';
import 'package:flutter/cupertino.dart';
class EmailProvider extends ChangeNotifier {
final apicall = Callapi();
List emaillist = [];
List get emailkollist => emaillist;
emailinfo(text) async {
print("Location_Text");
final email_result = await apicall.getemaildata(text);
emaillist = email_result;
notifyListeners();
}
}

View File

@ -12,8 +12,8 @@ class EventProvider extends ChangeNotifier {
List get allEventsList => alleventlist; List get allEventsList => alleventlist;
geteventdata() async { geteventdata(text) async {
final events = await apicall.geteventsdata(); final events = await apicall.geteventsdata(text);
eventlist = events; eventlist = events;
notifyListeners(); notifyListeners();

View File

@ -1,3 +1,4 @@
import 'package:discover_module/hive_fun.dart';
import 'package:discover_module/service.dart/service.dart'; import 'package:discover_module/service.dart/service.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
@ -16,6 +17,14 @@ class hcpProvider extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
// getHCPHive() async {
// final jsondata = await apicall.getallhcpdata();
// _list = jsondata;
// notifyListeners();
// }
List searchHCP(String query) { List searchHCP(String query) {
if (query.isEmpty) { if (query.isEmpty) {
return List.from(_list); // Return full list if query is empty return List.from(_list); // Return full list if query is empty
@ -24,10 +33,15 @@ class hcpProvider extends ChangeNotifier {
// .where( // .where(
// (hcp) => hcp['name'].toLowerCase().contains(query.toLowerCase())) // (hcp) => hcp['name'].toLowerCase().contains(query.toLowerCase()))
// .toList(); // .toList();
print("JsonIssList: $_list");
print("queryIssList: $query");
return _list return _list
.where((hcp) => .where((hcp) =>
hcp['name'].toLowerCase().contains(query.toLowerCase()) || hcp['name'].toLowerCase().contains(query.toLowerCase()) ||
// (hcp['speciality'].toLowerCase().contains(query.toLowerCase()) ??
// hcp['spl'].toLowerCase().contains(query.toLowerCase())) ||
hcp['speciality'].toLowerCase().contains(query.toLowerCase()) || hcp['speciality'].toLowerCase().contains(query.toLowerCase()) ||
hcp['addr'].toLowerCase().contains(query.toLowerCase())) hcp['addr'].toLowerCase().contains(query.toLowerCase()))
.toList(); .toList();
@ -41,4 +55,15 @@ class hcpProvider extends ChangeNotifier {
// }).toList(); // }).toList();
} }
} }
getHCPProviderHive() async {
final jsondata = await HiveFunctions.gethcpdata();
print("JsonDtaa: ${jsondata}");
_list = jsondata;
print("JsonDtaaList: $_list");
notifyListeners();
//print("Get_hcp_dataaaL ${HiveFunctions.gethcpdata()}");
}
} }

View File

@ -0,0 +1,16 @@
import 'package:discover_module/service.dart/service.dart';
import 'package:flutter/cupertino.dart';
class LocationProvider extends ChangeNotifier {
final apicall = Callapi();
List loclist = [];
List get locationlist => loclist;
locationinfo(text) async {
print("Location_Text");
final publication_result = await apicall.getlocationsdata(text);
loclist = publication_result;
notifyListeners();
}
}

View File

@ -0,0 +1,16 @@
import 'package:discover_module/service.dart/service.dart';
import 'package:flutter/cupertino.dart';
class NIHGrantsProvider extends ChangeNotifier {
final apicall = Callapi();
List nihlist = [];
List get nihgrantslist => nihlist;
nihinfo(text) async {
print("Location_Text");
final nih_result = await apicall.getnihdata(text);
nihlist = nih_result;
notifyListeners();
}
}

View File

@ -0,0 +1,16 @@
import 'package:discover_module/service.dart/service.dart';
import 'package:flutter/cupertino.dart';
class PatentProvider extends ChangeNotifier {
final apicall = Callapi();
List palist = [];
List get patentlist => palist;
patentinfo(text) async {
print("Location_Text");
final patent_result = await apicall.getpatentdata(text);
palist = patent_result;
notifyListeners();
}
}

View File

@ -0,0 +1,16 @@
import 'package:discover_module/service.dart/service.dart';
import 'package:flutter/cupertino.dart';
class PhonenoProvider extends ChangeNotifier {
final apicall = Callapi();
List phonelist = [];
List get phonenolist => phonelist;
phoneinfo(text) async {
print("Location_Text");
final phone_result = await apicall.getphonedata(text);
phonelist = phone_result;
notifyListeners();
}
}

View File

@ -0,0 +1,16 @@
import 'package:discover_module/service.dart/service.dart';
import 'package:flutter/cupertino.dart';
class ProcedureProvider extends ChangeNotifier {
final apicall = Callapi();
List procedurelist = [];
List get prolist => procedurelist;
proinfo(text) async {
print("Location_Text");
final nih_result = await apicall.getprodata(text);
procedurelist = nih_result;
notifyListeners();
}
}

View File

@ -11,8 +11,8 @@ class PublicatioProvider extends ChangeNotifier {
List get allpublicationlist => allpublist; List get allpublicationlist => allpublist;
publicatininfo() async { publicatininfo(text) async {
final publication_result = await apicall.getpublicationsdata(); final publication_result = await apicall.getpublicationsdata(text);
publist = publication_result; publist = publication_result;
notifyListeners(); notifyListeners();
} }

View File

@ -0,0 +1,16 @@
import 'package:discover_module/service.dart/service.dart';
import 'package:flutter/cupertino.dart';
class TrainigProvider extends ChangeNotifier {
final apicall = Callapi();
List tralist = [];
List get traininglist => tralist;
traininginfo(text) async {
print("Location_Text");
final email_result = await apicall.gettrainingdata(text);
tralist = email_result;
notifyListeners();
}
}

View File

@ -8,8 +8,8 @@ class TrialsProvider extends ChangeNotifier {
List get trialsinfo => trials; List get trialsinfo => trials;
trialsdata() async { trialsdata(text) async {
final jsonres = await callapi.getalltrials(); final jsonres = await callapi.getalltrials(text);
trials = jsonres; trials = jsonres;
notifyListeners(); notifyListeners();
} }

View File

@ -3,52 +3,53 @@ import 'dart:convert';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:discover_module/constants.dart'; import 'package:discover_module/constants.dart';
import 'package:discover_module/hive_fun.dart'; import 'package:discover_module/hive_fun.dart';
import 'package:flutter/services.dart';
import 'package:hive_flutter/hive_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart';
const String curl = Constants.url; const String curl = Constants.url;
class Callapi { class Callapi {
getallhcpdata() async { getallhcpdata() async {
// const url = 'http://127.0.0.1:8000/api/users';
// const url = 'http://192.168.2.143:8082/api/users';
// const url = 'http://192.168.172.50:8082/api/users';
// const url = 'http://192.168.172.50:8081/api/users';
const url = '$curl/users'; const url = '$curl/users';
final response = await Dio().get(url); // final response = await Dio().get(url);
final jsonresponse = response.data; // final jsonresponse = response.data;
final apihcpdata = Hive.box("hcpdata"); // final apihcpdata = Hive.box("hcpdata");
// if (apihcpdata.isNotEmpty) {
// apihcpdata.clear(); // if (apihcpdata.isEmpty) {
// print("alldata_is: , ${jsonresponse} ${jsonresponse.length}");
// for (int i = 0; i < jsonresponse.length; i++) {
// print("hcp:data_is: , ${jsonresponse[i]['email']}");
// HiveFunctions.storehcpdata({
// "id": jsonresponse[i]['id'],
// "name": jsonresponse[i]['name'],
// "email": jsonresponse[i]['email'],
// "summarry": jsonresponse[i]['summarry'],
// "addr": jsonresponse[i]['addr'],
// "license_no": jsonresponse[i]['license_no'],
// "p_suffix": jsonresponse[i]['p_suffix'],
// "speciality": jsonresponse[i]['speciality'],
// "sub_speciality": jsonresponse[i]['sub_speciality'],
// "phone_no": jsonresponse[i]['phone_no'],
// "rank": jsonresponse[i]['rank'],
// "score": jsonresponse[i]['score'],
// "events_count": jsonresponse[i]['events_count'],
// "affiliations_count": jsonresponse[i]['affiliations_count'],
// "publications_count": jsonresponse[i]['publications_count'],
// "img_path": jsonresponse[i]["img_path"],
// });
// }
// } // }
if (apihcpdata.isEmpty) {
print("alldata_is: , ${jsonresponse} ${jsonresponse.length}");
for (int i = 0; i < jsonresponse.length; i++) {
print("hcp:data_is: , ${jsonresponse[i]['email']}");
HiveFunctions.storehcpdata({ // return jsonresponse;
"id": jsonresponse[i]['id'],
"name": jsonresponse[i]['name'],
"email": jsonresponse[i]['email'],
"sumry": jsonresponse[i]['summarry'],
"addr": jsonresponse[i]['addr'],
"licno": jsonresponse[i]['license_no'],
"suffix": jsonresponse[i]['p_suffix'],
"spl": jsonresponse[i]['speciality'],
"sub_sp": jsonresponse[i]['sub_speciality'],
"phone_no": jsonresponse[i]['phone_no'],
"rank": jsonresponse[i]['rank'],
"score": jsonresponse[i]['score'],
"events_count": jsonresponse[i]['events_count'],
"affiliations_count": jsonresponse[i]['affiliations_count'],
"publications_count": jsonresponse[i]['publications_count'],
});
}
}
return jsonresponse; print("OfflineJsonnnn");
final String response = await rootBundle.loadString('assets/contact.json');
final data = await json.decode(response);
print("Data_isss: $data");
return data;
} }
getsinglehcpdata() async { getsinglehcpdata() async {
@ -66,42 +67,90 @@ class Callapi {
return jsonresponse1; return jsonresponse1;
} }
getaffiliationsdata() async { getaffiliationsdata(id) async {
// const url = 'http://192.168.2.143:8082/api/affiliations'; print("Affiliation_iddd: ${id}");
// const url = 'http://192.168.172.50:8081/api/affiliations'; // const url = '$curl/affiliations';
const url = '$curl/affiliations';
final affiliationres = await Dio().get(url); // final affiliationres = await Dio().get(url);
final jsonresponse2 = affiliationres.data.take(2).toList(); // final jsonresponse2 = affiliationres.data.take(2).toList();
return jsonresponse2; // return jsonresponse2;
// final String response = await rootBundle.loadString('assets/section.json');
// final String response = await rootBundle.loadString('assets/section.json');
final String response = await Constants.response;
final Affiliation = await json.decode(response);
/////////////////////////////////////////////////////
final List<Map<String, dynamic>> filteredData = Affiliation['Affiliations']
.where((item) => item['user_id'] == id)
.cast<Map<String, dynamic>>()
.toList();
print("filteredDatafilteredDatafilteredData: ${filteredData}");
// Print filtered data
final List<dynamic> affiliations = Affiliation['Affiliations'];
print("Data_isss: $affiliations");
return filteredData;
} }
getpublicationsdata() async { getpublicationsdata(id) async {
//const url = 'http://192.168.2.143:8082/api/publications'; print("getpublicationsdata_iddd: ${id}");
// const url = 'http://192.168.172.50:8081/api/publications';
const url = '$curl/publications';
final affiliationres = await Dio().get(url); // const url = '$curl/publications';
final jsonresponse2 = affiliationres.data.take(2).toList();
return jsonresponse2; // final affiliationres = await Dio().get(url);
// final jsonresponse2 = affiliationres.data.take(2).toList();
// return jsonresponse2;
final String response = await Constants.response;
final Publications = await json.decode(response);
final List<dynamic> publication = Publications['Publications'];
/////////////////////////////////////////////////////
final List<Map<String, dynamic>> filteredData = Publications['Publications']
.where((item) => item['user_id'] == id)
.cast<Map<String, dynamic>>()
.toList();
print("filteredDatafilteredDatafilteredData111: ${filteredData}");
// Print filtered data
print("publicationData_isss: $publication");
return filteredData;
} }
geteventsdata() async { geteventsdata(id) async {
// const url = 'http://192.168.2.143:8082/api/events'; // const url = '$curl/events';
// const url = 'http://192.168.172.50:8081/api/events';
const url = '$curl/events';
final events = await Dio().get(url); // final events = await Dio().get(url);
// // final jsonEvent = events.data;
// final jsonEvent = events.data; // final jsonEvent = events.data;
final jsonEvent = events.data; // print("All_event: $jsonEvent");
print("All_event: $jsonEvent"); // final jsonEvent1 = events.data.take(2).toList();
final jsonEvent1 = events.data.take(2).toList();
print("only few : $jsonEvent1"); // print("only few : $jsonEvent1");
return jsonEvent1; // return jsonEvent1;
final String response = await Constants.response;
final Events = await json.decode(response);
final List<dynamic> event = Events['Events'];
/////////////////////////////////////////////////////
final List<Map<String, dynamic>> filteredData = Events['Events']
.where((item) => item['user_id'] == id)
.cast<Map<String, dynamic>>()
.toList();
print("filteredDatafilteredDatafilteredData111: ${filteredData}");
// Print filtered data
print("eventData_isss: $event");
return filteredData;
} }
getallaffiliationsdata() async { getallaffiliationsdata() async {
@ -143,14 +192,30 @@ class Callapi {
return jsonEvent; return jsonEvent;
} }
getalltrials() async { getalltrials(id) async {
// const url = 'http://192.168.2.143:8082/api/trails'; print("TrialsssssAPIIIIIIIIII: $id");
const url = '$curl/trails'; // const url = '$curl/trails';
final trials = await Dio().get(url); // final trials = await Dio().get(url);
final jsontrials = trials.data; // final jsontrials = trials.data;
print("All_trialsss: $jsontrials"); // print("All_trialsss: $jsontrials");
return jsontrials; // return jsontrials;
final String response = await Constants.response;
final Trials = await json.decode(response);
final List<dynamic> trials = Trials['Trials'];
/////////////////////////////////////////////////////
final List<Map<String, dynamic>> filteredData = Trials['Trials']
.where((item) => item['user_id'] == id)
.cast<Map<String, dynamic>>()
.toList();
print("TrialsssssAPIIIIIIIIIIilteredDatafilteredData111: ${filteredData}");
// Print filtered data
print("trialsData_isss: $trials");
return filteredData;
} }
getallMedicalInsightdata() async { getallMedicalInsightdata() async {
@ -168,22 +233,218 @@ class Callapi {
} }
getSpeakerdata() async { getSpeakerdata() async {
const url = '$curl/speaker'; // const url = '$curl/speaker';
final response = await Dio().get(url); // final response = await Dio().get(url);
final jsonresponse = response.data; // final jsonresponse = response.data;
return jsonresponse; // return jsonresponse;
final String response = await Constants.response;
final Speaker = await json.decode(response);
final List<dynamic> speaker = Speaker['Speaker'];
print("speakerData_isss: $speaker");
return speaker;
} }
getEngdata() async { getEngdata() async {
const url = '$curl/engagement'; // const url = '$curl/engagement';
final response = await Dio().get(url); // final response = await Dio().get(url);
final jsonresponse = response.data; // final jsonresponse = response.data;
return jsonresponse; // return jsonresponse;
// }
final String response = await Constants.response;
final Engagement = await json.decode(response);
final List<dynamic> eng = Engagement['Engagement'];
print("engData_isss: $eng");
return eng;
}
getlocationsdata(id) async {
final String response = await Constants.response;
final Location = await json.decode(response);
final List<dynamic> event = Location['Location'];
/////////////////////////////////////////////////////
final List<Map<String, dynamic>> filteredData = Location['Location']
.where((item) => item['user_id'] == id)
.cast<Map<String, dynamic>>()
.toList();
print("LocationfilteredDatafilteredData111: ${filteredData}");
// Print filtered data
print("LocationeventData_isss: $event");
return filteredData;
}
getphonedata(id) async {
final String response = await Constants.response;
final PhoneNo = await json.decode(response);
final List<dynamic> event = PhoneNo['Location'];
/////////////////////////////////////////////////////
final List<Map<String, dynamic>> filteredData = PhoneNo['PhoneNo']
.where((item) => item['user_id'] == id)
.cast<Map<String, dynamic>>()
.toList();
print("PhoneNofilteredDatafilteredData111: ${filteredData}");
// Print filtered data
print("PhoneNoeventData_isss: $event");
return filteredData;
}
getemaildata(id) async {
final String response = await Constants.response;
final Email = await json.decode(response);
final List<dynamic> event = Email['Email'];
/////////////////////////////////////////////////////
final List<Map<String, dynamic>> filteredData = Email['Email']
.where((item) => item['user_id'] == id)
.cast<Map<String, dynamic>>()
.toList();
print("EmaililteredDatafilteredData111: ${filteredData}");
// Print filtered data
print("EmaileventData_isss: $event");
return filteredData;
}
getpatentdata(id) async {
final String response = await Constants.response;
final Patent = await json.decode(response);
final List<dynamic> event = Patent['Patent'];
/////////////////////////////////////////////////////
final List<Map<String, dynamic>> filteredData = Patent['Patent']
.where((item) => item['user_id'] == id)
.cast<Map<String, dynamic>>()
.toList();
print("PatenteredDatafilteredData111: ${filteredData}");
// Print filtered data
print("PatenttData_isss: $event");
return filteredData;
}
getcerlistdata(id) async {
final String response = await Constants.response;
final Certificate = await json.decode(response);
final List<dynamic> event = Certificate['Certificate'];
/////////////////////////////////////////////////////
final List<Map<String, dynamic>> filteredData = Certificate['Certificate']
.where((item) => item['user_id'] == id)
.cast<Map<String, dynamic>>()
.toList();
print("PatenteredDatafilteredData111: ${filteredData}");
// Print filtered data
print("PatenttData_isss: $event");
return filteredData;
}
getedulistdata(id) async {
final String response = await Constants.response;
final Education = await json.decode(response);
final List<dynamic> event = Education['Education'];
/////////////////////////////////////////////////////
final List<Map<String, dynamic>> filteredData = Education['Education']
.where((item) => item['user_id'] == id)
.cast<Map<String, dynamic>>()
.toList();
print("PatenteredDatafilteredData111: ${filteredData}");
// Print filtered data
print("PatenttData_isss: $event");
return filteredData;
}
getawarddata(id) async {
final String response = await Constants.response;
final Awards = await json.decode(response);
final List<dynamic> event = Awards['Awards'];
/////////////////////////////////////////////////////
final List<Map<String, dynamic>> filteredData = Awards['Awards']
.where((item) => item['user_id'] == id)
.cast<Map<String, dynamic>>()
.toList();
print("PatenteredDatafilteredData111: ${filteredData}");
// Print filtered data
print("PatenttData_isss: $event");
return filteredData;
}
gettrainingdata(id) async {
final String response = await Constants.response;
final Training = await json.decode(response);
final List<dynamic> event = Training['Training'];
/////////////////////////////////////////////////////
final List<Map<String, dynamic>> filteredData = Training['Training']
.where((item) => item['user_id'] == id)
.cast<Map<String, dynamic>>()
.toList();
print("PatenteredDatafilteredData111: ${filteredData}");
// Print filtered data
print("PatenttData_isss: $event");
return filteredData;
}
getnihdata(id) async {
final String response = await Constants.response;
final Nih = await json.decode(response);
final List<dynamic> event = Nih['NIHGrants'];
/////////////////////////////////////////////////////
final List<Map<String, dynamic>> filteredData = Nih['NIHGrants']
.where((item) => item['user_id'] == id)
.cast<Map<String, dynamic>>()
.toList();
print("PatenteredDatafilteredData111: ${filteredData}");
// Print filtered data
print("PatenttData_isss: $event");
return filteredData;
}
getprodata(id) async {
final String response = await Constants.response;
final Pro = await json.decode(response);
final List<dynamic> event = Pro['Procedure'];
/////////////////////////////////////////////////////
final List<Map<String, dynamic>> filteredData = Pro['Procedure']
.where((item) => item['user_id'] == id)
.cast<Map<String, dynamic>>()
.toList();
print("PatenteredDatafilteredData111: ${filteredData}");
// Print filtered data
print("PatenttData_isss: $event");
return filteredData;
} }
} }

View File

@ -0,0 +1,969 @@
import 'package:discover_module/constants.dart';
import 'package:discover_module/custom_widget/text.dart';
import 'package:discover_module/provider_class/affiliationsprovider.dart';
import 'package:discover_module/provider_class/events_provider.dart';
import 'package:discover_module/provider_class/publications_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/events_data.dart';
import 'package:discover_module/ui_screen/publication_data.dart';
import 'package:discover_module/ui_screen/trials_show_more.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class Activities extends StatefulWidget {
//Activities({super.key, required text});
Activities({required this.text, Key? key}) : super(key: key);
final int text;
@override
State<Activities> createState() => _ActivitiesState();
}
class _ActivitiesState extends State<Activities> {
bool _isExpanded = false;
List affiliation_data = [];
List publication_data = [];
List event_data = [];
List trial_data = [];
List medinsightData = [];
List speaker = [];
List eng = [];
@override
void initState() {
// TODO: implement initState
super.initState();
getaffiliations();
}
getaffiliations() async {
var affiliations =
Provider.of<AffiliationsProvider>(context, listen: false);
await affiliations.getAffiliationsdata(widget.text);
final affilist = affiliations.adddta;
print("CheckingAfflist: $affilist");
var publication = Provider.of<PublicatioProvider>(context, listen: false);
await publication.publicatininfo(widget.text);
final publist = publication.publicationlist;
var events = Provider.of<EventProvider>(context, listen: false);
await events.geteventdata(widget.text);
final eventlist = events.EventsList;
//var form = Provider.of<ViewInteractionProvider>(context, listen: false);
// form.savedList;
var trials = Provider.of<TrialsProvider>(context, listen: false);
await trials.trialsdata(widget.text);
final trialslist = trials.trialsinfo;
// var med = Provider.of<MediacalInsightProvider>(context, listen: false);
// await med.medicalinsightdata();
// final medlist = med.trialsinfo;
// var speaker11 =
// Provider.of<SpekerEvalutionProvider>(context, listen: false);
// await speaker11.getspeakerdata();
// final speakerlist = speaker11.speaker;
// var engtype = Provider.of<EnagagementProvider>(context, listen: false);
// await engtype.getengagementdata();
// final engtypelist = engtype.engagementdata;
setState(() {
affiliation_data = affilist;
publication_data = publist;
event_data = eventlist;
// viewformData = form.savedList;
trial_data = trialslist;
// medinsightData = medlist;
// speaker = speakerlist;
// eng = engtypelist;
});
print("Affiliations_data_isNewOff: $affiliation_data");
print("Publication_data_isNewOff: $publication_data");
// print("trialslist_data_is: $trialslist");
//final affiliationsss = affiliation_data['Affiliations'] as List<Map<String, dynamic>>;
}
@override
Widget build(BuildContext context) {
return Center(
child: ListView(children: [
affiliation_data.length != 0
? ListTileTheme(
dense: true,
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.k2color11,
child: ExpansionTile(
initiallyExpanded: false,
maintainState: true,
onExpansionChanged: (bool expanded) async {
print("HeyyyPooja");
setState(() {
_isExpanded = expanded;
});
},
backgroundColor: Constants.k2color11,
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:
"(${affiliation_data.length.toString()})",
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.take(2).length,
(index) => DataRow(
onSelectChanged: (value) {
// =======> Use onSelectChanged for tab
print(
"message11 ${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: () {
print("Passing_Id_isss: ${widget.text}");
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => AffiliationsData(
text: widget.text)));
},
child: Text(
'Show More',
style: TextStyle(color: Constants.k2color),
),
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
),
),
)
]),
),
),
)
: Container(), // adds spacing between the text and image
publication_data.length != 0
? ListTileTheme(
dense: true,
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.k2color11,
child: ExpansionTile(
initiallyExpanded: false,
maintainState: true,
// backgroundColor: Colors.white,
// collapsedBackgroundColor: Color(0xFF2b9af3),
onExpansionChanged: (bool expanded) {
setState(() {
_isExpanded = expanded;
});
},
backgroundColor: Constants.k2color11,
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: "Publications",
txtcolor: Colors.black,
fontweight: FontWeight.normal,
txtfont: 17.0),
const SizedBox(
width: 8.0,
),
Text1(
title:
"(${publication_data.length.toString()})",
txtcolor: Colors.black,
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('Article 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.take(2).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(
text: widget.text)));
},
child: Text(
'Show More',
style: TextStyle(color: Constants.k2color),
),
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
),
),
)
]),
),
),
)
: Container(), // adds spacing between the text and image
event_data.length != 0
? ListTileTheme(
dense: true,
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.k2color11,
child: ExpansionTile(
initiallyExpanded: false,
maintainState: true,
onExpansionChanged: (bool expanded) {
setState(() {
_isExpanded = expanded;
});
},
backgroundColor: Constants.k2color11,
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: "(${event_data.length.toString()})",
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('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.take(2).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(
text: widget.text,
)));
},
child: Text(
'Show More',
style: TextStyle(color: Constants.k2color),
),
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
),
),
)
]),
),
),
)
: Container(), // adds spacing between the text and image
trial_data.length != 0
? ListTileTheme(
dense: true,
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.k2color11,
child: ExpansionTile(
initiallyExpanded: false,
maintainState: true,
onExpansionChanged: (bool expanded) {
setState(() {
_isExpanded = expanded;
});
},
backgroundColor: Constants.k2color11,
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: "(${trial_data.length.toString()})",
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('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.take(2).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: (_) => TrialsShowmore(
text: widget.text)));
},
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
child: Text(
'Show More',
style: TextStyle(color: Constants.k2color),
),
),
),
),
)
]),
),
),
)
: Container(), // adds spacing between the text and image
]),
);
}
void bottomshet(affiliation_data) {
// print("Aff_index_data: ${affiliation_data}");
showModalBottomSheet<void>(
// 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,
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),
// )
// ],
// ),
SizedBox(
height: 18.0,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(18.0),
child: Text(
affiliation_data['org_name'],
softWrap: true,
maxLines: 4,
style: TextStyle(
fontSize: 16.0, color: Colors.black),
),
),
),
],
),
SizedBox(
height: 18.0,
),
Divider(),
SizedBox(
height: 8.0,
),
affiliation_data['dept'] != ""
? 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: 14.0,
color: Colors.grey[700]),
),
)
],
)
: Container(),
affiliation_data['role'] != ""
? 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: 14.0,
color: Colors.grey[700]),
),
)
],
)
: Container(),
affiliation_data['time_frame'] != ""
? Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(
left: 18.0, top: 18.0),
child: Text(
"Time Frame".toString(),
style: TextStyle(fontSize: 13.0),
),
),
Padding(
padding:
const EdgeInsets.only(left: 18.0),
child: Text(
affiliation_data['time_frame']
.toString(),
style: TextStyle(
fontSize: 14.0,
color: Colors.grey[700]),
),
)
],
)
: Container(),
affiliation_data['org_type'] != ""
? 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: 14.0,
color: Colors.grey[700]),
),
)
],
)
: Container(),
affiliation_data['emg_type'] != ""
? 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: 14.0,
color: Colors.grey[700]),
),
)
],
)
: Container(),
],
);
},
),
),
],
),
);
},
);
//);
},
);
}
}

View File

@ -2,9 +2,14 @@ import 'package:discover_module/provider_class/affiliationsprovider.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:discover_module/ui_screen/new_new_profile.dart';
class AffiliationsData extends StatefulWidget { class AffiliationsData extends StatefulWidget {
const AffiliationsData({super.key}); final int text;
//PublicationsData(text, {super.key});
// AffiliationsData({required this.text}) : super(key: key);
AffiliationsData({required this.text, Key? key}) : super(key: key);
@override @override
State<AffiliationsData> createState() => _AffiliationsDataState(); State<AffiliationsData> createState() => _AffiliationsDataState();
@ -17,15 +22,18 @@ class _AffiliationsDataState extends State<AffiliationsData> {
// TODO: implement initState // TODO: implement initState
super.initState(); super.initState();
print("Checkingg_passing_is: ${widget.text}");
affdata(); affdata();
} }
affdata() async { affdata() async {
final affprovider = final affprovider =
Provider.of<AffiliationsProvider>(context, listen: false); Provider.of<AffiliationsProvider>(context, listen: false);
await affprovider.getAllAffiliationsdata(); await affprovider.getAffiliationsdata(widget.text);
final affdata = affprovider.affiliationsAll; // await affprovider.getAffiliationsdata(1447203401);
final affdata = affprovider.adddta;
setState(() { setState(() {
hcpaffiliations = affdata; hcpaffiliations = affdata;
}); });
@ -40,37 +48,48 @@ class _AffiliationsDataState extends State<AffiliationsData> {
body: Scrollbar( body: Scrollbar(
child: SingleChildScrollView( child: SingleChildScrollView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Container( child: Container(
constraints: constraints:
BoxConstraints(minWidth: MediaQuery.of(context).size.width), BoxConstraints(minWidth: MediaQuery.of(context).size.width),
color: Colors.white, color: Colors.white,
child: DataTable( child: DataTable(
showCheckboxColumn: false,
columns: const [ columns: const [
DataColumn(label: Expanded(child: Text('sl no'))), //DataColumn(label: Expanded(child: Text('sl no'))),
DataColumn( DataColumn(
label: Expanded( label: Expanded(
child: Text('Organization Name'), child: Text('Organization Name'),
)), )),
DataColumn( DataColumn(
label: label: Expanded(
Expanded(child: Text('Department', softWrap: true))), child: Text('Department', softWrap: true))),
DataColumn( DataColumn(
label: Expanded(child: Text('Role', softWrap: true))), label: Expanded(child: Text('Role', softWrap: true))),
DataColumn(
label: Expanded(
child: Text('Time Frame', softWrap: true))),
DataColumn( DataColumn(
label: label:
Expanded(child: Text('Time Frame', softWrap: true))), Expanded(child: Text('Org Type', softWrap: true))),
DataColumn( DataColumn(
label: Expanded(child: Text('Org Type', softWrap: true))), label:
DataColumn( Expanded(child: Text('Eng Type', softWrap: true))),
label: Expanded(child: Text('Eng Type', softWrap: true))),
// Add more columns as needed // Add more columns as needed
], ],
rows: List.generate( rows: List.generate(
hcpaffiliations.length, hcpaffiliations.length,
(index) => DataRow( (index) => DataRow(
onSelectChanged: (value) {
// =======> Use onSelectChanged for tab
print("message11 ${hcpaffiliations[index]}");
bottomshet(hcpaffiliations[index]);
},
cells: [ cells: [
DataCell(Text(hcpaffiliations[index]['id'].toString(), // DataCell(Text(hcpaffiliations[index]['id'].toString(),
softWrap: true)), // softWrap: true)),
DataCell(Text( DataCell(Text(
hcpaffiliations[index]['org_name'].toString(), hcpaffiliations[index]['org_name'].toString(),
softWrap: true)), softWrap: true)),
@ -94,6 +113,278 @@ class _AffiliationsDataState extends State<AffiliationsData> {
), ),
), ),
), ),
),
)); ));
} }
void bottomshet(affiliation_data) {
// print("Aff_index_data: ${affiliation_data}");
showModalBottomSheet<void>(
// 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,
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),
// )
// ],
// ),
SizedBox(
height: 18.0,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(18.0),
child: Text(
affiliation_data['org_name'],
softWrap: true,
maxLines: 4,
style: TextStyle(
fontSize: 16.0, color: Colors.black),
),
),
),
// Padding(
// padding: const EdgeInsets.only(left: 18.0),
// child:
// GestureDetector(
// onTap: () async {
// final ConfigDataProvider
// configDataProvider =
// ConfigDataProvider();
// await configDataProvider
// .initConfigUIDataEng();
// final provider =
// Provider.of<InteractionProvider>(
// 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'],
// softWrap: true,
// maxLines: 4,
// 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'].toString(),
style: TextStyle(
fontSize: 14.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: 14.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'].toString(),
style: TextStyle(
fontSize: 14.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: 14.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: 14.0,
color: Colors.grey[700]),
),
)
],
),
],
);
},
),
),
],
),
);
},
);
//);
},
);
}
} }

View File

@ -0,0 +1,108 @@
import 'package:discover_module/provider_class/award_provider.dart';
import 'package:discover_module/ui_screen/bottom_sheet.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class AwardShowMore extends StatefulWidget {
AwardShowMore({required this.text, Key? key}) : super(key: key);
final int text;
@override
State<AwardShowMore> createState() => _AwardShowMoreState();
}
class _AwardShowMoreState extends State<AwardShowMore> {
List award = [];
@override
void initState() {
// TODO: implement initState
super.initState();
affdata();
}
affdata() async {
var awa = Provider.of<AwardProvider>(context, listen: false);
await awa.awainfo(widget.text);
final awa1 = awa.awardlist;
setState(() {
award = awa1;
});
print("locationList: ${award}");
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Awards'),
),
body: Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Container(
constraints:
BoxConstraints(minWidth: MediaQuery.of(context).size.width),
color: Colors.white,
child: DataTable(
showCheckboxColumn: false,
columns: const [
DataColumn(
label: Expanded(
child: Text('Education Type',
style: TextStyle(fontWeight: FontWeight.w600),
softWrap: true),
)),
DataColumn(
label: Expanded(
child: Text('Institution Name',
style:
TextStyle(fontWeight: FontWeight.w600)))),
],
rows: List.generate(
award.length,
(index) => DataRow(
onSelectChanged: (value) {
print("message ${award[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(award[index]);
},
);
},
cells: [
DataCell(Text(award[index]['Education Type'].toString(),
softWrap: true)),
DataCell(Text(
award[index]['Institution Name'].toString(),
softWrap: true)),
],
),
),
),
),
),
),
));
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,194 @@
import 'package:flutter/material.dart';
class BottomSheetHelper {
static void showBottomSheet(BuildContext context, dynamic affiliation_data) {
showModalBottomSheet<void>(
context: context,
useRootNavigator: true,
isScrollControlled: false,
enableDrag: true,
useSafeArea: true,
constraints: const BoxConstraints(
maxWidth: double.infinity,
),
builder: (BuildContext context) {
// Replace this with your desired bottom sheet content
return DraggableScrollableSheet(
expand: false,
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: [
SizedBox(
height: 18.0,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(18.0),
child: Text(
affiliation_data['org_name'],
softWrap: true,
maxLines: 4,
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'].toString(),
style: TextStyle(
fontSize: 14.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: 14.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'].toString(),
style: TextStyle(
fontSize: 14.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: 14.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: 14.0,
color: Colors.grey[700]),
),
)
],
),
],
);
},
),
),
],
),
);
},
);
},
);
}
}

View File

@ -0,0 +1,215 @@
// import 'package:flutter/cupertino.dart';
// class bsheetDynamicheight extends StatefulWidget {
// const bsheetDynamicheight(this.publicationdata, {super.key});
// final publicationdata;
// @override
// State<bsheetDynamicheight> createState() => _bsheetDynamicheightState();
// }
// class _bsheetDynamicheightState extends State<bsheetDynamicheight> {
// 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 Container(
// child: showModalBottomSheet(
// isScrollControlled: true,
// // context and builder are
// // required properties in this widget
// context: context,
// builder: (BuildContext context) {
// // we set up a container inside which
// // we create center column and display text
// // Returning SizedBox instead of a Container
// return Container(
// width: double.infinity,
// child: Wrap(
// // mainAxisSize: MainAxisSize.max,
// children: [
// Expanded(
// child: SingleChildScrollView(
// child: Column(
// //mainAxisAlignment: MainAxisAlignment.center,
// children: <Widget>[
// // Text(
// // 'GeeksforGeeks'),
// // Text(
// // 'GeeksforGeeks'),
// // ListView(
// // children: [
// ...List.generate(
// 20,
// (index) => Text('GeeksforGeeks $index'),
// )
// ],
// // )
// // ],
// ),
// ),
// ),
// ],
// ),
// );
// },
// ),
// );
// }
// }

View File

@ -0,0 +1,109 @@
import 'package:discover_module/provider_class/certificate_provider.dart';
import 'package:discover_module/ui_screen/bottom_sheet.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class CerShowMore extends StatefulWidget {
CerShowMore({required this.text, Key? key}) : super(key: key);
final int text;
@override
State<CerShowMore> createState() => _CerShowMoreState();
}
class _CerShowMoreState extends State<CerShowMore> {
List certificate = [];
@override
void initState() {
// TODO: implement initState
super.initState();
affdata();
}
affdata() async {
var cer = Provider.of<CertificateProvider>(context, listen: false);
await cer.certificateinfo(widget.text);
final cer1 = cer.certificatelist;
setState(() {
certificate = cer1;
});
print("locationList: ${certificate}");
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Certificates'),
),
body: Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Container(
constraints:
BoxConstraints(minWidth: MediaQuery.of(context).size.width),
color: Colors.white,
child: DataTable(
showCheckboxColumn: false,
columns: const [
DataColumn(
label: Expanded(
child: Text('Education Type',
style: TextStyle(fontWeight: FontWeight.w600),
softWrap: true),
)),
DataColumn(
label: Expanded(
child: Text('Institution Name',
style:
TextStyle(fontWeight: FontWeight.w600)))),
],
rows: List.generate(
certificate.length,
(index) => DataRow(
onSelectChanged: (value) {
print("message ${certificate[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(certificate[index]);
},
);
},
cells: [
DataCell(Text(
certificate[index]['Education Type'].toString(),
softWrap: true)),
DataCell(Text(
certificate[index]['Institution Name'].toString(),
softWrap: true)),
],
),
),
),
),
),
),
));
}
}

View File

@ -1,240 +1,195 @@
// import 'package:discover_module/hive_fun.dart'; // // import 'package:discover_module/hive_fun.dart';
// import 'package:discover_module/ui_screen/interactionform/NewtworkConnectivity.dart'; // // import 'package:discover_module/ui_screen/interactionform/NewtworkConnectivity.dart';
// import 'package:discover_module/provider_class/hcp%20_provider.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/profile.dart';
// import 'package:discover_module/ui_screen/ranking.dart'; // // import 'package:discover_module/ui_screen/ranking.dart';
// import 'package:flutter/cupertino.dart'; // // import 'package:flutter/cupertino.dart';
// import 'package:flutter/material.dart'; // // import 'package:flutter/material.dart';
// import 'package:flutter/services.dart'; // // import 'package:flutter/services.dart';
// import 'package:flutter/widgets.dart'; // // import 'package:flutter/widgets.dart';
// import 'package:flutter_profile_picture/flutter_profile_picture.dart'; // // import 'package:flutter_profile_picture/flutter_profile_picture.dart';
// import 'package:hive_flutter/hive_flutter.dart'; // // import 'package:hive_flutter/hive_flutter.dart';
// import 'package:provider/provider.dart'; // // import 'package:provider/provider.dart';
// class Contacts extends StatefulWidget { // // class Contacts extends StatefulWidget {
// const Contacts({super.key}); // // const Contacts({super.key});
// @override // // @override
// State<Contacts> createState() => _ContactsState(); // // State<Contacts> createState() => _ContactsState();
// } // // }
// class _ContactsState extends State<Contacts> { // // class _ContactsState extends State<Contacts> {
// // final _contactbox = Hive.box('mycontact'); // // // final _contactbox = Hive.box('mycontact');
// static final _contactbox = Hive.box("mycontact"); // // static final _contactbox = Hive.box("mycontact");
// bool _switchValue = false; // // bool _switchValue = false;
// bool isOnline2 = false; // // bool isOnline2 = false;
// // List<dynamic> alldata = _contactbox.values.toList(); // // // List<dynamic> alldata = _contactbox.values.toList();
// @override // // @override
// void initState() { // // void initState() {
// // TODO: implement initState // // // TODO: implement initState
// super.initState(); // // super.initState();
// setupConnectivityListener(); // // setupConnectivityListener();
// getcall(); // // getcall();
// } // // }
// NetworkConnectivity networkConnectivity = NetworkConnectivity(); // // NetworkConnectivity networkConnectivity = NetworkConnectivity();
// Future<void> setupConnectivityListener() async { // // Future<void> setupConnectivityListener() async {
// while (true) { // // while (true) {
// bool isOnline = await networkConnectivity.isInternetAvailable(); // // bool isOnline = await networkConnectivity.isInternetAvailable();
// print('Internetcontact available: $isOnline'); // // print('Internetcontact available: $isOnline');
// // Perform actions based on connectivity status // // // Perform actions based on connectivity status
// await Future.delayed(Duration(seconds: 10)); // // await Future.delayed(Duration(seconds: 10));
// setState(() { // // setState(() {
// isOnline2 = isOnline; // // isOnline2 = isOnline;
// }); // Example: Check every 10 seconds // // }); // Example: Check every 10 seconds
// } // // }
// } // // }
// void getcall() async { // // void getcall() async {
// await Provider.of<hcpProvider>(context, listen: false).getHCPProvider(); // // await Provider.of<hcpProvider>(context, listen: false).getHCPProvider();
// } // // }
// @override // // @override
// Widget build(BuildContext context) { // // Widget build(BuildContext context) {
// SystemChrome.setSystemUIOverlayStyle( // // SystemChrome.setSystemUIOverlayStyle(
// SystemUiOverlayStyle(statusBarColor: Color.fromARGB(255, 0, 71, 132))); // // SystemUiOverlayStyle(statusBarColor: Color.fromARGB(255, 0, 71, 132)));
// print( // // print(
// "newdata_is: ${_contactbox.values.toList()},${_contactbox.values.toList().length}"); // // "newdata_is: ${_contactbox.values.toList()},${_contactbox.values.toList().length}");
// print( // // print(
// "Data_newww: ${HiveFunctions.getAllUsers()} ,${HiveFunctions.getAllUsers().length} "); // // "Data_newww: ${HiveFunctions.getAllUsers()} ,${HiveFunctions.getAllUsers().length} ");
// return SafeArea( // // return SafeArea(
// child: Scaffold( // // child: Scaffold(
// // appBar: AppBar( // // // appBar: AppBar(
// // title: const Text('Contacts'), // // // title: const Text('Contacts'),
// // ), // // // ),
// body: Consumer<hcpProvider>(builder: (context, value, child) { // // body: Consumer<hcpProvider>(builder: (context, value, child) {
// print("todoss: ${value},${value.list.length}"); // // print("todoss: ${value},${value.list.length}");
// return Column( // // return Column(
// children: [ // // children: [
// Row( // // Row(
// mainAxisAlignment: MainAxisAlignment // // mainAxisAlignment: MainAxisAlignment
// .center, // Align children to start and end of the row // // .center, // Align children to start and end of the row
// children: [ // // 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,
// fontStyle: FontStyle.normal,
// color:
// _switchValue ? Colors.black : Colors.black),
// ),
// ),
// ),
// // Expanded( // // Expanded(
// Row( // // child: Padding(
// // Adjust alignment as needed // // padding: const EdgeInsets.only(left: 45.0),
// mainAxisSize: MainAxisSize.min, // // child: Text(
// children: [ // // _switchValue ? "My Contacts" : "All Contacts",
// _switchValue // // textAlign: TextAlign.center,
// ? const Text( // // style: TextStyle(
// 'All', // // fontSize: 20.0,
// style: TextStyle( // // fontWeight: FontWeight.w500,
// fontSize: 12, // // fontStyle: FontStyle.normal,
// decoration: TextDecoration.lineThrough, // // color:
// decorationThickness: 0.85, // // _switchValue ? Colors.black : Colors.black),
// ),
// // TODO: implement dispose
// )
// : const Text('All',
// style: TextStyle(
// fontSize: 12,
// )),
// CupertinoSwitch(
// activeColor: Color.fromARGB(255, 0, 71, 132),
// value: _switchValue,
// onChanged: (value) {
// setState(() {
// print("Switch_value_is : $value");
// _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,
// )),
// )
// ],
// ),
// // ), // // ),
// ]), // // ),
// isOnline2 // // ),
// ? Expanded( // // // Expanded(
// child: ListView.builder( // // Row(
// itemCount: value.list.length, // // // Adjust alignment as needed
// itemBuilder: (BuildContext context, int index) { // // mainAxisSize: MainAxisSize.min,
// // var data = HiveFunctions.getAllUsers()[index]; // // children: [
// var data = value.list[index]; // // _switchValue
// // ? const Text(
// // 'All',
// // style: TextStyle(
// // fontSize: 12,
// // decoration: TextDecoration.lineThrough,
// // decorationThickness: 0.85,
// // ),
// // // TODO: implement dispose
// // )
// // : const Text('All',
// // style: TextStyle(
// // fontSize: 12,
// // )),
// // CupertinoSwitch(
// // activeColor: Color.fromARGB(255, 0, 71, 132),
// // value: _switchValue,
// // onChanged: (value) {
// // setState(() {
// // print("Switch_value_is : $value");
// // _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,
// // )),
// // )
// // ],
// // ),
// // // ),
// // ]),
// // isOnline2
// // ? Expanded(
// // child: ListView.builder(
// // itemCount: value.list.length,
// // itemBuilder: (BuildContext context, int index) {
// // // var data = HiveFunctions.getAllUsers()[index];
// // var data = value.list[index];
// print("dataaaa_isss:$data"); // // print("dataaaa_isss:$data");
// return Column( // // return Column(
// children: [ // // children: [
// ListTile( // // ListTile(
// onTap: () { // // onTap: () {
// Navigator.push( // // Navigator.push(
// context, // // context,
// MaterialPageRoute( // // MaterialPageRoute(
// builder: (context) => Profile( // // builder: (context) => Profile(
// text: data, // // text: data,
// ))); // // )));
// }, // // },
// // title: Text(_contactbox.values.toString()), // // // title: Text(_contactbox.values.toString()),
// leading: ProfilePicture( // // leading: ProfilePicture(
// name: data["name"], // // name: data["name"],
// radius: 20, // // radius: 20,
// fontsize: 12, // // fontsize: 12,
// ), // // ),
// title: Text( // // title: Text(
// data["name"], // // data["name"],
// style: const TextStyle( // // style: const TextStyle(
// fontSize: 18.0, // // fontSize: 18.0,
// fontWeight: FontWeight.bold), // // fontWeight: FontWeight.bold),
// ), // // ),
// subtitle: const Text( // // subtitle: const Text(
// "Added by Pooja.K", // // "Added by Pooja.K",
// style: TextStyle( // // style: TextStyle(
// fontSize: 14.0, // // fontSize: 14.0,
// fontWeight: FontWeight.normal), // // fontWeight: FontWeight.normal),
// ), // // ),
// ), // // ),
// ], // // ],
// ); // // );
// }, // // },
// ), // // ),
// ) // // )
// : Expanded( // // : Expanded(
// child: ListView.builder(
// itemCount: HiveFunctions.getAllUsers().length,
// itemBuilder: (BuildContext context, int index) {
// var data = HiveFunctions.getAllUsers()[index];
// print("dataaaa_isss:$data");
// return Column(
// children: [
// ListTile(
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => Profile(
// text: data,
// )));
// },
// // title: Text(_contactbox.values.toString()),
// leading: ProfilePicture(
// name: data["name"],
// radius: 20,
// fontsize: 12,
// ),
// title: Text(
// data["name"],
// style: const TextStyle(
// fontSize: 18.0,
// fontWeight: FontWeight.bold),
// ),
// subtitle: const Text(
// "Added by Pooja.K",
// style: TextStyle(
// fontSize: 14.0,
// fontWeight: FontWeight.normal),
// ),
// ),
// ],
// );
// },
// ),
// ),
// ///////////////////////////////////////////////
// // Expanded(
// // child: ListView.builder( // // child: ListView.builder(
// // itemCount: HiveFunctions.getAllUsers().length, // // itemCount: HiveFunctions.getAllUsers().length,
// // itemBuilder: (BuildContext context, int index) { // // itemBuilder: (BuildContext context, int index) {
@ -262,12 +217,14 @@
// // title: Text( // // title: Text(
// // data["name"], // // data["name"],
// // style: const TextStyle( // // style: const TextStyle(
// // fontSize: 18.0, fontWeight: FontWeight.bold), // // fontSize: 18.0,
// // fontWeight: FontWeight.bold),
// // ), // // ),
// // subtitle: const Text( // // subtitle: const Text(
// // "Added by Pooja.K", // // "Added by Pooja.K",
// // style: TextStyle( // // style: TextStyle(
// // fontSize: 14.0, fontWeight: FontWeight.normal), // // fontSize: 14.0,
// // fontWeight: FontWeight.normal),
// // ), // // ),
// // ), // // ),
// // ], // // ],
@ -275,244 +232,287 @@
// // }, // // },
// // ), // // ),
// // ), // // ),
// // ///////////////////////////////////////////////
// // // Expanded(
// // // child: ListView.builder(
// // // itemCount: HiveFunctions.getAllUsers().length,
// // // itemBuilder: (BuildContext context, int index) {
// // // var data = HiveFunctions.getAllUsers()[index];
// // // print("dataaaa_isss:$data");
// // // return Column(
// // // children: [
// // // ListTile(
// // // onTap: () {
// // // Navigator.push(
// // // context,
// // // MaterialPageRoute(
// // // builder: (context) => Profile(
// // // text: data,
// // // )));
// // // },
// // // // title: Text(_contactbox.values.toString()),
// // // leading: ProfilePicture(
// // // name: data["name"],
// // // radius: 20,
// // // fontsize: 12,
// // // ),
// // // title: Text(
// // // data["name"],
// // // style: const TextStyle(
// // // fontSize: 18.0, fontWeight: FontWeight.bold),
// // // ),
// // // subtitle: const Text(
// // // "Added by Pooja.K",
// // // style: TextStyle(
// // // fontSize: 14.0, fontWeight: FontWeight.normal),
// // // ),
// // // ),
// // // ],
// // // );
// // // },
// // // ),
// // // ),
// // ],
// // );
// // }),
// // ),
// // );
// // }
// // }
// 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 Contacts extends StatefulWidget {
// const Contacts({Key? key}) : super(key: key);
// @override
// State<Contacts> createState() => _ContactsState();
// }
// class _ContactsState extends State<Contacts> {
// final _contactBox = Hive.box("mycontact");
// bool _switchValue = false;
// bool? isOnline2;
// @override
// void initState() {
// super.initState();
// setupConnectivityListener();
// // getCall();
// }
// Future<void> 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;
// });
// }
// if (isOnline2 == true) {
// getCall();
// }
// }
// }
// // @override
// // void dispose() {
// // // TODO: implement dispose
// // }
// void getCall() async {
// await Provider.of<hcpProvider>(context, listen: false).getHCPProvider();
// }
// @override
// Widget build(BuildContext context) {
// SystemChrome.setSystemUIOverlayStyle(
// SystemUiOverlayStyle(statusBarColor: Color.fromARGB(255, 0, 71, 132)));
// print("internet data_is: $isOnline2");
// return SafeArea(
// child: Scaffold(
// body: Consumer<hcpProvider>(
// 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,
// ),
// ),
// )
// ],
// ),
// ],
// ),
// if (isOnline2 == true)
// Expanded(
// child: ListView.builder(
// itemCount: value.list.length,
// itemBuilder: (BuildContext context, int index) {
// var data = value.list[index];
// return 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),
// ),
// ),
// 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,
// ),
// ),
// );
// },
// ),
// )
// else
// 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) => Profile(
// 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,
// ),
// ),
// );
// },
// ),
// ),
// ], // ],
// ); // );
// }), // },
// ),
// ), // ),
// ); // );
// } // }
// } // }
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 Contacts extends StatefulWidget {
const Contacts({Key? key}) : super(key: key);
@override
State<Contacts> createState() => _ContactsState();
}
class _ContactsState extends State<Contacts> {
final _contactBox = Hive.box("mycontact");
bool _switchValue = false;
bool? isOnline2;
@override
void initState() {
super.initState();
setupConnectivityListener();
// getCall();
}
Future<void> 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;
});
}
if (isOnline2 == true) {
getCall();
}
}
}
// @override
// void dispose() {
// // TODO: implement dispose
// }
void getCall() async {
await Provider.of<hcpProvider>(context, listen: false).getHCPProvider();
}
@override
Widget build(BuildContext context) {
SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Color.fromARGB(255, 0, 71, 132)));
print("internet data_is: $isOnline2");
return SafeArea(
child: Scaffold(
body: Consumer<hcpProvider>(
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,
),
),
)
],
),
],
),
if (isOnline2 == true)
Expanded(
child: ListView.builder(
itemCount: value.list.length,
itemBuilder: (BuildContext context, int index) {
var data = value.list[index];
return 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),
),
),
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,
),
),
);
},
),
)
else
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) => Profile(
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,
),
),
);
},
),
),
],
);
},
),
),
);
}
}

View File

@ -1,64 +1,64 @@
import 'package:discover_module/ui_screen/ranking.dart'; // import 'package:discover_module/ui_screen/ranking.dart';
import 'package:discover_module/ui_screen/rising_stars.dart'; // import 'package:discover_module/ui_screen/rising_stars.dart';
import 'package:discover_module/ui_screen/trends.dart'; // import 'package:discover_module/ui_screen/trends.dart';
import 'package:flutter/material.dart'; // import 'package:flutter/material.dart';
class Discover extends StatefulWidget { // class Discover extends StatefulWidget {
const Discover(this.outerTab, {super.key}); // const Discover(this.outerTab, {super.key});
final String outerTab; // final String outerTab;
@override // @override
State<Discover> createState() => _DiscoverState(); // State<Discover> createState() => _DiscoverState();
} // }
class _DiscoverState extends State<Discover> with TickerProviderStateMixin { // class _DiscoverState extends State<Discover> with TickerProviderStateMixin {
late final TabController _tabController; // late final TabController _tabController;
@override // @override
void initState() { // void initState() {
super.initState(); // super.initState();
_tabController = TabController(length: 3, vsync: this); // _tabController = TabController(length: 3, vsync: this);
} // }
@override // @override
void dispose() { // void dispose() {
_tabController.dispose(); // _tabController.dispose();
super.dispose(); // super.dispose();
} // }
@override // @override
Widget build(BuildContext context) { // Widget build(BuildContext context) {
return Column( // return Column(
children: <Widget>[ // children: <Widget>[
TabBar.secondary( // TabBar.secondary(
controller: _tabController, // controller: _tabController,
labelStyle: // labelStyle:
const TextStyle(fontSize: 12.0, fontWeight: FontWeight.bold), // const TextStyle(fontSize: 12.0, fontWeight: FontWeight.bold),
indicatorWeight: 1.0, // indicatorWeight: 1.0,
indicatorColor: const Color.fromARGB(255, 0, 71, 135), // indicatorColor: const Color.fromARGB(255, 0, 71, 135),
labelPadding: EdgeInsets.all(0.0), // labelPadding: EdgeInsets.all(0.0),
tabs: const <Widget>[ // tabs: const <Widget>[
Tab(text: 'Ranking'), // Tab(text: 'Ranking'),
// Tab(text: 'Chart'), // // Tab(text: 'Chart'),
Tab(text: 'Trends'), // Tab(text: 'Trends'),
//Tab(text: 'Referral'), // //Tab(text: 'Referral'),
Tab(text: 'Rising Stars '), // Tab(text: 'Rising Stars '),
], // ],
), // ),
Expanded( // Expanded(
child: TabBarView( // child: TabBarView(
controller: _tabController, // controller: _tabController,
children: <Widget>[ // children: <Widget>[
Ranking(), // Ranking(),
// const Chart1(), // // const Chart1(),
const Trends(), // const Trends(),
//const Referral(), // //const Referral(),
const RisingStar(), // const RisingStar(),
], // ],
), // ),
), // ),
], // ],
); // );
} // }
} // }

View File

@ -0,0 +1,110 @@
import 'package:discover_module/provider_class/educationprovider.dart';
import 'package:discover_module/ui_screen/bottom_sheet.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class EducationShowMore extends StatefulWidget {
EducationShowMore({required this.text, Key? key}) : super(key: key);
final int text;
@override
State<EducationShowMore> createState() => _EducationShowMoreState();
}
class _EducationShowMoreState extends State<EducationShowMore> {
@override
List education = [];
@override
void initState() {
// TODO: implement initState
super.initState();
affdata();
}
affdata() async {
var edu = Provider.of<EducationProvider>(context, listen: false);
await edu.eduinfo(widget.text);
final edu1 = edu.educationlist;
setState(() {
education = edu1;
});
print("locationList: ${education}");
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Education'),
),
body: Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Container(
constraints:
BoxConstraints(minWidth: MediaQuery.of(context).size.width),
color: Colors.white,
child: DataTable(
showCheckboxColumn: false,
columns: const [
DataColumn(
label: Expanded(
child: Text('Education Type',
style: TextStyle(fontWeight: FontWeight.w600),
softWrap: true),
)),
DataColumn(
label: Expanded(
child: Text('Institution Name',
style:
TextStyle(fontWeight: FontWeight.w600)))),
],
rows: List.generate(
education.length,
(index) => DataRow(
onSelectChanged: (value) {
print("message ${education[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(education[index]);
},
);
},
cells: [
DataCell(Text(
education[index]['Education Type'].toString(),
softWrap: true)),
DataCell(Text(
education[index]['Institution Name'].toString(),
softWrap: true)),
],
),
),
),
),
),
),
));
}
}

View File

@ -0,0 +1,107 @@
import 'package:discover_module/provider_class/email_provider.dart';
import 'package:discover_module/ui_screen/bottom_sheet.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class EmailShowMore extends StatefulWidget {
EmailShowMore({required this.text, Key? key}) : super(key: key);
final int text;
@override
State<EmailShowMore> createState() => _EmailShowMoreState();
}
class _EmailShowMoreState extends State<EmailShowMore> {
@override
List emailid = [];
@override
void initState() {
// TODO: implement initState
super.initState();
affdata();
}
affdata() async {
var email = Provider.of<EmailProvider>(context, listen: false);
await email.emailinfo(widget.text);
final emailno1 = email.emailkollist;
setState(() {
emailid = emailno1;
});
print("locationList: ${emailid}");
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Emails'),
),
body: Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
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(
emailid.length,
(index) => DataRow(
onSelectChanged: (value) {
print("message ${emailid[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(emailid[index]);
},
);
},
cells: [
DataCell(Text(emailid[index]['Email Type'].toString(),
softWrap: true)),
DataCell(Text(emailid[index]['Email'].toString(),
softWrap: true)),
],
),
),
),
),
),
),
));
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,22 @@
import 'package:discover_module/provider_class/affiliationsprovider.dart'; import 'package:discover_module/provider_class/affiliationsprovider.dart';
import 'package:discover_module/provider_class/events_provider.dart'; import 'package:discover_module/provider_class/events_provider.dart';
import 'package:discover_module/provider_class/publications_provider.dart'; import 'package:discover_module/provider_class/publications_provider.dart';
import 'package:discover_module/ui_screen/bottom_sheet.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class EventsData extends StatefulWidget { class EventsData extends StatefulWidget {
const EventsData({super.key}); // const EventsData({super.key});
EventsData({required this.text, Key? key}) : super(key: key);
final int text;
@override @override
State<EventsData> createState() => _EventsDataState(); State<EventsData> createState() => _EventsDataState();
} }
class _EventsDataState extends State<EventsData> { class _EventsDataState extends State<EventsData> {
List hcppublication = []; List event_data = [];
@override @override
void initState() { void initState() {
// TODO: implement initState // TODO: implement initState
@ -23,12 +26,11 @@ class _EventsDataState extends State<EventsData> {
} }
affdata() async { affdata() async {
final affprovider = Provider.of<EventProvider>(context, listen: false); var events = Provider.of<EventProvider>(context, listen: false);
await affprovider.allgeteventdata(); await events.geteventdata(widget.text);
final eventlist = events.EventsList;
final affdata = affprovider.allEventsList;
setState(() { setState(() {
hcppublication = affdata; event_data = eventlist;
}); });
} }
@ -36,47 +38,68 @@ class _EventsDataState extends State<EventsData> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text('Publications'), title: Text('Events'),
), ),
body: Scrollbar( body: Scrollbar(
child: SingleChildScrollView( child: SingleChildScrollView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Container( child: Container(
constraints: constraints:
BoxConstraints(minWidth: MediaQuery.of(context).size.width), BoxConstraints(minWidth: MediaQuery.of(context).size.width),
child: DataTable( child: DataTable(
showCheckboxColumn: false,
columns: const [ columns: const [
DataColumn(
label: Expanded(child: Text('sl no', softWrap: true))),
DataColumn( DataColumn(
label: Expanded( label: Expanded(
child: Text('Event Name', softWrap: true), child: Text('Event Name',
softWrap: true,
style: TextStyle(fontWeight: FontWeight.w600)),
)), )),
DataColumn( DataColumn(
label: Expanded( label: Expanded(
child: Text('Session Type', softWrap: true))), child: Text('Role',
DataColumn( softWrap: true,
label: Expanded(child: Text('Topic', softWrap: true))), style:
DataColumn( TextStyle(fontWeight: FontWeight.w600)))),
label: Expanded(child: Text('Role', softWrap: true))),
// Add more columns as needed // Add more columns as needed
], ],
rows: List.generate( rows: List.generate(
hcppublication.length, event_data.length,
(index) => DataRow( (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: [ cells: [
DataCell(Text(hcppublication[index]['id'].toString(),
softWrap: true)),
DataCell(Text( DataCell(Text(
hcppublication[index]['event_name'].toString(), event_data[index]['event_name'].toString(),
softWrap: true)), softWrap: true)),
DataCell(Text(
hcppublication[index]['session_type'].toString(), DataCell(Text(event_data[index]['role'].toString(),
softWrap: true)),
DataCell(Text(hcppublication[index]['topic'].toString(),
softWrap: true)),
DataCell(Text(hcppublication[index]['role'].toString(),
softWrap: true)), softWrap: true)),
// Add more DataCells as needed // Add more DataCells as needed
@ -86,6 +109,7 @@ class _EventsDataState extends State<EventsData> {
), ),
), ),
), ),
),
)); ));
} }
} }

View File

@ -94,12 +94,25 @@ class MockApiCall {
"sectionName": "Attendees", "sectionName": "Attendees",
"multiple": true, "multiple": true,
"sectionList": [ "sectionList": [
// {
// "name": "HCP Name",
// "id": "attendeeshcpname_3",
// "depid": "",
// "widget": "text",
// "input": "text1",
// "validation": {"isRequired": true}
// },
{ {
"name": "HCP Name", "name": "HCP Name",
"id": "attendeeshcpname_3", "id": "attendeeshcpname_3",
"depid": "", "depid": "",
"widget": "text", "widget": "dropdown",
"input": "text", "inputList": [
{"name": "", "id": "1", "pid": "1"},
{"name": "Abraham, William", "id": "1", "pid": "1"},
{"name": "Abbas, Samer", "id": "2", "pid": "1"},
{"name": "Bulter, Javed", "id": "3", "pid": "1"},
],
"validation": {"isRequired": true} "validation": {"isRequired": true}
}, },
{ {
@ -217,6 +230,39 @@ class MockApiCall {
} }
] ]
}, },
// {
// "sectionName": "Attach Document(s)",
// "multiple": true,
// "sectionList": [
// {
// "name": "Document Name",
// "id": "documentName_21",
// "depid": "",
// "widget": "text",
// "input": "text",
// "inputList": [],
// "validation": {"isRequired": true}
// },
// {
// "name": "Description",
// "id": "documentDescription_21",
// "depid": "",
// "widget": "text",
// "input": "text",
// "inputList": [],
// "validation": {"isRequired": true}
// },
// {
// "name": "Choose file",
// "id": "chooseFile_22",
// "depid": "",
// "widget": "button",
// "input": "chooseFile",
// "inputList": [],
// "validation": {"isRequired": true, "multipleFiles": true}
// }
// ]
// },
] ]
} }
] ]

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,6 @@
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/edit_interaction_screen.dart';
import 'package:discover_module/ui_screen/interactionform/mockapi.dart';
import 'package:discover_module/ui_screen/interactionform/model/save_interaction.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/util.dart';
import 'package:discover_module/ui_screen/interactionform/view_interaction_screen.dart'; import 'package:discover_module/ui_screen/interactionform/view_interaction_screen.dart';
@ -60,6 +62,39 @@ class _SavedFormListScreenState extends State<SavedFormListScreen> {
color: Colors.white, color: Colors.white,
), ),
), ),
actions: [
IconButton(
onPressed: () async {
final ConfigDataProvider configDataProvider =
ConfigDataProvider();
if (await checkRecordsAvailable()) {
String jsonstr = await formJsonForSync();
print("jsonrrrrr: $jsonstr");
var result = await MockApiCall().postSavedData(jsonstr);
if (result != null) {
Navigator.pop(context);
await deleteRecords();
await configDataProvider
.initConfigUIData()
.then((value) {});
_displaySnackBar('Data synced sucessfully!');
} else {
Navigator.pop(context);
_displaySnackBar('Something went wrong!');
}
} else {
Navigator.pop(context);
_displaySnackBar('No records to sync!');
}
},
icon: Icon(Icons.upload))
],
), ),
body: Container( body: Container(
child: Center( child: Center(

View File

@ -0,0 +1,109 @@
import 'package:discover_module/provider_class/location_provider.dart';
import 'package:discover_module/ui_screen/bottom_sheet.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class Locationfulldata extends StatefulWidget {
Locationfulldata({required this.text, Key? key}) : super(key: key);
final int text;
@override
State<Locationfulldata> createState() => _LocationfulldataState();
}
class _LocationfulldataState extends State<Locationfulldata> {
List locationList = [];
@override
void initState() {
// TODO: implement initState
super.initState();
affdata();
}
affdata() async {
final location = Provider.of<LocationProvider>(context, listen: false);
await location.locationinfo(widget.text);
final loclist = location.locationlist;
setState(() {
locationList = loclist;
});
print("locationList: ${locationList}");
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Locations'),
),
body: Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Container(
constraints:
BoxConstraints(minWidth: MediaQuery.of(context).size.width),
color: Colors.white,
child: DataTable(
showCheckboxColumn: false,
columns: const [
DataColumn(
label: Expanded(
child: Text('Institution',
style: TextStyle(fontWeight: FontWeight.w600),
softWrap: true),
)),
DataColumn(
label: Expanded(
child: Text('Address',
style:
TextStyle(fontWeight: FontWeight.w600)))),
],
rows: List.generate(
locationList.length,
(index) => DataRow(
onSelectChanged: (value) {
print("message ${locationList[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(locationList[index]);
},
);
},
cells: [
DataCell(Text(
locationList[index]['Institution'].toString(),
softWrap: true)),
DataCell(Text(locationList[index]['Address'].toString(),
softWrap: true)),
],
),
),
),
),
),
),
));
}
}

View File

@ -1,4 +1,3 @@
import 'package:discover_module/ui_screen/profile.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class DataTableDemo extends StatefulWidget { class DataTableDemo extends StatefulWidget {

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,13 @@
import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:discover_module/constants.dart'; import 'package:discover_module/constants.dart';
import 'package:discover_module/hive_fun.dart';
import 'package:discover_module/provider_class/hcp%20_provider.dart'; import 'package:discover_module/provider_class/hcp%20_provider.dart';
import 'package:discover_module/ui_screen/filters_menu.dart'; import 'package:discover_module/ui_screen/filters_menu.dart';
import 'package:discover_module/ui_screen/interactionform/util.dart';
import 'package:discover_module/ui_screen/new_new_profile.dart';
import 'package:discover_module/ui_screen/new_new_profile_offline.dart';
import 'package:dropdown_button2/dropdown_button2.dart'; import 'package:dropdown_button2/dropdown_button2.dart';
import 'package:dropdownfield2/dropdownfield2.dart'; import 'package:dropdownfield2/dropdownfield2.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -11,8 +18,6 @@ import 'package:provider/provider.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_profile_picture/flutter_profile_picture.dart'; import 'package:flutter_profile_picture/flutter_profile_picture.dart';
import 'package:hive_flutter/hive_flutter.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'; import 'package:discover_module/ui_screen/interactionform/NewtworkConnectivity.dart';
class Contacts1 extends StatefulWidget { class Contacts1 extends StatefulWidget {
@ -25,7 +30,7 @@ class Contacts1 extends StatefulWidget {
class _Contacts1State extends State<Contacts1> { class _Contacts1State extends State<Contacts1> {
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
final _contactBox = Hive.box("mycontact"); // final contactBox = Hive.box("mycontact");
bool _switchValue = false; bool _switchValue = false;
bool isOnline2 = true; bool isOnline2 = true;
@ -61,28 +66,58 @@ class _Contacts1State extends State<Contacts1> {
TextEditingController textEditingController = TextEditingController(); TextEditingController textEditingController = TextEditingController();
List displayedHCPList = []; List displayedHCPList = [];
bool ActiveConnection = false;
String T = "";
bool isChecked = false;
//final Set<int> _selectedIndices = Set();
final List<int> _selectedIndices = [];
final List<int> _selectedremoveIndices = [];
bool longpress = false;
bool longpressmy = false;
// Future CheckUserConnection() async {
// try {
// final result = await InternetAddress.lookup('google.com');
// if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) {
// setState(() {
// ActiveConnection = true;
// T = "Turn off the data and repress again";
// print("Isssss Off $ActiveConnection");
// Provider.of<hcpProvider>(context, listen: false).getHCPProvider();
// });
// }
// } on SocketException catch (_) {
// setState(() {
// ActiveConnection = false;
// T = "Turn On the data and repress again";
// print("Isssss Off $ActiveConnection");
// Provider.of<hcpProvider>(context, listen: false).getHCPProviderHive();
// });
// }
// }
@override @override
void initState() { void initState() {
super.initState(); super.initState();
// CheckUserConnection();
Provider.of<hcpProvider>(context, listen: false).getHCPProvider(); Provider.of<hcpProvider>(context, listen: false).getHCPProvider();
// HiveFunctions.getAllUsers11();
//Provider.of<hcpProvider>(context, listen: false).getHCPProviderHive();
//print("Get_hcp_dataaaL ${HiveFunctions.gethcpdata()}");
// getDropdownlist(); // getDropdownlist();
} }
// getDropdownlist() {
// final provider =
// Provider.of<hcpProvider>(context, listen: false).getHCPProvider();
// final datta = provider.list;
// print("Providerrrrr_is ${datta}");
// }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
print("ProfileType $dropdownvalue, $_selectedValue1"); print("ProfileType $dropdownvalue, $_selectedValue1");
// print("all StoredUser: ${HiveFunctions.getAllUsers11()}");
if (_selectedValue1 == "Profile Type") { if (_selectedValue1 == "Profile Type") {
print("PPPP11"); print("PPPP11");
setState(() { setState(() {
@ -317,44 +352,90 @@ class _Contacts1State extends State<Contacts1> {
height: 5, height: 5,
), ),
Expanded( !_switchValue
? Expanded(
child: ListView.builder( child: ListView.builder(
itemCount: displayedHCPList.length, itemCount: displayedHCPList.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
var data = displayedHCPList[index]; var data = displayedHCPList[index];
print("CheckinggggImage_path: ${data['img_path']}");
return Column( return Column(
children: [ children: [
ListTile( ListTile(
onTap: () { onLongPress: () {
print("LongPresss");
setState(() {
longpress = true;
});
},
onTap: () async {
print("Check_data = ${data["Location"]}");
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => NewProfile(text: data), builder: (context) =>
NewProfile1(text: data),
), ),
); );
}, },
leading: data["img_path"] == null leading: data["img_path"] == ""
? ProfilePicture( ? ProfilePicture(
name: data["name"], name: data["First Name"],
radius: 20, radius: 30,
fontsize: 12, fontsize: 12,
) )
: ClipOval( : ClipOval(
child: SizedBox.fromSize( child: SizedBox.fromSize(
size: Size.fromRadius(30), // Image radius size: Size.fromRadius(30),
child: Image.network(data["img_path"], child: CachedNetworkImage(
fit: BoxFit.fill), imageUrl: data["img_path"],
imageBuilder:
(context, imageProvider) =>
Container(
decoration: BoxDecoration(
image: DecorationImage(
image: imageProvider,
fit: BoxFit.fill,
), ),
), ),
// trailing: Icon( ),
// Icons.person_add_rounded, // placeholder: (context, url) =>
// color: Constants.k2color, // CircularProgressIndicator(),
// size: 30.0, // errorWidget: (context, url, error) =>
// ), // Icon(Icons.error),
),
),
),
trailing: Visibility(
visible: longpress,
child: Checkbox(
value: _selectedIndices
.contains(data["uid"]),
onChanged: (value) {
// setState(() {
// _selectedIndices.add(data["id"]);
// // isChecked = value!;
// });
setState(() {
if (value!) {
_selectedIndices.add(data["uid"]);
} else {
_selectedIndices
.remove(data["uid"]);
}
print(
"id_total: ${_selectedIndices}");
});
}),
),
title: Text( title: Text(
"${data["name"]}", "${data["name"]}",
style: const TextStyle( style: TextStyle(
fontSize: 18.0, fontSize: isTablet ? 22 : 16,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
@ -364,9 +445,9 @@ class _Contacts1State extends State<Contacts1> {
children: [ children: [
Expanded( Expanded(
child: Text( child: Text(
"${data["speciality"]},", "${data["speciality"] ?? data['spl']},",
style: const TextStyle( style: TextStyle(
fontSize: 14.0, fontSize: isTablet ? 20 : 14,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
), ),
@ -376,12 +457,24 @@ class _Contacts1State extends State<Contacts1> {
Row( Row(
children: [ children: [
Text( Text(
"${data["addr"]},", "${data["State"] ?? ""},",
style: const TextStyle( style: const TextStyle(
fontSize: 14.0, fontSize: 14.0,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
), ),
), ),
SizedBox(
width: 3.0,
),
Expanded(
child: Text(
"${data["Country"] ?? ""}",
style: const TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.normal,
),
),
),
], ],
), ),
// Row( // Row(
@ -399,7 +492,8 @@ class _Contacts1State extends State<Contacts1> {
), ),
), ),
const Row( const Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
Padding( Padding(
padding: EdgeInsets.only(left: 10.0), padding: EdgeInsets.only(left: 10.0),
@ -428,6 +522,390 @@ class _Contacts1State extends State<Contacts1> {
); );
}, },
), ),
)
: Expanded(
child: ListView.builder(
itemCount: HiveFunctions.getAllUsers11().length,
itemBuilder: (BuildContext context, int index) {
var data = HiveFunctions.getAllUsers11()[index];
print("CheckinggggImage_path: ${data['img_path']}");
print(
"CheckinggggImage_path: ${data['name']},${data['inid']}");
return Column(
children: [
ListTile(
onLongPress: () {
print("LongPresss");
setState(() {
longpressmy = true;
});
},
onTap: () async {
print("Check_data = $data");
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
NewProfile1(text: data),
),
);
},
leading: data["img_path"] == ""
? ProfilePicture(
name: data["name"],
radius: 30,
fontsize: 12,
)
: ClipOval(
child: SizedBox.fromSize(
size: Size.fromRadius(30),
child: CachedNetworkImage(
imageUrl: data["img_path"],
imageBuilder:
(context, imageProvider) =>
Container(
decoration: BoxDecoration(
image: DecorationImage(
image: imageProvider,
fit: BoxFit.fill,
),
),
),
// placeholder: (context, url) =>
// CircularProgressIndicator(),
// errorWidget: (context, url, error) =>
// Icon(Icons.error),
),
),
),
trailing: Visibility(
visible: longpressmy,
child: Checkbox(
value: _selectedremoveIndices
.contains(data["id"]),
onChanged: (value) {
setState(() {
if (value!) {
_selectedremoveIndices
.add(data["id"]);
} else {
_selectedremoveIndices
.remove(data["id"]);
}
print(
"id_total: ${_selectedremoveIndices}");
});
}),
),
title: Text(
"${data["name"]}",
style: TextStyle(
fontSize: isTablet ? 22 : 16,
fontWeight: FontWeight.bold,
),
),
subtitle: Column(
children: [
Row(
children: [
Expanded(
child: Text(
"${data["speciality"] ?? data['spl']},",
style: TextStyle(
fontSize: isTablet ? 20 : 14,
fontWeight: FontWeight.normal,
),
),
),
],
),
Row(
children: [
Text(
"${data["addr"]},",
style: const TextStyle(
fontSize: 14.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(),
],
);
},
),
),
!_switchValue
? Align(
alignment: Alignment.bottomCenter,
child: longpress
? Container(
color: const Color.fromARGB(255, 251, 242, 242),
width: MediaQuery.of(context).size.width,
height: 200.0,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
onTap: () async {
print("Selected: ${_selectedIndices}");
print(
"Selected: ${_selectedIndices.length}");
for (int i = 0;
i < _selectedIndices.length;
i++) {
print(
'The id id : ${_selectedIndices[i]}');
//List<_Row> _rows = [];
final row = displayedHCPList[
_selectedIndices[i] - 1];
var data = displayedHCPList[i];
print(
"checking_value_istrends: ${_selectedIndices[i]},${row["name"]}, ${row["id"]}");
int autoIncrementKey1 =
await getNextAutoIncrementValue();
print(autoIncrementKey1);
HiveFunctions.createUser({
"inid": autoIncrementKey1,
"id": autoIncrementKey1,
"name": row["name"],
"org": "med",
"addr": row["addr"],
"phone": row["phone_no"],
"phone_no": row["phone_no"],
"email": row["email"],
"summarry": row["summarry"],
"speciality": row["speciality"],
"sub_speciality":
row["sub_speciality"],
"img_path": row["img_path"],
});
}
_showMyDialog(
"Selected contact has been added to my contacts ");
},
child: Row(
children: [
Padding(
padding: const EdgeInsets.all(15.0),
child: Icon(
Icons.add,
color: Colors.green,
),
),
Text(
'Add to My Contacts',
style: TextStyle(
color: Colors.black,
fontSize: 14.0),
),
],
),
),
Row(
children: [
Padding(
padding: const EdgeInsets.all(15.0),
child: Icon(
Icons.download,
color: Colors.blue,
),
),
GestureDetector(
onTap: () {},
child: Text(
'Download',
style:
TextStyle(color: Colors.black),
),
),
],
),
GestureDetector(
onTap: () {
setState(() {
longpress = false;
_selectedIndices.clear();
_selectedremoveIndices.clear();
});
},
child: const Row(
children: [
Padding(
padding: EdgeInsets.all(15.0),
child: Icon(
Icons.close,
color: Colors.red,
),
),
Text(
'Cancel',
style:
TextStyle(color: Colors.black),
),
],
),
),
],
),
)
: Container(),
)
: Align(
alignment: Alignment.bottomCenter,
child: longpressmy
? Container(
color: const Color.fromARGB(255, 251, 242, 242),
width: MediaQuery.of(context).size.width,
height: 200.0,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
onTap: () async {
print(
"SelectedRemoveee: ${_selectedremoveIndices}");
print(
"Selected: ${_selectedremoveIndices.length}");
for (int i = 0;
i < _selectedremoveIndices.length;
i++) {
print(
'The id id : ${_selectedremoveIndices[i]}');
//List<_Row> _rows = [];
// final row = displayedHCPList[
// _selectedremoveIndices[i] - 1];
// var data = displayedHCPList[i];
final row =
await HiveFunctions.getuser(
_selectedremoveIndices[i]);
// var data = HiveFunctions.getuser()[i];
print("Delete_Row ${row[i]}");
print("Delete_Row ${row[i]["inid"]}");
// print(
// "checking_valueRemove_istrends: ${_selectedremoveIndices[i]},${row["name"]}, ${row["id"]},${row["inid"]}");
//HiveFunctions.addno(_selectedIndices[i]);
// HiveFunctions.removeno(_selectedremoveIndices[i]);
final row1 =
await HiveFunctions.deleteUser11(
row[i]["inid"]);
setState(() {});
// HiveFunctions.deleteUser(_selectedremoveIndices);
}
_showMyDialog(
"selected contact has been removed");
},
child: Row(
children: [
Padding(
padding: const EdgeInsets.all(15.0),
child: Icon(
Icons.remove,
color: Colors.green,
),
),
Text(
'Remove from My Contacts',
style:
TextStyle(color: Colors.black),
),
],
),
),
Row(
children: [
Padding(
padding: const EdgeInsets.all(15.0),
child: Icon(
Icons.download,
color: Colors.blue,
),
),
GestureDetector(
onTap: () {},
child: Text(
'Download',
style:
TextStyle(color: Colors.black),
),
),
],
),
GestureDetector(
onTap: () {
setState(() {
longpressmy = false;
_selectedIndices.clear();
_selectedremoveIndices.clear();
});
},
child: Row(
children: [
Padding(
padding: const EdgeInsets.all(15.0),
child: Icon(
Icons.close,
color: Colors.red,
),
),
Text(
'Cancel',
style: TextStyle(
color: Constants.k2color),
),
],
),
),
],
),
)
: Container(),
), ),
], ],
); );
@ -679,4 +1157,52 @@ class _Contacts1State extends State<Contacts1> {
print("_selectedValue_isss: $_selectedValue"); print("_selectedValue_isss: $_selectedValue");
}); });
} }
Future<void> _showMyDialog(String data) async {
return showDialog<void>(
context: context,
barrierDismissible: false, // user must tap button!
builder: (BuildContext context) {
return AlertDialog(
title: const Text('Successfully'),
content: SingleChildScrollView(
child: ListBody(
children: <Widget>[
// Text('This is a demo alert dialog.'),
Text(data),
],
),
),
actions: <Widget>[
TextButton(
child: const Text('Ok'),
onPressed: () {
Navigator.of(context).pop();
setState(() {
_selectedIndices.clear();
_selectedremoveIndices.clear();
longpress = false;
longpressmy = false;
});
},
),
],
);
},
);
}
Future<int> getNextAutoIncrementValue() async {
var counterBox = await Hive.openBox<int>('counterBox');
if (!counterBox.containsKey('counter')) {
counterBox.put('counter', 0);
}
int? counter = counterBox.get('counter');
counterBox.put('counter', counter! + 1);
await counterBox.close();
return counter;
}
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -309,4 +309,10 @@ class _FormListState extends State<FormList> {
); );
}); });
} }
@override
void dispose() {
// TODO: implement dispose
super.dispose();
}
} }

View File

@ -0,0 +1,107 @@
import 'package:discover_module/provider_class/nih_provider.dart';
import 'package:discover_module/ui_screen/bottom_sheet.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class NIHShowMore extends StatefulWidget {
NIHShowMore({required this.text, Key? key}) : super(key: key);
final int text;
@override
State<NIHShowMore> createState() => _NIHShowMoreState();
}
class _NIHShowMoreState extends State<NIHShowMore> {
List nihgrants = [];
@override
void initState() {
// TODO: implement initState
super.initState();
affdata();
}
affdata() async {
var nih = Provider.of<NIHGrantsProvider>(context, listen: false);
await nih.nihinfo(widget.text);
final nih1 = nih.nihlist;
setState(() {
nihgrants = nih1;
});
print("locationList: ${nihgrants}");
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('NIH Grants'),
),
body: Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
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(
nihgrants.length,
(index) => DataRow(
onSelectChanged: (value) {
print("message ${nihgrants[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(nihgrants[index]);
},
);
},
cells: [
DataCell(Text(nihgrants[index]['pi_names'].toString(),
softWrap: true)),
DataCell(Text(
nihgrants[index]['NIH Center/Institute'].toString(),
softWrap: true)),
],
),
),
),
),
),
),
));
}
}

View File

@ -0,0 +1,106 @@
import 'package:discover_module/provider_class/patent_provider.dart';
import 'package:discover_module/ui_screen/bottom_sheet.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PatentShowMore extends StatefulWidget {
PatentShowMore({required this.text, Key? key}) : super(key: key);
final int text;
@override
State<PatentShowMore> createState() => _PatentShowMoreState();
}
class _PatentShowMoreState extends State<PatentShowMore> {
List patent = [];
@override
void initState() {
// TODO: implement initState
super.initState();
affdata();
}
affdata() async {
var patentt = Provider.of<PatentProvider>(context, listen: false);
await patentt.patentinfo(widget.text);
final patentt1 = patentt.patentlist;
setState(() {
patent = patentt1;
});
print("locationList: ${patent}");
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Patents'),
),
body: Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
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(
patent.length,
(index) => DataRow(
onSelectChanged: (value) {
print("message ${patent[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(patent[index]);
},
);
},
cells: [
DataCell(Text(patent[index]['Patent Title'].toString(),
softWrap: true)),
DataCell(Text(patent[index]['Status'].toString(),
softWrap: true)),
],
),
),
),
),
),
),
));
}
}

View File

@ -0,0 +1,107 @@
import 'package:discover_module/provider_class/phoneno_provider.dart';
import 'package:discover_module/ui_screen/bottom_sheet.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PhoneShowMore extends StatefulWidget {
PhoneShowMore({required this.text, Key? key}) : super(key: key);
final int text;
@override
State<PhoneShowMore> createState() => _PhoneShowMoreState();
}
class _PhoneShowMoreState extends State<PhoneShowMore> {
List pno = [];
@override
void initState() {
// TODO: implement initState
super.initState();
affdata();
}
affdata() async {
final phone = Provider.of<PhonenoProvider>(context, listen: false);
await phone.phoneinfo(widget.text);
final phoneno = phone.phonenolist;
setState(() {
pno = phoneno;
});
print("Phone Numbers: ${pno}");
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Phone Numbers'),
),
body: Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
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('Phone No',
style:
TextStyle(fontWeight: FontWeight.w600)))),
],
rows: List.generate(
pno.length,
(index) => DataRow(
onSelectChanged: (value) {
print("message ${pno[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(pno[index]);
},
);
},
cells: [
DataCell(Text(pno[index]['Phone type'].toString(),
softWrap: true)),
DataCell(Text(pno[index]['phone Number'].toString(),
softWrap: true)),
],
),
),
),
),
),
),
));
}
}

View File

@ -0,0 +1,107 @@
import 'package:discover_module/provider_class/procedureprovider.dart';
import 'package:discover_module/ui_screen/bottom_sheet.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class ProShowMore extends StatefulWidget {
ProShowMore({required this.text, Key? key}) : super(key: key);
final int text;
@override
State<ProShowMore> createState() => _ProShowMoreState();
}
class _ProShowMoreState extends State<ProShowMore> {
List procedure = [];
@override
void initState() {
// TODO: implement initState
super.initState();
affdata();
}
affdata() async {
var pro = Provider.of<ProcedureProvider>(context, listen: false);
await pro.proinfo(widget.text);
final pro1 = pro.prolist;
setState(() {
procedure = pro1;
});
print("locationList: ${procedure}");
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Procedures'),
),
body: Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
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(
procedure.length,
(index) => DataRow(
onSelectChanged: (value) {
print("message ${procedure[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(procedure[index]);
},
);
},
cells: [
DataCell(Text(procedure[index]['Procedure'].toString(),
softWrap: true)),
DataCell(Text(
procedure[index]['Place of Service'].toString(),
softWrap: true)),
],
),
),
),
),
),
),
));
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,15 @@
import 'package:discover_module/provider_class/affiliationsprovider.dart'; import 'package:discover_module/provider_class/affiliationsprovider.dart';
import 'package:discover_module/provider_class/publications_provider.dart'; import 'package:discover_module/provider_class/publications_provider.dart';
import 'package:discover_module/ui_screen/bottom_sheet.dart';
import 'package:discover_module/ui_screen/bottommmsheet.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class PublicationsData extends StatefulWidget { class PublicationsData extends StatefulWidget {
const PublicationsData({super.key}); PublicationsData({required this.text, Key? key}) : super(key: key);
final int text;
@override @override
State<PublicationsData> createState() => _PublicationsDataState(); State<PublicationsData> createState() => _PublicationsDataState();
@ -23,12 +27,14 @@ class _PublicationsDataState extends State<PublicationsData> {
affdata() async { affdata() async {
final affprovider = Provider.of<PublicatioProvider>(context, listen: false); final affprovider = Provider.of<PublicatioProvider>(context, listen: false);
await affprovider.allpublicatininfo(); await affprovider.publicatininfo(widget.text);
final affdata = affprovider.allpublicationlist; final affdata = affprovider.publicationlist;
setState(() { setState(() {
hcppublication = affdata; hcppublication = affdata;
}); });
print("hcppppProfiledata: ${hcppublication}");
} }
@override @override
@ -40,17 +46,18 @@ class _PublicationsDataState extends State<PublicationsData> {
body: Scrollbar( body: Scrollbar(
child: SingleChildScrollView( child: SingleChildScrollView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Container( child: Container(
constraints: constraints:
BoxConstraints(minWidth: MediaQuery.of(context).size.width), BoxConstraints(minWidth: MediaQuery.of(context).size.width),
color: Colors.white, color: Colors.white,
child: DataTable( child: DataTable(
showCheckboxColumn: false,
columns: const [ columns: const [
DataColumn(
label: Expanded(child: Text('sl no', softWrap: true))),
DataColumn( DataColumn(
label: Expanded( label: Expanded(
child: Text('Artical Title', softWrap: true), child: Text('Article Title', softWrap: true),
)), )),
DataColumn( DataColumn(
label: Expanded( label: Expanded(
@ -58,16 +65,38 @@ class _PublicationsDataState extends State<PublicationsData> {
DataColumn( DataColumn(
label: Expanded(child: Text('Date', softWrap: true))), label: Expanded(child: Text('Date', softWrap: true))),
DataColumn( DataColumn(
label: Expanded(child: Text('Authors', softWrap: true))), label:
Expanded(child: Text('Authors', softWrap: true))),
// Add more columns as needed // Add more columns as needed
], ],
rows: List.generate( rows: List.generate(
hcppublication.length, hcppublication.length,
(index) => DataRow( (index) => DataRow(
onSelectChanged: (value) {
// =======> Use onSelectChanged for tab
print("message11 ${hcppublication[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(hcppublication[index]);
},
);
},
cells: [ cells: [
DataCell(Text(hcppublication[index]['id'].toString(),
softWrap: true)),
DataCell(Text( DataCell(Text(
hcppublication[index]['artical_title'].toString(), hcppublication[index]['artical_title'].toString(),
softWrap: true)), softWrap: true)),
@ -76,7 +105,8 @@ class _PublicationsDataState extends State<PublicationsData> {
softWrap: true)), softWrap: true)),
DataCell(Text(hcppublication[index]['date'].toString(), DataCell(Text(hcppublication[index]['date'].toString(),
softWrap: true)), softWrap: true)),
DataCell(Text(hcppublication[index]['author'].toString(), DataCell(Text(
hcppublication[index]['author'].toString(),
softWrap: true)), softWrap: true)),
// Add more DataCells as needed // Add more DataCells as needed
@ -86,6 +116,7 @@ class _PublicationsDataState extends State<PublicationsData> {
), ),
), ),
), ),
),
)); ));
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,110 @@
import 'package:discover_module/provider_class/training_provider.dart';
import 'package:discover_module/ui_screen/bottom_sheet.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class TrainingShowMore extends StatefulWidget {
TrainingShowMore({required this.text, Key? key}) : super(key: key);
final int text;
@override
State<TrainingShowMore> createState() => _TrainingShowMoreState();
}
class _TrainingShowMoreState extends State<TrainingShowMore> {
@override
List training = [];
@override
void initState() {
// TODO: implement initState
super.initState();
affdata();
}
affdata() async {
var trai = Provider.of<TrainigProvider>(context, listen: false);
await trai.traininginfo(widget.text);
final training1 = trai.traininglist;
setState(() {
training = training1;
});
print("locationList: ${training}");
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Training'),
),
body: Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Container(
constraints:
BoxConstraints(minWidth: MediaQuery.of(context).size.width),
color: Colors.white,
child: DataTable(
showCheckboxColumn: false,
columns: const [
DataColumn(
label: Expanded(
child: Text('Education Type',
style: TextStyle(fontWeight: FontWeight.w600),
softWrap: true),
)),
DataColumn(
label: Expanded(
child: Text('Institution Name',
style:
TextStyle(fontWeight: FontWeight.w600)))),
],
rows: List.generate(
training.length,
(index) => DataRow(
onSelectChanged: (value) {
print("message ${training[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(training[index]);
},
);
},
cells: [
DataCell(Text(
training[index]['Education Type'].toString(),
softWrap: true)),
DataCell(Text(
training[index]['Institution Name'].toString(),
softWrap: true)),
],
),
),
),
),
),
),
));
}
}

View File

@ -0,0 +1,109 @@
import 'package:discover_module/provider_class/trials_provider.dart';
import 'package:discover_module/ui_screen/bottom_sheet.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class TrialsShowmore extends StatefulWidget {
TrialsShowmore({required this.text, Key? key}) : super(key: key);
final int text;
@override
State<TrialsShowmore> createState() => _TrialsShowmoreState();
}
class _TrialsShowmoreState extends State<TrialsShowmore> {
List trial_data = [];
@override
void initState() {
// TODO: implement initState
super.initState();
affdata();
}
affdata() async {
var trials = Provider.of<TrialsProvider>(context, listen: false);
await trials.trialsdata(widget.text);
final trialslist = trials.trialsinfo;
setState(() {
trial_data = trialslist;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Trials'),
),
body: Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Container(
constraints:
BoxConstraints(minWidth: MediaQuery.of(context).size.width),
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)),
],
),
),
),
),
),
),
));
}
}

View File

@ -6,6 +6,10 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <url_launcher_linux/url_launcher_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) { void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
} }

View File

@ -3,6 +3,7 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
url_launcher_linux
) )
list(APPEND FLUTTER_FFI_PLUGIN_LIST list(APPEND FLUTTER_FFI_PLUGIN_LIST

View File

@ -8,9 +8,13 @@ import Foundation
import connectivity_plus import connectivity_plus
import path_provider_foundation import path_provider_foundation
import shared_preferences_foundation import shared_preferences_foundation
import sqflite
import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin")) ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
} }

View File

@ -121,6 +121,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "8.9.2" version: "8.9.2"
cached_network_image:
dependency: "direct main"
description:
name: cached_network_image
sha256: "4a5d8d2c728b0f3d0245f69f921d7be90cae4c2fd5288f773088672c0893f819"
url: "https://pub.dev"
source: hosted
version: "3.4.0"
cached_network_image_platform_interface:
dependency: transitive
description:
name: cached_network_image_platform_interface
sha256: ff0c949e323d2a1b52be73acce5b4a7b04063e61414c8ca542dbba47281630a7
url: "https://pub.dev"
source: hosted
version: "4.1.0"
cached_network_image_web:
dependency: transitive
description:
name: cached_network_image_web
sha256: "6322dde7a5ad92202e64df659241104a43db20ed594c41ca18de1014598d7996"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
carousel_slider: carousel_slider:
dependency: "direct main" dependency: "direct main"
description: description:
@ -374,6 +398,14 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
flutter_cache_manager:
dependency: transitive
description:
name: flutter_cache_manager
sha256: a77f77806a790eb9ba0118a5a3a936e81c4fea2b61533033b2b0c3d50bbde5ea
url: "https://pub.dev"
source: hosted
version: "3.4.0"
flutter_carousel_widget: flutter_carousel_widget:
dependency: "direct main" dependency: "direct main"
description: description:
@ -664,6 +696,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.0" version: "0.5.0"
octo_image:
dependency: transitive
description:
name: octo_image
sha256: "34faa6639a78c7e3cbe79be6f9f96535867e879748ade7d17c9b1ae7536293bd"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
open_file: open_file:
dependency: "direct main" dependency: "direct main"
description: description:
@ -880,6 +920,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.26" version: "1.0.26"
rxdart:
dependency: transitive
description:
name: rxdart
sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962"
url: "https://pub.dev"
source: hosted
version: "0.28.0"
shared_preferences: shared_preferences:
dependency: "direct main" dependency: "direct main"
description: description:
@ -981,6 +1029,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.10.0" version: "1.10.0"
sprintf:
dependency: transitive
description:
name: sprintf
sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
url: "https://pub.dev"
source: hosted
version: "7.0.0"
sqflite:
dependency: transitive
description:
name: sqflite
sha256: a43e5a27235518c03ca238e7b4732cf35eabe863a369ceba6cbefa537a66f16d
url: "https://pub.dev"
source: hosted
version: "2.3.3+1"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
sha256: "3da423ce7baf868be70e2c0976c28a1bb2f73644268b7ffa7d2e08eab71f16a4"
url: "https://pub.dev"
source: hosted
version: "2.5.4"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
@ -1045,6 +1117,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "21.2.10" version: "21.2.10"
synchronized:
dependency: transitive
description:
name: synchronized
sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558"
url: "https://pub.dev"
source: hosted
version: "3.1.0+1"
term_glyph: term_glyph:
dependency: transitive dependency: transitive
description: description:
@ -1093,6 +1173,78 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.2" version: "2.2.2"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3"
url: "https://pub.dev"
source: hosted
version: "6.3.0"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9"
url: "https://pub.dev"
source: hosted
version: "6.3.2"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e
url: "https://pub.dev"
source: hosted
version: "6.3.1"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
sha256: e2b9622b4007f97f504cd64c0128309dfb978ae66adbe944125ed9e1750f06af
url: "https://pub.dev"
source: hosted
version: "3.2.0"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de"
url: "https://pub.dev"
source: hosted
version: "3.2.0"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e"
url: "https://pub.dev"
source: hosted
version: "2.3.3"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185"
url: "https://pub.dev"
source: hosted
version: "3.1.2"
uuid:
dependency: transitive
description:
name: uuid
sha256: "83d37c7ad7aaf9aa8e275490669535c8080377cfa7a7004c24dfac53afffaa90"
url: "https://pub.dev"
source: hosted
version: "4.4.2"
vector_graphics: vector_graphics:
dependency: transitive dependency: transitive
description: description:

View File

@ -67,6 +67,8 @@ dependencies:
adoptive_calendar: ^0.1.8 adoptive_calendar: ^0.1.8
multi_dropdown: ^2.1.4 multi_dropdown: ^2.1.4
intl: ^0.17.0 intl: ^0.17.0
cached_network_image: ^3.4.0
url_launcher: ^6.3.0
@ -97,6 +99,10 @@ flutter:
assets: assets:
- assets/konectar_white_logo.svg - assets/konectar_white_logo.svg
- assets/interactionform.json - assets/interactionform.json
- assets/contact.json
- assets/section.json
# An image asset can refer to one or more resolution-specific "variants", see # An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware # https://flutter.dev/assets-and-images/#resolution-aware

View File

@ -8,10 +8,13 @@
#include <connectivity_plus/connectivity_plus_windows_plugin.h> #include <connectivity_plus/connectivity_plus_windows_plugin.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h> #include <permission_handler_windows/permission_handler_windows_plugin.h>
#include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) { void RegisterPlugins(flutter::PluginRegistry* registry) {
ConnectivityPlusWindowsPluginRegisterWithRegistrar( ConnectivityPlusWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
PermissionHandlerWindowsPluginRegisterWithRegistrar( PermissionHandlerWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
} }

View File

@ -5,6 +5,7 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
connectivity_plus connectivity_plus
permission_handler_windows permission_handler_windows
url_launcher_windows
) )
list(APPEND FLUTTER_FFI_PLUGIN_LIST list(APPEND FLUTTER_FFI_PLUGIN_LIST