aug30
This commit is contained in:
parent
4a4245a147
commit
5072100b96
|
@ -1,10 +1,19 @@
|
|||
<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.CAMERA" />
|
||||
|
||||
|
||||
<application
|
||||
android:label="discover_module"
|
||||
android:label="Konectar Contacts"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
android:usesCleartextTraffic="true"
|
||||
|
||||
android:icon="@mipmap/launcher_icon">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
|
@ -42,5 +51,20 @@
|
|||
<action android:name="android.intent.action.PROCESS_TEXT"/>
|
||||
<data android:mimeType="text/plain"/>
|
||||
</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>
|
||||
</manifest>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
File diff suppressed because one or more lines are too long
|
@ -45,5 +45,13 @@
|
|||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>sms</string>
|
||||
<string>tel</string>
|
||||
<string>mailto</string>
|
||||
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
728
lib/check.dart
728
lib/check.dart
|
@ -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';
|
||||
|
||||
// class MyHomePage11 extends StatefulWidget {
|
||||
// @override
|
||||
// _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();
|
||||
// }
|
||||
// class ModalBottomSheetDemo extends StatelessWidget {
|
||||
// const ModalBottomSheetDemo({Key? key}) : super(key: key);
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Scaffold(
|
||||
// body: CustomScrollView(
|
||||
// controller: _scrollController,
|
||||
// slivers: <Widget>[
|
||||
// SliverAppBar(
|
||||
// automaticallyImplyLeading: false,
|
||||
// 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),
|
||||
// return Center(
|
||||
// child: ElevatedButton(
|
||||
// child: const Text('showModalBottomSheet'),
|
||||
// onPressed: () {
|
||||
// // when raised button is pressed
|
||||
// // we display showModalBottomSheet
|
||||
// showModalBottomSheet<dynamic>(
|
||||
// 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,
|
||||
// //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: [
|
||||
// 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',
|
||||
// index == 0
|
||||
// ? "Top Event Topics"
|
||||
// : index == 1
|
||||
// ? "Top Publication Topics"
|
||||
// : index == 2
|
||||
// ? "Top Products Discussed"
|
||||
// : index == 3
|
||||
// ? "Drugs Prescribed"
|
||||
// : "Condition Treated",
|
||||
// style: TextStyle(
|
||||
// fontSize: MediaQuery.of(context).size.width < 600
|
||||
// ? 20.0
|
||||
// : 28.0,
|
||||
// fontSize: 16.0,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// color: Colors.black,
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(height: 8.0),
|
||||
// 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,
|
||||
// ),
|
||||
// ),
|
||||
// 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,
|
||||
// const SizedBox(height: 10.0),
|
||||
// // Example content, you can replace this with your dynamic data
|
||||
// Row(
|
||||
// children: [
|
||||
// ListView.builder(
|
||||
// itemCount: 50,
|
||||
// itemBuilder: (context, index) {
|
||||
// return ListTile(
|
||||
// title: Text('Item #$index in Tab 1'),
|
||||
// );
|
||||
// },
|
||||
// Container(
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.grey[800], // Replace with your color
|
||||
// borderRadius: BorderRadius.circular(10),
|
||||
// ),
|
||||
// ListView.builder(
|
||||
// itemCount: 50,
|
||||
// itemBuilder: (context, index) {
|
||||
// return ListTile(
|
||||
// title: Text('Item #$index in Tab 2'),
|
||||
// );
|
||||
// },
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.all(5.0),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// 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(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,260 +1,25 @@
|
|||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
class Constants {
|
||||
//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 cardtext = Color.fromARGB(255, 247, 247, 250);
|
||||
static Color cardtext = Colors.transparent;
|
||||
static Color cardtextdark = Colors.transparent;
|
||||
|
||||
// static Color cardtextdark = const Color.fromARGB(255, 156, 154, 154);
|
||||
static const Color bgcolor = Color(0xFFF2F3F8);
|
||||
static Color bgcolor2 = const Color.fromARGB(255, 0, 112, 184);
|
||||
|
||||
static Color k2color11 = Colors.white;
|
||||
|
||||
//static const url = "http://192.168.21.50:8082/api";
|
||||
static const url = 'http://192.168.2.143:8084/api';
|
||||
static final Future<String> response =
|
||||
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';
|
||||
}
|
||||
|
||||
|
||||
// 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,
|
||||
// ),
|
|
@ -12,6 +12,29 @@ class HiveFunctions {
|
|||
_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() {
|
||||
final data = _contactbox.keys.map((key) {
|
||||
final value = _contactbox.get(key);
|
||||
|
@ -32,11 +55,12 @@ class HiveFunctions {
|
|||
"license_no": value["license_no"],
|
||||
"p_suffix": value["p_suffix"],
|
||||
"speciality": value["speciality"],
|
||||
"sub_speciality": value["sub_speciality"]
|
||||
"sub_speciality": value["sub_speciality"],
|
||||
"img_path": value["img_path"]
|
||||
};
|
||||
}).toList();
|
||||
|
||||
return data.reversed.toList();
|
||||
return data;
|
||||
}
|
||||
|
||||
static List getindexUsers() {
|
||||
|
@ -59,27 +83,107 @@ class HiveFunctions {
|
|||
|
||||
return data.reversed.toList();
|
||||
}
|
||||
//static deleteUser112(row) {}
|
||||
|
||||
static addno(int selectedRowId) {
|
||||
// final box1 = Hive.box("mycontact");
|
||||
static deleteUser11(id) {
|
||||
print("Hive_id: $id");
|
||||
final value1 = _contactbox.delete(id);
|
||||
|
||||
print("SelectedStoredvaluessss: $selectedRowId");
|
||||
|
||||
box1.add(selectedRowId);
|
||||
print("Getted_valueee: $value1");
|
||||
}
|
||||
|
||||
static getno() {
|
||||
// final box1 = Hive.box("mycontact");
|
||||
static Future<void> deleteUser(int selectedremoveIndic) async {
|
||||
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) {
|
||||
apihcpdata.add(data);
|
||||
}
|
||||
|
||||
static gethcpdata() {
|
||||
return apihcpdata.values;
|
||||
return apihcpdata.values.toList();
|
||||
}
|
||||
|
||||
static Future<List> getindexUser(String text) async {
|
||||
|
@ -112,4 +216,27 @@ class HiveFunctions {
|
|||
// print("Check_data_is: $data");
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,22 @@
|
|||
import 'package:discover_module/check.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/events_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/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/single_hcpprovider.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/ui_screen/contacts.dart';
|
||||
import 'package:discover_module/ui_screen/discover.dart';
|
||||
|
@ -78,6 +88,16 @@ Future<void> main() async {
|
|||
ChangeNotifierProvider(create: (_) => MediacalInsightProvider()),
|
||||
ChangeNotifierProvider(create: (_) => SpekerEvalutionProvider()),
|
||||
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<HiveDataRepository>(
|
||||
|
@ -87,7 +107,7 @@ Future<void> main() async {
|
|||
child: MyApp(),
|
||||
|
||||
// child: MaterialApp(
|
||||
// home: MyHomePage11(),
|
||||
// home: MyWidget(),
|
||||
// ),
|
||||
));
|
||||
}
|
||||
|
@ -118,8 +138,10 @@ class _MyAppState extends State<MyApp> {
|
|||
fontFamily: 'OpenSans',
|
||||
appBarTheme: const AppBarTheme(
|
||||
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: const MyHomePage(title: 'Discover Module'),
|
||||
// home: const MedicalInsight(),
|
||||
|
|
|
@ -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,
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,7 @@
|
|||
import 'dart:convert';
|
||||
|
||||
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:flutter/cupertino.dart';
|
||||
|
||||
|
@ -11,12 +14,18 @@ class AffiliationsProvider extends ChangeNotifier {
|
|||
List get adddta => affiliations1;
|
||||
List get affiliationsAll => allaffiliations1;
|
||||
|
||||
getAffiliationsdata() async {
|
||||
print("Affiliations_is: ");
|
||||
final affdata = await affapi.getaffiliationsdata();
|
||||
getAffiliationsdata(text) async {
|
||||
print("Affiliations_is: ${text}");
|
||||
final affdata = await affapi.getaffiliationsdata(text);
|
||||
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;
|
||||
// print("Affiliations_is return:$affiliations1 ");
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -12,8 +12,8 @@ class EventProvider extends ChangeNotifier {
|
|||
|
||||
List get allEventsList => alleventlist;
|
||||
|
||||
geteventdata() async {
|
||||
final events = await apicall.geteventsdata();
|
||||
geteventdata(text) async {
|
||||
final events = await apicall.geteventsdata(text);
|
||||
|
||||
eventlist = events;
|
||||
notifyListeners();
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:discover_module/hive_fun.dart';
|
||||
import 'package:discover_module/service.dart/service.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
|
@ -16,6 +17,14 @@ class hcpProvider extends ChangeNotifier {
|
|||
notifyListeners();
|
||||
}
|
||||
|
||||
// getHCPHive() async {
|
||||
// final jsondata = await apicall.getallhcpdata();
|
||||
|
||||
// _list = jsondata;
|
||||
|
||||
// notifyListeners();
|
||||
// }
|
||||
|
||||
List searchHCP(String query) {
|
||||
if (query.isEmpty) {
|
||||
return List.from(_list); // Return full list if query is empty
|
||||
|
@ -24,10 +33,15 @@ class hcpProvider extends ChangeNotifier {
|
|||
// .where(
|
||||
// (hcp) => hcp['name'].toLowerCase().contains(query.toLowerCase()))
|
||||
// .toList();
|
||||
print("JsonIssList: $_list");
|
||||
print("queryIssList: $query");
|
||||
|
||||
return _list
|
||||
.where((hcp) =>
|
||||
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['addr'].toLowerCase().contains(query.toLowerCase()))
|
||||
.toList();
|
||||
|
@ -41,4 +55,15 @@ class hcpProvider extends ChangeNotifier {
|
|||
// }).toList();
|
||||
}
|
||||
}
|
||||
|
||||
getHCPProviderHive() async {
|
||||
final jsondata = await HiveFunctions.gethcpdata();
|
||||
print("JsonDtaa: ${jsondata}");
|
||||
|
||||
_list = jsondata;
|
||||
print("JsonDtaaList: $_list");
|
||||
|
||||
notifyListeners();
|
||||
//print("Get_hcp_dataaaL ${HiveFunctions.gethcpdata()}");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -11,8 +11,8 @@ class PublicatioProvider extends ChangeNotifier {
|
|||
|
||||
List get allpublicationlist => allpublist;
|
||||
|
||||
publicatininfo() async {
|
||||
final publication_result = await apicall.getpublicationsdata();
|
||||
publicatininfo(text) async {
|
||||
final publication_result = await apicall.getpublicationsdata(text);
|
||||
publist = publication_result;
|
||||
notifyListeners();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -8,8 +8,8 @@ class TrialsProvider extends ChangeNotifier {
|
|||
|
||||
List get trialsinfo => trials;
|
||||
|
||||
trialsdata() async {
|
||||
final jsonres = await callapi.getalltrials();
|
||||
trialsdata(text) async {
|
||||
final jsonres = await callapi.getalltrials(text);
|
||||
trials = jsonres;
|
||||
notifyListeners();
|
||||
}
|
||||
|
|
|
@ -3,52 +3,53 @@ import 'dart:convert';
|
|||
import 'package:dio/dio.dart';
|
||||
import 'package:discover_module/constants.dart';
|
||||
import 'package:discover_module/hive_fun.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
|
||||
const String curl = Constants.url;
|
||||
|
||||
class Callapi {
|
||||
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';
|
||||
|
||||
final response = await Dio().get(url);
|
||||
// final response = await Dio().get(url);
|
||||
|
||||
final jsonresponse = response.data;
|
||||
final apihcpdata = Hive.box("hcpdata");
|
||||
// if (apihcpdata.isNotEmpty) {
|
||||
// apihcpdata.clear();
|
||||
// final jsonresponse = response.data;
|
||||
// final apihcpdata = Hive.box("hcpdata");
|
||||
|
||||
// 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({
|
||||
"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;
|
||||
|
||||
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 {
|
||||
|
@ -66,42 +67,90 @@ class Callapi {
|
|||
return jsonresponse1;
|
||||
}
|
||||
|
||||
getaffiliationsdata() async {
|
||||
// const url = 'http://192.168.2.143:8082/api/affiliations';
|
||||
// const url = 'http://192.168.172.50:8081/api/affiliations';
|
||||
const url = '$curl/affiliations';
|
||||
getaffiliationsdata(id) async {
|
||||
print("Affiliation_iddd: ${id}");
|
||||
// const url = '$curl/affiliations';
|
||||
|
||||
final affiliationres = await Dio().get(url);
|
||||
final jsonresponse2 = affiliationres.data.take(2).toList();
|
||||
// final affiliationres = await Dio().get(url);
|
||||
// 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 {
|
||||
//const url = 'http://192.168.2.143:8082/api/publications';
|
||||
// const url = 'http://192.168.172.50:8081/api/publications';
|
||||
const url = '$curl/publications';
|
||||
getpublicationsdata(id) async {
|
||||
print("getpublicationsdata_iddd: ${id}");
|
||||
|
||||
final affiliationres = await Dio().get(url);
|
||||
final jsonresponse2 = affiliationres.data.take(2).toList();
|
||||
// const url = '$curl/publications';
|
||||
|
||||
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 {
|
||||
// const url = 'http://192.168.2.143:8082/api/events';
|
||||
// const url = 'http://192.168.172.50:8081/api/events';
|
||||
const url = '$curl/events';
|
||||
geteventsdata(id) async {
|
||||
// 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;
|
||||
print("All_event: $jsonEvent");
|
||||
final jsonEvent1 = events.data.take(2).toList();
|
||||
// print("All_event: $jsonEvent");
|
||||
// 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 {
|
||||
|
@ -143,14 +192,30 @@ class Callapi {
|
|||
return jsonEvent;
|
||||
}
|
||||
|
||||
getalltrials() async {
|
||||
// const url = 'http://192.168.2.143:8082/api/trails';
|
||||
const url = '$curl/trails';
|
||||
getalltrials(id) async {
|
||||
print("TrialsssssAPIIIIIIIIII: $id");
|
||||
// const url = '$curl/trails';
|
||||
|
||||
final trials = await Dio().get(url);
|
||||
final jsontrials = trials.data;
|
||||
print("All_trialsss: $jsontrials");
|
||||
return jsontrials;
|
||||
// final trials = await Dio().get(url);
|
||||
// final jsontrials = trials.data;
|
||||
// print("All_trialsss: $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 {
|
||||
|
@ -168,22 +233,218 @@ class Callapi {
|
|||
}
|
||||
|
||||
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 {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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(),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
//);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
|
@ -2,9 +2,14 @@ import 'package:discover_module/provider_class/affiliationsprovider.dart';
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:discover_module/ui_screen/new_new_profile.dart';
|
||||
|
||||
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
|
||||
State<AffiliationsData> createState() => _AffiliationsDataState();
|
||||
|
@ -17,15 +22,18 @@ class _AffiliationsDataState extends State<AffiliationsData> {
|
|||
// TODO: implement initState
|
||||
super.initState();
|
||||
|
||||
print("Checkingg_passing_is: ${widget.text}");
|
||||
affdata();
|
||||
}
|
||||
|
||||
affdata() async {
|
||||
final affprovider =
|
||||
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(() {
|
||||
hcpaffiliations = affdata;
|
||||
});
|
||||
|
@ -40,37 +48,48 @@ class _AffiliationsDataState extends State<AffiliationsData> {
|
|||
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('sl no'))),
|
||||
//DataColumn(label: Expanded(child: Text('sl no'))),
|
||||
DataColumn(
|
||||
label: Expanded(
|
||||
child: Text('Organization Name'),
|
||||
)),
|
||||
DataColumn(
|
||||
label:
|
||||
Expanded(child: Text('Department', softWrap: true))),
|
||||
label: Expanded(
|
||||
child: Text('Department', softWrap: true))),
|
||||
DataColumn(
|
||||
label: Expanded(child: Text('Role', softWrap: true))),
|
||||
DataColumn(
|
||||
label: Expanded(
|
||||
child: Text('Time Frame', softWrap: true))),
|
||||
DataColumn(
|
||||
label:
|
||||
Expanded(child: Text('Time Frame', softWrap: true))),
|
||||
Expanded(child: Text('Org Type', softWrap: true))),
|
||||
DataColumn(
|
||||
label: Expanded(child: Text('Org Type', softWrap: true))),
|
||||
DataColumn(
|
||||
label: Expanded(child: Text('Eng Type', softWrap: true))),
|
||||
label:
|
||||
Expanded(child: Text('Eng Type', softWrap: true))),
|
||||
// Add more columns as needed
|
||||
],
|
||||
rows: List.generate(
|
||||
hcpaffiliations.length,
|
||||
(index) => DataRow(
|
||||
onSelectChanged: (value) {
|
||||
// =======> Use onSelectChanged for tab
|
||||
print("message11 ${hcpaffiliations[index]}");
|
||||
|
||||
bottomshet(hcpaffiliations[index]);
|
||||
},
|
||||
cells: [
|
||||
DataCell(Text(hcpaffiliations[index]['id'].toString(),
|
||||
softWrap: true)),
|
||||
// DataCell(Text(hcpaffiliations[index]['id'].toString(),
|
||||
// softWrap: true)),
|
||||
DataCell(Text(
|
||||
hcpaffiliations[index]['org_name'].toString(),
|
||||
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]),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
//);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
@ -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]),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
|
@ -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'),
|
||||
// )
|
||||
// ],
|
||||
// // )
|
||||
// // ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
|
@ -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)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
|
@ -1,240 +1,195 @@
|
|||
// import 'package:discover_module/hive_fun.dart';
|
||||
// import 'package:discover_module/ui_screen/interactionform/NewtworkConnectivity.dart';
|
||||
// // import 'package:discover_module/hive_fun.dart';
|
||||
// // import 'package:discover_module/ui_screen/interactionform/NewtworkConnectivity.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/ranking.dart';
|
||||
// import 'package:flutter/cupertino.dart';
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:flutter/services.dart';
|
||||
// import 'package:flutter/widgets.dart';
|
||||
// import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
||||
// import 'package:hive_flutter/hive_flutter.dart';
|
||||
// import 'package:provider/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/ranking.dart';
|
||||
// // import 'package:flutter/cupertino.dart';
|
||||
// // import 'package:flutter/material.dart';
|
||||
// // import 'package:flutter/services.dart';
|
||||
// // import 'package:flutter/widgets.dart';
|
||||
// // import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
||||
// // import 'package:hive_flutter/hive_flutter.dart';
|
||||
// // import 'package:provider/provider.dart';
|
||||
|
||||
// class Contacts extends StatefulWidget {
|
||||
// const Contacts({super.key});
|
||||
// // class Contacts extends StatefulWidget {
|
||||
// // const Contacts({super.key});
|
||||
|
||||
// @override
|
||||
// State<Contacts> createState() => _ContactsState();
|
||||
// }
|
||||
// // @override
|
||||
// // State<Contacts> createState() => _ContactsState();
|
||||
// // }
|
||||
|
||||
// class _ContactsState extends State<Contacts> {
|
||||
// // final _contactbox = Hive.box('mycontact');
|
||||
// static final _contactbox = Hive.box("mycontact");
|
||||
// // class _ContactsState extends State<Contacts> {
|
||||
// // // 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();
|
||||
// @override
|
||||
// void initState() {
|
||||
// // TODO: implement initState
|
||||
// super.initState();
|
||||
// setupConnectivityListener();
|
||||
// // // List<dynamic> alldata = _contactbox.values.toList();
|
||||
// // @override
|
||||
// // void initState() {
|
||||
// // // TODO: implement initState
|
||||
// // super.initState();
|
||||
// // setupConnectivityListener();
|
||||
|
||||
// getcall();
|
||||
// }
|
||||
// // getcall();
|
||||
// // }
|
||||
|
||||
// NetworkConnectivity networkConnectivity = NetworkConnectivity();
|
||||
// // NetworkConnectivity networkConnectivity = NetworkConnectivity();
|
||||
|
||||
// Future<void> setupConnectivityListener() async {
|
||||
// while (true) {
|
||||
// bool isOnline = await networkConnectivity.isInternetAvailable();
|
||||
// print('Internetcontact available: $isOnline');
|
||||
// // Perform actions based on connectivity status
|
||||
// await Future.delayed(Duration(seconds: 10));
|
||||
// // Future<void> setupConnectivityListener() async {
|
||||
// // while (true) {
|
||||
// // bool isOnline = await networkConnectivity.isInternetAvailable();
|
||||
// // print('Internetcontact available: $isOnline');
|
||||
// // // Perform actions based on connectivity status
|
||||
// // await Future.delayed(Duration(seconds: 10));
|
||||
|
||||
// setState(() {
|
||||
// isOnline2 = isOnline;
|
||||
// }); // Example: Check every 10 seconds
|
||||
// }
|
||||
// }
|
||||
// // setState(() {
|
||||
// // isOnline2 = isOnline;
|
||||
// // }); // Example: Check every 10 seconds
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// void getcall() async {
|
||||
// await Provider.of<hcpProvider>(context, listen: false).getHCPProvider();
|
||||
// }
|
||||
// // 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(
|
||||
// "newdata_is: ${_contactbox.values.toList()},${_contactbox.values.toList().length}");
|
||||
// // @override
|
||||
// // Widget build(BuildContext context) {
|
||||
// // SystemChrome.setSystemUIOverlayStyle(
|
||||
// // SystemUiOverlayStyle(statusBarColor: Color.fromARGB(255, 0, 71, 132)));
|
||||
// // print(
|
||||
// // "newdata_is: ${_contactbox.values.toList()},${_contactbox.values.toList().length}");
|
||||
|
||||
// print(
|
||||
// "Data_newww: ${HiveFunctions.getAllUsers()} ,${HiveFunctions.getAllUsers().length} ");
|
||||
// // print(
|
||||
// // "Data_newww: ${HiveFunctions.getAllUsers()} ,${HiveFunctions.getAllUsers().length} ");
|
||||
|
||||
// return SafeArea(
|
||||
// child: Scaffold(
|
||||
// // appBar: AppBar(
|
||||
// // title: const Text('Contacts'),
|
||||
// // ),
|
||||
// body: Consumer<hcpProvider>(builder: (context, value, child) {
|
||||
// print("todoss: ${value},${value.list.length}");
|
||||
// return Column(
|
||||
// children: [
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment
|
||||
// .center, // Align children to start and end of the row
|
||||
// // return SafeArea(
|
||||
// // child: Scaffold(
|
||||
// // // appBar: AppBar(
|
||||
// // // title: const Text('Contacts'),
|
||||
// // // ),
|
||||
// // body: Consumer<hcpProvider>(builder: (context, value, child) {
|
||||
// // print("todoss: ${value},${value.list.length}");
|
||||
// // return Column(
|
||||
// // children: [
|
||||
// // Row(
|
||||
// // mainAxisAlignment: MainAxisAlignment
|
||||
// // .center, // Align children to start and end of the row
|
||||
|
||||
// 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),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// // children: [
|
||||
// // Expanded(
|
||||
// Row(
|
||||
// // Adjust alignment as needed
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// _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,
|
||||
// )),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// // 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),
|
||||
// // ),
|
||||
// ]),
|
||||
// isOnline2
|
||||
// ? Expanded(
|
||||
// child: ListView.builder(
|
||||
// itemCount: value.list.length,
|
||||
// itemBuilder: (BuildContext context, int index) {
|
||||
// // var data = HiveFunctions.getAllUsers()[index];
|
||||
// var data = value.list[index];
|
||||
// // ),
|
||||
// // ),
|
||||
// // // Expanded(
|
||||
// // Row(
|
||||
// // // Adjust alignment as needed
|
||||
// // mainAxisSize: MainAxisSize.min,
|
||||
// // children: [
|
||||
// // _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(
|
||||
// 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(
|
||||
// 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(
|
||||
// // 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(
|
||||
// // itemCount: HiveFunctions.getAllUsers().length,
|
||||
// // itemBuilder: (BuildContext context, int index) {
|
||||
|
@ -262,12 +217,14 @@
|
|||
// // title: Text(
|
||||
// // data["name"],
|
||||
// // style: const TextStyle(
|
||||
// // fontSize: 18.0, fontWeight: FontWeight.bold),
|
||||
// // fontSize: 18.0,
|
||||
// // fontWeight: FontWeight.bold),
|
||||
// // ),
|
||||
// // subtitle: const Text(
|
||||
// // "Added by Pooja.K",
|
||||
// // 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,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,64 +1,64 @@
|
|||
import 'package:discover_module/ui_screen/ranking.dart';
|
||||
import 'package:discover_module/ui_screen/rising_stars.dart';
|
||||
import 'package:discover_module/ui_screen/trends.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
// import 'package:discover_module/ui_screen/ranking.dart';
|
||||
// import 'package:discover_module/ui_screen/rising_stars.dart';
|
||||
// import 'package:discover_module/ui_screen/trends.dart';
|
||||
// import 'package:flutter/material.dart';
|
||||
|
||||
class Discover extends StatefulWidget {
|
||||
const Discover(this.outerTab, {super.key});
|
||||
// class Discover extends StatefulWidget {
|
||||
// const Discover(this.outerTab, {super.key});
|
||||
|
||||
final String outerTab;
|
||||
// final String outerTab;
|
||||
|
||||
@override
|
||||
State<Discover> createState() => _DiscoverState();
|
||||
}
|
||||
// @override
|
||||
// State<Discover> createState() => _DiscoverState();
|
||||
// }
|
||||
|
||||
class _DiscoverState extends State<Discover> with TickerProviderStateMixin {
|
||||
late final TabController _tabController;
|
||||
// class _DiscoverState extends State<Discover> with TickerProviderStateMixin {
|
||||
// late final TabController _tabController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_tabController = TabController(length: 3, vsync: this);
|
||||
}
|
||||
// @override
|
||||
// void initState() {
|
||||
// super.initState();
|
||||
// _tabController = TabController(length: 3, vsync: this);
|
||||
// }
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_tabController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
// @override
|
||||
// void dispose() {
|
||||
// _tabController.dispose();
|
||||
// super.dispose();
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
TabBar.secondary(
|
||||
controller: _tabController,
|
||||
labelStyle:
|
||||
const TextStyle(fontSize: 12.0, fontWeight: FontWeight.bold),
|
||||
indicatorWeight: 1.0,
|
||||
indicatorColor: const Color.fromARGB(255, 0, 71, 135),
|
||||
labelPadding: EdgeInsets.all(0.0),
|
||||
tabs: const <Widget>[
|
||||
Tab(text: 'Ranking'),
|
||||
// Tab(text: 'Chart'),
|
||||
Tab(text: 'Trends'),
|
||||
//Tab(text: 'Referral'),
|
||||
Tab(text: 'Rising Stars '),
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
controller: _tabController,
|
||||
children: <Widget>[
|
||||
Ranking(),
|
||||
// const Chart1(),
|
||||
const Trends(),
|
||||
//const Referral(),
|
||||
const RisingStar(),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Column(
|
||||
// children: <Widget>[
|
||||
// TabBar.secondary(
|
||||
// controller: _tabController,
|
||||
// labelStyle:
|
||||
// const TextStyle(fontSize: 12.0, fontWeight: FontWeight.bold),
|
||||
// indicatorWeight: 1.0,
|
||||
// indicatorColor: const Color.fromARGB(255, 0, 71, 135),
|
||||
// labelPadding: EdgeInsets.all(0.0),
|
||||
// tabs: const <Widget>[
|
||||
// Tab(text: 'Ranking'),
|
||||
// // Tab(text: 'Chart'),
|
||||
// Tab(text: 'Trends'),
|
||||
// //Tab(text: 'Referral'),
|
||||
// Tab(text: 'Rising Stars '),
|
||||
// ],
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: TabBarView(
|
||||
// controller: _tabController,
|
||||
// children: <Widget>[
|
||||
// Ranking(),
|
||||
// // const Chart1(),
|
||||
// const Trends(),
|
||||
// //const Referral(),
|
||||
// const RisingStar(),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
|
|
@ -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)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
|
@ -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
|
@ -1,19 +1,22 @@
|
|||
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/ui_screen/bottom_sheet.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
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
|
||||
State<EventsData> createState() => _EventsDataState();
|
||||
}
|
||||
|
||||
class _EventsDataState extends State<EventsData> {
|
||||
List hcppublication = [];
|
||||
List event_data = [];
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
|
@ -23,12 +26,11 @@ class _EventsDataState extends State<EventsData> {
|
|||
}
|
||||
|
||||
affdata() async {
|
||||
final affprovider = Provider.of<EventProvider>(context, listen: false);
|
||||
await affprovider.allgeteventdata();
|
||||
|
||||
final affdata = affprovider.allEventsList;
|
||||
var events = Provider.of<EventProvider>(context, listen: false);
|
||||
await events.geteventdata(widget.text);
|
||||
final eventlist = events.EventsList;
|
||||
setState(() {
|
||||
hcppublication = affdata;
|
||||
event_data = eventlist;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -36,47 +38,68 @@ class _EventsDataState extends State<EventsData> {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Publications'),
|
||||
title: Text('Events'),
|
||||
),
|
||||
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('sl no', softWrap: true))),
|
||||
DataColumn(
|
||||
label: Expanded(
|
||||
child: Text('Event Name', softWrap: true),
|
||||
child: Text('Event Name',
|
||||
softWrap: true,
|
||||
style: TextStyle(fontWeight: FontWeight.w600)),
|
||||
)),
|
||||
|
||||
DataColumn(
|
||||
label: Expanded(
|
||||
child: Text('Session Type', softWrap: true))),
|
||||
DataColumn(
|
||||
label: Expanded(child: Text('Topic', softWrap: true))),
|
||||
DataColumn(
|
||||
label: Expanded(child: Text('Role', softWrap: true))),
|
||||
child: Text('Role',
|
||||
softWrap: true,
|
||||
style:
|
||||
TextStyle(fontWeight: FontWeight.w600)))),
|
||||
|
||||
// Add more columns as needed
|
||||
],
|
||||
rows: List.generate(
|
||||
hcppublication.length,
|
||||
event_data.length,
|
||||
(index) => DataRow(
|
||||
onSelectChanged: (value) {
|
||||
// =======> Use onSelectChanged for tab
|
||||
print("message ${event_data[index]}");
|
||||
|
||||
showModalBottomSheet(
|
||||
useRootNavigator: true,
|
||||
isScrollControlled: false,
|
||||
enableDrag: true,
|
||||
useSafeArea: true,
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: double.infinity,
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(
|
||||
top: Radius.circular(0),
|
||||
),
|
||||
),
|
||||
clipBehavior: Clip.antiAliasWithSaveLayer,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return bsheet(event_data[index]);
|
||||
},
|
||||
);
|
||||
},
|
||||
cells: [
|
||||
DataCell(Text(hcppublication[index]['id'].toString(),
|
||||
softWrap: true)),
|
||||
DataCell(Text(
|
||||
hcppublication[index]['event_name'].toString(),
|
||||
event_data[index]['event_name'].toString(),
|
||||
softWrap: true)),
|
||||
DataCell(Text(
|
||||
hcppublication[index]['session_type'].toString(),
|
||||
softWrap: true)),
|
||||
DataCell(Text(hcppublication[index]['topic'].toString(),
|
||||
softWrap: true)),
|
||||
DataCell(Text(hcppublication[index]['role'].toString(),
|
||||
|
||||
DataCell(Text(event_data[index]['role'].toString(),
|
||||
softWrap: true)),
|
||||
|
||||
// Add more DataCells as needed
|
||||
|
@ -86,6 +109,7 @@ class _EventsDataState extends State<EventsData> {
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,12 +94,25 @@ class MockApiCall {
|
|||
"sectionName": "Attendees",
|
||||
"multiple": true,
|
||||
"sectionList": [
|
||||
// {
|
||||
// "name": "HCP Name",
|
||||
// "id": "attendeeshcpname_3",
|
||||
// "depid": "",
|
||||
// "widget": "text",
|
||||
// "input": "text1",
|
||||
// "validation": {"isRequired": true}
|
||||
// },
|
||||
{
|
||||
"name": "HCP Name",
|
||||
"id": "attendeeshcpname_3",
|
||||
"depid": "",
|
||||
"widget": "text",
|
||||
"input": "text",
|
||||
"widget": "dropdown",
|
||||
"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}
|
||||
},
|
||||
{
|
||||
|
@ -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
|
@ -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/mockapi.dart';
|
||||
import 'package:discover_module/ui_screen/interactionform/model/save_interaction.dart';
|
||||
import 'package:discover_module/ui_screen/interactionform/util.dart';
|
||||
import 'package:discover_module/ui_screen/interactionform/view_interaction_screen.dart';
|
||||
|
@ -60,6 +62,39 @@ class _SavedFormListScreenState extends State<SavedFormListScreen> {
|
|||
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(
|
||||
child: Center(
|
||||
|
|
|
@ -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)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
import 'package:discover_module/ui_screen/profile.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DataTableDemo extends StatefulWidget {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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/hive_fun.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/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:dropdownfield2/dropdownfield2.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
@ -11,8 +18,6 @@ import 'package:provider/provider.dart';
|
|||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:discover_module/ui_screen/profile.dart';
|
||||
import 'package:discover_module/ui_screen/new_profile.dart';
|
||||
import 'package:discover_module/ui_screen/interactionform/NewtworkConnectivity.dart';
|
||||
|
||||
class Contacts1 extends StatefulWidget {
|
||||
|
@ -25,7 +30,7 @@ class Contacts1 extends StatefulWidget {
|
|||
class _Contacts1State extends State<Contacts1> {
|
||||
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
final _contactBox = Hive.box("mycontact");
|
||||
// final contactBox = Hive.box("mycontact");
|
||||
bool _switchValue = false;
|
||||
bool isOnline2 = true;
|
||||
|
||||
|
@ -61,28 +66,58 @@ class _Contacts1State extends State<Contacts1> {
|
|||
TextEditingController textEditingController = TextEditingController();
|
||||
|
||||
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
|
||||
void initState() {
|
||||
super.initState();
|
||||
// CheckUserConnection();
|
||||
Provider.of<hcpProvider>(context, listen: false).getHCPProvider();
|
||||
|
||||
// HiveFunctions.getAllUsers11();
|
||||
|
||||
//Provider.of<hcpProvider>(context, listen: false).getHCPProviderHive();
|
||||
|
||||
//print("Get_hcp_dataaaL ${HiveFunctions.gethcpdata()}");
|
||||
// getDropdownlist();
|
||||
}
|
||||
|
||||
// getDropdownlist() {
|
||||
// final provider =
|
||||
// Provider.of<hcpProvider>(context, listen: false).getHCPProvider();
|
||||
|
||||
// final datta = provider.list;
|
||||
|
||||
// print("Providerrrrr_is ${datta}");
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
print("ProfileType $dropdownvalue, $_selectedValue1");
|
||||
|
||||
// print("all StoredUser: ${HiveFunctions.getAllUsers11()}");
|
||||
|
||||
if (_selectedValue1 == "Profile Type") {
|
||||
print("PPPP11");
|
||||
setState(() {
|
||||
|
@ -317,44 +352,90 @@ class _Contacts1State extends State<Contacts1> {
|
|||
height: 5,
|
||||
),
|
||||
|
||||
Expanded(
|
||||
!_switchValue
|
||||
? Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: displayedHCPList.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
var data = displayedHCPList[index];
|
||||
|
||||
print("CheckinggggImage_path: ${data['img_path']}");
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
ListTile(
|
||||
onTap: () {
|
||||
onLongPress: () {
|
||||
print("LongPresss");
|
||||
setState(() {
|
||||
longpress = true;
|
||||
});
|
||||
},
|
||||
onTap: () async {
|
||||
print("Check_data = ${data["Location"]}");
|
||||
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => NewProfile(text: data),
|
||||
builder: (context) =>
|
||||
NewProfile1(text: data),
|
||||
),
|
||||
);
|
||||
},
|
||||
leading: data["img_path"] == null
|
||||
leading: data["img_path"] == ""
|
||||
? ProfilePicture(
|
||||
name: data["name"],
|
||||
radius: 20,
|
||||
name: data["First Name"],
|
||||
radius: 30,
|
||||
fontsize: 12,
|
||||
)
|
||||
: ClipOval(
|
||||
child: SizedBox.fromSize(
|
||||
size: Size.fromRadius(30), // Image radius
|
||||
child: Image.network(data["img_path"],
|
||||
fit: BoxFit.fill),
|
||||
size: Size.fromRadius(30),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: data["img_path"],
|
||||
imageBuilder:
|
||||
(context, imageProvider) =>
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: imageProvider,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
// trailing: Icon(
|
||||
// Icons.person_add_rounded,
|
||||
// color: Constants.k2color,
|
||||
// size: 30.0,
|
||||
// ),
|
||||
),
|
||||
// placeholder: (context, url) =>
|
||||
// CircularProgressIndicator(),
|
||||
// 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(
|
||||
"${data["name"]}",
|
||||
style: const TextStyle(
|
||||
fontSize: 18.0,
|
||||
style: TextStyle(
|
||||
fontSize: isTablet ? 22 : 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
|
@ -364,9 +445,9 @@ class _Contacts1State extends State<Contacts1> {
|
|||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"${data["speciality"]},",
|
||||
style: const TextStyle(
|
||||
fontSize: 14.0,
|
||||
"${data["speciality"] ?? data['spl']},",
|
||||
style: TextStyle(
|
||||
fontSize: isTablet ? 20 : 14,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
|
@ -376,12 +457,24 @@ class _Contacts1State extends State<Contacts1> {
|
|||
Row(
|
||||
children: [
|
||||
Text(
|
||||
"${data["addr"]},",
|
||||
"${data["State"] ?? ""},",
|
||||
style: const TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 3.0,
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"${data["Country"] ?? ""}",
|
||||
style: const TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
// Row(
|
||||
|
@ -399,7 +492,8 @@ class _Contacts1State extends State<Contacts1> {
|
|||
),
|
||||
),
|
||||
const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Padding(
|
||||
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");
|
||||
});
|
||||
}
|
||||
|
||||
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
|
@ -309,4 +309,10 @@ class _FormListState extends State<FormList> {
|
|||
);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
|
@ -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)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
|
@ -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)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
|
@ -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
|
@ -1,11 +1,15 @@
|
|||
import 'package:discover_module/provider_class/affiliationsprovider.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/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class PublicationsData extends StatefulWidget {
|
||||
const PublicationsData({super.key});
|
||||
PublicationsData({required this.text, Key? key}) : super(key: key);
|
||||
|
||||
final int text;
|
||||
|
||||
@override
|
||||
State<PublicationsData> createState() => _PublicationsDataState();
|
||||
|
@ -23,12 +27,14 @@ class _PublicationsDataState extends State<PublicationsData> {
|
|||
|
||||
affdata() async {
|
||||
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(() {
|
||||
hcppublication = affdata;
|
||||
});
|
||||
|
||||
print("hcppppProfiledata: ${hcppublication}");
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -40,17 +46,18 @@ class _PublicationsDataState extends State<PublicationsData> {
|
|||
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('sl no', softWrap: true))),
|
||||
DataColumn(
|
||||
label: Expanded(
|
||||
child: Text('Artical Title', softWrap: true),
|
||||
child: Text('Article Title', softWrap: true),
|
||||
)),
|
||||
DataColumn(
|
||||
label: Expanded(
|
||||
|
@ -58,16 +65,38 @@ class _PublicationsDataState extends State<PublicationsData> {
|
|||
DataColumn(
|
||||
label: Expanded(child: Text('Date', softWrap: true))),
|
||||
DataColumn(
|
||||
label: Expanded(child: Text('Authors', softWrap: true))),
|
||||
label:
|
||||
Expanded(child: Text('Authors', softWrap: true))),
|
||||
|
||||
// Add more columns as needed
|
||||
],
|
||||
rows: List.generate(
|
||||
hcppublication.length,
|
||||
(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: [
|
||||
DataCell(Text(hcppublication[index]['id'].toString(),
|
||||
softWrap: true)),
|
||||
DataCell(Text(
|
||||
hcppublication[index]['artical_title'].toString(),
|
||||
softWrap: true)),
|
||||
|
@ -76,7 +105,8 @@ class _PublicationsDataState extends State<PublicationsData> {
|
|||
softWrap: true)),
|
||||
DataCell(Text(hcppublication[index]['date'].toString(),
|
||||
softWrap: true)),
|
||||
DataCell(Text(hcppublication[index]['author'].toString(),
|
||||
DataCell(Text(
|
||||
hcppublication[index]['author'].toString(),
|
||||
softWrap: true)),
|
||||
|
||||
// Add more DataCells as needed
|
||||
|
@ -86,6 +116,7 @@ class _PublicationsDataState extends State<PublicationsData> {
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
|
@ -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)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
|
@ -6,6 +6,10 @@
|
|||
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
url_launcher_linux
|
||||
)
|
||||
|
||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||
|
|
|
@ -8,9 +8,13 @@ import Foundation
|
|||
import connectivity_plus
|
||||
import path_provider_foundation
|
||||
import shared_preferences_foundation
|
||||
import sqflite
|
||||
import url_launcher_macos
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
|
||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||
}
|
||||
|
|
152
pubspec.lock
152
pubspec.lock
|
@ -121,6 +121,30 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -374,6 +398,14 @@ packages:
|
|||
description: flutter
|
||||
source: sdk
|
||||
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:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -664,6 +696,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -880,6 +920,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.26"
|
||||
rxdart:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: rxdart
|
||||
sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.28.0"
|
||||
shared_preferences:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -981,6 +1029,30 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1045,6 +1117,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1093,6 +1173,78 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
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:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -67,6 +67,8 @@ dependencies:
|
|||
adoptive_calendar: ^0.1.8
|
||||
multi_dropdown: ^2.1.4
|
||||
intl: ^0.17.0
|
||||
cached_network_image: ^3.4.0
|
||||
url_launcher: ^6.3.0
|
||||
|
||||
|
||||
|
||||
|
@ -97,6 +99,10 @@ flutter:
|
|||
assets:
|
||||
- assets/konectar_white_logo.svg
|
||||
- assets/interactionform.json
|
||||
- assets/contact.json
|
||||
- assets/section.json
|
||||
|
||||
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware
|
||||
|
|
|
@ -8,10 +8,13 @@
|
|||
|
||||
#include <connectivity_plus/connectivity_plus_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) {
|
||||
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
|
||||
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
|
||||
UrlLauncherWindowsRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
connectivity_plus
|
||||
permission_handler_windows
|
||||
url_launcher_windows
|
||||
)
|
||||
|
||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||
|
|
Loading…
Reference in New Issue