code merge
This commit is contained in:
parent
a362cbc773
commit
7fadc0c64d
|
@ -48,7 +48,7 @@ android {
|
||||||
applicationId "com.example.konectar_events"
|
applicationId "com.example.konectar_events"
|
||||||
// You can update the following values to match your application needs.
|
// You can update the following values to match your application needs.
|
||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdkVersion flutter.minSdkVersion
|
minSdkVersion 21
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
|
|
|
@ -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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
|
@ -0,0 +1,511 @@
|
||||||
|
{
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"id": "Form1",
|
||||||
|
"name": "Interaction Form",
|
||||||
|
"form-fields": [
|
||||||
|
{
|
||||||
|
"sectionName": "Interaction Details",
|
||||||
|
"multiple": false,
|
||||||
|
"sectionList": [
|
||||||
|
{
|
||||||
|
"name": "Interaction Date",
|
||||||
|
"id": "intdate_1",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "text",
|
||||||
|
"input": "Date",
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Interaction Location",
|
||||||
|
"param": "interactionLocation",
|
||||||
|
"id": "intlocation_1",
|
||||||
|
"selectedValue": [],
|
||||||
|
"depid": "",
|
||||||
|
"widget": "dropdown",
|
||||||
|
"input": "dropdown",
|
||||||
|
"inputList": [
|
||||||
|
{
|
||||||
|
"id": "1",
|
||||||
|
"name": "In office"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "2",
|
||||||
|
"name": "some"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "3",
|
||||||
|
"name": "Internal meetings"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "4",
|
||||||
|
"name": "Internal meetings2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "5",
|
||||||
|
"name": "Out of Office"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "6",
|
||||||
|
"name": "Virtual"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Interaction Type",
|
||||||
|
"id": "inttype_11",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "dropdown",
|
||||||
|
"input": "dropdown",
|
||||||
|
"inputList": [
|
||||||
|
{
|
||||||
|
"id": "11",
|
||||||
|
"name": "Face to Face"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "12",
|
||||||
|
"name": "Lecture"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "13",
|
||||||
|
"name": "Mailing"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "14",
|
||||||
|
"name": "Other"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "15",
|
||||||
|
"name": "Phone"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Interaction Category",
|
||||||
|
"id": "intcategory_21",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "radio",
|
||||||
|
"input": "radio",
|
||||||
|
"inputList": [
|
||||||
|
{
|
||||||
|
"id": "21",
|
||||||
|
"name": "One to One"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "22",
|
||||||
|
"name": "Group"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Number of Attendees",
|
||||||
|
"id": "intattendees_2",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "text",
|
||||||
|
"input": "number",
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Employee name",
|
||||||
|
"id": "intempname_31",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "dropdown",
|
||||||
|
"input": "dropdown",
|
||||||
|
"inputList": [
|
||||||
|
{
|
||||||
|
"id": "31",
|
||||||
|
"name": "Sarepta Manager"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "32",
|
||||||
|
"name": "Todd Truesdale"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Interaction ",
|
||||||
|
"id": "intcheck_121",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "checkbox",
|
||||||
|
"input": "checkbox",
|
||||||
|
"inputList": [
|
||||||
|
{
|
||||||
|
"id": "121",
|
||||||
|
"name": "One to One"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "122",
|
||||||
|
"name": "Group"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Number of Attendees",
|
||||||
|
"id": "intrange_122",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "rangeslider",
|
||||||
|
"max": "100",
|
||||||
|
"min": "20",
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sectionName": "Discussion Topic",
|
||||||
|
"multiple": true,
|
||||||
|
"sectionList": [
|
||||||
|
{
|
||||||
|
"name": "Product",
|
||||||
|
"id": "discproduct_41",
|
||||||
|
"depid": "",
|
||||||
|
"param": "product",
|
||||||
|
"widget": "dropdown",
|
||||||
|
"input": "dropdown",
|
||||||
|
"inputList": [
|
||||||
|
{
|
||||||
|
"id": "41",
|
||||||
|
"name": "Product1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "42",
|
||||||
|
"name": "Product2"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Discussion Type",
|
||||||
|
"id": "disctype_51",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "autocomplete",
|
||||||
|
"input": "autocomplete",
|
||||||
|
"inputList": [
|
||||||
|
{
|
||||||
|
"id": "51",
|
||||||
|
"name": "Face to Face"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "52",
|
||||||
|
"name": "Lecture"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "53",
|
||||||
|
"name": "Mailing"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "54",
|
||||||
|
"name": "Other"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "55",
|
||||||
|
"name": "Phone"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Discussion Topic",
|
||||||
|
"id": "disctopic_61",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "multiselect",
|
||||||
|
"input": "multiselect",
|
||||||
|
"inputList": [
|
||||||
|
{
|
||||||
|
"id": "61",
|
||||||
|
"name": "Face to Face"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "62",
|
||||||
|
"name": "Lecture"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "63",
|
||||||
|
"name": "Mailing"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "64",
|
||||||
|
"name": "Other"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "65",
|
||||||
|
"name": "Phone"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sectionName": "Attendees",
|
||||||
|
"multiple": true,
|
||||||
|
"sectionList": [
|
||||||
|
{
|
||||||
|
"name": "HCP Name",
|
||||||
|
"id": "attendeeshcpname_3",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "text",
|
||||||
|
"input": "text",
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Speciality",
|
||||||
|
"id": "attendeeshcpspeciality_4",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "text",
|
||||||
|
"input": "text",
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Title",
|
||||||
|
"id": "attendeestitle_5",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "text",
|
||||||
|
"input": "text",
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sectionName": "Other",
|
||||||
|
"multiple": false,
|
||||||
|
"sectionList": [
|
||||||
|
{
|
||||||
|
"name": "Address1",
|
||||||
|
"id": "otheraddress1_12",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "text",
|
||||||
|
"input": "primary",
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Address2",
|
||||||
|
"id": "otheraddress2_13",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "text",
|
||||||
|
"input": "Hubli",
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Postal code",
|
||||||
|
"id": "otherpostal_14",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "text",
|
||||||
|
"input": "number",
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Country",
|
||||||
|
"id": "othercountry_15",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "dropdown",
|
||||||
|
"inputList": [
|
||||||
|
{
|
||||||
|
"name": "India",
|
||||||
|
"id": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "USA",
|
||||||
|
"id": "2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Nepal",
|
||||||
|
"id": "3"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "State",
|
||||||
|
"id": "otherstate_16",
|
||||||
|
"depid": "othercountry_15",
|
||||||
|
"widget": "dropdown",
|
||||||
|
"inputList": [
|
||||||
|
{
|
||||||
|
"name": "Karnataka",
|
||||||
|
"id": "1",
|
||||||
|
"pid": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Maharashtra",
|
||||||
|
"id": "2",
|
||||||
|
"pid": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Andhra Pradesh",
|
||||||
|
"id": "3",
|
||||||
|
"pid": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Karnataka",
|
||||||
|
"id": "4",
|
||||||
|
"pid": "1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "City",
|
||||||
|
"widget": "dropdown",
|
||||||
|
"id": "othercity_17",
|
||||||
|
"depid": "otherstate_16",
|
||||||
|
"inputList": [
|
||||||
|
{
|
||||||
|
"name": "Hubli",
|
||||||
|
"id": "1",
|
||||||
|
"pid": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Bangalore",
|
||||||
|
"id": "2",
|
||||||
|
"pid": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Belgavi",
|
||||||
|
"id": "3",
|
||||||
|
"pid": "1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sectionName": "Other Attendees",
|
||||||
|
"multiple": false,
|
||||||
|
"sectionList": [
|
||||||
|
{
|
||||||
|
"name": "Attendee Name",
|
||||||
|
"id": "otherattendeename_18",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "text",
|
||||||
|
"input": "text",
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Speciality",
|
||||||
|
"id": "otherattendeespeciality_19",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "text",
|
||||||
|
"input": "text",
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Comments",
|
||||||
|
"id": "otherattendeecom_20",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "text",
|
||||||
|
"input": "text",
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sectionName": "Attach Document(s)",
|
||||||
|
"multiple": true,
|
||||||
|
"sectionList": [
|
||||||
|
{
|
||||||
|
"name": "Document Name",
|
||||||
|
"id": "documentName_21",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "text",
|
||||||
|
"input": "text",
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Description",
|
||||||
|
"id": "documentDescription_21",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "text",
|
||||||
|
"input": "text",
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Choose file",
|
||||||
|
"id": "chooseFile_22",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "button",
|
||||||
|
"input": "chooseFile",
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true,
|
||||||
|
"multipleFiles": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"sectionName": "Notes",
|
||||||
|
"multiple": false,
|
||||||
|
"sectionList": [
|
||||||
|
{
|
||||||
|
"name": "Comments",
|
||||||
|
"id": "notescomments_22",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "text",
|
||||||
|
"input": "textArea",
|
||||||
|
"validation": {
|
||||||
|
"type": "maxchars",
|
||||||
|
"chars": "500",
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,230 @@
|
||||||
|
// import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
// class ModalBottomSheetDemo extends StatelessWidget {
|
||||||
|
// const ModalBottomSheetDemo({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
// @override
|
||||||
|
// Widget build(BuildContext context) {
|
||||||
|
// 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,
|
||||||
|
// 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: [
|
||||||
|
// Text(
|
||||||
|
// index == 0
|
||||||
|
// ? "Top Event Topics"
|
||||||
|
// : index == 1
|
||||||
|
// ? "Top Publication Topics"
|
||||||
|
// : index == 2
|
||||||
|
// ? "Top Products Discussed"
|
||||||
|
// : index == 3
|
||||||
|
// ? "Drugs Prescribed"
|
||||||
|
// : "Condition Treated",
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 16.0,
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// color: Colors.white,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// const SizedBox(height: 10.0),
|
||||||
|
// // Example content, you can replace this with your dynamic data
|
||||||
|
// Row(
|
||||||
|
// children: [
|
||||||
|
// Container(
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: Colors.grey[800], // Replace with your color
|
||||||
|
// borderRadius: BorderRadius.circular(10),
|
||||||
|
// ),
|
||||||
|
// 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,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// },
|
||||||
|
// );
|
||||||
|
// }).toList(),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
import 'dart:async';
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||||
|
import 'package:dio/dio.dart';
|
||||||
|
|
||||||
|
class NetworkConnectivity {
|
||||||
|
// Future<bool> isInternetAvailable() async {
|
||||||
|
// var connectivityResult = await (Connectivity().checkConnectivity());
|
||||||
|
// return connectivityResult != ConnectivityResult.none;
|
||||||
|
// }
|
||||||
|
Future<bool> isInternetAvailable() async {
|
||||||
|
var connectivityResult = await Connectivity().checkConnectivity();
|
||||||
|
if (connectivityResult == ConnectivityResult.none) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
// final result = await InternetAddress.lookup('google.com');
|
||||||
|
// return true;
|
||||||
|
final result = await Dio().get('www.google.com');
|
||||||
|
|
||||||
|
if (result.statusCode == 200) {
|
||||||
|
// if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) {
|
||||||
|
return true;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} on SocketException catch (_) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
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 k2color1 = Color.fromARGB(255, 0, 71, 132);
|
||||||
|
|
||||||
|
static Color cardtext = Colors.transparent;
|
||||||
|
static Color cardtextdark = Colors.transparent;
|
||||||
|
|
||||||
|
static const Color bgcolor = Color(0xFFF2F3F8);
|
||||||
|
static Color bgcolor2 = const Color.fromARGB(255, 0, 112, 184);
|
||||||
|
|
||||||
|
static Color k2color11 = Colors.white;
|
||||||
|
|
||||||
|
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.2.143:8000/api";
|
||||||
|
|
||||||
|
// static const url = "http://192.168.21.50:8000/api";
|
||||||
|
|
||||||
|
//static const url = 'http://192.168.2.143:8085/api';http://127.0.0.1:8001
|
||||||
|
//static const url = 'http://192.168.153.50:8082/api';192.168.21.50:8000
|
||||||
|
|
||||||
|
static const k2url = "http://192.168.2.130:8888/api";
|
||||||
|
}
|
|
@ -0,0 +1,212 @@
|
||||||
|
import 'package:konectar_events/contacts_module/constants.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/custom_widget/text.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_Certificate_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_aff_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_awards_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_education_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_email_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_event_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_location_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_pno_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_training_k2.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class CustomExpansionTile<T> extends StatefulWidget {
|
||||||
|
final String title;
|
||||||
|
final List<T> itemList;
|
||||||
|
final String buttonText;
|
||||||
|
final String field1;
|
||||||
|
final String field2;
|
||||||
|
|
||||||
|
final Function(T) onItemSelected;
|
||||||
|
|
||||||
|
const CustomExpansionTile({
|
||||||
|
Key? key,
|
||||||
|
required this.title,
|
||||||
|
required this.itemList,
|
||||||
|
required this.buttonText,
|
||||||
|
required this.onItemSelected,
|
||||||
|
required this.field1,
|
||||||
|
required this.field2,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_CustomExpansionTileState createState() => _CustomExpansionTileState<T>();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CustomExpansionTileState<T> extends State<CustomExpansionTile<T>> {
|
||||||
|
bool _isExpanded = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
print("Chekingg_Field_one: ${widget.field1}");
|
||||||
|
|
||||||
|
return ListTileTheme(
|
||||||
|
dense: true,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
|
child: Container(
|
||||||
|
child: Card(
|
||||||
|
margin: EdgeInsets.all(1.0),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
|
),
|
||||||
|
color: Constants.k2color11,
|
||||||
|
child: ExpansionTile(
|
||||||
|
backgroundColor: Constants.k2color11,
|
||||||
|
initiallyExpanded: false,
|
||||||
|
maintainState: true,
|
||||||
|
onExpansionChanged: (bool expanded) {
|
||||||
|
setState(() {
|
||||||
|
_isExpanded = expanded;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
trailing: Icon(
|
||||||
|
_isExpanded
|
||||||
|
? Icons.keyboard_arrow_up
|
||||||
|
: Icons.keyboard_arrow_down,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
title: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text1(
|
||||||
|
title: widget.title,
|
||||||
|
txtcolor: Colors.black,
|
||||||
|
fontweight: FontWeight.normal,
|
||||||
|
txtfont: 16.0,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8.0),
|
||||||
|
Text1(
|
||||||
|
title: "(${widget.itemList.length})",
|
||||||
|
txtcolor: Colors.black,
|
||||||
|
fontweight: FontWeight.normal,
|
||||||
|
txtfont: 16.0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
Scrollbar(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
scrollDirection: Axis.horizontal,
|
||||||
|
child: Container(
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
minWidth: MediaQuery.of(context).size.width,
|
||||||
|
),
|
||||||
|
color: Colors.white,
|
||||||
|
child: DataTable(
|
||||||
|
showCheckboxColumn: false,
|
||||||
|
columns: [
|
||||||
|
DataColumn(
|
||||||
|
label: Expanded(
|
||||||
|
child: Text(
|
||||||
|
widget.field1 ?? 'Item',
|
||||||
|
style: TextStyle(fontWeight: FontWeight.w600),
|
||||||
|
softWrap: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
DataColumn(
|
||||||
|
label: Expanded(
|
||||||
|
child: Text(
|
||||||
|
widget.field2 ?? 'Details',
|
||||||
|
style: TextStyle(fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
rows: List.generate(widget.itemList.take(2).length,
|
||||||
|
(index) {
|
||||||
|
final item = widget.itemList[index];
|
||||||
|
|
||||||
|
return DataRow(
|
||||||
|
onSelectChanged: (value) {
|
||||||
|
widget.onItemSelected(widget.itemList[index]);
|
||||||
|
},
|
||||||
|
cells: [
|
||||||
|
DataCell(getdatacel1(item)),
|
||||||
|
DataCell(
|
||||||
|
getdatacel2(item),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: OutlinedButton(
|
||||||
|
onPressed: () {
|
||||||
|
// Handle the button action here
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
widget.buttonText,
|
||||||
|
style: TextStyle(color: Constants.k2color),
|
||||||
|
),
|
||||||
|
style: OutlinedButton.styleFrom(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
getdatacel1(T location) {
|
||||||
|
if (location is Data) {
|
||||||
|
return Text1(title: "${location.address1}");
|
||||||
|
} else if (location is DataPhno) {
|
||||||
|
return Text1(title: "${location.phoneTypeName}");
|
||||||
|
} else if (location is EmailData) {
|
||||||
|
return Text1(title: "${location.emailTypeName}");
|
||||||
|
} else if (location is TrainingList) {
|
||||||
|
return Text1(title: "${location.organizationId}");
|
||||||
|
} else if (location is EducationList) {
|
||||||
|
return Text1(title: "${location.organizationId}");
|
||||||
|
} else if (location is AwardsList) {
|
||||||
|
return Text1(title: "${location.name}");
|
||||||
|
} else if (location is CertificateList) {
|
||||||
|
return Text1(title: "${location.organizationId}");
|
||||||
|
} else if (location is AffList) {
|
||||||
|
return Text1(title: "${location.title}");
|
||||||
|
} else if (location is EventList) {
|
||||||
|
return Text1(title: "${location.name}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getdatacel2(T location) {
|
||||||
|
if (location is Data) {
|
||||||
|
return Text1(title: "${location.postalCode}");
|
||||||
|
} else if (location is DataPhno) {
|
||||||
|
return Text1(title: "${location.number}");
|
||||||
|
} else if (location is EmailData) {
|
||||||
|
return Text1(title: "${location.email}");
|
||||||
|
} else if (location is TrainingList) {
|
||||||
|
return Text1(title: "${location.degree}");
|
||||||
|
} else if (location is EducationList) {
|
||||||
|
return Text1(title: "${location.degree}");
|
||||||
|
} else if (location is AwardsList) {
|
||||||
|
return Text1(title: "${location.startDate} ${location.endDate}");
|
||||||
|
} else if (location is CertificateList) {
|
||||||
|
return Text1(title: "${location.specialty}");
|
||||||
|
} else if (location is AffList) {
|
||||||
|
return Text1(title: "${location.role}");
|
||||||
|
} else if (location is EventList) {
|
||||||
|
return Text1(title: "${location.notes}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
// ignore: must_be_immutable
|
||||||
|
class ElevationBtn extends StatefulWidget {
|
||||||
|
ElevationBtn(
|
||||||
|
{this.text, this.color, required this.onPressed, this.textcolor});
|
||||||
|
String? text;
|
||||||
|
Color? color;
|
||||||
|
final VoidCallback onPressed;
|
||||||
|
Color? textcolor;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<ElevationBtn> createState() => _ElevationBtnState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ElevationBtnState extends State<ElevationBtn> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return ElevatedButton(
|
||||||
|
onPressed: widget.onPressed,
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: widget.color?.withOpacity(0.9),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
widget.text!,
|
||||||
|
style: TextStyle(color: widget.textcolor),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
|
// ignore: must_be_immutable
|
||||||
|
class FloatingBtn extends StatefulWidget {
|
||||||
|
FloatingBtn({
|
||||||
|
this.height,
|
||||||
|
this.width,
|
||||||
|
required this.title,
|
||||||
|
this.onTap,
|
||||||
|
required this.icon,
|
||||||
|
});
|
||||||
|
|
||||||
|
double? height;
|
||||||
|
double? width;
|
||||||
|
String title;
|
||||||
|
VoidCallback? onTap;
|
||||||
|
IconData? icon;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<FloatingBtn> createState() => _FloatingBtnState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _FloatingBtnState extends State<FloatingBtn> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return FloatingActionButton(
|
||||||
|
onPressed: widget.onTap,
|
||||||
|
child: Icon(Icons.add),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
import 'package:konectar_events/contacts_module/custom_widget/text.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:http_mock_adapter/http_mock_adapter.dart';
|
||||||
|
|
||||||
|
class Alert extends StatelessWidget {
|
||||||
|
Alert({super.key, required this.data, required this.onPressed});
|
||||||
|
String? data;
|
||||||
|
VoidCallbackAction? oidCallbackAction;
|
||||||
|
final void Function() onPressed;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: Text1(
|
||||||
|
title: "Alert",
|
||||||
|
txtfont: 22.0,
|
||||||
|
),
|
||||||
|
content: Text1(
|
||||||
|
title: data!,
|
||||||
|
txtfont: 18.0,
|
||||||
|
),
|
||||||
|
actions: [TextButton(onPressed: onPressed, child: Text("Ok"))],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
// ignore: must_be_immutable
|
||||||
|
class Text1 extends StatefulWidget {
|
||||||
|
Text1({
|
||||||
|
super.key,
|
||||||
|
required this.title,
|
||||||
|
this.txtcolor,
|
||||||
|
this.txtfont,
|
||||||
|
this.fontweight,
|
||||||
|
});
|
||||||
|
final String title;
|
||||||
|
Color? txtcolor;
|
||||||
|
double? txtfont;
|
||||||
|
FontWeight? fontweight;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<Text1> createState() => _Text1State();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _Text1State extends State<Text1> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Text(
|
||||||
|
widget.title,
|
||||||
|
softWrap: true,
|
||||||
|
style: TextStyle(
|
||||||
|
color: widget.txtcolor,
|
||||||
|
fontSize: widget.txtfont,
|
||||||
|
fontWeight: widget.fontweight),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
// ignore: must_be_immutable
|
||||||
|
class TxtField extends StatefulWidget {
|
||||||
|
TxtField(
|
||||||
|
{super.key,
|
||||||
|
required this.text,
|
||||||
|
this.voidCallback,
|
||||||
|
this.contentPadding,
|
||||||
|
this.icon,
|
||||||
|
this.border,
|
||||||
|
this.decoration});
|
||||||
|
|
||||||
|
final String? text;
|
||||||
|
final VoidCallback? voidCallback;
|
||||||
|
final Padding? contentPadding;
|
||||||
|
Icon? icon;
|
||||||
|
Border? border;
|
||||||
|
Decoration? decoration;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<TxtField> createState() => _TxtFieldState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _TxtFieldState extends State<TxtField> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return TextField();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,390 @@
|
||||||
|
// import 'package:discover_module/storage_hive/kol_info/kol_info_model_hive.dart';
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
|
||||||
|
class HiveFunctions {
|
||||||
|
// String userHiveBox="User Box";
|
||||||
|
// Box which will use to store the things
|
||||||
|
static final _contactbox = Hive.box("mycontact");
|
||||||
|
static var box1 = Hive.box('checkvalue');
|
||||||
|
|
||||||
|
static final apihcpdata = Hive.box("hcpdata");
|
||||||
|
|
||||||
|
static final apihcpdata123 = Hive.box('kolshive');
|
||||||
|
|
||||||
|
static createUser(Map data) {
|
||||||
|
_contactbox.add(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
static List getAllUsers11() {
|
||||||
|
final data = _contactbox.keys.map((key) {
|
||||||
|
final value = _contactbox.get(key);
|
||||||
|
print("Checking_Name : $value");
|
||||||
|
return {
|
||||||
|
"inid": value["inid"],
|
||||||
|
"id": value["id"],
|
||||||
|
"name": value["name"],
|
||||||
|
"org": value["org"],
|
||||||
|
"addr": value["addr"],
|
||||||
|
"phone": value["phone"],
|
||||||
|
"phone_no": value["phone_no"],
|
||||||
|
"email": value["email"],
|
||||||
|
"summarry": value["summarry"],
|
||||||
|
"speciality": value["speciality"],
|
||||||
|
"sub_speciality": value["sub_speciality"],
|
||||||
|
"img_path": value["img_path"]
|
||||||
|
};
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
return data.reversed.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
static List getAllUsers() {
|
||||||
|
final data = _contactbox.keys.map((key) {
|
||||||
|
final value = _contactbox.get(key);
|
||||||
|
print("Checking_Name : $value");
|
||||||
|
return {
|
||||||
|
"id": value["id"],
|
||||||
|
"name": value["name"],
|
||||||
|
"org": value["org"],
|
||||||
|
"addr": value["addr"],
|
||||||
|
"phone": value["phone"],
|
||||||
|
"phone_no": value["phone_no"],
|
||||||
|
"email": value["email"],
|
||||||
|
"affiliations_count": value["affiliations_count"],
|
||||||
|
"events_count": value["events_count"],
|
||||||
|
"publications_count": value["publications_count"],
|
||||||
|
"trail_count": value["trail_count"],
|
||||||
|
"summarry": value["summarry"],
|
||||||
|
"license_no": value["license_no"],
|
||||||
|
"p_suffix": value["p_suffix"],
|
||||||
|
"speciality": value["speciality"],
|
||||||
|
"sub_speciality": value["sub_speciality"],
|
||||||
|
"img_path": value["img_path"]
|
||||||
|
};
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List getindexUsers() {
|
||||||
|
final data = _contactbox.keys.map((key) {
|
||||||
|
final value = _contactbox.get(key);
|
||||||
|
print("Checking_Name : $value");
|
||||||
|
return {
|
||||||
|
"name": value["name"],
|
||||||
|
"org": value["org"],
|
||||||
|
"adrr": value["adrr"],
|
||||||
|
"phone": value["phone"],
|
||||||
|
"Pphone": value["Pphone"],
|
||||||
|
"email": value["email"],
|
||||||
|
"affno": value["affno"],
|
||||||
|
"eveno": value["eveno"],
|
||||||
|
"pubno": value["pubno"],
|
||||||
|
"trailno": value["trailno"]
|
||||||
|
};
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
return data.reversed.toList();
|
||||||
|
}
|
||||||
|
//static deleteUser112(row) {}
|
||||||
|
|
||||||
|
static deleteUser11(id) async {
|
||||||
|
print("Hive_id: $id");
|
||||||
|
|
||||||
|
for (var entry in _contactbox.toMap().entries) {
|
||||||
|
var contactData = entry.value;
|
||||||
|
|
||||||
|
print("Selected_del_value: $contactData");
|
||||||
|
|
||||||
|
if (contactData['id'] == id) {
|
||||||
|
print("entry.keyentry.key: ${entry.key}.");
|
||||||
|
|
||||||
|
// Found the contact with the matching id
|
||||||
|
await _contactbox.delete(entry.key); // Delete by key
|
||||||
|
print("Record with id $id has been deleted.");
|
||||||
|
return; // Exit the function after deletion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<void> deleteUser(int selectedremoveIndic) async {
|
||||||
|
print("storeddelData_id: ${selectedremoveIndic}");
|
||||||
|
|
||||||
|
// 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.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
static List getindexUser(String query) {
|
||||||
|
//static getindexUser(String text) async {
|
||||||
|
print("Text_issssssS: $query");
|
||||||
|
|
||||||
|
final value = _contactbox.values.toList();
|
||||||
|
print("Checking_Name_Offline_Searchh : ${value}");
|
||||||
|
|
||||||
|
// final offlinesearch1 = value.map((e) => e["name"].toString()).toList();
|
||||||
|
|
||||||
|
// print("Checking_offlinesearch1 : ${offlinesearch1}");
|
||||||
|
|
||||||
|
List data = value
|
||||||
|
.where((hcp) =>
|
||||||
|
hcp['name'].toLowerCase().contains(query.toLowerCase()) ||
|
||||||
|
hcp['speciality'].toLowerCase().contains(query.toLowerCase()) ||
|
||||||
|
hcp['addr'].toLowerCase().contains(query.toLowerCase()))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
print("Checking_Name_data : ${data}");
|
||||||
|
|
||||||
|
// print("Checking_Name : ${value.contains(text)}");
|
||||||
|
// final dataa = value.get(text);
|
||||||
|
|
||||||
|
// return {
|
||||||
|
// "name": value["name"],
|
||||||
|
// "org": value["org"],
|
||||||
|
// "adrr": value["adrr"],
|
||||||
|
// "phone": value["phone"],
|
||||||
|
// "Pphone": value["Pphone"],
|
||||||
|
// "email": value["email"],
|
||||||
|
// "affno": value["affno"],
|
||||||
|
// "eveno": value["eveno"],
|
||||||
|
// "pubno": value["pubno"],
|
||||||
|
// "trailno": value["trailno"]
|
||||||
|
// };
|
||||||
|
// }).toList();
|
||||||
|
|
||||||
|
// print("Check_data_is: $data");
|
||||||
|
return data.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
static getAllhcpdata(String? option) {
|
||||||
|
List myhcpname = _contactbox.values.toList();
|
||||||
|
|
||||||
|
if (option == "HCP Name") {
|
||||||
|
return myhcpname.map((e) => e["name"].toString()).toList();
|
||||||
|
} else {
|
||||||
|
return myhcpname.map((e) => e["speciality"].toString()).toList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static List OfflineStored_getindexUser(String query) {
|
||||||
|
//static getindexUser(String text) async {
|
||||||
|
|
||||||
|
print("Text_issssssS: $query");
|
||||||
|
|
||||||
|
final value = apihcpdata123.values.toList();
|
||||||
|
print("Checking_Name_Offline_Searchh : ${value}");
|
||||||
|
|
||||||
|
// final offlinesearch1 = value.map((e) => e["name"].toString()).toList();
|
||||||
|
|
||||||
|
// print("Checking_offlinesearch1 : ${offlinesearch1}");
|
||||||
|
|
||||||
|
List data = value
|
||||||
|
.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();
|
||||||
|
|
||||||
|
print("Checking_Name_data : ${data}");
|
||||||
|
|
||||||
|
// print("Checking_Name : ${value.contains(text)}");
|
||||||
|
// final dataa = value.get(text);
|
||||||
|
|
||||||
|
// return {
|
||||||
|
// "name": value["name"],
|
||||||
|
// "org": value["org"],
|
||||||
|
// "adrr": value["adrr"],
|
||||||
|
// "phone": value["phone"],
|
||||||
|
// "Pphone": value["Pphone"],
|
||||||
|
// "email": value["email"],
|
||||||
|
// "affno": value["affno"],
|
||||||
|
// "eveno": value["eveno"],
|
||||||
|
// "pubno": value["pubno"],
|
||||||
|
// "trailno": value["trailno"]
|
||||||
|
// };
|
||||||
|
// }).toList();
|
||||||
|
|
||||||
|
// print("Check_data_is: $data");
|
||||||
|
return data.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
// static void savemyContact(List<String> selectedIndices, [List displayedHCPList]) async {
|
||||||
|
// print("Iam selectedd $selectedIndices");
|
||||||
|
|
||||||
|
// for (int i = 0; i < selectedIndices.length; i++) {
|
||||||
|
// Map<String, dynamic>? row = await findRecordById1(selectedIndices[i]);
|
||||||
|
|
||||||
|
// print("StoringgggMyContactneww_isss_isss:Row $row");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Map<String, dynamic> findRecordById(String selectedIndic) {
|
||||||
|
// final list = _contactbox.values.toList();
|
||||||
|
// }
|
||||||
|
|
||||||
|
static Map<String, dynamic>? findRecordById1(String selectedIndic) {
|
||||||
|
final list = _contactbox.values.toList();
|
||||||
|
return list
|
||||||
|
.firstWhere((element) => element['id'] == int.parse(selectedIndic));
|
||||||
|
}
|
||||||
|
|
||||||
|
static savemyContact(Map<String, dynamic> row) async {
|
||||||
|
print("CheckingRowww ${row!["email"]}");
|
||||||
|
|
||||||
|
final value1 = await _contactbox.values.toList();
|
||||||
|
|
||||||
|
List value11 = await value1
|
||||||
|
.where((element) => element["email"] == row["email"])
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
print("Getted_valueee: ${value11}");
|
||||||
|
if (value11.isEmpty) {
|
||||||
|
print("Getted_valueee_imaEmpty");
|
||||||
|
|
||||||
|
Map<String, dynamic> data = await {
|
||||||
|
"id": row["id"],
|
||||||
|
"name": row["name"],
|
||||||
|
"org": row["org"],
|
||||||
|
"addr": row["addr"],
|
||||||
|
"phone": row["phone"],
|
||||||
|
"phone_no": row["phone_no"],
|
||||||
|
"email": row["email"],
|
||||||
|
"summarry": row["summarry"],
|
||||||
|
"speciality": row["speciality"],
|
||||||
|
"sub_speciality": row["sub_speciality"],
|
||||||
|
"img_path": row["img_path"]
|
||||||
|
};
|
||||||
|
print("Inserting_data_is: $data");
|
||||||
|
|
||||||
|
await _contactbox.put(await getNextAutoIncrementValue(), data);
|
||||||
|
|
||||||
|
// await _contactbox.add(row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static 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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final affiliations = affiliationsFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Affiliations> affiliationsFromJson(String str) => List<Affiliations>.from(
|
||||||
|
json.decode(str).map((x) => Affiliations.fromJson(x)));
|
||||||
|
|
||||||
|
String affiliationsToJson(List<Affiliations> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Affiliations {
|
||||||
|
int id;
|
||||||
|
int userId;
|
||||||
|
String orgName;
|
||||||
|
String dept;
|
||||||
|
String role;
|
||||||
|
String timeFrame;
|
||||||
|
String orgType;
|
||||||
|
String emgType;
|
||||||
|
dynamic createdAt;
|
||||||
|
dynamic updatedAt;
|
||||||
|
|
||||||
|
Affiliations({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
required this.orgName,
|
||||||
|
required this.dept,
|
||||||
|
required this.role,
|
||||||
|
required this.timeFrame,
|
||||||
|
required this.orgType,
|
||||||
|
required this.emgType,
|
||||||
|
required this.createdAt,
|
||||||
|
required this.updatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Affiliations.fromJson(Map<String, dynamic> json) => Affiliations(
|
||||||
|
id: json["id"],
|
||||||
|
userId: json["user_id"],
|
||||||
|
orgName: json["org_name"],
|
||||||
|
dept: json["dept"],
|
||||||
|
role: json["role"],
|
||||||
|
timeFrame: json["time_frame"],
|
||||||
|
orgType: json["org_type"],
|
||||||
|
emgType: json["emg_type"],
|
||||||
|
createdAt: json["created_at"],
|
||||||
|
updatedAt: json["updated_at"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"user_id": userId,
|
||||||
|
"org_name": orgName,
|
||||||
|
"dept": dept,
|
||||||
|
"role": role,
|
||||||
|
"time_frame": timeFrame,
|
||||||
|
"org_type": orgType,
|
||||||
|
"emg_type": emgType,
|
||||||
|
"created_at": createdAt,
|
||||||
|
"updated_at": updatedAt,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final awa = awaFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Awa> awaFromJson(String str) =>
|
||||||
|
List<Awa>.from(json.decode(str).map((x) => Awa.fromJson(x)));
|
||||||
|
|
||||||
|
String awaToJson(List<Awa> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Awa {
|
||||||
|
int id;
|
||||||
|
int userId;
|
||||||
|
String educationType;
|
||||||
|
String institutionName;
|
||||||
|
String degree;
|
||||||
|
String specialty;
|
||||||
|
String timeFrame;
|
||||||
|
String url1;
|
||||||
|
String url2;
|
||||||
|
|
||||||
|
Awa({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
required this.educationType,
|
||||||
|
required this.institutionName,
|
||||||
|
required this.degree,
|
||||||
|
required this.specialty,
|
||||||
|
required this.timeFrame,
|
||||||
|
required this.url1,
|
||||||
|
required this.url2,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Awa.fromJson(Map<String, dynamic> json) => Awa(
|
||||||
|
id: json["id"],
|
||||||
|
userId: json["user_id"],
|
||||||
|
educationType: json["Education Type"],
|
||||||
|
institutionName: json["Institution Name"],
|
||||||
|
degree: json["Degree"],
|
||||||
|
specialty: json["Specialty"],
|
||||||
|
timeFrame: json["Time Frame"],
|
||||||
|
url1: json["Url1"],
|
||||||
|
url2: json["Url2"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"user_id": userId,
|
||||||
|
"Education Type": educationType,
|
||||||
|
"Institution Name": institutionName,
|
||||||
|
"Degree": degree,
|
||||||
|
"Specialty": specialty,
|
||||||
|
"Time Frame": timeFrame,
|
||||||
|
"Url1": url1,
|
||||||
|
"Url2": url2,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final cer = cerFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Cer> cerFromJson(String str) =>
|
||||||
|
List<Cer>.from(json.decode(str).map((x) => Cer.fromJson(x)));
|
||||||
|
|
||||||
|
String cerToJson(List<Cer> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Cer {
|
||||||
|
int id;
|
||||||
|
int userId;
|
||||||
|
String educationType;
|
||||||
|
String institutionName;
|
||||||
|
String degree;
|
||||||
|
String specialty;
|
||||||
|
int timeFrame;
|
||||||
|
String url1;
|
||||||
|
String url2;
|
||||||
|
|
||||||
|
Cer({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
required this.educationType,
|
||||||
|
required this.institutionName,
|
||||||
|
required this.degree,
|
||||||
|
required this.specialty,
|
||||||
|
required this.timeFrame,
|
||||||
|
required this.url1,
|
||||||
|
required this.url2,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Cer.fromJson(Map<String, dynamic> json) => Cer(
|
||||||
|
id: json["id"],
|
||||||
|
userId: json["user_id"],
|
||||||
|
educationType: json["Education Type"],
|
||||||
|
institutionName: json["Institution Name"],
|
||||||
|
degree: json["Degree"],
|
||||||
|
specialty: json["Specialty"],
|
||||||
|
timeFrame: json["Time Frame"],
|
||||||
|
url1: json["Url1"],
|
||||||
|
url2: json["Url2"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"user_id": userId,
|
||||||
|
"Education Type": educationType,
|
||||||
|
"Institution Name": institutionName,
|
||||||
|
"Degree": degree,
|
||||||
|
"Specialty": specialty,
|
||||||
|
"Time Frame": timeFrame,
|
||||||
|
"Url1": url1,
|
||||||
|
"Url2": url2,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final edu = eduFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Edu> eduFromJson(String str) =>
|
||||||
|
List<Edu>.from(json.decode(str).map((x) => Edu.fromJson(x)));
|
||||||
|
|
||||||
|
String eduToJson(List<Edu> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Edu {
|
||||||
|
int id;
|
||||||
|
int userId;
|
||||||
|
String educationType;
|
||||||
|
String institutionName;
|
||||||
|
String degree;
|
||||||
|
String specialty;
|
||||||
|
int timeFrame;
|
||||||
|
|
||||||
|
Edu({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
required this.educationType,
|
||||||
|
required this.institutionName,
|
||||||
|
required this.degree,
|
||||||
|
required this.specialty,
|
||||||
|
required this.timeFrame,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Edu.fromJson(Map<String, dynamic> json) => Edu(
|
||||||
|
id: json["id"],
|
||||||
|
userId: json["user_id"],
|
||||||
|
educationType: json["Education Type"],
|
||||||
|
institutionName: json["Institution Name"],
|
||||||
|
degree: json["Degree"],
|
||||||
|
specialty: json["Specialty"],
|
||||||
|
timeFrame: json["Time Frame"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"user_id": userId,
|
||||||
|
"Education Type": educationType,
|
||||||
|
"Institution Name": institutionName,
|
||||||
|
"Degree": degree,
|
||||||
|
"Specialty": specialty,
|
||||||
|
"Time Frame": timeFrame,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final email = emailFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Email> emailFromJson(String str) =>
|
||||||
|
List<Email>.from(json.decode(str).map((x) => Email.fromJson(x)));
|
||||||
|
|
||||||
|
String emailToJson(List<Email> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Email {
|
||||||
|
int id;
|
||||||
|
int userId;
|
||||||
|
String emailType;
|
||||||
|
String email;
|
||||||
|
|
||||||
|
Email({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
required this.emailType,
|
||||||
|
required this.email,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Email.fromJson(Map<String, dynamic> json) => Email(
|
||||||
|
id: json["id"],
|
||||||
|
userId: json["user_id"],
|
||||||
|
emailType: json["Email Type"],
|
||||||
|
email: json["Email"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"user_id": userId,
|
||||||
|
"Email Type": emailType,
|
||||||
|
"Email": email,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final events = eventsFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Events> eventsFromJson(String str) =>
|
||||||
|
List<Events>.from(json.decode(str).map((x) => Events.fromJson(x)));
|
||||||
|
|
||||||
|
String eventsToJson(List<Events> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Events {
|
||||||
|
int id;
|
||||||
|
int userId;
|
||||||
|
String eventName;
|
||||||
|
String sessionType;
|
||||||
|
String topic;
|
||||||
|
String role;
|
||||||
|
DateTime? createdAt;
|
||||||
|
DateTime? updatedAt;
|
||||||
|
|
||||||
|
Events({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
required this.eventName,
|
||||||
|
required this.sessionType,
|
||||||
|
required this.topic,
|
||||||
|
required this.role,
|
||||||
|
required this.createdAt,
|
||||||
|
required this.updatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Events.fromJson(Map<String, dynamic> json) => Events(
|
||||||
|
id: json["id"],
|
||||||
|
userId: json["user_id"],
|
||||||
|
eventName: json["event_name"],
|
||||||
|
sessionType: json["session_type"],
|
||||||
|
topic: json["topic"],
|
||||||
|
role: json["role"],
|
||||||
|
createdAt: json["created_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["created_at"]),
|
||||||
|
updatedAt: json["updated_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["updated_at"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"user_id": userId,
|
||||||
|
"event_name": eventName,
|
||||||
|
"session_type": sessionType,
|
||||||
|
"topic": topic,
|
||||||
|
"role": role,
|
||||||
|
"created_at": createdAt?.toIso8601String(),
|
||||||
|
"updated_at": updatedAt?.toIso8601String(),
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,99 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final table = tableFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Table> tableFromJson(String str) =>
|
||||||
|
List<Table>.from(json.decode(str).map((x) => Table.fromJson(x)));
|
||||||
|
|
||||||
|
String tableToJson(List<Table> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Table {
|
||||||
|
int id;
|
||||||
|
String name;
|
||||||
|
String email;
|
||||||
|
DateTime emailVerifiedAt;
|
||||||
|
String summarry;
|
||||||
|
String addr;
|
||||||
|
int licenseNo;
|
||||||
|
String pSuffix;
|
||||||
|
String speciality;
|
||||||
|
String subSpeciality;
|
||||||
|
int phoneNo;
|
||||||
|
int rank;
|
||||||
|
int score;
|
||||||
|
DateTime? createdAt;
|
||||||
|
DateTime? updatedAt;
|
||||||
|
int eventsCount;
|
||||||
|
int affiliationsCount;
|
||||||
|
int publicationsCount;
|
||||||
|
|
||||||
|
Table({
|
||||||
|
required this.id,
|
||||||
|
required this.name,
|
||||||
|
required this.email,
|
||||||
|
required this.emailVerifiedAt,
|
||||||
|
required this.summarry,
|
||||||
|
required this.addr,
|
||||||
|
required this.licenseNo,
|
||||||
|
required this.pSuffix,
|
||||||
|
required this.speciality,
|
||||||
|
required this.subSpeciality,
|
||||||
|
required this.phoneNo,
|
||||||
|
required this.rank,
|
||||||
|
required this.score,
|
||||||
|
required this.createdAt,
|
||||||
|
required this.updatedAt,
|
||||||
|
required this.eventsCount,
|
||||||
|
required this.affiliationsCount,
|
||||||
|
required this.publicationsCount,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Table.fromJson(Map<String, dynamic> json) => Table(
|
||||||
|
id: json["id"],
|
||||||
|
name: json["name"],
|
||||||
|
email: json["email"],
|
||||||
|
emailVerifiedAt: DateTime.parse(json["email_verified_at"]),
|
||||||
|
summarry: json["summarry"],
|
||||||
|
addr: json["addr"],
|
||||||
|
licenseNo: json["license_no"],
|
||||||
|
pSuffix: json["p_suffix"],
|
||||||
|
speciality: json["speciality"],
|
||||||
|
subSpeciality: json["sub_speciality"],
|
||||||
|
phoneNo: json["phone_no"],
|
||||||
|
rank: json["rank"],
|
||||||
|
score: json["score"],
|
||||||
|
createdAt: json["created_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["created_at"]),
|
||||||
|
updatedAt: json["updated_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["updated_at"]),
|
||||||
|
eventsCount: json["events_count"],
|
||||||
|
affiliationsCount: json["affiliations_count"],
|
||||||
|
publicationsCount: json["publications_count"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"name": name,
|
||||||
|
"email": email,
|
||||||
|
"email_verified_at": emailVerifiedAt.toIso8601String(),
|
||||||
|
"summarry": summarry,
|
||||||
|
"addr": addr,
|
||||||
|
"license_no": licenseNo,
|
||||||
|
"p_suffix": pSuffix,
|
||||||
|
"speciality": speciality,
|
||||||
|
"sub_speciality": subSpeciality,
|
||||||
|
"phone_no": phoneNo,
|
||||||
|
"rank": rank,
|
||||||
|
"score": score,
|
||||||
|
"created_at": createdAt?.toIso8601String(),
|
||||||
|
"updated_at": updatedAt?.toIso8601String(),
|
||||||
|
"events_count": eventsCount,
|
||||||
|
"affiliations_count": affiliationsCount,
|
||||||
|
"publications_count": publicationsCount,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,122 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final dataCertificate = dataCertificateFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
DataCertificate dataCertificateFromJson(String str) =>
|
||||||
|
DataCertificate.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String dataCertificateToJson(DataCertificate data) =>
|
||||||
|
json.encode(data.toJson());
|
||||||
|
|
||||||
|
class DataCertificate {
|
||||||
|
int? code;
|
||||||
|
String? message;
|
||||||
|
List<CertificateList>? data;
|
||||||
|
int? lastPage;
|
||||||
|
int? lastRow;
|
||||||
|
int? count;
|
||||||
|
|
||||||
|
DataCertificate({
|
||||||
|
this.code,
|
||||||
|
this.message,
|
||||||
|
this.data,
|
||||||
|
this.lastPage,
|
||||||
|
this.lastRow,
|
||||||
|
this.count,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory DataCertificate.fromJson(Map<String, dynamic> json) =>
|
||||||
|
DataCertificate(
|
||||||
|
code: json["code"],
|
||||||
|
message: json["message"],
|
||||||
|
data: json["data"] == null
|
||||||
|
? []
|
||||||
|
: List<CertificateList>.from(
|
||||||
|
json["data"]!.map((x) => CertificateList.fromJson(x))),
|
||||||
|
lastPage: json["last_page"],
|
||||||
|
lastRow: json["last_row"],
|
||||||
|
count: json["count"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"code": code,
|
||||||
|
"message": message,
|
||||||
|
"data": data == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.from(data!.map((x) => x.toJson())),
|
||||||
|
"last_page": lastPage,
|
||||||
|
"last_row": lastRow,
|
||||||
|
"count": count,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class CertificateList {
|
||||||
|
String? uniqueId;
|
||||||
|
int? kolId;
|
||||||
|
int? clientId;
|
||||||
|
int? organizationId;
|
||||||
|
dynamic specialty;
|
||||||
|
String? startDate;
|
||||||
|
String? endDate;
|
||||||
|
String? url;
|
||||||
|
dynamic switchedUserId;
|
||||||
|
String? createdByUser;
|
||||||
|
String? updatedByUser;
|
||||||
|
DateTime? formattedCreatedAt;
|
||||||
|
DateTime? formattedUpdatedAt;
|
||||||
|
|
||||||
|
CertificateList({
|
||||||
|
this.uniqueId,
|
||||||
|
this.kolId,
|
||||||
|
this.clientId,
|
||||||
|
this.organizationId,
|
||||||
|
this.specialty,
|
||||||
|
this.startDate,
|
||||||
|
this.endDate,
|
||||||
|
this.url,
|
||||||
|
this.switchedUserId,
|
||||||
|
this.createdByUser,
|
||||||
|
this.updatedByUser,
|
||||||
|
this.formattedCreatedAt,
|
||||||
|
this.formattedUpdatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory CertificateList.fromJson(Map<String, dynamic> json) =>
|
||||||
|
CertificateList(
|
||||||
|
uniqueId: json["unique_id"],
|
||||||
|
kolId: json["kol_id"],
|
||||||
|
clientId: json["client_id"],
|
||||||
|
organizationId: json["organization_id"],
|
||||||
|
specialty: json["specialty"],
|
||||||
|
startDate: json["start_date"],
|
||||||
|
endDate: json["end_date"],
|
||||||
|
url: json["url"],
|
||||||
|
switchedUserId: json["switched_user_id"],
|
||||||
|
createdByUser: json["created_by_user"],
|
||||||
|
updatedByUser: json["updated_by_user"],
|
||||||
|
formattedCreatedAt: json["formatted_created_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_created_at"]),
|
||||||
|
formattedUpdatedAt: json["formatted_updated_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_updated_at"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"unique_id": uniqueId,
|
||||||
|
"kol_id": kolId,
|
||||||
|
"client_id": clientId,
|
||||||
|
"organization_id": organizationId,
|
||||||
|
"specialty": specialty,
|
||||||
|
"start_date": startDate,
|
||||||
|
"end_date": endDate,
|
||||||
|
"url": url,
|
||||||
|
"switched_user_id": switchedUserId,
|
||||||
|
"created_by_user": createdByUser,
|
||||||
|
"updated_by_user": updatedByUser,
|
||||||
|
"formatted_created_at": formattedCreatedAt?.toIso8601String(),
|
||||||
|
"formatted_updated_at": formattedUpdatedAt?.toIso8601String(),
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,144 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final dataAffiliations = dataAffiliationsFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
DataAffiliations dataAffiliationsFromJson(String str) =>
|
||||||
|
DataAffiliations.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String dataAffiliationsToJson(DataAffiliations data) =>
|
||||||
|
json.encode(data.toJson());
|
||||||
|
|
||||||
|
class DataAffiliations {
|
||||||
|
int? code;
|
||||||
|
String? message;
|
||||||
|
List<AffList>? data;
|
||||||
|
int? lastPage;
|
||||||
|
int? lastRow;
|
||||||
|
int? count;
|
||||||
|
|
||||||
|
DataAffiliations({
|
||||||
|
this.code,
|
||||||
|
this.message,
|
||||||
|
this.data,
|
||||||
|
this.lastPage,
|
||||||
|
this.lastRow,
|
||||||
|
this.count,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory DataAffiliations.fromJson(Map<String, dynamic> json) =>
|
||||||
|
DataAffiliations(
|
||||||
|
code: json["code"],
|
||||||
|
message: json["message"],
|
||||||
|
data: json["data"] == null
|
||||||
|
? []
|
||||||
|
: List<AffList>.from(json["data"]!.map((x) => AffList.fromJson(x))),
|
||||||
|
lastPage: json["last_page"],
|
||||||
|
lastRow: json["last_row"],
|
||||||
|
count: json["count"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"code": code,
|
||||||
|
"message": message,
|
||||||
|
"data": data == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.from(data!.map((x) => x.toJson())),
|
||||||
|
"last_page": lastPage,
|
||||||
|
"last_row": lastRow,
|
||||||
|
"count": count,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class AffList {
|
||||||
|
String? uniqueId;
|
||||||
|
String? department;
|
||||||
|
String? title;
|
||||||
|
String? startYear;
|
||||||
|
String? endYear;
|
||||||
|
String? role;
|
||||||
|
dynamic switchedUserId;
|
||||||
|
dynamic kolOrganizationUniqueId;
|
||||||
|
dynamic kolOrganizationName;
|
||||||
|
String? kolOrganizationType;
|
||||||
|
String? kolEngagementType;
|
||||||
|
String? kolEngagementTypeUniqueId;
|
||||||
|
String? startAndEndYear;
|
||||||
|
String? createdByUser;
|
||||||
|
String? updatedByUser;
|
||||||
|
dynamic deletedByUser;
|
||||||
|
DateTime? formattedCreatedAt;
|
||||||
|
DateTime? formattedUpdatedAt;
|
||||||
|
dynamic formattedDeletedAt;
|
||||||
|
|
||||||
|
AffList({
|
||||||
|
this.uniqueId,
|
||||||
|
this.department,
|
||||||
|
this.title,
|
||||||
|
this.startYear,
|
||||||
|
this.endYear,
|
||||||
|
this.role,
|
||||||
|
this.switchedUserId,
|
||||||
|
this.kolOrganizationUniqueId,
|
||||||
|
this.kolOrganizationName,
|
||||||
|
this.kolOrganizationType,
|
||||||
|
this.kolEngagementType,
|
||||||
|
this.kolEngagementTypeUniqueId,
|
||||||
|
this.startAndEndYear,
|
||||||
|
this.createdByUser,
|
||||||
|
this.updatedByUser,
|
||||||
|
this.deletedByUser,
|
||||||
|
this.formattedCreatedAt,
|
||||||
|
this.formattedUpdatedAt,
|
||||||
|
this.formattedDeletedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory AffList.fromJson(Map<String, dynamic> json) => AffList(
|
||||||
|
uniqueId: json["unique_id"],
|
||||||
|
department: json["department"],
|
||||||
|
title: json["title"],
|
||||||
|
startYear: json["start_year"],
|
||||||
|
endYear: json["end_year"],
|
||||||
|
role: json["role"],
|
||||||
|
switchedUserId: json["switched_user_id"],
|
||||||
|
kolOrganizationUniqueId: json["kol_organization_unique_id"],
|
||||||
|
kolOrganizationName: json["kol_organization_name"],
|
||||||
|
kolOrganizationType: json["kol_organization_type"],
|
||||||
|
kolEngagementType: json["kol_engagement_type"],
|
||||||
|
kolEngagementTypeUniqueId: json["kol_engagement_type_unique_id"],
|
||||||
|
startAndEndYear: json["start_and_end_year"],
|
||||||
|
createdByUser: json["created_by_user"],
|
||||||
|
updatedByUser: json["updated_by_user"],
|
||||||
|
deletedByUser: json["deleted_by_user"],
|
||||||
|
formattedCreatedAt: json["formatted_created_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_created_at"]),
|
||||||
|
formattedUpdatedAt: json["formatted_updated_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_updated_at"]),
|
||||||
|
formattedDeletedAt: json["formatted_deleted_at"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"unique_id": uniqueId,
|
||||||
|
"department": department,
|
||||||
|
"title": title,
|
||||||
|
"start_year": startYear,
|
||||||
|
"end_year": endYear,
|
||||||
|
"role": role,
|
||||||
|
"switched_user_id": switchedUserId,
|
||||||
|
"kol_organization_unique_id": kolOrganizationUniqueId,
|
||||||
|
"kol_organization_name": kolOrganizationName,
|
||||||
|
"kol_organization_type": kolOrganizationType,
|
||||||
|
"kol_engagement_type": kolEngagementType,
|
||||||
|
"kol_engagement_type_unique_id": kolEngagementTypeUniqueId,
|
||||||
|
"start_and_end_year": startAndEndYear,
|
||||||
|
"created_by_user": createdByUser,
|
||||||
|
"updated_by_user": updatedByUser,
|
||||||
|
"deleted_by_user": deletedByUser,
|
||||||
|
"formatted_created_at": formattedCreatedAt?.toIso8601String(),
|
||||||
|
"formatted_updated_at": formattedUpdatedAt?.toIso8601String(),
|
||||||
|
"formatted_deleted_at": formattedDeletedAt,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,115 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final dataAwards = dataAwardsFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
DataAwards dataAwardsFromJson(String str) =>
|
||||||
|
DataAwards.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String dataAwardsToJson(DataAwards data) => json.encode(data.toJson());
|
||||||
|
|
||||||
|
class DataAwards {
|
||||||
|
int? code;
|
||||||
|
String? message;
|
||||||
|
List<AwardsList>? data;
|
||||||
|
int? lastPage;
|
||||||
|
int? lastRow;
|
||||||
|
int? count;
|
||||||
|
|
||||||
|
DataAwards({
|
||||||
|
this.code,
|
||||||
|
this.message,
|
||||||
|
this.data,
|
||||||
|
this.lastPage,
|
||||||
|
this.lastRow,
|
||||||
|
this.count,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory DataAwards.fromJson(Map<String, dynamic> json) => DataAwards(
|
||||||
|
code: json["code"],
|
||||||
|
message: json["message"],
|
||||||
|
data: json["data"] == null
|
||||||
|
? []
|
||||||
|
: List<AwardsList>.from(
|
||||||
|
json["data"]!.map((x) => AwardsList.fromJson(x))),
|
||||||
|
lastPage: json["last_page"],
|
||||||
|
lastRow: json["last_row"],
|
||||||
|
count: json["count"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"code": code,
|
||||||
|
"message": message,
|
||||||
|
"data": data == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.from(data!.map((x) => x.toJson())),
|
||||||
|
"last_page": lastPage,
|
||||||
|
"last_row": lastRow,
|
||||||
|
"count": count,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class AwardsList {
|
||||||
|
String? uniqueId;
|
||||||
|
int? kolId;
|
||||||
|
int? clientId;
|
||||||
|
String? name;
|
||||||
|
String? startDate;
|
||||||
|
String? endDate;
|
||||||
|
String? url;
|
||||||
|
dynamic switchedUserId;
|
||||||
|
String? createdByUser;
|
||||||
|
String? updatedByUser;
|
||||||
|
DateTime? formattedCreatedAt;
|
||||||
|
DateTime? formattedUpdatedAt;
|
||||||
|
|
||||||
|
AwardsList({
|
||||||
|
this.uniqueId,
|
||||||
|
this.kolId,
|
||||||
|
this.clientId,
|
||||||
|
this.name,
|
||||||
|
this.startDate,
|
||||||
|
this.endDate,
|
||||||
|
this.url,
|
||||||
|
this.switchedUserId,
|
||||||
|
this.createdByUser,
|
||||||
|
this.updatedByUser,
|
||||||
|
this.formattedCreatedAt,
|
||||||
|
this.formattedUpdatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory AwardsList.fromJson(Map<String, dynamic> json) => AwardsList(
|
||||||
|
uniqueId: json["unique_id"],
|
||||||
|
kolId: json["kol_id"],
|
||||||
|
clientId: json["client_id"],
|
||||||
|
name: json["name"],
|
||||||
|
startDate: json["start_date"],
|
||||||
|
endDate: json["end_date"],
|
||||||
|
url: json["url"],
|
||||||
|
switchedUserId: json["switched_user_id"],
|
||||||
|
createdByUser: json["created_by_user"],
|
||||||
|
updatedByUser: json["updated_by_user"],
|
||||||
|
formattedCreatedAt: json["formatted_created_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_created_at"]),
|
||||||
|
formattedUpdatedAt: json["formatted_updated_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_updated_at"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"unique_id": uniqueId,
|
||||||
|
"kol_id": kolId,
|
||||||
|
"client_id": clientId,
|
||||||
|
"name": name,
|
||||||
|
"start_date": startDate,
|
||||||
|
"end_date": endDate,
|
||||||
|
"url": url,
|
||||||
|
"switched_user_id": switchedUserId,
|
||||||
|
"created_by_user": createdByUser,
|
||||||
|
"updated_by_user": updatedByUser,
|
||||||
|
"formatted_created_at": formattedCreatedAt?.toIso8601String(),
|
||||||
|
"formatted_updated_at": formattedUpdatedAt?.toIso8601String(),
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,123 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final dataEducation = dataEducationFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
DataEducation dataEducationFromJson(String str) =>
|
||||||
|
DataEducation.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String dataEducationToJson(DataEducation data) => json.encode(data.toJson());
|
||||||
|
|
||||||
|
class DataEducation {
|
||||||
|
int? code;
|
||||||
|
String? message;
|
||||||
|
List<EducationList>? data;
|
||||||
|
int? lastPage;
|
||||||
|
int? lastRow;
|
||||||
|
int? count;
|
||||||
|
|
||||||
|
DataEducation({
|
||||||
|
this.code,
|
||||||
|
this.message,
|
||||||
|
this.data,
|
||||||
|
this.lastPage,
|
||||||
|
this.lastRow,
|
||||||
|
this.count,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory DataEducation.fromJson(Map<String, dynamic> json) => DataEducation(
|
||||||
|
code: json["code"],
|
||||||
|
message: json["message"],
|
||||||
|
data: json["data"] == null
|
||||||
|
? []
|
||||||
|
: List<EducationList>.from(
|
||||||
|
json["data"]!.map((x) => EducationList.fromJson(x))),
|
||||||
|
lastPage: json["last_page"],
|
||||||
|
lastRow: json["last_row"],
|
||||||
|
count: json["count"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"code": code,
|
||||||
|
"message": message,
|
||||||
|
"data": data == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.from(data!.map((x) => x.toJson())),
|
||||||
|
"last_page": lastPage,
|
||||||
|
"last_row": lastRow,
|
||||||
|
"count": count,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class EducationList {
|
||||||
|
String? uniqueId;
|
||||||
|
int? kolId;
|
||||||
|
int? clientId;
|
||||||
|
dynamic organizationId;
|
||||||
|
dynamic degree;
|
||||||
|
dynamic specialty;
|
||||||
|
String? startDate;
|
||||||
|
String? endDate;
|
||||||
|
String? url;
|
||||||
|
dynamic switchedUserId;
|
||||||
|
String? createdByUser;
|
||||||
|
String? updatedByUser;
|
||||||
|
DateTime? formattedCreatedAt;
|
||||||
|
DateTime? formattedUpdatedAt;
|
||||||
|
|
||||||
|
EducationList({
|
||||||
|
this.uniqueId,
|
||||||
|
this.kolId,
|
||||||
|
this.clientId,
|
||||||
|
this.organizationId,
|
||||||
|
this.degree,
|
||||||
|
this.specialty,
|
||||||
|
this.startDate,
|
||||||
|
this.endDate,
|
||||||
|
this.url,
|
||||||
|
this.switchedUserId,
|
||||||
|
this.createdByUser,
|
||||||
|
this.updatedByUser,
|
||||||
|
this.formattedCreatedAt,
|
||||||
|
this.formattedUpdatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory EducationList.fromJson(Map<String, dynamic> json) => EducationList(
|
||||||
|
uniqueId: json["unique_id"],
|
||||||
|
kolId: json["kol_id"],
|
||||||
|
clientId: json["client_id"],
|
||||||
|
organizationId: json["organization_id"],
|
||||||
|
degree: json["degree"],
|
||||||
|
specialty: json["specialty"],
|
||||||
|
startDate: json["start_date"],
|
||||||
|
endDate: json["end_date"],
|
||||||
|
url: json["url"],
|
||||||
|
switchedUserId: json["switched_user_id"],
|
||||||
|
createdByUser: json["created_by_user"],
|
||||||
|
updatedByUser: json["updated_by_user"],
|
||||||
|
formattedCreatedAt: json["formatted_created_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_created_at"]),
|
||||||
|
formattedUpdatedAt: json["formatted_updated_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_updated_at"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"unique_id": uniqueId,
|
||||||
|
"kol_id": kolId,
|
||||||
|
"client_id": clientId,
|
||||||
|
"organization_id": organizationId,
|
||||||
|
"degree": degree,
|
||||||
|
"specialty": specialty,
|
||||||
|
"start_date": startDate,
|
||||||
|
"end_date": endDate,
|
||||||
|
"url": url,
|
||||||
|
"switched_user_id": switchedUserId,
|
||||||
|
"created_by_user": createdByUser,
|
||||||
|
"updated_by_user": updatedByUser,
|
||||||
|
"formatted_created_at": formattedCreatedAt?.toIso8601String(),
|
||||||
|
"formatted_updated_at": formattedUpdatedAt?.toIso8601String(),
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,102 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final dataEmail = dataEmailFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
DataEmail dataEmailFromJson(String str) => DataEmail.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String dataEmailToJson(DataEmail data) => json.encode(data.toJson());
|
||||||
|
|
||||||
|
class DataEmail {
|
||||||
|
int? code;
|
||||||
|
String? message;
|
||||||
|
List<EmailData>? data;
|
||||||
|
int? lastPage;
|
||||||
|
int? lastRow;
|
||||||
|
int? count;
|
||||||
|
|
||||||
|
DataEmail({
|
||||||
|
this.code,
|
||||||
|
this.message,
|
||||||
|
this.data,
|
||||||
|
this.lastPage,
|
||||||
|
this.lastRow,
|
||||||
|
this.count,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory DataEmail.fromJson(Map<String, dynamic> json) => DataEmail(
|
||||||
|
code: json["code"],
|
||||||
|
message: json["message"],
|
||||||
|
data: json["data"] == null
|
||||||
|
? []
|
||||||
|
: List<EmailData>.from(
|
||||||
|
json["data"]!.map((x) => EmailData.fromJson(x))),
|
||||||
|
lastPage: json["last_page"],
|
||||||
|
lastRow: json["last_row"],
|
||||||
|
count: json["count"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"code": code,
|
||||||
|
"message": message,
|
||||||
|
"data": data == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.from(data!.map((x) => x.toJson())),
|
||||||
|
"last_page": lastPage,
|
||||||
|
"last_row": lastRow,
|
||||||
|
"count": count,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class EmailData {
|
||||||
|
String? uniqueId;
|
||||||
|
String? email;
|
||||||
|
String? kolUniqueId;
|
||||||
|
String? emailTypeName;
|
||||||
|
String? formattedIsPrimary;
|
||||||
|
String? createdByUser;
|
||||||
|
String? updatedByUser;
|
||||||
|
DateTime? formattedCreatedAt;
|
||||||
|
DateTime? formattedUpdatedAt;
|
||||||
|
|
||||||
|
EmailData({
|
||||||
|
this.uniqueId,
|
||||||
|
this.email,
|
||||||
|
this.kolUniqueId,
|
||||||
|
this.emailTypeName,
|
||||||
|
this.formattedIsPrimary,
|
||||||
|
this.createdByUser,
|
||||||
|
this.updatedByUser,
|
||||||
|
this.formattedCreatedAt,
|
||||||
|
this.formattedUpdatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory EmailData.fromJson(Map<String, dynamic> json) => EmailData(
|
||||||
|
uniqueId: json["unique_id"],
|
||||||
|
email: json["email"],
|
||||||
|
kolUniqueId: json["kol_unique_id"],
|
||||||
|
emailTypeName: json["email_type_name"],
|
||||||
|
formattedIsPrimary: json["formatted_is_primary"],
|
||||||
|
createdByUser: json["created_by_user"],
|
||||||
|
updatedByUser: json["updated_by_user"],
|
||||||
|
formattedCreatedAt: json["formatted_created_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_created_at"]),
|
||||||
|
formattedUpdatedAt: json["formatted_updated_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_updated_at"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"unique_id": uniqueId,
|
||||||
|
"email": email,
|
||||||
|
"kol_unique_id": kolUniqueId,
|
||||||
|
"email_type_name": emailTypeName,
|
||||||
|
"formatted_is_primary": formattedIsPrimary,
|
||||||
|
"created_by_user": createdByUser,
|
||||||
|
"updated_by_user": updatedByUser,
|
||||||
|
"formatted_created_at": formattedCreatedAt?.toIso8601String(),
|
||||||
|
"formatted_updated_at": formattedUpdatedAt?.toIso8601String(),
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,98 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final dataEvent = dataEventFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
DataEvent dataEventFromJson(String str) => DataEvent.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String dataEventToJson(DataEvent data) => json.encode(data.toJson());
|
||||||
|
|
||||||
|
class DataEvent {
|
||||||
|
int? code;
|
||||||
|
String? message;
|
||||||
|
List<EventList>? data;
|
||||||
|
int? lastPage;
|
||||||
|
int? lastRow;
|
||||||
|
int? count;
|
||||||
|
|
||||||
|
DataEvent({
|
||||||
|
this.code,
|
||||||
|
this.message,
|
||||||
|
this.data,
|
||||||
|
this.lastPage,
|
||||||
|
this.lastRow,
|
||||||
|
this.count,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory DataEvent.fromJson(Map<String, dynamic> json) => DataEvent(
|
||||||
|
code: json["code"],
|
||||||
|
message: json["message"],
|
||||||
|
data: json["data"] == null
|
||||||
|
? []
|
||||||
|
: List<EventList>.from(
|
||||||
|
json["data"]!.map((x) => EventList.fromJson(x))),
|
||||||
|
lastPage: json["last_page"],
|
||||||
|
lastRow: json["last_row"],
|
||||||
|
count: json["count"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"code": code,
|
||||||
|
"message": message,
|
||||||
|
"data": data == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.from(data!.map((x) => x.toJson())),
|
||||||
|
"last_page": lastPage,
|
||||||
|
"last_row": lastRow,
|
||||||
|
"count": count,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class EventList {
|
||||||
|
String? uniqueId;
|
||||||
|
String? name;
|
||||||
|
dynamic notes;
|
||||||
|
int? partiallyReleasedEvent;
|
||||||
|
String? createdByUser;
|
||||||
|
String? updatedByUser;
|
||||||
|
DateTime? formattedCreatedAt;
|
||||||
|
DateTime? formattedUpdatedAt;
|
||||||
|
|
||||||
|
EventList({
|
||||||
|
this.uniqueId,
|
||||||
|
this.name,
|
||||||
|
this.notes,
|
||||||
|
this.partiallyReleasedEvent,
|
||||||
|
this.createdByUser,
|
||||||
|
this.updatedByUser,
|
||||||
|
this.formattedCreatedAt,
|
||||||
|
this.formattedUpdatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory EventList.fromJson(Map<String, dynamic> json) => EventList(
|
||||||
|
uniqueId: json["unique_id"],
|
||||||
|
name: json["name"],
|
||||||
|
notes: json["notes"],
|
||||||
|
partiallyReleasedEvent: json["partially_released_event"],
|
||||||
|
createdByUser: json["created_by_user"],
|
||||||
|
updatedByUser: json["updated_by_user"],
|
||||||
|
formattedCreatedAt: json["formatted_created_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_created_at"]),
|
||||||
|
formattedUpdatedAt: json["formatted_updated_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_updated_at"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"unique_id": uniqueId,
|
||||||
|
"name": name,
|
||||||
|
"notes": notes,
|
||||||
|
"partially_released_event": partiallyReleasedEvent,
|
||||||
|
"created_by_user": createdByUser,
|
||||||
|
"updated_by_user": updatedByUser,
|
||||||
|
"formatted_created_at": formattedCreatedAt?.toIso8601String(),
|
||||||
|
"formatted_updated_at": formattedUpdatedAt?.toIso8601String(),
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,128 @@
|
||||||
|
class KolLocation {
|
||||||
|
int? code;
|
||||||
|
String? message;
|
||||||
|
List<Data>? data;
|
||||||
|
int? lastPage;
|
||||||
|
int? lastRow;
|
||||||
|
int? count;
|
||||||
|
|
||||||
|
KolLocation(
|
||||||
|
{this.code,
|
||||||
|
this.message,
|
||||||
|
this.data,
|
||||||
|
this.lastPage,
|
||||||
|
this.lastRow,
|
||||||
|
this.count});
|
||||||
|
|
||||||
|
KolLocation.fromJson(Map<String, dynamic> json) {
|
||||||
|
code = json['code'];
|
||||||
|
message = json['message'];
|
||||||
|
if (json['data'] != null) {
|
||||||
|
data = <Data>[];
|
||||||
|
json['data'].forEach((v) {
|
||||||
|
data!.add(new Data.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
lastPage = json['last_page'];
|
||||||
|
lastRow = json['last_row'];
|
||||||
|
count = json['count'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['code'] = this.code;
|
||||||
|
data['message'] = this.message;
|
||||||
|
if (this.data != null) {
|
||||||
|
data['data'] = this.data!.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
data['last_page'] = this.lastPage;
|
||||||
|
data['last_row'] = this.lastRow;
|
||||||
|
data['count'] = this.count;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Data {
|
||||||
|
String? uniqueId;
|
||||||
|
Null? orgInstitutionId;
|
||||||
|
String? address1;
|
||||||
|
String? postalCode;
|
||||||
|
String? kolUniqueId;
|
||||||
|
String? formattedIsPrimary;
|
||||||
|
Null? organizationUniqueId;
|
||||||
|
Null? organizationName;
|
||||||
|
String? countryUniqueId;
|
||||||
|
String? countryName;
|
||||||
|
String? stateUniqueId;
|
||||||
|
String? stateName;
|
||||||
|
String? cityUniqueId;
|
||||||
|
String? cityName;
|
||||||
|
String? createdByUser;
|
||||||
|
String? updatedByUser;
|
||||||
|
String? formattedCreatedAt;
|
||||||
|
String? formattedUpdatedAt;
|
||||||
|
|
||||||
|
Data(
|
||||||
|
{this.uniqueId,
|
||||||
|
this.orgInstitutionId,
|
||||||
|
this.address1,
|
||||||
|
this.postalCode,
|
||||||
|
this.kolUniqueId,
|
||||||
|
this.formattedIsPrimary,
|
||||||
|
this.organizationUniqueId,
|
||||||
|
this.organizationName,
|
||||||
|
this.countryUniqueId,
|
||||||
|
this.countryName,
|
||||||
|
this.stateUniqueId,
|
||||||
|
this.stateName,
|
||||||
|
this.cityUniqueId,
|
||||||
|
this.cityName,
|
||||||
|
this.createdByUser,
|
||||||
|
this.updatedByUser,
|
||||||
|
this.formattedCreatedAt,
|
||||||
|
this.formattedUpdatedAt});
|
||||||
|
|
||||||
|
Data.fromJson(Map<String, dynamic> json) {
|
||||||
|
uniqueId = json['unique_id'];
|
||||||
|
orgInstitutionId = json['org_institution_id'];
|
||||||
|
address1 = json['address1'];
|
||||||
|
postalCode = json['postal_code'];
|
||||||
|
kolUniqueId = json['kol_unique_id'];
|
||||||
|
formattedIsPrimary = json['formatted_is_primary'];
|
||||||
|
organizationUniqueId = json['organization_unique_id'];
|
||||||
|
organizationName = json['organization_name'];
|
||||||
|
countryUniqueId = json['country_unique_id'];
|
||||||
|
countryName = json['country_name'];
|
||||||
|
stateUniqueId = json['state_unique_id'];
|
||||||
|
stateName = json['state_name'];
|
||||||
|
cityUniqueId = json['city_unique_id'];
|
||||||
|
cityName = json['city_name'];
|
||||||
|
createdByUser = json['created_by_user'];
|
||||||
|
updatedByUser = json['updated_by_user'];
|
||||||
|
formattedCreatedAt = json['formatted_created_at'];
|
||||||
|
formattedUpdatedAt = json['formatted_updated_at'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['unique_id'] = this.uniqueId;
|
||||||
|
data['org_institution_id'] = this.orgInstitutionId;
|
||||||
|
data['address1'] = this.address1;
|
||||||
|
data['postal_code'] = this.postalCode;
|
||||||
|
data['kol_unique_id'] = this.kolUniqueId;
|
||||||
|
data['formatted_is_primary'] = this.formattedIsPrimary;
|
||||||
|
data['organization_unique_id'] = this.organizationUniqueId;
|
||||||
|
data['organization_name'] = this.organizationName;
|
||||||
|
data['country_unique_id'] = this.countryUniqueId;
|
||||||
|
data['country_name'] = this.countryName;
|
||||||
|
data['state_unique_id'] = this.stateUniqueId;
|
||||||
|
data['state_name'] = this.stateName;
|
||||||
|
data['city_unique_id'] = this.cityUniqueId;
|
||||||
|
data['city_name'] = this.cityName;
|
||||||
|
data['created_by_user'] = this.createdByUser;
|
||||||
|
data['updated_by_user'] = this.updatedByUser;
|
||||||
|
data['formatted_created_at'] = this.formattedCreatedAt;
|
||||||
|
data['formatted_updated_at'] = this.formattedUpdatedAt;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,116 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final dataPno = dataPnoFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
DataaPnoresponse dataPnoFromJson(String str) =>
|
||||||
|
DataaPnoresponse.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String dataPnoToJson(DataaPnoresponse data) => json.encode(data.toJson());
|
||||||
|
|
||||||
|
class DataaPnoresponse {
|
||||||
|
int? code;
|
||||||
|
String? message;
|
||||||
|
List<DataPhno>? data;
|
||||||
|
int? lastPage;
|
||||||
|
int? lastRow;
|
||||||
|
int? count;
|
||||||
|
|
||||||
|
DataaPnoresponse({
|
||||||
|
this.code,
|
||||||
|
this.message,
|
||||||
|
this.data,
|
||||||
|
this.lastPage,
|
||||||
|
this.lastRow,
|
||||||
|
this.count,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory DataaPnoresponse.fromJson(Map<String, dynamic> json) =>
|
||||||
|
DataaPnoresponse(
|
||||||
|
code: json["code"],
|
||||||
|
message: json["message"],
|
||||||
|
data: json["data"] == null
|
||||||
|
? []
|
||||||
|
: List<DataPhno>.from(
|
||||||
|
json["data"]!.map((x) => DataPhno.fromJson(x))),
|
||||||
|
lastPage: json["last_page"],
|
||||||
|
lastRow: json["last_row"],
|
||||||
|
count: json["count"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"code": code,
|
||||||
|
"message": message,
|
||||||
|
"data": data == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.from(data!.map((x) => x.toJson())),
|
||||||
|
"last_page": lastPage,
|
||||||
|
"last_row": lastRow,
|
||||||
|
"count": count,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class DataPhno {
|
||||||
|
String? uniqueId;
|
||||||
|
int? number;
|
||||||
|
String? kolUniqueId;
|
||||||
|
String? phoneTypeName;
|
||||||
|
String? phoneTypeUniqueId;
|
||||||
|
String? formattedIsPrimary;
|
||||||
|
dynamic organizationUniqueId;
|
||||||
|
dynamic organizationName;
|
||||||
|
String? createdByUser;
|
||||||
|
String? updatedByUser;
|
||||||
|
DateTime? formattedCreatedAt;
|
||||||
|
DateTime? formattedUpdatedAt;
|
||||||
|
|
||||||
|
DataPhno({
|
||||||
|
this.uniqueId,
|
||||||
|
this.number,
|
||||||
|
this.kolUniqueId,
|
||||||
|
this.phoneTypeName,
|
||||||
|
this.phoneTypeUniqueId,
|
||||||
|
this.formattedIsPrimary,
|
||||||
|
this.organizationUniqueId,
|
||||||
|
this.organizationName,
|
||||||
|
this.createdByUser,
|
||||||
|
this.updatedByUser,
|
||||||
|
this.formattedCreatedAt,
|
||||||
|
this.formattedUpdatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory DataPhno.fromJson(Map<String, dynamic> json) => DataPhno(
|
||||||
|
uniqueId: json["unique_id"],
|
||||||
|
number: json["number"],
|
||||||
|
kolUniqueId: json["kol_unique_id"],
|
||||||
|
phoneTypeName: json["phone_type_name"],
|
||||||
|
phoneTypeUniqueId: json["phone_type_unique_id"],
|
||||||
|
formattedIsPrimary: json["formatted_is_primary"],
|
||||||
|
organizationUniqueId: json["organization_unique_id"],
|
||||||
|
organizationName: json["organization_name"],
|
||||||
|
createdByUser: json["created_by_user"],
|
||||||
|
updatedByUser: json["updated_by_user"],
|
||||||
|
formattedCreatedAt: json["formatted_created_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_created_at"]),
|
||||||
|
formattedUpdatedAt: json["formatted_updated_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_updated_at"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"unique_id": uniqueId,
|
||||||
|
"number": number,
|
||||||
|
"kol_unique_id": kolUniqueId,
|
||||||
|
"phone_type_name": phoneTypeName,
|
||||||
|
"phone_type_unique_id": phoneTypeUniqueId,
|
||||||
|
"formatted_is_primary": formattedIsPrimary,
|
||||||
|
"organization_unique_id": organizationUniqueId,
|
||||||
|
"organization_name": organizationName,
|
||||||
|
"created_by_user": createdByUser,
|
||||||
|
"updated_by_user": updatedByUser,
|
||||||
|
"formatted_created_at": formattedCreatedAt?.toIso8601String(),
|
||||||
|
"formatted_updated_at": formattedUpdatedAt?.toIso8601String(),
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,127 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final dataTraining = dataTrainingFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
DataTraining dataTrainingFromJson(String str) =>
|
||||||
|
DataTraining.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String dataTrainingToJson(DataTraining data) => json.encode(data.toJson());
|
||||||
|
|
||||||
|
class DataTraining {
|
||||||
|
int? code;
|
||||||
|
String? message;
|
||||||
|
List<TrainingList>? data;
|
||||||
|
int? lastPage;
|
||||||
|
int? lastRow;
|
||||||
|
int? count;
|
||||||
|
|
||||||
|
DataTraining({
|
||||||
|
this.code,
|
||||||
|
this.message,
|
||||||
|
this.data,
|
||||||
|
this.lastPage,
|
||||||
|
this.lastRow,
|
||||||
|
this.count,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory DataTraining.fromJson(Map<String, dynamic> json) => DataTraining(
|
||||||
|
code: json["code"],
|
||||||
|
message: json["message"],
|
||||||
|
data: json["data"] == null
|
||||||
|
? []
|
||||||
|
: List<TrainingList>.from(
|
||||||
|
json["data"]!.map((x) => TrainingList.fromJson(x))),
|
||||||
|
lastPage: json["last_page"],
|
||||||
|
lastRow: json["last_row"],
|
||||||
|
count: json["count"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"code": code,
|
||||||
|
"message": message,
|
||||||
|
"data": data == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.from(data!.map((x) => x.toJson())),
|
||||||
|
"last_page": lastPage,
|
||||||
|
"last_row": lastRow,
|
||||||
|
"count": count,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class TrainingList {
|
||||||
|
String? uniqueId;
|
||||||
|
int? kolId;
|
||||||
|
int? orgId;
|
||||||
|
int? clientId;
|
||||||
|
dynamic organizationId;
|
||||||
|
dynamic degree;
|
||||||
|
dynamic specialty;
|
||||||
|
String? startDate;
|
||||||
|
String? endDate;
|
||||||
|
String? url;
|
||||||
|
dynamic switchedUserId;
|
||||||
|
String? createdByUser;
|
||||||
|
String? updatedByUser;
|
||||||
|
DateTime? formattedCreatedAt;
|
||||||
|
DateTime? formattedUpdatedAt;
|
||||||
|
|
||||||
|
TrainingList({
|
||||||
|
this.uniqueId,
|
||||||
|
this.kolId,
|
||||||
|
this.orgId,
|
||||||
|
this.clientId,
|
||||||
|
this.organizationId,
|
||||||
|
this.degree,
|
||||||
|
this.specialty,
|
||||||
|
this.startDate,
|
||||||
|
this.endDate,
|
||||||
|
this.url,
|
||||||
|
this.switchedUserId,
|
||||||
|
this.createdByUser,
|
||||||
|
this.updatedByUser,
|
||||||
|
this.formattedCreatedAt,
|
||||||
|
this.formattedUpdatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory TrainingList.fromJson(Map<String, dynamic> json) => TrainingList(
|
||||||
|
uniqueId: json["unique_id"],
|
||||||
|
kolId: json["kol_id"],
|
||||||
|
orgId: json["org_id"],
|
||||||
|
clientId: json["client_id"],
|
||||||
|
organizationId: json["organization_id"],
|
||||||
|
degree: json["degree"],
|
||||||
|
specialty: json["specialty"],
|
||||||
|
startDate: json["start_date"],
|
||||||
|
endDate: json["end_date"],
|
||||||
|
url: json["url"],
|
||||||
|
switchedUserId: json["switched_user_id"],
|
||||||
|
createdByUser: json["created_by_user"],
|
||||||
|
updatedByUser: json["updated_by_user"],
|
||||||
|
formattedCreatedAt: json["formatted_created_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_created_at"]),
|
||||||
|
formattedUpdatedAt: json["formatted_updated_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["formatted_updated_at"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"unique_id": uniqueId,
|
||||||
|
"kol_id": kolId,
|
||||||
|
"org_id": orgId,
|
||||||
|
"client_id": clientId,
|
||||||
|
"organization_id": organizationId,
|
||||||
|
"degree": degree,
|
||||||
|
"specialty": specialty,
|
||||||
|
"start_date": startDate,
|
||||||
|
"end_date": endDate,
|
||||||
|
"url": url,
|
||||||
|
"switched_user_id": switchedUserId,
|
||||||
|
"created_by_user": createdByUser,
|
||||||
|
"updated_by_user": updatedByUser,
|
||||||
|
"formatted_created_at": formattedCreatedAt?.toIso8601String(),
|
||||||
|
"formatted_updated_at": formattedUpdatedAt?.toIso8601String(),
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,272 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final kolcontact = kolcontactFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
Kolcontact kolcontactFromJson(String str) =>
|
||||||
|
Kolcontact.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String kolcontactToJson(Kolcontact data) => json.encode(data.toJson());
|
||||||
|
|
||||||
|
class Kolcontact {
|
||||||
|
int code;
|
||||||
|
String message;
|
||||||
|
List<Datum> data;
|
||||||
|
int lastPage;
|
||||||
|
int lastRow;
|
||||||
|
int count;
|
||||||
|
|
||||||
|
Kolcontact({
|
||||||
|
required this.code,
|
||||||
|
required this.message,
|
||||||
|
required this.data,
|
||||||
|
required this.lastPage,
|
||||||
|
required this.lastRow,
|
||||||
|
required this.count,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Kolcontact.fromJson(Map<String, dynamic> json) => Kolcontact(
|
||||||
|
code: json["code"],
|
||||||
|
message: json["message"],
|
||||||
|
data: List<Datum>.from(json["data"].map((x) => Datum.fromJson(x))),
|
||||||
|
lastPage: json["last_page"],
|
||||||
|
lastRow: json["last_row"],
|
||||||
|
count: json["count"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"code": code,
|
||||||
|
"message": message,
|
||||||
|
"data": List<dynamic>.from(data.map((x) => x.toJson())),
|
||||||
|
"last_page": lastPage,
|
||||||
|
"last_row": lastRow,
|
||||||
|
"count": count,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class Datum {
|
||||||
|
String uniqueId;
|
||||||
|
dynamic profileImage;
|
||||||
|
String? npiNum;
|
||||||
|
String fullName;
|
||||||
|
String? specialityName;
|
||||||
|
List<dynamic> subSpecialities;
|
||||||
|
dynamic primaryOrganization;
|
||||||
|
String? primaryEmail;
|
||||||
|
int? primaryPhoneNumber;
|
||||||
|
dynamic primaryFax;
|
||||||
|
dynamic primaryCountry;
|
||||||
|
dynamic primaryState;
|
||||||
|
dynamic primaryCity;
|
||||||
|
dynamic primaryPostalCode;
|
||||||
|
dynamic profileDocumentUniqueId;
|
||||||
|
dynamic profileDocumentImage;
|
||||||
|
dynamic latitude;
|
||||||
|
dynamic longitude;
|
||||||
|
List<dynamic> organizations;
|
||||||
|
List<Email> emails;
|
||||||
|
List<Address> address;
|
||||||
|
List<StateLicense> stateLicense;
|
||||||
|
String createdByUser;
|
||||||
|
String updatedByUser;
|
||||||
|
dynamic deletedByUser;
|
||||||
|
DateTime formattedCreatedAt;
|
||||||
|
DateTime formattedUpdatedAt;
|
||||||
|
dynamic formattedDeletedAt;
|
||||||
|
dynamic profile;
|
||||||
|
|
||||||
|
Datum({
|
||||||
|
required this.uniqueId,
|
||||||
|
required this.profileImage,
|
||||||
|
required this.npiNum,
|
||||||
|
required this.fullName,
|
||||||
|
required this.specialityName,
|
||||||
|
required this.subSpecialities,
|
||||||
|
required this.primaryOrganization,
|
||||||
|
required this.primaryEmail,
|
||||||
|
required this.primaryPhoneNumber,
|
||||||
|
required this.primaryFax,
|
||||||
|
required this.primaryCountry,
|
||||||
|
required this.primaryState,
|
||||||
|
required this.primaryCity,
|
||||||
|
required this.primaryPostalCode,
|
||||||
|
required this.profileDocumentUniqueId,
|
||||||
|
required this.profileDocumentImage,
|
||||||
|
required this.latitude,
|
||||||
|
required this.longitude,
|
||||||
|
required this.organizations,
|
||||||
|
required this.emails,
|
||||||
|
required this.address,
|
||||||
|
required this.stateLicense,
|
||||||
|
required this.createdByUser,
|
||||||
|
required this.updatedByUser,
|
||||||
|
required this.deletedByUser,
|
||||||
|
required this.formattedCreatedAt,
|
||||||
|
required this.formattedUpdatedAt,
|
||||||
|
required this.formattedDeletedAt,
|
||||||
|
required this.profile,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Datum.fromJson(Map<String, dynamic> json) => Datum(
|
||||||
|
uniqueId: json["unique_id"],
|
||||||
|
profileImage: json["profile_image"],
|
||||||
|
npiNum: json["npi_num"],
|
||||||
|
fullName: json["full_name"],
|
||||||
|
specialityName: json["speciality_name"],
|
||||||
|
subSpecialities:
|
||||||
|
List<dynamic>.from(json["sub_specialities"].map((x) => x)),
|
||||||
|
primaryOrganization: json["primary_organization"],
|
||||||
|
primaryEmail: json["primary_email"],
|
||||||
|
primaryPhoneNumber: json["primary_phone_number"],
|
||||||
|
primaryFax: json["primary_fax"],
|
||||||
|
primaryCountry: json["primary_country"],
|
||||||
|
primaryState: json["primary_state"],
|
||||||
|
primaryCity: json["primary_city"],
|
||||||
|
primaryPostalCode: json["primary_postal_code"],
|
||||||
|
profileDocumentUniqueId: json["profile_document_unique_id"],
|
||||||
|
profileDocumentImage: json["profile_document_image"],
|
||||||
|
latitude: json["latitude"],
|
||||||
|
longitude: json["longitude"],
|
||||||
|
organizations: List<dynamic>.from(json["organizations"].map((x) => x)),
|
||||||
|
emails: List<Email>.from(json["emails"].map((x) => Email.fromJson(x))),
|
||||||
|
address:
|
||||||
|
List<Address>.from(json["address"].map((x) => Address.fromJson(x))),
|
||||||
|
stateLicense: List<StateLicense>.from(
|
||||||
|
json["state_license"].map((x) => StateLicense.fromJson(x))),
|
||||||
|
createdByUser: json["created_by_user"],
|
||||||
|
updatedByUser: json["updated_by_user"],
|
||||||
|
deletedByUser: json["deleted_by_user"],
|
||||||
|
formattedCreatedAt: DateTime.parse(json["formatted_created_at"]),
|
||||||
|
formattedUpdatedAt: DateTime.parse(json["formatted_updated_at"]),
|
||||||
|
formattedDeletedAt: json["formatted_deleted_at"],
|
||||||
|
profile: json["profile"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"unique_id": uniqueId,
|
||||||
|
"profile_image": profileImage,
|
||||||
|
"npi_num": npiNum,
|
||||||
|
"full_name": fullName,
|
||||||
|
"speciality_name": specialityName,
|
||||||
|
"sub_specialities": List<dynamic>.from(subSpecialities.map((x) => x)),
|
||||||
|
"primary_organization": primaryOrganization,
|
||||||
|
"primary_email": primaryEmail,
|
||||||
|
"primary_phone_number": primaryPhoneNumber,
|
||||||
|
"primary_fax": primaryFax,
|
||||||
|
"primary_country": primaryCountry,
|
||||||
|
"primary_state": primaryState,
|
||||||
|
"primary_city": primaryCity,
|
||||||
|
"primary_postal_code": primaryPostalCode,
|
||||||
|
"profile_document_unique_id": profileDocumentUniqueId,
|
||||||
|
"profile_document_image": profileDocumentImage,
|
||||||
|
"latitude": latitude,
|
||||||
|
"longitude": longitude,
|
||||||
|
"organizations": List<dynamic>.from(organizations.map((x) => x)),
|
||||||
|
"emails": List<dynamic>.from(emails.map((x) => x.toJson())),
|
||||||
|
"address": List<dynamic>.from(address.map((x) => x.toJson())),
|
||||||
|
"state_license":
|
||||||
|
List<dynamic>.from(stateLicense.map((x) => x.toJson())),
|
||||||
|
"created_by_user": createdByUser,
|
||||||
|
"updated_by_user": updatedByUser,
|
||||||
|
"deleted_by_user": deletedByUser,
|
||||||
|
"formatted_created_at": formattedCreatedAt.toIso8601String(),
|
||||||
|
"formatted_updated_at": formattedUpdatedAt.toIso8601String(),
|
||||||
|
"formatted_deleted_at": formattedDeletedAt,
|
||||||
|
"profile": profile,
|
||||||
|
};
|
||||||
|
|
||||||
|
// @override
|
||||||
|
// String toString() {
|
||||||
|
// // TODO: implement toString
|
||||||
|
// return profileImage.toString();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
class Address {
|
||||||
|
String address1;
|
||||||
|
String? address2;
|
||||||
|
String country;
|
||||||
|
String? state;
|
||||||
|
City city;
|
||||||
|
|
||||||
|
Address({
|
||||||
|
required this.address1,
|
||||||
|
required this.address2,
|
||||||
|
required this.country,
|
||||||
|
required this.state,
|
||||||
|
required this.city,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Address.fromJson(Map<String, dynamic> json) => Address(
|
||||||
|
address1: json["address1"],
|
||||||
|
address2: json["address2"],
|
||||||
|
country: json["country"],
|
||||||
|
state: json["state"],
|
||||||
|
city: cityValues.map[json["city"]]!,
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"address1": address1,
|
||||||
|
"address2": address2,
|
||||||
|
"country": country,
|
||||||
|
"state": state,
|
||||||
|
"city": cityValues.reverse[city],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
enum City { ONTARIO }
|
||||||
|
|
||||||
|
final cityValues = EnumValues({"Ontario": City.ONTARIO});
|
||||||
|
|
||||||
|
class Email {
|
||||||
|
dynamic type;
|
||||||
|
String phoneNo;
|
||||||
|
|
||||||
|
Email({
|
||||||
|
required this.type,
|
||||||
|
required this.phoneNo,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Email.fromJson(Map<String, dynamic> json) => Email(
|
||||||
|
type: json["type"],
|
||||||
|
phoneNo: json["phone_no"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"type": type,
|
||||||
|
"phone_no": phoneNo,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class StateLicense {
|
||||||
|
String licenseNumber;
|
||||||
|
dynamic stateCode;
|
||||||
|
|
||||||
|
StateLicense({
|
||||||
|
required this.licenseNumber,
|
||||||
|
required this.stateCode,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory StateLicense.fromJson(Map<String, dynamic> json) => StateLicense(
|
||||||
|
licenseNumber: json["license_number"],
|
||||||
|
stateCode: json["state_code"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"license_number": licenseNumber,
|
||||||
|
"state_code": stateCode,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class EnumValues<T> {
|
||||||
|
Map<String, T> map;
|
||||||
|
late Map<T, String> reverseMap;
|
||||||
|
|
||||||
|
EnumValues(this.map);
|
||||||
|
|
||||||
|
Map<T, String> get reverse {
|
||||||
|
reverseMap = map.map((k, v) => MapEntry(v, k));
|
||||||
|
return reverseMap;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final loc = locFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Loc> locFromJson(String str) =>
|
||||||
|
List<Loc>.from(json.decode(str).map((x) => Loc.fromJson(x)));
|
||||||
|
|
||||||
|
String locToJson(List<Loc> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Loc {
|
||||||
|
int id;
|
||||||
|
int userId;
|
||||||
|
String institution;
|
||||||
|
String address;
|
||||||
|
String city;
|
||||||
|
String state;
|
||||||
|
int postalCode;
|
||||||
|
|
||||||
|
Loc({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
required this.institution,
|
||||||
|
required this.address,
|
||||||
|
required this.city,
|
||||||
|
required this.state,
|
||||||
|
required this.postalCode,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Loc.fromJson(Map<String, dynamic> json) => Loc(
|
||||||
|
id: json["id"],
|
||||||
|
userId: json["user_id"],
|
||||||
|
institution: json["Institution"],
|
||||||
|
address: json["Address"],
|
||||||
|
city: json["City"],
|
||||||
|
state: json["State"],
|
||||||
|
postalCode: json["Postal_code"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"user_id": userId,
|
||||||
|
"Institution": institution,
|
||||||
|
"Address": address,
|
||||||
|
"City": city,
|
||||||
|
"State": state,
|
||||||
|
"Postal_code": postalCode,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,100 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final nih = nihFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Nih> nihFromJson(String str) =>
|
||||||
|
List<Nih>.from(json.decode(str).map((x) => Nih.fromJson(x)));
|
||||||
|
|
||||||
|
String nihToJson(List<Nih> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Nih {
|
||||||
|
int id;
|
||||||
|
int userId;
|
||||||
|
|
||||||
|
String piNames;
|
||||||
|
String firstName;
|
||||||
|
String middleName;
|
||||||
|
String lastName;
|
||||||
|
String organizationName;
|
||||||
|
String departmentName;
|
||||||
|
String orgCity;
|
||||||
|
String orgState;
|
||||||
|
String purpose;
|
||||||
|
String institute;
|
||||||
|
String totalCost;
|
||||||
|
String projectStart;
|
||||||
|
String projectEnd;
|
||||||
|
String budgetStart;
|
||||||
|
String budgetEnd;
|
||||||
|
String createdOn;
|
||||||
|
int piId;
|
||||||
|
|
||||||
|
Nih({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
required this.piNames,
|
||||||
|
required this.firstName,
|
||||||
|
required this.middleName,
|
||||||
|
required this.lastName,
|
||||||
|
required this.organizationName,
|
||||||
|
required this.departmentName,
|
||||||
|
required this.orgCity,
|
||||||
|
required this.orgState,
|
||||||
|
required this.purpose,
|
||||||
|
required this.institute,
|
||||||
|
required this.totalCost,
|
||||||
|
required this.projectStart,
|
||||||
|
required this.projectEnd,
|
||||||
|
required this.budgetStart,
|
||||||
|
required this.budgetEnd,
|
||||||
|
required this.createdOn,
|
||||||
|
required this.piId,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Nih.fromJson(Map<String, dynamic> json) => Nih(
|
||||||
|
id: json["id"],
|
||||||
|
userId: json["user_id"],
|
||||||
|
piNames: json["pi_names"],
|
||||||
|
firstName: json["first_name"],
|
||||||
|
middleName: json["middle_name"],
|
||||||
|
lastName: json["last_name"],
|
||||||
|
organizationName: json["organizationName"],
|
||||||
|
departmentName: json["departmentName"],
|
||||||
|
orgCity: json["org_city"],
|
||||||
|
orgState: json["org_state"],
|
||||||
|
purpose: json["purpose"],
|
||||||
|
institute: json["institute"],
|
||||||
|
totalCost: json["total_cost"],
|
||||||
|
projectStart: json["project_start"],
|
||||||
|
projectEnd: json["project_end"],
|
||||||
|
budgetStart: json["budget_start"],
|
||||||
|
budgetEnd: json["budget_end"],
|
||||||
|
createdOn: json["created_on"],
|
||||||
|
piId: json["pi_id"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"user_id": userId,
|
||||||
|
"pi_names": piNames,
|
||||||
|
"first_name": firstName,
|
||||||
|
"middle_name": middleName,
|
||||||
|
"last_name": lastName,
|
||||||
|
"organizationName": organizationName,
|
||||||
|
"departmentName": departmentName,
|
||||||
|
"org_city": orgCity,
|
||||||
|
"org_state": orgState,
|
||||||
|
"purpose": purpose,
|
||||||
|
"institute": institute,
|
||||||
|
"total_cost": totalCost,
|
||||||
|
"project_start": projectStart,
|
||||||
|
"project_end": projectEnd,
|
||||||
|
"budget_start": budgetStart,
|
||||||
|
"budget_end": budgetEnd,
|
||||||
|
"created_on": createdOn,
|
||||||
|
"pi_id": piId,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final patent = patentFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Patent> patentFromJson(String str) =>
|
||||||
|
List<Patent>.from(json.decode(str).map((x) => Patent.fromJson(x)));
|
||||||
|
|
||||||
|
String patentToJson(List<Patent> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Patent {
|
||||||
|
int id;
|
||||||
|
int userId;
|
||||||
|
String patentTitle;
|
||||||
|
String status;
|
||||||
|
|
||||||
|
Patent({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
required this.patentTitle,
|
||||||
|
required this.status,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Patent.fromJson(Map<String, dynamic> json) => Patent(
|
||||||
|
id: json["id"],
|
||||||
|
userId: json["user_id"],
|
||||||
|
patentTitle: json["Patent Title"],
|
||||||
|
status: json["Status"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"user_id": userId,
|
||||||
|
"Patent Title": patentTitle,
|
||||||
|
"Status": status,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final phoneno = phonenoFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Phoneno> phonenoFromJson(String str) =>
|
||||||
|
List<Phoneno>.from(json.decode(str).map((x) => Phoneno.fromJson(x)));
|
||||||
|
|
||||||
|
String phonenoToJson(List<Phoneno> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Phoneno {
|
||||||
|
int id;
|
||||||
|
int userId;
|
||||||
|
String phoneType;
|
||||||
|
String locations;
|
||||||
|
String phoneNumber;
|
||||||
|
|
||||||
|
Phoneno({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
required this.phoneType,
|
||||||
|
required this.locations,
|
||||||
|
required this.phoneNumber,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Phoneno.fromJson(Map<String, dynamic> json) => Phoneno(
|
||||||
|
id: json["id"],
|
||||||
|
userId: json["user_id"],
|
||||||
|
phoneType: json["Phone type"],
|
||||||
|
locations: json["Locations"],
|
||||||
|
phoneNumber: json["phone Number"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"user_id": userId,
|
||||||
|
"Phone type": phoneType,
|
||||||
|
"Locations": locations,
|
||||||
|
"phone Number": phoneNumber,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final pro = proFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Pro> proFromJson(String str) =>
|
||||||
|
List<Pro>.from(json.decode(str).map((x) => Pro.fromJson(x)));
|
||||||
|
|
||||||
|
String proToJson(List<Pro> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Pro {
|
||||||
|
int id;
|
||||||
|
int userId;
|
||||||
|
int procedureCode;
|
||||||
|
String procedure;
|
||||||
|
String placeOfService;
|
||||||
|
int totalBeneficiaries;
|
||||||
|
int totalServices;
|
||||||
|
int totalBeneDayServices;
|
||||||
|
int programYear;
|
||||||
|
|
||||||
|
Pro({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
required this.procedureCode,
|
||||||
|
required this.procedure,
|
||||||
|
required this.placeOfService,
|
||||||
|
required this.totalBeneficiaries,
|
||||||
|
required this.totalServices,
|
||||||
|
required this.totalBeneDayServices,
|
||||||
|
required this.programYear,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Pro.fromJson(Map<String, dynamic> json) => Pro(
|
||||||
|
id: json["id"],
|
||||||
|
userId: json["user_id"],
|
||||||
|
procedureCode: json["Procedure code"],
|
||||||
|
procedure: json["Procedure"],
|
||||||
|
placeOfService: json["Place of Service"],
|
||||||
|
totalBeneficiaries: json["Total Beneficiaries"],
|
||||||
|
totalServices: json["Total Services"],
|
||||||
|
totalBeneDayServices: json["Total_bene_day_services"],
|
||||||
|
programYear: json["Program year"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"user_id": userId,
|
||||||
|
"Procedure code": procedureCode,
|
||||||
|
"Procedure": procedure,
|
||||||
|
"Place of Service": placeOfService,
|
||||||
|
"Total Beneficiaries": totalBeneficiaries,
|
||||||
|
"Total Services": totalServices,
|
||||||
|
"Total_bene_day_services": totalBeneDayServices,
|
||||||
|
"Program year": programYear,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final publications = publicationsFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Publications> publicationsFromJson(String str) => List<Publications>.from(
|
||||||
|
json.decode(str).map((x) => Publications.fromJson(x)));
|
||||||
|
|
||||||
|
String publicationsToJson(List<Publications> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Publications {
|
||||||
|
int id;
|
||||||
|
int userId;
|
||||||
|
String articalTitle;
|
||||||
|
String journalName;
|
||||||
|
DateTime date;
|
||||||
|
String author;
|
||||||
|
dynamic createdAt;
|
||||||
|
dynamic updatedAt;
|
||||||
|
|
||||||
|
Publications({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
required this.articalTitle,
|
||||||
|
required this.journalName,
|
||||||
|
required this.date,
|
||||||
|
required this.author,
|
||||||
|
required this.createdAt,
|
||||||
|
required this.updatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Publications.fromJson(Map<String, dynamic> json) => Publications(
|
||||||
|
id: json["id"],
|
||||||
|
userId: json["user_id"],
|
||||||
|
articalTitle: json["artical_title"],
|
||||||
|
journalName: json["journal_name"],
|
||||||
|
date: DateTime.parse(json["date"]),
|
||||||
|
author: json["author"],
|
||||||
|
createdAt: json["created_at"],
|
||||||
|
updatedAt: json["updated_at"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"user_id": userId,
|
||||||
|
"artical_title": articalTitle,
|
||||||
|
"journal_name": journalName,
|
||||||
|
"date": date.toIso8601String(),
|
||||||
|
"author": author,
|
||||||
|
"created_at": createdAt,
|
||||||
|
"updated_at": updatedAt,
|
||||||
|
};
|
||||||
|
}
|
|
@ -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,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,82 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final userdetails = userdetailsFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
Userdetails userdetailsFromJson(String str) =>
|
||||||
|
Userdetails.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String userdetailsToJson(Userdetails data) => json.encode(data.toJson());
|
||||||
|
|
||||||
|
class Userdetails {
|
||||||
|
int id;
|
||||||
|
String name;
|
||||||
|
String email;
|
||||||
|
DateTime emailVerifiedAt;
|
||||||
|
String summarry;
|
||||||
|
String addr;
|
||||||
|
int licenseNo;
|
||||||
|
String pSuffix;
|
||||||
|
String speciality;
|
||||||
|
String subSpeciality;
|
||||||
|
int phoneNo;
|
||||||
|
int rank;
|
||||||
|
int score;
|
||||||
|
dynamic createdAt;
|
||||||
|
dynamic updatedAt;
|
||||||
|
|
||||||
|
Userdetails({
|
||||||
|
required this.id,
|
||||||
|
required this.name,
|
||||||
|
required this.email,
|
||||||
|
required this.emailVerifiedAt,
|
||||||
|
required this.summarry,
|
||||||
|
required this.addr,
|
||||||
|
required this.licenseNo,
|
||||||
|
required this.pSuffix,
|
||||||
|
required this.speciality,
|
||||||
|
required this.subSpeciality,
|
||||||
|
required this.phoneNo,
|
||||||
|
required this.rank,
|
||||||
|
required this.score,
|
||||||
|
required this.createdAt,
|
||||||
|
required this.updatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Userdetails.fromJson(Map<String, dynamic> json) => Userdetails(
|
||||||
|
id: json["id"],
|
||||||
|
name: json["name"],
|
||||||
|
email: json["email"],
|
||||||
|
emailVerifiedAt: DateTime.parse(json["email_verified_at"]),
|
||||||
|
summarry: json["summarry"],
|
||||||
|
addr: json["addr"],
|
||||||
|
licenseNo: json["license_no"],
|
||||||
|
pSuffix: json["p_suffix"],
|
||||||
|
speciality: json["speciality"],
|
||||||
|
subSpeciality: json["sub_speciality"],
|
||||||
|
phoneNo: json["phone_no"],
|
||||||
|
rank: json["rank"],
|
||||||
|
score: json["score"],
|
||||||
|
createdAt: json["created_at"],
|
||||||
|
updatedAt: json["updated_at"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"name": name,
|
||||||
|
"email": email,
|
||||||
|
"email_verified_at": emailVerifiedAt.toIso8601String(),
|
||||||
|
"summarry": summarry,
|
||||||
|
"addr": addr,
|
||||||
|
"license_no": licenseNo,
|
||||||
|
"p_suffix": pSuffix,
|
||||||
|
"speciality": speciality,
|
||||||
|
"sub_speciality": subSpeciality,
|
||||||
|
"phone_no": phoneNo,
|
||||||
|
"rank": rank,
|
||||||
|
"score": score,
|
||||||
|
"created_at": createdAt,
|
||||||
|
"updated_at": updatedAt,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final speaker = speakerFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Speaker> speakerFromJson(String str) =>
|
||||||
|
List<Speaker>.from(json.decode(str).map((x) => Speaker.fromJson(x)));
|
||||||
|
|
||||||
|
String speakerToJson(List<Speaker> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Speaker {
|
||||||
|
int id;
|
||||||
|
String programtopic;
|
||||||
|
String speakername;
|
||||||
|
String role;
|
||||||
|
String evaluatorname;
|
||||||
|
String programdate;
|
||||||
|
DateTime createdAt;
|
||||||
|
DateTime updatedAt;
|
||||||
|
|
||||||
|
Speaker({
|
||||||
|
required this.id,
|
||||||
|
required this.programtopic,
|
||||||
|
required this.speakername,
|
||||||
|
required this.role,
|
||||||
|
required this.evaluatorname,
|
||||||
|
required this.programdate,
|
||||||
|
required this.createdAt,
|
||||||
|
required this.updatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Speaker.fromJson(Map<String, dynamic> json) => Speaker(
|
||||||
|
id: json["id"],
|
||||||
|
programtopic: json["programtopic"],
|
||||||
|
speakername: json["speakername"],
|
||||||
|
role: json["role"],
|
||||||
|
evaluatorname: json["evaluatorname"],
|
||||||
|
programdate: json["programdate"],
|
||||||
|
createdAt: DateTime.parse(json["created_at"]),
|
||||||
|
updatedAt: DateTime.parse(json["updated_at"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"programtopic": programtopic,
|
||||||
|
"speakername": speakername,
|
||||||
|
"role": role,
|
||||||
|
"evaluatorname": evaluatorname,
|
||||||
|
"programdate": programdate,
|
||||||
|
"created_at": createdAt.toIso8601String(),
|
||||||
|
"updated_at": updatedAt.toIso8601String(),
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final traning = traningFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Traning> traningFromJson(String str) =>
|
||||||
|
List<Traning>.from(json.decode(str).map((x) => Traning.fromJson(x)));
|
||||||
|
|
||||||
|
String traningToJson(List<Traning> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Traning {
|
||||||
|
int id;
|
||||||
|
int userId;
|
||||||
|
String educationType;
|
||||||
|
String institutionName;
|
||||||
|
String degree;
|
||||||
|
String specialty;
|
||||||
|
String timeFrame;
|
||||||
|
|
||||||
|
Traning({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
required this.educationType,
|
||||||
|
required this.institutionName,
|
||||||
|
required this.degree,
|
||||||
|
required this.specialty,
|
||||||
|
required this.timeFrame,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Traning.fromJson(Map<String, dynamic> json) => Traning(
|
||||||
|
id: json["id"],
|
||||||
|
userId: json["user_id"],
|
||||||
|
educationType: json["Education Type"],
|
||||||
|
institutionName: json["Institution Name"],
|
||||||
|
degree: json["Degree"],
|
||||||
|
specialty: json["Specialty"],
|
||||||
|
timeFrame: json["Time Frame"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"user_id": userId,
|
||||||
|
"Education Type": educationType,
|
||||||
|
"Institution Name": institutionName,
|
||||||
|
"Degree": degree,
|
||||||
|
"Specialty": specialty,
|
||||||
|
"Time Frame": timeFrame,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,67 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final trials = trialsFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
List<Trials> trialsFromJson(String str) =>
|
||||||
|
List<Trials>.from(json.decode(str).map((x) => Trials.fromJson(x)));
|
||||||
|
|
||||||
|
String trialsToJson(List<Trials> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
|
class Trials {
|
||||||
|
int id;
|
||||||
|
int userId;
|
||||||
|
String ctId;
|
||||||
|
String trialName;
|
||||||
|
String status;
|
||||||
|
String sponsors;
|
||||||
|
String condition;
|
||||||
|
String intervention;
|
||||||
|
String phase;
|
||||||
|
dynamic createdAt;
|
||||||
|
dynamic updatedAt;
|
||||||
|
|
||||||
|
Trials({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
required this.ctId,
|
||||||
|
required this.trialName,
|
||||||
|
required this.status,
|
||||||
|
required this.sponsors,
|
||||||
|
required this.condition,
|
||||||
|
required this.intervention,
|
||||||
|
required this.phase,
|
||||||
|
required this.createdAt,
|
||||||
|
required this.updatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Trials.fromJson(Map<String, dynamic> json) => Trials(
|
||||||
|
id: json["id"],
|
||||||
|
userId: json["user_id"],
|
||||||
|
ctId: json["ct_id"],
|
||||||
|
trialName: json["trial_name"],
|
||||||
|
status: json["status"],
|
||||||
|
sponsors: json["sponsors"],
|
||||||
|
condition: json["condition"],
|
||||||
|
intervention: json["intervention"],
|
||||||
|
phase: json["phase"],
|
||||||
|
createdAt: json["created_at"],
|
||||||
|
updatedAt: json["updated_at"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"user_id": userId,
|
||||||
|
"ct_id": ctId,
|
||||||
|
"trial_name": trialName,
|
||||||
|
"status": status,
|
||||||
|
"sponsors": sponsors,
|
||||||
|
"condition": condition,
|
||||||
|
"intervention": intervention,
|
||||||
|
"phase": phase,
|
||||||
|
"created_at": createdAt,
|
||||||
|
"updated_at": updatedAt,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||||
|
|
||||||
|
class NetworkConnectivity {
|
||||||
|
Future<bool> isInternetAvailable() async {
|
||||||
|
var connectivityResult = await (Connectivity().checkConnectivity());
|
||||||
|
return connectivityResult != ConnectivityResult.none;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/aff_data/insert_aff.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class AffiliationsProvider extends ChangeNotifier {
|
||||||
|
final affapi = Callapi();
|
||||||
|
|
||||||
|
List affiliations1 = [];
|
||||||
|
List allaffiliations1 = [];
|
||||||
|
|
||||||
|
List get adddta => affiliations1;
|
||||||
|
List get affiliationsAll => allaffiliations1;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
getAllAffiliationsdata() async {
|
||||||
|
print("Affiliations_is: ");
|
||||||
|
final affdata = await affapi.getallaffiliationsdata();
|
||||||
|
print("Affiliations_is after:$affdata ");
|
||||||
|
|
||||||
|
allaffiliations1 = affdata;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
storeAff(row) async {
|
||||||
|
final affdata = await affapi.getaffiliationsdata(row);
|
||||||
|
|
||||||
|
print("Affiliations_MyStoringData:$affdata ");
|
||||||
|
|
||||||
|
await addAffiliation(affdata);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/awa_data/crud_awa.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();
|
||||||
|
}
|
||||||
|
|
||||||
|
storeAwa(row) async {
|
||||||
|
final awaresult = await apicall.getawarddata(row);
|
||||||
|
await addAwa(awaresult);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/cer_hive/crud_cer.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();
|
||||||
|
}
|
||||||
|
|
||||||
|
storeCer(row) async {
|
||||||
|
final cerResult = await apicall.getcerlistdata(row);
|
||||||
|
await addCer(cerResult);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/edu_data/crud_edu.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();
|
||||||
|
}
|
||||||
|
|
||||||
|
storeEdu(row) async {
|
||||||
|
final emailresult = await apicall.getedulistdata(row);
|
||||||
|
await addEdu(emailresult);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/email_data/crud_email.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();
|
||||||
|
}
|
||||||
|
|
||||||
|
storeEmail(row) async {
|
||||||
|
final emailresult = await apicall.getemaildata(row);
|
||||||
|
await addEmail(emailresult);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,79 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class EnagagementProvider extends ChangeNotifier {
|
||||||
|
final callapi = Callapi();
|
||||||
|
|
||||||
|
List enagement = [];
|
||||||
|
List get engagementdata => enagement;
|
||||||
|
|
||||||
|
List enagementhcpname = [];
|
||||||
|
List get engagementhcppname => enagementhcpname;
|
||||||
|
|
||||||
|
List enagementhcpmain = [];
|
||||||
|
List get enagementhcppmain => enagementhcpmain;
|
||||||
|
|
||||||
|
List enagementhcprel = [];
|
||||||
|
List get enagementhcpprel => enagementhcprel;
|
||||||
|
|
||||||
|
List enagementhcplevel = [];
|
||||||
|
List get enagementhcpplevel => enagementhcplevel;
|
||||||
|
|
||||||
|
getengagementdata() async {
|
||||||
|
final engdata = await callapi.getEngdata();
|
||||||
|
enagement = engdata;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
gethcpname() async {
|
||||||
|
if (enagementhcpname.isNotEmpty) {
|
||||||
|
enagementhcpname.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var hname in engagementdata) {
|
||||||
|
enagementhcpname.add(hname['hcpname']);
|
||||||
|
|
||||||
|
//print("checkin_eng: ${hname['hcpname']}");
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getmaintherepeutic() async {
|
||||||
|
if (enagementhcpmain.isNotEmpty) {
|
||||||
|
enagementhcpmain.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var hname in engagementdata) {
|
||||||
|
enagementhcpmain.add(hname['main thereutic area']);
|
||||||
|
|
||||||
|
//print("checkin_eng: ${hname['hcpname']}");
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getrelationship() async {
|
||||||
|
if (enagementhcprel.isNotEmpty) {
|
||||||
|
enagementhcprel.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var hname in engagementdata) {
|
||||||
|
enagementhcprel.add(hname['relationship with chiesi']);
|
||||||
|
|
||||||
|
//print("checkin_eng: ${hname['hcpname']}");
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getrelationlevel() async {
|
||||||
|
if (enagementhcplevel.isNotEmpty) {
|
||||||
|
enagementhcplevel.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var hname in engagementdata) {
|
||||||
|
enagementhcplevel.add(hname['level of engagement']);
|
||||||
|
|
||||||
|
//print("checkin_eng: ${hname['hcpname']}");
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/events_data/crud_event.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class EventProvider extends ChangeNotifier {
|
||||||
|
final apicall = Callapi();
|
||||||
|
|
||||||
|
List eventlist = [];
|
||||||
|
|
||||||
|
List get EventsList => eventlist;
|
||||||
|
|
||||||
|
List alleventlist = [];
|
||||||
|
|
||||||
|
List get allEventsList => alleventlist;
|
||||||
|
|
||||||
|
geteventdata(text) async {
|
||||||
|
final events = await apicall.geteventsdata(text);
|
||||||
|
|
||||||
|
eventlist = events;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
allgeteventdata() async {
|
||||||
|
final events = await apicall.allgeteventsdata();
|
||||||
|
|
||||||
|
alleventlist = events;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
storeEvent(row) async {
|
||||||
|
final events = await apicall.geteventsdata(row);
|
||||||
|
await addEvent(events);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,123 @@
|
||||||
|
// import 'package:konectar_events/hive_fun.dart';
|
||||||
|
// import 'package:konectar_events/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/hive_fun.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
|
class hcpProvider extends ChangeNotifier {
|
||||||
|
final apicall = Callapi();
|
||||||
|
|
||||||
|
List _list = [];
|
||||||
|
|
||||||
|
List get list => _list;
|
||||||
|
|
||||||
|
getHCPProvider() async {
|
||||||
|
final jsondata = await apicall.getallhcpdata();
|
||||||
|
|
||||||
|
print("kkoollll_dataaaa: ${jsondata}");
|
||||||
|
|
||||||
|
_list = jsondata;
|
||||||
|
|
||||||
|
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
|
||||||
|
} else {
|
||||||
|
// return _list
|
||||||
|
// .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();
|
||||||
|
|
||||||
|
// return _list.where((hcp) {
|
||||||
|
// // Perform multiple checks using logical AND (&&)
|
||||||
|
// return hcp['name'].toLowerCase().contains(query.toLowerCase()) &&
|
||||||
|
// hcp['speciality'].toLowerCase().contains(query.toLowerCase()) &&
|
||||||
|
// hcp['addr'].toLowerCase().contains(query.toLowerCase());
|
||||||
|
// // Add more conditions as needed
|
||||||
|
// }).toList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getHCPProviderHive() async {
|
||||||
|
final jsondata = await HiveFunctions.gethcpdata();
|
||||||
|
print("JsonDtaa: ${jsondata}");
|
||||||
|
|
||||||
|
_list = jsondata;
|
||||||
|
print("JsonDtaaList: $_list");
|
||||||
|
|
||||||
|
notifyListeners();
|
||||||
|
//print("Get_hcp_dataaaL ${HiveFunctions.gethcpdata()}");
|
||||||
|
}
|
||||||
|
|
||||||
|
gethcpNamefilter(String? option) {
|
||||||
|
if (option == "HCP Name") {
|
||||||
|
return _list.map((e) => e["name"].toString()).toList();
|
||||||
|
} else {
|
||||||
|
return _list.map((e) => e["speciality"].toString()).toList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getHCPProviderFilters(String? _selectedValue1, List<String> value) {
|
||||||
|
print("I_am Provider_filterr");
|
||||||
|
if (_selectedValue1 == "Profile Type") {
|
||||||
|
print("PPPP11");
|
||||||
|
return value = [
|
||||||
|
"All Profile",
|
||||||
|
'Full Profile',
|
||||||
|
'Basic Profile',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
// else if (_selectedValue1 == "HCP Name") {
|
||||||
|
// print("FilterHcpNameee");
|
||||||
|
// fecthhcpbyname();
|
||||||
|
// } else if (_selectedValue1 == "Speciality") {
|
||||||
|
// print("kkk");
|
||||||
|
// fecthhcpbyspl();
|
||||||
|
// }
|
||||||
|
|
||||||
|
else if (_selectedValue1 == "Country") {
|
||||||
|
print("kkk");
|
||||||
|
return value = [
|
||||||
|
"United States",
|
||||||
|
"United States",
|
||||||
|
"United States",
|
||||||
|
];
|
||||||
|
} else if (_selectedValue1 == "State") {
|
||||||
|
print("kkk");
|
||||||
|
return value = [
|
||||||
|
"Karnataka",
|
||||||
|
'Karnataka',
|
||||||
|
'Karnataka',
|
||||||
|
];
|
||||||
|
} else if (_selectedValue1 == "City") {
|
||||||
|
print("kkk");
|
||||||
|
return value = [
|
||||||
|
"Hubli",
|
||||||
|
'Hubli',
|
||||||
|
'Hubli',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_aff_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class AffiliationsProviderk2 extends ChangeNotifier {
|
||||||
|
final affapi = CallK2api();
|
||||||
|
|
||||||
|
List<AffList> affiliations1 = [];
|
||||||
|
List allaffiliations1 = [];
|
||||||
|
|
||||||
|
List get adddta => affiliations1;
|
||||||
|
List get affiliationsAll => allaffiliations1;
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
getAllAffiliationsdata() async {
|
||||||
|
print("Affiliations_is: ");
|
||||||
|
final affdata = await affapi.getallaffiliationsdata();
|
||||||
|
print("Affiliations_is after:$affdata ");
|
||||||
|
|
||||||
|
allaffiliations1 = affdata;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_awards_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class AwardProviderK2 extends ChangeNotifier {
|
||||||
|
final apicall = CallK2api();
|
||||||
|
List<AwardsList> 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,17 @@
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_Certificate_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class CertificateProviderK2 extends ChangeNotifier {
|
||||||
|
final apicall = CallK2api();
|
||||||
|
List<CertificateList> 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,17 @@
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_education_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class EducationProviderK2 extends ChangeNotifier {
|
||||||
|
final apicall = CallK2api();
|
||||||
|
List<EducationList> 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,17 @@
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_email_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class EmailProviderK2 extends ChangeNotifier {
|
||||||
|
final apicall = CallK2api();
|
||||||
|
List<EmailData> emaillist = [];
|
||||||
|
|
||||||
|
List get emailkollist => emaillist;
|
||||||
|
|
||||||
|
emailinfo(text) async {
|
||||||
|
print("Location_Text");
|
||||||
|
final email_result = await apicall.getemaildata(text);
|
||||||
|
emaillist = email_result!;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_event_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class EventProviderK2 extends ChangeNotifier {
|
||||||
|
final apicall = CallK2api();
|
||||||
|
|
||||||
|
List<EventList> eventlist = [];
|
||||||
|
|
||||||
|
List get EventsList => eventlist;
|
||||||
|
|
||||||
|
List alleventlist = [];
|
||||||
|
|
||||||
|
List get allEventsList => alleventlist;
|
||||||
|
|
||||||
|
geteventdata(text) async {
|
||||||
|
final events = await apicall.geteventsdata(text);
|
||||||
|
|
||||||
|
eventlist = events!;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
allgeteventdata() async {
|
||||||
|
final events = await apicall.allgeteventsdata();
|
||||||
|
|
||||||
|
alleventlist = events;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
import 'package:konectar_events/contacts_module/hive_fun.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
|
class KolListProvider extends ChangeNotifier {
|
||||||
|
final apicall = CallK2api();
|
||||||
|
|
||||||
|
List _list = [];
|
||||||
|
|
||||||
|
List get list => _list;
|
||||||
|
|
||||||
|
getHCPProvider() async {
|
||||||
|
final jsondata = await apicall.getallhcpdata();
|
||||||
|
|
||||||
|
print("kkoollll_dataaaa: ${jsondata}");
|
||||||
|
|
||||||
|
_list = jsondata;
|
||||||
|
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
List searchHCP(String query) {
|
||||||
|
if (query.isEmpty) {
|
||||||
|
return List.from(_list); // Return full list if query is empty
|
||||||
|
} else {
|
||||||
|
// return _list
|
||||||
|
// .where(
|
||||||
|
// (hcp) => hcp['name'].toLowerCase().contains(query.toLowerCase()))
|
||||||
|
// .toList();
|
||||||
|
print("JsonIssList: $_list");
|
||||||
|
print("queryIssList: $query");
|
||||||
|
|
||||||
|
return _list
|
||||||
|
.where((hcp) =>
|
||||||
|
hcp['full_name']
|
||||||
|
.toLowerCase()
|
||||||
|
.contains(query.toLowerCase()) ||
|
||||||
|
// (hcp['speciality'].toLowerCase().contains(query.toLowerCase()) ??
|
||||||
|
// hcp['spl'].toLowerCase().contains(query.toLowerCase())) ||
|
||||||
|
|
||||||
|
hcp['speciality_name']
|
||||||
|
.toLowerCase()
|
||||||
|
.contains(query.toLowerCase())
|
||||||
|
// ||
|
||||||
|
// hcp['addr'].toLowerCase().contains(query.toLowerCase())
|
||||||
|
)
|
||||||
|
.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:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class LocationKolProvider extends ChangeNotifier {
|
||||||
|
final apicall = CallK2api();
|
||||||
|
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,17 @@
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_pno_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class PhonenoProviderK2 extends ChangeNotifier {
|
||||||
|
final apicall = CallK2api();
|
||||||
|
List<DataPhno>? phonelist = [];
|
||||||
|
|
||||||
|
List get phonenolist => phonelist!;
|
||||||
|
|
||||||
|
phonek2info(text) async {
|
||||||
|
print("Location_Text");
|
||||||
|
final phone_result = await apicall.getphonedata(text);
|
||||||
|
phonelist = phone_result;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_training_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class TrainigProviderK2 extends ChangeNotifier {
|
||||||
|
final apicall = CallK2api();
|
||||||
|
List<TrainingList> tralist = [];
|
||||||
|
|
||||||
|
List get traininglist => tralist;
|
||||||
|
|
||||||
|
traininginfo(text) async {
|
||||||
|
print("Location_Text");
|
||||||
|
final email_result = await apicall.gettrainingdata(text);
|
||||||
|
tralist = email_result!;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/loc_data/crud_loc.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();
|
||||||
|
}
|
||||||
|
|
||||||
|
storeLoc(row) async {
|
||||||
|
final publicationResult = await apicall.getlocationsdata(row);
|
||||||
|
await addLoc(publicationResult);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class MediacalInsightProvider extends ChangeNotifier {
|
||||||
|
final callapi = Callapi();
|
||||||
|
|
||||||
|
List med = [];
|
||||||
|
|
||||||
|
List get trialsinfo => med;
|
||||||
|
|
||||||
|
medicalinsightdata() async {
|
||||||
|
final jsonres = await callapi.getallMedicalInsightdata();
|
||||||
|
med = jsonres;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/nih_grant_data/crud_nih.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();
|
||||||
|
}
|
||||||
|
|
||||||
|
storeNih(row) async {
|
||||||
|
final nihresult = await apicall.getnihdata(row);
|
||||||
|
await addNih(nihresult);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/patent_data/crud_patent.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();
|
||||||
|
}
|
||||||
|
|
||||||
|
storePet(row) async {
|
||||||
|
final patentresult = await apicall.getpatentdata(row);
|
||||||
|
await addPatent(patentresult);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/pno_data/crud_pno.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();
|
||||||
|
}
|
||||||
|
|
||||||
|
storePno(row) async {
|
||||||
|
print("Location_Text");
|
||||||
|
final phoneresult = await apicall.getphonedata(row);
|
||||||
|
await addPno(phoneresult);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/procedure_data/crud_pro.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();
|
||||||
|
}
|
||||||
|
|
||||||
|
storePro(row) async {
|
||||||
|
final proData = await apicall.getprodata(row);
|
||||||
|
await addPro(proData);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/pub_data/curd_pub.dart';
|
||||||
|
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class PublicatioProvider extends ChangeNotifier {
|
||||||
|
final apicall = Callapi();
|
||||||
|
List publist = [];
|
||||||
|
|
||||||
|
List get publicationlist => publist;
|
||||||
|
|
||||||
|
List allpublist = [];
|
||||||
|
|
||||||
|
List get allpublicationlist => allpublist;
|
||||||
|
|
||||||
|
publicatininfo(text) async {
|
||||||
|
final publication_result = await apicall.getpublicationsdata(text);
|
||||||
|
publist = publication_result;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
allpublicatininfo() async {
|
||||||
|
final publication_result = await apicall.getallpublicationsdata();
|
||||||
|
allpublist = publication_result;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
storePub(row) async {
|
||||||
|
final publication_result = await apicall.getpublicationsdata(row);
|
||||||
|
|
||||||
|
print("Affiliations_MyStoringData:$publication_result ");
|
||||||
|
|
||||||
|
await addPublication(publication_result);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/single_hcpinfo.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
|
class Singlehcpdetails extends ChangeNotifier {
|
||||||
|
final apicall = Callapi();
|
||||||
|
|
||||||
|
List<Userdetails> _singlehcplist = [];
|
||||||
|
|
||||||
|
List<Userdetails> get singlehcpinfo => _singlehcplist;
|
||||||
|
|
||||||
|
Future<void> hcpinfo() async {
|
||||||
|
final getdata = await apicall.getsinglehcpdata();
|
||||||
|
|
||||||
|
print("Provider_data: $getdata");
|
||||||
|
|
||||||
|
// _singlehcplist = getdata;
|
||||||
|
_singlehcplist.add(Userdetails.fromJson(getdata));
|
||||||
|
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/speaker_data/crud.speaker.dart';
|
||||||
|
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class SpekerEvalutionProvider extends ChangeNotifier {
|
||||||
|
final callapi = Callapi();
|
||||||
|
|
||||||
|
List speaker_data = [];
|
||||||
|
|
||||||
|
List get speakerlist => speaker_data;
|
||||||
|
|
||||||
|
getspeakerdata() async {
|
||||||
|
final data = await callapi.getSpeakerdata();
|
||||||
|
|
||||||
|
speaker_data = data;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
storeSpeaker(row) async {
|
||||||
|
final dataSpe = await callapi.getSpeakerdata();
|
||||||
|
await addSpeaker(dataSpe);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/traning_data/crud_training.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();
|
||||||
|
}
|
||||||
|
|
||||||
|
storeTraining(row) async {
|
||||||
|
final trainingresult = await apicall.gettrainingdata(row);
|
||||||
|
await addtraining(trainingresult);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/trials_data/crud_trials.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class TrialsProvider extends ChangeNotifier {
|
||||||
|
final callapi = Callapi();
|
||||||
|
|
||||||
|
List trials = [];
|
||||||
|
|
||||||
|
List get trialsinfo => trials;
|
||||||
|
|
||||||
|
trialsdata(text) async {
|
||||||
|
final jsonres = await callapi.getalltrials(text);
|
||||||
|
trials = jsonres;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
storeTrials(row) async {
|
||||||
|
final jsonres = await callapi.getalltrials(row);
|
||||||
|
await addTrials(jsonres);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
class _Row {
|
||||||
|
_Row(
|
||||||
|
this.identifier,
|
||||||
|
this.valueA,
|
||||||
|
this.valueC,
|
||||||
|
this.valueD,
|
||||||
|
this.valueE,
|
||||||
|
this.valueF,
|
||||||
|
this.valueG,
|
||||||
|
this.valueH,
|
||||||
|
this.valueI,
|
||||||
|
this.selected, // Add selected parameter
|
||||||
|
);
|
||||||
|
|
||||||
|
final int identifier;
|
||||||
|
final String valueA;
|
||||||
|
final String valueC;
|
||||||
|
final String valueD;
|
||||||
|
final String valueE;
|
||||||
|
final String valueF;
|
||||||
|
final String valueG;
|
||||||
|
final String valueH;
|
||||||
|
final String valueI;
|
||||||
|
|
||||||
|
bool selected = false;
|
||||||
|
}
|
|
@ -0,0 +1,496 @@
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/constants.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_Certificate_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_aff_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_awards_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_education_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_email_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_event_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_location_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_pno_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_training_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kolcontact_list_k2.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/nih_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/patent_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/procedure_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/publication_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/speaker.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/trials.dart';
|
||||||
|
|
||||||
|
const String curl = Constants.k2url;
|
||||||
|
|
||||||
|
class CallK2api {
|
||||||
|
getallhcpdata() async {
|
||||||
|
const url = '$curl/contacts/v2/en/fetch_kols';
|
||||||
|
|
||||||
|
print("K2_Urll: $url");
|
||||||
|
|
||||||
|
// final response = await Dio().get(url);
|
||||||
|
|
||||||
|
final response = await Dio().post(url,
|
||||||
|
data: {"page": 1, "limit": 100},
|
||||||
|
options: Options(headers: {
|
||||||
|
"Authorization":
|
||||||
|
"Bearer 245|J1GeqJKw33m4YhCOfiMNyQm2U8jbx8rf1JkC567ffcb2f9bd"
|
||||||
|
}));
|
||||||
|
|
||||||
|
print("ResponseeeeK2: ${response.statusCode}");
|
||||||
|
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
List<Datum> users = (response.data['data'] as List)
|
||||||
|
.map((userJson) => Datum.fromJson(userJson))
|
||||||
|
.toList();
|
||||||
|
return users;
|
||||||
|
}
|
||||||
|
|
||||||
|
// final jsonresponse = response.data;
|
||||||
|
|
||||||
|
// final jsonresponse211 = response.data["data"];
|
||||||
|
|
||||||
|
// print("jsonresponse211: ${jsonresponse211}");
|
||||||
|
|
||||||
|
// final kolresponse =
|
||||||
|
// jsonresponse211.map((kollist) => Datum.fromJson(kollist)).toList();
|
||||||
|
|
||||||
|
// print("kolresponse_isss: ${kolresponse}");
|
||||||
|
|
||||||
|
// return kolresponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
getsinglehcpdata() async {
|
||||||
|
const url = '$curl/users/1';
|
||||||
|
|
||||||
|
final responsehcp = await Dio().post(url);
|
||||||
|
final jsonresponse1 = responsehcp.data;
|
||||||
|
|
||||||
|
// final List<dynamic> Json = json.decode(responsehcp.data);
|
||||||
|
|
||||||
|
print("Singlejsondata : ${jsonresponse1}");
|
||||||
|
return jsonresponse1;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<AffList>?> getaffiliationsdata(id) async {
|
||||||
|
print("Affiliation_iddd: ${id}");
|
||||||
|
var url = '$curl/affiliations/v1/en/fetch';
|
||||||
|
|
||||||
|
final affiliationres = await Dio().post(url,
|
||||||
|
data: {"page": 1, "limit": 100},
|
||||||
|
options: Options(headers: {
|
||||||
|
"Authorization":
|
||||||
|
"Bearer 245|J1GeqJKw33m4YhCOfiMNyQm2U8jbx8rf1JkC567ffcb2f9bd"
|
||||||
|
}));
|
||||||
|
|
||||||
|
if (affiliationres.statusCode == 200) {
|
||||||
|
DataAffiliations dataaff = DataAffiliations.fromJson(affiliationres.data);
|
||||||
|
|
||||||
|
List<AffList> afflist = dataaff.data!;
|
||||||
|
|
||||||
|
return afflist;
|
||||||
|
}
|
||||||
|
|
||||||
|
// print("Gettingdata_isss: ${'''[$affiliationres]'''}");
|
||||||
|
|
||||||
|
// String arrayText = '''[$affiliationres]''';
|
||||||
|
|
||||||
|
// final jsonresponse2 = json.decode(arrayText);
|
||||||
|
|
||||||
|
// return jsonresponse2
|
||||||
|
// .map((doctor) => Affiliations.fromJson(doctor))
|
||||||
|
// .toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
getpublicationsdata(id) async {
|
||||||
|
print("getpublicationsdata_iddd: ${id}");
|
||||||
|
|
||||||
|
var url = '$curl/publications/$id';
|
||||||
|
final publicationres = await Dio().get(url);
|
||||||
|
String arrayText = '''[$publicationres]''';
|
||||||
|
|
||||||
|
final jsonresponse2 = json.decode(arrayText);
|
||||||
|
|
||||||
|
return jsonresponse2
|
||||||
|
.map((doctor) => Publications.fromJson(doctor))
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<EventList>?> geteventsdata(id) async {
|
||||||
|
var url = '$curl/events/v1/en/fetch';
|
||||||
|
|
||||||
|
final events = await Dio().post(url,
|
||||||
|
data: {"page": 1, "limit": 100},
|
||||||
|
options: Options(headers: {
|
||||||
|
"Authorization":
|
||||||
|
"Bearer 245|J1GeqJKw33m4YhCOfiMNyQm2U8jbx8rf1JkC567ffcb2f9bd"
|
||||||
|
}));
|
||||||
|
|
||||||
|
if (events.statusCode == 200) {
|
||||||
|
DataEvent dataeve = DataEvent.fromJson(events.data);
|
||||||
|
List<EventList> evelist = dataeve.data!;
|
||||||
|
return evelist;
|
||||||
|
}
|
||||||
|
|
||||||
|
// String evn = '''[$events]''';
|
||||||
|
// final jsonEvent = json.decode(evn);
|
||||||
|
// print("All_event: $jsonEvent");
|
||||||
|
// return jsonEvent.map((doctor) => Events.fromJson(doctor)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
getallaffiliationsdata() async {
|
||||||
|
const url = '$curl/affiliations/';
|
||||||
|
|
||||||
|
final events = await Dio().get(url);
|
||||||
|
// final jsonEvent = events.data;
|
||||||
|
final jsonEvent = events.data;
|
||||||
|
print("All_event: $jsonEvent");
|
||||||
|
|
||||||
|
return jsonEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
getallpublicationsdata() async {
|
||||||
|
const url = '$curl/publications';
|
||||||
|
|
||||||
|
final events = await Dio().get(url);
|
||||||
|
// final jsonEvent = events.data;
|
||||||
|
final jsonEvent = events.data;
|
||||||
|
print("All_event: $jsonEvent");
|
||||||
|
|
||||||
|
return jsonEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
allgeteventsdata() async {
|
||||||
|
const url = '$curl/events';
|
||||||
|
|
||||||
|
final events = await Dio().get(url);
|
||||||
|
// final jsonEvent = events.data;
|
||||||
|
final jsonEvent = events.data;
|
||||||
|
print("All_event: $jsonEvent");
|
||||||
|
|
||||||
|
return jsonEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
getalltrials(id) async {
|
||||||
|
print("TrialsssssAPIIIIIIIIII: $id");
|
||||||
|
// var url = '$curl/trails/$id';
|
||||||
|
var url = '$curl/trails/1';
|
||||||
|
|
||||||
|
final trials = await Dio().get(url);
|
||||||
|
String dataa = "[${trials}]";
|
||||||
|
final jsontrials = jsonDecode(dataa);
|
||||||
|
print("All_trialsss: $jsontrials");
|
||||||
|
// return jsontrials;
|
||||||
|
if (jsontrials.isEmpty) {
|
||||||
|
print("notnulllllll: $jsontrials");
|
||||||
|
//return jsontrials.map((doctor) => Trials.fromJson(doctor)).toList();
|
||||||
|
} else {
|
||||||
|
return jsontrials.map((doctor) => Trials.fromJson(doctor)).toList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getallMedicalInsightdata() async {
|
||||||
|
const url = '$curl/medicalinsight';
|
||||||
|
|
||||||
|
final response = await Dio().get(url);
|
||||||
|
|
||||||
|
final jsonresponse = response.data;
|
||||||
|
return jsonresponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
getSpeakerdata() async {
|
||||||
|
// print("TrialsssssAPIIIIIIIIII: $id");
|
||||||
|
// var url = '$curl/trails/$id';
|
||||||
|
var url = '$curl/speaker/1';
|
||||||
|
|
||||||
|
final speaker = await Dio().get(url);
|
||||||
|
|
||||||
|
print("Checkkkkk: Speakerrr: $speaker");
|
||||||
|
|
||||||
|
final List jsonspe = speaker.data; // Directly use the data
|
||||||
|
|
||||||
|
return jsonspe.map((location) => Speaker.fromJson(location)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
getEngdata() async {
|
||||||
|
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 {
|
||||||
|
const url = '$curl/contacts/v2/en/kol_location_fetch';
|
||||||
|
|
||||||
|
// var url = '$curl/location/1';
|
||||||
|
|
||||||
|
// final location = await Dio().get(url);
|
||||||
|
|
||||||
|
final location = await Dio().post(url,
|
||||||
|
data: {
|
||||||
|
"page": 1,
|
||||||
|
"limit": 100,
|
||||||
|
"kol_id": "b470ae0ac9ff5cf81e2d44b8fbfe32b1"
|
||||||
|
},
|
||||||
|
options: Options(headers: {
|
||||||
|
"Authorization":
|
||||||
|
"Bearer 245|J1GeqJKw33m4YhCOfiMNyQm2U8jbx8rf1JkC567ffcb2f9bd"
|
||||||
|
}));
|
||||||
|
|
||||||
|
// print("All_locDataaK22: ${location.data}");
|
||||||
|
|
||||||
|
final List jsonEvent = location.data["data"]; // Directly use the data
|
||||||
|
|
||||||
|
// print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
// return jsonEvent.map((location) => Loc.fromJson(location)).toList();
|
||||||
|
|
||||||
|
if (location.statusCode == 200) {
|
||||||
|
List<Data> kolLocation = jsonEvent.map((e) => Data.fromJson(e)).toList();
|
||||||
|
|
||||||
|
print("All_locDataaK22: ${kolLocation}");
|
||||||
|
|
||||||
|
return kolLocation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<DataPhno>?> getphonedata($id) async {
|
||||||
|
var url = '$curl/contacts/v2/en/kol_phoneno_fetch';
|
||||||
|
|
||||||
|
// final phoneno = await Dio().get(url);
|
||||||
|
final phoneno = await Dio().post(url,
|
||||||
|
data: {
|
||||||
|
"page": 1,
|
||||||
|
"limit": 100,
|
||||||
|
"kol_id": "b470ae0ac9ff5cf81e2d44b8fbfe32b1"
|
||||||
|
},
|
||||||
|
options: Options(headers: {
|
||||||
|
"Authorization":
|
||||||
|
"Bearer 245|J1GeqJKw33m4YhCOfiMNyQm2U8jbx8rf1JkC567ffcb2f9bd"
|
||||||
|
}));
|
||||||
|
|
||||||
|
if (phoneno.statusCode == 200) {
|
||||||
|
final List jsonpno = phoneno.data["data"]; // Directly use the data
|
||||||
|
print("All_locDataaphone_pnos: ${jsonpno}");
|
||||||
|
DataaPnoresponse dataPno = DataaPnoresponse.fromJson(phoneno.data);
|
||||||
|
List<DataPhno>? datalist = dataPno.data;
|
||||||
|
|
||||||
|
// List kol_pno = jsonpno.map((e) => pno.PhnoData.fromJson(e)).toList();
|
||||||
|
|
||||||
|
print("All_kol_pnoDataa123: ${datalist}");
|
||||||
|
|
||||||
|
// List<Datum> users = (response.data['data'] as List)
|
||||||
|
// .map((userJson) => Datum.fromJson(userJson))
|
||||||
|
// .toList();
|
||||||
|
// return users;
|
||||||
|
|
||||||
|
return datalist;
|
||||||
|
}
|
||||||
|
// return datalist;
|
||||||
|
|
||||||
|
// return jsonEvent.map((pno) => Phoneno.fromJson(pno)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<EmailData>?> getemaildata($id) async {
|
||||||
|
var url = '$curl/contacts/v2/en/kol_email_fetch';
|
||||||
|
|
||||||
|
final email = await Dio().post(url,
|
||||||
|
data: {
|
||||||
|
"page": 1,
|
||||||
|
"limit": 100,
|
||||||
|
"kol_id": "b470ae0ac9ff5cf81e2d44b8fbfe32b1"
|
||||||
|
},
|
||||||
|
options: Options(headers: {
|
||||||
|
"Authorization":
|
||||||
|
"Bearer 245|J1GeqJKw33m4YhCOfiMNyQm2U8jbx8rf1JkC567ffcb2f9bd"
|
||||||
|
}));
|
||||||
|
|
||||||
|
print("All_locDataaEmaillK22: ${email.data}");
|
||||||
|
|
||||||
|
if (email.statusCode == 200) {
|
||||||
|
DataEmail email1 = DataEmail.fromJson(email.data);
|
||||||
|
|
||||||
|
List<EmailData>? emailinfo = email1.data;
|
||||||
|
|
||||||
|
return emailinfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
// final List jsonEvent = email.data; // Directly use the data
|
||||||
|
|
||||||
|
// print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
//return jsonEvent.map((email) => Email.fromJson(email)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
getpatentdata(id) async {
|
||||||
|
var url = '$curl/patent/1';
|
||||||
|
|
||||||
|
final patent = await Dio().get(url);
|
||||||
|
|
||||||
|
print("All_locDataa: ${patent.data}");
|
||||||
|
|
||||||
|
final List jsonEvent = patent.data; // Directly use the data
|
||||||
|
|
||||||
|
print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
return jsonEvent.map((email) => Patent.fromJson(email)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<CertificateList>?> getcerlistdata(id) async {
|
||||||
|
var url = '$curl/contacts/v2/en/kol_certification_fetch';
|
||||||
|
|
||||||
|
final cer = await Dio().post(url,
|
||||||
|
data: {
|
||||||
|
"page": 1,
|
||||||
|
"limit": 100,
|
||||||
|
"kol_id": "b470ae0ac9ff5cf81e2d44b8fbfe32b1"
|
||||||
|
},
|
||||||
|
options: Options(headers: {
|
||||||
|
"Authorization":
|
||||||
|
"Bearer 245|J1GeqJKw33m4YhCOfiMNyQm2U8jbx8rf1JkC567ffcb2f9bd"
|
||||||
|
}));
|
||||||
|
|
||||||
|
print("All_locDataa: ${cer.data}");
|
||||||
|
|
||||||
|
if (cer.statusCode == 200) {
|
||||||
|
DataCertificate datacer = DataCertificate.fromJson(cer.data);
|
||||||
|
List<CertificateList>? cerlist = datacer.data;
|
||||||
|
|
||||||
|
return cerlist;
|
||||||
|
}
|
||||||
|
|
||||||
|
// final List jsonEvent = cer.data; // Directly use the data
|
||||||
|
|
||||||
|
// print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
// return jsonEvent.map((certificate) => Cer.fromJson(certificate)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<EducationList>?> getedulistdata($id) async {
|
||||||
|
var url = '$curl/contacts/v2/en/kol_education_fetch';
|
||||||
|
|
||||||
|
final edu = await Dio().post(url,
|
||||||
|
data: {
|
||||||
|
"page": 1,
|
||||||
|
"limit": 100,
|
||||||
|
"kol_id": "b470ae0ac9ff5cf81e2d44b8fbfe32b1"
|
||||||
|
},
|
||||||
|
options: Options(headers: {
|
||||||
|
"Authorization":
|
||||||
|
"Bearer 245|J1GeqJKw33m4YhCOfiMNyQm2U8jbx8rf1JkC567ffcb2f9bd"
|
||||||
|
}));
|
||||||
|
|
||||||
|
print("All_locDataa: ${edu.data}");
|
||||||
|
|
||||||
|
if (edu.statusCode == 200) {
|
||||||
|
DataEducation dataedu = DataEducation.fromJson(edu.data);
|
||||||
|
|
||||||
|
List<EducationList>? edulist = dataedu.data;
|
||||||
|
|
||||||
|
return edulist;
|
||||||
|
}
|
||||||
|
|
||||||
|
// final List jsonEvent = edu.data; // Directly use the data
|
||||||
|
|
||||||
|
// print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
// return jsonEvent.map((edu) => Edu.fromJson(edu)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<AwardsList>?> getawarddata(id) async {
|
||||||
|
var url = '$curl/contacts/v2/en/kol_awards_fetch';
|
||||||
|
|
||||||
|
final awa = await Dio().post(url,
|
||||||
|
data: {
|
||||||
|
"page": 1,
|
||||||
|
"limit": 100,
|
||||||
|
"kol_id": "b470ae0ac9ff5cf81e2d44b8fbfe32b1"
|
||||||
|
},
|
||||||
|
options: Options(headers: {
|
||||||
|
"Authorization":
|
||||||
|
"Bearer 245|J1GeqJKw33m4YhCOfiMNyQm2U8jbx8rf1JkC567ffcb2f9bd"
|
||||||
|
}));
|
||||||
|
|
||||||
|
print("All_locDataa: ${awa.data}");
|
||||||
|
|
||||||
|
if (awa.statusCode == 200) {
|
||||||
|
DataAwards awardss = DataAwards.fromJson(awa.data);
|
||||||
|
List<AwardsList> awalist = awardss.data!;
|
||||||
|
return awalist;
|
||||||
|
}
|
||||||
|
|
||||||
|
// // String loc = "{$location}";
|
||||||
|
// // final jsonEvent = json.decode(loc);
|
||||||
|
// // print("All_loc: $jsonEvent");
|
||||||
|
|
||||||
|
// final List jsonEvent = awa.data; // Directly use the data
|
||||||
|
|
||||||
|
// print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
// return jsonEvent.map((awards) => Awa.fromJson(awards)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<TrainingList>?> gettrainingdata(id) async {
|
||||||
|
var url = '$curl/contacts/v2/en/kol_training_fetch';
|
||||||
|
|
||||||
|
final training = await Dio().post(url,
|
||||||
|
data: {
|
||||||
|
"page": 1,
|
||||||
|
"limit": 100,
|
||||||
|
"kol_id": "b470ae0ac9ff5cf81e2d44b8fbfe32b1"
|
||||||
|
},
|
||||||
|
options: Options(headers: {
|
||||||
|
"Authorization":
|
||||||
|
"Bearer 245|J1GeqJKw33m4YhCOfiMNyQm2U8jbx8rf1JkC567ffcb2f9bd"
|
||||||
|
}));
|
||||||
|
|
||||||
|
print("All_locDataa:Training: ${training.data}");
|
||||||
|
|
||||||
|
if (training.statusCode == 200) {
|
||||||
|
DataTraining trainingdata = DataTraining.fromJson(training.data);
|
||||||
|
List<TrainingList>? traininglist = trainingdata.data;
|
||||||
|
|
||||||
|
return traininglist;
|
||||||
|
}
|
||||||
|
|
||||||
|
// // String loc = "{$location}";
|
||||||
|
// // final jsonEvent = json.decode(loc);
|
||||||
|
// // print("All_loc: $jsonEvent");
|
||||||
|
|
||||||
|
// final List jsonEvent = training.data; // Directly use the data
|
||||||
|
|
||||||
|
// print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
// return jsonEvent.map((awards) => Traning.fromJson(awards)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
getnihdata(id) async {
|
||||||
|
var url = '$curl/nih/1';
|
||||||
|
|
||||||
|
final nih = await Dio().get(url);
|
||||||
|
|
||||||
|
print("All_locDataa: ${nih.data}");
|
||||||
|
|
||||||
|
final List jsonEvent = nih.data; // Directly use the data
|
||||||
|
|
||||||
|
print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
return jsonEvent.map((awards) => Nih.fromJson(awards)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
getprodata(id) async {
|
||||||
|
var url = '$curl/pro/1';
|
||||||
|
|
||||||
|
final pro = await Dio().get(url);
|
||||||
|
|
||||||
|
print("All_locDataa: ${pro.data}");
|
||||||
|
|
||||||
|
final List jsonEvent = pro.data; // Directly use the data
|
||||||
|
|
||||||
|
print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
return jsonEvent.map((awards) => Pro.fromJson(awards)).toList();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,730 @@
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/constants.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/affiliations.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/awards_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/certificate_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/education_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/email_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/event_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/location_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/nih_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/patent_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/pno_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/procedure_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/publication_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/speaker.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/trainig_model.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/trials.dart';
|
||||||
|
|
||||||
|
const String curl = Constants.url;
|
||||||
|
|
||||||
|
class Callapi {
|
||||||
|
getallhcpdata() async {
|
||||||
|
const url = '$curl/users';
|
||||||
|
|
||||||
|
final response = await Dio().get(url);
|
||||||
|
|
||||||
|
print("Responseeee: ${response.statusCode}");
|
||||||
|
|
||||||
|
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"],
|
||||||
|
// // });
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
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 {
|
||||||
|
// const url = 'http://127.0.0.1:8000/api/users/1';
|
||||||
|
// const url = 'http://192.168.2.143:8082/api/users/1';
|
||||||
|
// const url = 'http://192.168.172.50:8081/api/users/1';
|
||||||
|
const url = '$curl/users/1';
|
||||||
|
|
||||||
|
final responsehcp = await Dio().post(url);
|
||||||
|
final jsonresponse1 = responsehcp.data;
|
||||||
|
|
||||||
|
// final List<dynamic> Json = json.decode(responsehcp.data);
|
||||||
|
|
||||||
|
print("Singlejsondata : ${jsonresponse1}");
|
||||||
|
return jsonresponse1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// getaffiliationsdata(id) async {
|
||||||
|
// print("Affiliation_iddd: ${id}");
|
||||||
|
// var url = '$curl/affiliations/$id';
|
||||||
|
|
||||||
|
// // final affiliationres = await Dio().get(url);
|
||||||
|
// // final jsonresponse2 = affiliationres.data.take(2).toList();
|
||||||
|
|
||||||
|
// final affiliationres = await Dio().get(url);
|
||||||
|
|
||||||
|
// print("Gettingdata_isss: ${'''[$affiliationres]'''}");
|
||||||
|
|
||||||
|
// String arrayText = '''[$affiliationres]''';
|
||||||
|
|
||||||
|
// final jsonresponse2 = json.decode(arrayText);
|
||||||
|
|
||||||
|
// print("Gettingdata_jsonresponse2isss: ${jsonresponse2}");
|
||||||
|
|
||||||
|
// return jsonresponse2;
|
||||||
|
// ////////////////////////////////offline//////////////////////////
|
||||||
|
// // 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;
|
||||||
|
// }
|
||||||
|
|
||||||
|
getaffiliationsdata(id) async {
|
||||||
|
print("Affiliation_iddd: ${id}");
|
||||||
|
var url = '$curl/affiliations/$id';
|
||||||
|
|
||||||
|
// final affiliationres = await Dio().get(url);
|
||||||
|
// final jsonresponse2 = affiliationres.data.take(2).toList();
|
||||||
|
|
||||||
|
final affiliationres = await Dio().get(url);
|
||||||
|
|
||||||
|
print("Gettingdata_isss: ${'''[$affiliationres]'''}");
|
||||||
|
|
||||||
|
String arrayText = '''[$affiliationres]''';
|
||||||
|
|
||||||
|
final jsonresponse2 = json.decode(arrayText);
|
||||||
|
|
||||||
|
return jsonresponse2
|
||||||
|
.map((doctor) => Affiliations.fromJson(doctor))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
// print("Gettingdata_jsonresponse2isss: ${jsonresponse2}");
|
||||||
|
|
||||||
|
// return jsonresponse2;
|
||||||
|
}
|
||||||
|
|
||||||
|
getpublicationsdata(id) async {
|
||||||
|
print("getpublicationsdata_iddd: ${id}");
|
||||||
|
|
||||||
|
// const url = '$curl/publications';
|
||||||
|
|
||||||
|
// final affiliationres = await Dio().get(url);
|
||||||
|
// final jsonresponse2 = affiliationres.data.take(2).toList();
|
||||||
|
|
||||||
|
// return jsonresponse2;
|
||||||
|
var url = '$curl/publications/$id';
|
||||||
|
final publicationres = await Dio().get(url);
|
||||||
|
String arrayText = '''[$publicationres]''';
|
||||||
|
|
||||||
|
//print("Gettingdata_isss: ${affiliationres}");
|
||||||
|
|
||||||
|
// final jsonresponse2 = affiliationres.data;
|
||||||
|
final jsonresponse2 = json.decode(arrayText);
|
||||||
|
|
||||||
|
return jsonresponse2
|
||||||
|
.map((doctor) => Publications.fromJson(doctor))
|
||||||
|
.toList();
|
||||||
|
//return jsonresponse2;
|
||||||
|
////////////////////////////////offline//////////////////////////
|
||||||
|
|
||||||
|
// 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(id) async {
|
||||||
|
var url = '$curl/events/$id';
|
||||||
|
|
||||||
|
final events = await Dio().get(url);
|
||||||
|
// // final jsonEvent = events.data;
|
||||||
|
// final jsonEvent = events.data;
|
||||||
|
// print("All_event: $jsonEvent");
|
||||||
|
// final jsonEvent1 = events.data.take(2).toList();
|
||||||
|
|
||||||
|
// print("only few : $jsonEvent1");
|
||||||
|
|
||||||
|
// return jsonEvent1;
|
||||||
|
|
||||||
|
// final jsonEvent = events.data;
|
||||||
|
|
||||||
|
String evn = '''[$events]''';
|
||||||
|
final jsonEvent = json.decode(evn);
|
||||||
|
print("All_event: $jsonEvent");
|
||||||
|
return jsonEvent.map((doctor) => Events.fromJson(doctor)).toList();
|
||||||
|
//return jsonEvent;
|
||||||
|
|
||||||
|
////////////////////////////////offline//////////////////////////
|
||||||
|
|
||||||
|
// 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 {
|
||||||
|
// const url = 'http://192.168.2.143:8082/api/affiliations';
|
||||||
|
//const url = 'http://192.168.172.50:8081/api/affiliations';
|
||||||
|
const url = '$curl/affiliations/';
|
||||||
|
|
||||||
|
final events = await Dio().get(url);
|
||||||
|
// final jsonEvent = events.data;
|
||||||
|
final jsonEvent = events.data;
|
||||||
|
print("All_event: $jsonEvent");
|
||||||
|
|
||||||
|
return jsonEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
getallpublicationsdata() 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';
|
||||||
|
|
||||||
|
final events = await Dio().get(url);
|
||||||
|
// final jsonEvent = events.data;
|
||||||
|
final jsonEvent = events.data;
|
||||||
|
print("All_event: $jsonEvent");
|
||||||
|
|
||||||
|
return jsonEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
allgeteventsdata() 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';
|
||||||
|
|
||||||
|
final events = await Dio().get(url);
|
||||||
|
// final jsonEvent = events.data;
|
||||||
|
final jsonEvent = events.data;
|
||||||
|
print("All_event: $jsonEvent");
|
||||||
|
|
||||||
|
return jsonEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
print("TrialsssssAPIIIIIIIIII: $id");
|
||||||
|
// var url = '$curl/trails/$id';
|
||||||
|
var url = '$curl/trails/1';
|
||||||
|
|
||||||
|
final trials = await Dio().get(url);
|
||||||
|
String dataa = "[${trials}]";
|
||||||
|
final jsontrials = jsonDecode(dataa);
|
||||||
|
print("All_trialsss: $jsontrials");
|
||||||
|
// return jsontrials;
|
||||||
|
if (jsontrials.isEmpty) {
|
||||||
|
print("notnulllllll: $jsontrials");
|
||||||
|
//return jsontrials.map((doctor) => Trials.fromJson(doctor)).toList();
|
||||||
|
} else {
|
||||||
|
return jsontrials.map((doctor) => Trials.fromJson(doctor)).toList();
|
||||||
|
}
|
||||||
|
////////////////////////////////offline//////////////////////////
|
||||||
|
|
||||||
|
// 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 {
|
||||||
|
// 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/medicalinsight';
|
||||||
|
|
||||||
|
final response = await Dio().get(url);
|
||||||
|
|
||||||
|
final jsonresponse = response.data;
|
||||||
|
return jsonresponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
// getSpeakerdata() async {
|
||||||
|
// // const url = '$curl/speaker';
|
||||||
|
|
||||||
|
// // final response = await Dio().get(url);
|
||||||
|
|
||||||
|
// // final jsonresponse = response.data;
|
||||||
|
|
||||||
|
// // 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;
|
||||||
|
// }
|
||||||
|
|
||||||
|
getSpeakerdata() async {
|
||||||
|
// print("TrialsssssAPIIIIIIIIII: $id");
|
||||||
|
// var url = '$curl/trails/$id';
|
||||||
|
var url = '$curl/speaker/1';
|
||||||
|
|
||||||
|
final speaker = await Dio().get(url);
|
||||||
|
|
||||||
|
print("Checkkkkk: Speakerrr: $speaker");
|
||||||
|
|
||||||
|
// final jsonspe = jsonDecode(speaker.data);
|
||||||
|
// print("All_trialsss: $jsonspe");
|
||||||
|
|
||||||
|
final List jsonspe = speaker.data; // Directly use the data
|
||||||
|
|
||||||
|
return jsonspe.map((location) => Speaker.fromJson(location)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
getEngdata() async {
|
||||||
|
// const url = '$curl/engagement';
|
||||||
|
|
||||||
|
// final response = await Dio().get(url);
|
||||||
|
|
||||||
|
// final jsonresponse = response.data;
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
// }
|
||||||
|
getlocationsdata($id) async {
|
||||||
|
var url = '$curl/location/1';
|
||||||
|
|
||||||
|
final location = await Dio().get(url);
|
||||||
|
|
||||||
|
print("All_locDataa: ${location.data}");
|
||||||
|
|
||||||
|
// String loc = "{$location}";
|
||||||
|
// final jsonEvent = json.decode(loc);
|
||||||
|
// print("All_loc: $jsonEvent");
|
||||||
|
|
||||||
|
final List jsonEvent = location.data; // Directly use the data
|
||||||
|
|
||||||
|
print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
return jsonEvent.map((location) => Loc.fromJson(location)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
// }
|
||||||
|
getphonedata($id) async {
|
||||||
|
var url = '$curl/pno/1';
|
||||||
|
|
||||||
|
final phoneno = await Dio().get(url);
|
||||||
|
|
||||||
|
print("All_locDataa: ${phoneno.data}");
|
||||||
|
|
||||||
|
// String loc = "{$location}";
|
||||||
|
// final jsonEvent = json.decode(loc);
|
||||||
|
// print("All_loc: $jsonEvent");
|
||||||
|
|
||||||
|
final List jsonEvent = phoneno.data; // Directly use the data
|
||||||
|
|
||||||
|
print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
return jsonEvent.map((pno) => Phoneno.fromJson(pno)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
// }
|
||||||
|
|
||||||
|
getemaildata($id) async {
|
||||||
|
var url = '$curl/email/1';
|
||||||
|
|
||||||
|
final email = await Dio().get(url);
|
||||||
|
|
||||||
|
print("All_locDataa: ${email.data}");
|
||||||
|
|
||||||
|
// String loc = "{$location}";
|
||||||
|
// final jsonEvent = json.decode(loc);
|
||||||
|
// print("All_loc: $jsonEvent");
|
||||||
|
|
||||||
|
final List jsonEvent = email.data; // Directly use the data
|
||||||
|
|
||||||
|
print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
return jsonEvent.map((email) => Email.fromJson(email)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
// }
|
||||||
|
|
||||||
|
getpatentdata(id) async {
|
||||||
|
var url = '$curl/patent/1';
|
||||||
|
|
||||||
|
final patent = await Dio().get(url);
|
||||||
|
|
||||||
|
print("All_locDataa: ${patent.data}");
|
||||||
|
|
||||||
|
// String loc = "{$location}";
|
||||||
|
// final jsonEvent = json.decode(loc);
|
||||||
|
// print("All_loc: $jsonEvent");
|
||||||
|
|
||||||
|
final List jsonEvent = patent.data; // Directly use the data
|
||||||
|
|
||||||
|
print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
return jsonEvent.map((email) => Patent.fromJson(email)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
// }
|
||||||
|
|
||||||
|
getcerlistdata(id) async {
|
||||||
|
var url = '$curl/cer/1';
|
||||||
|
|
||||||
|
final cer = await Dio().get(url);
|
||||||
|
|
||||||
|
print("All_locDataa: ${cer.data}");
|
||||||
|
|
||||||
|
// String loc = "{$location}";
|
||||||
|
// final jsonEvent = json.decode(loc);
|
||||||
|
// print("All_loc: $jsonEvent");
|
||||||
|
|
||||||
|
final List jsonEvent = cer.data; // Directly use the data
|
||||||
|
|
||||||
|
print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
return jsonEvent.map((certificate) => Cer.fromJson(certificate)).toList();
|
||||||
|
}
|
||||||
|
// 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;
|
||||||
|
// }
|
||||||
|
|
||||||
|
getedulistdata($id) async {
|
||||||
|
var url = '$curl/edu/1';
|
||||||
|
|
||||||
|
final edu = await Dio().get(url);
|
||||||
|
|
||||||
|
print("All_locDataa: ${edu.data}");
|
||||||
|
|
||||||
|
// String loc = "{$location}";
|
||||||
|
// final jsonEvent = json.decode(loc);
|
||||||
|
// print("All_loc: $jsonEvent");
|
||||||
|
|
||||||
|
final List jsonEvent = edu.data; // Directly use the data
|
||||||
|
|
||||||
|
print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
return jsonEvent.map((edu) => Edu.fromJson(edu)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
// }
|
||||||
|
|
||||||
|
getawarddata(id) async {
|
||||||
|
var url = '$curl/awa/1';
|
||||||
|
|
||||||
|
final awa = await Dio().get(url);
|
||||||
|
|
||||||
|
print("All_locDataa: ${awa.data}");
|
||||||
|
|
||||||
|
// String loc = "{$location}";
|
||||||
|
// final jsonEvent = json.decode(loc);
|
||||||
|
// print("All_loc: $jsonEvent");
|
||||||
|
|
||||||
|
final List jsonEvent = awa.data; // Directly use the data
|
||||||
|
|
||||||
|
print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
return jsonEvent.map((awards) => Awa.fromJson(awards)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
// }
|
||||||
|
|
||||||
|
gettrainingdata(id) async {
|
||||||
|
var url = '$curl/training/1';
|
||||||
|
|
||||||
|
final training = await Dio().get(url);
|
||||||
|
|
||||||
|
print("All_locDataa: ${training.data}");
|
||||||
|
|
||||||
|
// String loc = "{$location}";
|
||||||
|
// final jsonEvent = json.decode(loc);
|
||||||
|
// print("All_loc: $jsonEvent");
|
||||||
|
|
||||||
|
final List jsonEvent = training.data; // Directly use the data
|
||||||
|
|
||||||
|
print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
return jsonEvent.map((awards) => Traning.fromJson(awards)).toList();
|
||||||
|
}
|
||||||
|
// 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;
|
||||||
|
// }
|
||||||
|
getnihdata(id) async {
|
||||||
|
var url = '$curl/nih/1';
|
||||||
|
|
||||||
|
final nih = await Dio().get(url);
|
||||||
|
|
||||||
|
print("All_locDataa: ${nih.data}");
|
||||||
|
|
||||||
|
// String loc = "{$location}";
|
||||||
|
// final jsonEvent = json.decode(loc);
|
||||||
|
// print("All_loc: $jsonEvent");
|
||||||
|
|
||||||
|
final List jsonEvent = nih.data; // Directly use the data
|
||||||
|
|
||||||
|
print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
return jsonEvent.map((awards) => Nih.fromJson(awards)).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
// }
|
||||||
|
|
||||||
|
getprodata(id) async {
|
||||||
|
var url = '$curl/pro/1';
|
||||||
|
|
||||||
|
final pro = await Dio().get(url);
|
||||||
|
|
||||||
|
print("All_locDataa: ${pro.data}");
|
||||||
|
|
||||||
|
// String loc = "{$location}";
|
||||||
|
// final jsonEvent = json.decode(loc);
|
||||||
|
// print("All_loc: $jsonEvent");
|
||||||
|
|
||||||
|
final List jsonEvent = pro.data; // Directly use the data
|
||||||
|
|
||||||
|
print("All_locDataa123: ${jsonEvent}");
|
||||||
|
|
||||||
|
return jsonEvent.map((awards) => Pro.fromJson(awards)).toList();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
import 'package:hive/hive.dart';
|
||||||
|
|
||||||
|
part 'aff_model_hive.g.dart'; // This part file will be generated
|
||||||
|
|
||||||
|
@HiveType(typeId: 30) // Use a unique typeId for this class
|
||||||
|
class Affiliation extends HiveObject {
|
||||||
|
@HiveField(0)
|
||||||
|
final int? id;
|
||||||
|
|
||||||
|
@HiveField(1)
|
||||||
|
final int? userId;
|
||||||
|
|
||||||
|
@HiveField(2)
|
||||||
|
final String? orgName;
|
||||||
|
|
||||||
|
@HiveField(3)
|
||||||
|
final String? dept;
|
||||||
|
|
||||||
|
@HiveField(4)
|
||||||
|
final String? role;
|
||||||
|
|
||||||
|
@HiveField(5)
|
||||||
|
final String? timeFrame;
|
||||||
|
|
||||||
|
@HiveField(6)
|
||||||
|
final String? orgType;
|
||||||
|
|
||||||
|
@HiveField(7)
|
||||||
|
final String? emgType;
|
||||||
|
|
||||||
|
@HiveField(8)
|
||||||
|
final DateTime? createdAt;
|
||||||
|
|
||||||
|
@HiveField(9)
|
||||||
|
final DateTime? updatedAt; // Nullable
|
||||||
|
|
||||||
|
Affiliation({
|
||||||
|
this.id,
|
||||||
|
this.userId,
|
||||||
|
this.orgName,
|
||||||
|
this.dept,
|
||||||
|
this.role,
|
||||||
|
this.timeFrame,
|
||||||
|
this.orgType,
|
||||||
|
this.emgType,
|
||||||
|
this.createdAt,
|
||||||
|
this.updatedAt,
|
||||||
|
});
|
||||||
|
}
|
|
@ -0,0 +1,68 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'aff_model_hive.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// TypeAdapterGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class AffiliationAdapter extends TypeAdapter<Affiliation> {
|
||||||
|
@override
|
||||||
|
final int typeId = 30;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Affiliation read(BinaryReader reader) {
|
||||||
|
final numOfFields = reader.readByte();
|
||||||
|
final fields = <int, dynamic>{
|
||||||
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||||
|
};
|
||||||
|
return Affiliation(
|
||||||
|
id: fields[0] as int?,
|
||||||
|
userId: fields[1] as int?,
|
||||||
|
orgName: fields[2] as String?,
|
||||||
|
dept: fields[3] as String?,
|
||||||
|
role: fields[4] as String?,
|
||||||
|
timeFrame: fields[5] as String?,
|
||||||
|
orgType: fields[6] as String?,
|
||||||
|
emgType: fields[7] as String?,
|
||||||
|
createdAt: fields[8] as DateTime?,
|
||||||
|
updatedAt: fields[9] as DateTime?,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void write(BinaryWriter writer, Affiliation obj) {
|
||||||
|
writer
|
||||||
|
..writeByte(10)
|
||||||
|
..writeByte(0)
|
||||||
|
..write(obj.id)
|
||||||
|
..writeByte(1)
|
||||||
|
..write(obj.userId)
|
||||||
|
..writeByte(2)
|
||||||
|
..write(obj.orgName)
|
||||||
|
..writeByte(3)
|
||||||
|
..write(obj.dept)
|
||||||
|
..writeByte(4)
|
||||||
|
..write(obj.role)
|
||||||
|
..writeByte(5)
|
||||||
|
..write(obj.timeFrame)
|
||||||
|
..writeByte(6)
|
||||||
|
..write(obj.orgType)
|
||||||
|
..writeByte(7)
|
||||||
|
..write(obj.emgType)
|
||||||
|
..writeByte(8)
|
||||||
|
..write(obj.createdAt)
|
||||||
|
..writeByte(9)
|
||||||
|
..write(obj.updatedAt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => typeId.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is AffiliationAdapter &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
typeId == other.typeId;
|
||||||
|
}
|
|
@ -0,0 +1,70 @@
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
|
||||||
|
import 'aff_model_hive.dart';
|
||||||
|
|
||||||
|
addAffiliation(List affilist) async {
|
||||||
|
// static final apihcpdata = Hive.box("hcpdata");
|
||||||
|
|
||||||
|
//final box = Hive.box<Affiliations>('affiliationshive');
|
||||||
|
|
||||||
|
var box = await Hive.openBox<Affiliation>('affiliationshive');
|
||||||
|
|
||||||
|
print("IamAffiliation_dataaa: ${affilist}");
|
||||||
|
|
||||||
|
// Convert JSON list to List<Affiliation>
|
||||||
|
List<Affiliation> affiliations = affilist.map((json) {
|
||||||
|
print("CheckinggJsonnnn: ${json.id}, ${json.userId}");
|
||||||
|
return Affiliation(
|
||||||
|
id: json.id,
|
||||||
|
userId: json.userId,
|
||||||
|
orgName: json.orgName,
|
||||||
|
dept: json.dept,
|
||||||
|
role: json.role,
|
||||||
|
timeFrame: json.timeFrame,
|
||||||
|
orgType: json.orgType,
|
||||||
|
emgType: json.emgType,
|
||||||
|
createdAt: DateTime.parse(json.createdAt),
|
||||||
|
updatedAt: json.updatedAt != null ? DateTime.parse(json.updatedAt) : null,
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
for (var affiliation in affiliations) {
|
||||||
|
print("Storing_Affff: ${affiliation.orgName}");
|
||||||
|
await box.put(affiliation.id, affiliation); // Use `put` with id as key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
retrieveAffiliations() async {
|
||||||
|
var box = await Hive.openBox<Affiliation>('affiliationshive');
|
||||||
|
print('Retrive Doctor}');
|
||||||
|
|
||||||
|
List affiliations = box.values.toList();
|
||||||
|
print('Retrive Doctor affiliations ${affiliations}}');
|
||||||
|
|
||||||
|
for (var affiliation in affiliations) {
|
||||||
|
print('Retrive Organization Name: ${affiliation.orgName}');
|
||||||
|
print('Department: ${affiliation.dept}');
|
||||||
|
// Access other fields as needed
|
||||||
|
}
|
||||||
|
return affiliations;
|
||||||
|
}
|
||||||
|
|
||||||
|
retrieveidAffiliations(int text) async {
|
||||||
|
var box = await Hive.openBox<Affiliation>('affiliationshive');
|
||||||
|
print('Retrive Doctor123 ${text}}');
|
||||||
|
|
||||||
|
var affiliations = box.get(text);
|
||||||
|
|
||||||
|
List<Affiliation> affiliations1 = [];
|
||||||
|
if (affiliations != null) {
|
||||||
|
affiliations1.add(affiliations); // Add to the list if not null
|
||||||
|
}
|
||||||
|
print('Retrive Doctor affiliations ${affiliations}');
|
||||||
|
|
||||||
|
// for (var affiliation in affiliations) {
|
||||||
|
// print('Retrive Organization Name: ${affiliation.orgName}');
|
||||||
|
// print('Department: ${affiliation.dept}');
|
||||||
|
// // Access other fields as needed
|
||||||
|
// }
|
||||||
|
return affiliations1;
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
part 'awa_model_hive.g.dart'; // This part file will be generated
|
||||||
|
|
||||||
|
@HiveType(typeId: 40)
|
||||||
|
class Awa extends HiveObject {
|
||||||
|
@HiveField(0)
|
||||||
|
final int id;
|
||||||
|
|
||||||
|
@HiveField(1)
|
||||||
|
final int userId;
|
||||||
|
|
||||||
|
@HiveField(2)
|
||||||
|
final String? educationType;
|
||||||
|
|
||||||
|
@HiveField(3)
|
||||||
|
final String? institutionName;
|
||||||
|
|
||||||
|
@HiveField(4)
|
||||||
|
final String? degree;
|
||||||
|
|
||||||
|
@HiveField(5)
|
||||||
|
final String? specialty;
|
||||||
|
|
||||||
|
@HiveField(6)
|
||||||
|
final String? timeFrame;
|
||||||
|
|
||||||
|
Awa({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
this.educationType,
|
||||||
|
this.institutionName,
|
||||||
|
this.degree,
|
||||||
|
this.specialty,
|
||||||
|
this.timeFrame,
|
||||||
|
});
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'awa_model_hive.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// TypeAdapterGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class AwaAdapter extends TypeAdapter<Awa> {
|
||||||
|
@override
|
||||||
|
final int typeId = 40;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Awa read(BinaryReader reader) {
|
||||||
|
final numOfFields = reader.readByte();
|
||||||
|
final fields = <int, dynamic>{
|
||||||
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||||
|
};
|
||||||
|
return Awa(
|
||||||
|
id: fields[0] as int,
|
||||||
|
userId: fields[1] as int,
|
||||||
|
educationType: fields[2] as String?,
|
||||||
|
institutionName: fields[3] as String?,
|
||||||
|
degree: fields[4] as String?,
|
||||||
|
specialty: fields[5] as String?,
|
||||||
|
timeFrame: fields[6] as String?,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void write(BinaryWriter writer, Awa obj) {
|
||||||
|
writer
|
||||||
|
..writeByte(7)
|
||||||
|
..writeByte(0)
|
||||||
|
..write(obj.id)
|
||||||
|
..writeByte(1)
|
||||||
|
..write(obj.userId)
|
||||||
|
..writeByte(2)
|
||||||
|
..write(obj.educationType)
|
||||||
|
..writeByte(3)
|
||||||
|
..write(obj.institutionName)
|
||||||
|
..writeByte(4)
|
||||||
|
..write(obj.degree)
|
||||||
|
..writeByte(5)
|
||||||
|
..write(obj.specialty)
|
||||||
|
..writeByte(6)
|
||||||
|
..write(obj.timeFrame);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => typeId.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is AwaAdapter &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
typeId == other.typeId;
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/awa_data/awa_model_hive.dart';
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
|
||||||
|
addAwa(List awalist) async {
|
||||||
|
// static final apihcpdata = Hive.box("hcpdata");
|
||||||
|
|
||||||
|
var box = await Hive.openBox<Awa>('awahive');
|
||||||
|
//
|
||||||
|
//var box = await Hive.openBox<Affiliation>('affiliationshive');
|
||||||
|
|
||||||
|
// print("IamPublication_dataaa: ${publist},${publist.}");
|
||||||
|
|
||||||
|
// Convert JSON list to List<Affiliation>
|
||||||
|
List<Awa> edus = awalist.map((json) {
|
||||||
|
return Awa(
|
||||||
|
id: json.id,
|
||||||
|
userId: json.userId,
|
||||||
|
educationType: json.educationType ?? '',
|
||||||
|
institutionName: json.institutionName ?? '',
|
||||||
|
degree: json.degree ?? '',
|
||||||
|
specialty: json.specialty ?? '',
|
||||||
|
timeFrame: json.timeFrame.toString() ?? '',
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
print("Eduactionnsss ${edus}");
|
||||||
|
|
||||||
|
for (var edu in edus) {
|
||||||
|
print("Storing_Eduactionnsss: ${edu.specialty}");
|
||||||
|
await box.put(edu.id, edu); // Use `put` with id as key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Future<void> retrievePublications() async {
|
||||||
|
// var box = await Hive.openBox<Location>('pubhive');
|
||||||
|
// print('Retrive Doctor}');
|
||||||
|
|
||||||
|
// List<Location> publications = box.values.toList();
|
||||||
|
// print('Retrive Doctor publications ${publications}}');
|
||||||
|
|
||||||
|
// for (var publications in publications) {
|
||||||
|
// print('Retrive artical_title Name: ${publications.artical_title}');
|
||||||
|
// print('journal_name: ${publications.journal_name}');
|
||||||
|
// // Access other fields as needed
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
retrieveidawa(int id) async {
|
||||||
|
var box = await Hive.openBox<Awa>('awahive');
|
||||||
|
|
||||||
|
print('Retrive Doctor}');
|
||||||
|
|
||||||
|
var edus = box.get(id);
|
||||||
|
print('Retrive Doctor Eduuu ${edus}}');
|
||||||
|
|
||||||
|
List<Awa> dataedu = [];
|
||||||
|
if (edus != null) {
|
||||||
|
dataedu.add(edus); // Add to the list if not null
|
||||||
|
}
|
||||||
|
return dataedu;
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
part 'cer_model_hive.g.dart'; // This part file will be generated
|
||||||
|
|
||||||
|
@HiveType(typeId: 41)
|
||||||
|
class Cer extends HiveObject {
|
||||||
|
@HiveField(0)
|
||||||
|
final int id;
|
||||||
|
|
||||||
|
@HiveField(1)
|
||||||
|
final int userId;
|
||||||
|
|
||||||
|
@HiveField(2)
|
||||||
|
final String? educationType;
|
||||||
|
|
||||||
|
@HiveField(3)
|
||||||
|
final String? institutionName;
|
||||||
|
|
||||||
|
@HiveField(4)
|
||||||
|
final String? degree;
|
||||||
|
|
||||||
|
@HiveField(5)
|
||||||
|
final String? specialty;
|
||||||
|
|
||||||
|
@HiveField(6)
|
||||||
|
final String? timeFrame;
|
||||||
|
|
||||||
|
Cer({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
this.educationType,
|
||||||
|
this.institutionName,
|
||||||
|
this.degree,
|
||||||
|
this.specialty,
|
||||||
|
this.timeFrame,
|
||||||
|
});
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'cer_model_hive.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// TypeAdapterGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class CerAdapter extends TypeAdapter<Cer> {
|
||||||
|
@override
|
||||||
|
final int typeId = 41;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Cer read(BinaryReader reader) {
|
||||||
|
final numOfFields = reader.readByte();
|
||||||
|
final fields = <int, dynamic>{
|
||||||
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||||
|
};
|
||||||
|
return Cer(
|
||||||
|
id: fields[0] as int,
|
||||||
|
userId: fields[1] as int,
|
||||||
|
educationType: fields[2] as String?,
|
||||||
|
institutionName: fields[3] as String?,
|
||||||
|
degree: fields[4] as String?,
|
||||||
|
specialty: fields[5] as String?,
|
||||||
|
timeFrame: fields[6] as String?,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void write(BinaryWriter writer, Cer obj) {
|
||||||
|
writer
|
||||||
|
..writeByte(7)
|
||||||
|
..writeByte(0)
|
||||||
|
..write(obj.id)
|
||||||
|
..writeByte(1)
|
||||||
|
..write(obj.userId)
|
||||||
|
..writeByte(2)
|
||||||
|
..write(obj.educationType)
|
||||||
|
..writeByte(3)
|
||||||
|
..write(obj.institutionName)
|
||||||
|
..writeByte(4)
|
||||||
|
..write(obj.degree)
|
||||||
|
..writeByte(5)
|
||||||
|
..write(obj.specialty)
|
||||||
|
..writeByte(6)
|
||||||
|
..write(obj.timeFrame);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => typeId.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is CerAdapter &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
typeId == other.typeId;
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
// import 'package:konectar_events/storage_hive/awa_data/awa_model_hive.dart';
|
||||||
|
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/awa_data/awa_model_hive.dart';
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
|
||||||
|
addCer(List cerlist) async {
|
||||||
|
// static final apihcpdata = Hive.box("hcpdata");
|
||||||
|
|
||||||
|
var box = await Hive.openBox<Awa>('cerhive');
|
||||||
|
//
|
||||||
|
//var box = await Hive.openBox<Affiliation>('affiliationshive');
|
||||||
|
|
||||||
|
// print("IamPublication_dataaa: ${publist},${publist.}");
|
||||||
|
|
||||||
|
// Convert JSON list to List<Affiliation>
|
||||||
|
List<Awa> cers = cerlist.map((json) {
|
||||||
|
return Awa(
|
||||||
|
id: json.id,
|
||||||
|
userId: json.userId,
|
||||||
|
educationType: json.educationType ?? '',
|
||||||
|
institutionName: json.institutionName ?? '',
|
||||||
|
degree: json.degree ?? '',
|
||||||
|
specialty: json.specialty ?? '',
|
||||||
|
timeFrame: json.timeFrame.toString() ?? '',
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
print("Eduactionnsss ${cers}");
|
||||||
|
|
||||||
|
for (var cer in cers) {
|
||||||
|
print("Storing_Eduactionnsss: ${cer.specialty}");
|
||||||
|
await box.put(cer.id, cer); // Use `put` with id as key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Future<void> retrievePublications() async {
|
||||||
|
// var box = await Hive.openBox<Location>('pubhive');
|
||||||
|
// print('Retrive Doctor}');
|
||||||
|
|
||||||
|
// List<Location> publications = box.values.toList();
|
||||||
|
// print('Retrive Doctor publications ${publications}}');
|
||||||
|
|
||||||
|
// for (var publications in publications) {
|
||||||
|
// print('Retrive artical_title Name: ${publications.artical_title}');
|
||||||
|
// print('journal_name: ${publications.journal_name}');
|
||||||
|
// // Access other fields as needed
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
retrieveidcer(int id) async {
|
||||||
|
var box = await Hive.openBox<Awa>('cerhive');
|
||||||
|
|
||||||
|
print('Retrive Doctor}');
|
||||||
|
|
||||||
|
var cers = box.get(id);
|
||||||
|
print('Retrive Doctor Eduuu ${cers}}');
|
||||||
|
|
||||||
|
List<Awa> datacer = [];
|
||||||
|
if (cers != null) {
|
||||||
|
datacer.add(cers); // Add to the list if not null
|
||||||
|
}
|
||||||
|
return datacer;
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/edu_data/edu_model_hive.dart';
|
||||||
|
// import 'package:konectar_events/storage_hive/edu_data/edu_model_hive.dart';
|
||||||
|
// import 'package:konectar_events/storage_hive/loc_data/location_model_hive.dart';
|
||||||
|
// import 'package:konectar_events/storage_hive/pno_data/pno_model_hive.dart';
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
|
||||||
|
addEdu(List edulist) async {
|
||||||
|
// static final apihcpdata = Hive.box("hcpdata");
|
||||||
|
|
||||||
|
var box = await Hive.openBox<Edu>('edulhive');
|
||||||
|
//
|
||||||
|
//var box = await Hive.openBox<Affiliation>('affiliationshive');
|
||||||
|
|
||||||
|
// print("IamPublication_dataaa: ${publist},${publist.}");
|
||||||
|
|
||||||
|
// Convert JSON list to List<Affiliation>
|
||||||
|
List<Edu> edus = edulist.map((json) {
|
||||||
|
return Edu(
|
||||||
|
id: json.id,
|
||||||
|
userId: json.userId,
|
||||||
|
educationType: json.educationType ?? '',
|
||||||
|
institutionName: json.institutionName ?? '',
|
||||||
|
degree: json.degree ?? '',
|
||||||
|
specialty: json.specialty ?? '',
|
||||||
|
timeFrame: json.timeFrame.toString() ?? '',
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
print("Eduactionnsss ${edus}");
|
||||||
|
|
||||||
|
for (var edu in edus) {
|
||||||
|
print("Storing_Eduactionnsss: ${edu.specialty}");
|
||||||
|
await box.put(edu.id, edu); // Use `put` with id as key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Future<void> retrievePublications() async {
|
||||||
|
// var box = await Hive.openBox<Location>('pubhive');
|
||||||
|
// print('Retrive Doctor}');
|
||||||
|
|
||||||
|
// List<Location> publications = box.values.toList();
|
||||||
|
// print('Retrive Doctor publications ${publications}}');
|
||||||
|
|
||||||
|
// for (var publications in publications) {
|
||||||
|
// print('Retrive artical_title Name: ${publications.artical_title}');
|
||||||
|
// print('journal_name: ${publications.journal_name}');
|
||||||
|
// // Access other fields as needed
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
retrieveidedus(int id) async {
|
||||||
|
var box = await Hive.openBox<Edu>('edulhive');
|
||||||
|
|
||||||
|
print('Retrive Doctor}');
|
||||||
|
|
||||||
|
var edus = box.get(4);
|
||||||
|
print('Retrive Doctor Eduuu ${edus}}');
|
||||||
|
|
||||||
|
List<Edu> dataedu = [];
|
||||||
|
if (edus != null) {
|
||||||
|
dataedu.add(edus); // Add to the list if not null
|
||||||
|
}
|
||||||
|
return dataedu;
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
part 'edu_model_hive.g.dart'; // This part file will be generated
|
||||||
|
|
||||||
|
@HiveType(typeId: 39)
|
||||||
|
class Edu extends HiveObject {
|
||||||
|
@HiveField(0)
|
||||||
|
final int id;
|
||||||
|
|
||||||
|
@HiveField(1)
|
||||||
|
final int userId;
|
||||||
|
|
||||||
|
@HiveField(2)
|
||||||
|
final String? educationType;
|
||||||
|
|
||||||
|
@HiveField(3)
|
||||||
|
final String? institutionName;
|
||||||
|
|
||||||
|
@HiveField(4)
|
||||||
|
final String? degree;
|
||||||
|
|
||||||
|
@HiveField(5)
|
||||||
|
final String? specialty;
|
||||||
|
|
||||||
|
@HiveField(6)
|
||||||
|
final String? timeFrame;
|
||||||
|
|
||||||
|
Edu({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
this.educationType,
|
||||||
|
this.institutionName,
|
||||||
|
this.degree,
|
||||||
|
this.specialty,
|
||||||
|
this.timeFrame,
|
||||||
|
});
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'edu_model_hive.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// TypeAdapterGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class EduAdapter extends TypeAdapter<Edu> {
|
||||||
|
@override
|
||||||
|
final int typeId = 39;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Edu read(BinaryReader reader) {
|
||||||
|
final numOfFields = reader.readByte();
|
||||||
|
final fields = <int, dynamic>{
|
||||||
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||||
|
};
|
||||||
|
return Edu(
|
||||||
|
id: fields[0] as int,
|
||||||
|
userId: fields[1] as int,
|
||||||
|
educationType: fields[2] as String?,
|
||||||
|
institutionName: fields[3] as String?,
|
||||||
|
degree: fields[4] as String?,
|
||||||
|
specialty: fields[5] as String?,
|
||||||
|
timeFrame: fields[6] as String?,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void write(BinaryWriter writer, Edu obj) {
|
||||||
|
writer
|
||||||
|
..writeByte(7)
|
||||||
|
..writeByte(0)
|
||||||
|
..write(obj.id)
|
||||||
|
..writeByte(1)
|
||||||
|
..write(obj.userId)
|
||||||
|
..writeByte(2)
|
||||||
|
..write(obj.educationType)
|
||||||
|
..writeByte(3)
|
||||||
|
..write(obj.institutionName)
|
||||||
|
..writeByte(4)
|
||||||
|
..write(obj.degree)
|
||||||
|
..writeByte(5)
|
||||||
|
..write(obj.specialty)
|
||||||
|
..writeByte(6)
|
||||||
|
..write(obj.timeFrame);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => typeId.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is EduAdapter &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
typeId == other.typeId;
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
// import 'package:konectar_events/storage_hive/email_data/email_model_hive.dart';
|
||||||
|
// import 'package:konectar_events/storage_hive/loc_data/location_model_hive.dart';
|
||||||
|
// import 'package:konectar_events/storage_hive/pno_data/pno_model_hive.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/email_data/email_model_hive.dart';
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
|
||||||
|
addEmail(List emaillist) async {
|
||||||
|
// static final apihcpdata = Hive.box("hcpdata");
|
||||||
|
|
||||||
|
var box = await Hive.openBox<Email>('emailhive');
|
||||||
|
//
|
||||||
|
//var box = await Hive.openBox<Affiliation>('affiliationshive');
|
||||||
|
|
||||||
|
// print("IamPublication_dataaa: ${publist},${publist.}");
|
||||||
|
|
||||||
|
// Convert JSON list to List<Affiliation>
|
||||||
|
List<Email> emails = emaillist.map((json) {
|
||||||
|
return Email(
|
||||||
|
id: json.id,
|
||||||
|
userId: json.userId,
|
||||||
|
emailType: json.emailType ?? '',
|
||||||
|
email: json.email ?? '',
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
print("Publicattionnsss_isss: ${emails}");
|
||||||
|
|
||||||
|
for (var email in emails) {
|
||||||
|
print("Storing_Affff: ${email.emailType}");
|
||||||
|
await box.put(email.id, email); // Use `put` with id as key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Future<void> retrievePublications() async {
|
||||||
|
// var box = await Hive.openBox<Location>('pubhive');
|
||||||
|
// print('Retrive Doctor}');
|
||||||
|
|
||||||
|
// List<Location> publications = box.values.toList();
|
||||||
|
// print('Retrive Doctor publications ${publications}}');
|
||||||
|
|
||||||
|
// for (var publications in publications) {
|
||||||
|
// print('Retrive artical_title Name: ${publications.artical_title}');
|
||||||
|
// print('journal_name: ${publications.journal_name}');
|
||||||
|
// // Access other fields as needed
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
retrieveidemails(int id) async {
|
||||||
|
var box = await Hive.openBox<Email>('emailhive');
|
||||||
|
print('Retrive Doctor}');
|
||||||
|
|
||||||
|
var pnos = box.get(id);
|
||||||
|
print('Retrive Doctor locations ${pnos}}');
|
||||||
|
|
||||||
|
List<Email> dataemail = [];
|
||||||
|
if (pnos != null) {
|
||||||
|
dataemail.add(pnos); // Add to the list if not null
|
||||||
|
}
|
||||||
|
return dataemail;
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
part 'email_model_hive.g.dart'; // This part file will be generated
|
||||||
|
|
||||||
|
@HiveType(typeId: 38)
|
||||||
|
class Email extends HiveObject {
|
||||||
|
@HiveField(0)
|
||||||
|
final int id;
|
||||||
|
|
||||||
|
@HiveField(1)
|
||||||
|
final int userId;
|
||||||
|
|
||||||
|
@HiveField(2)
|
||||||
|
final String? emailType;
|
||||||
|
|
||||||
|
@HiveField(3)
|
||||||
|
final String? email;
|
||||||
|
|
||||||
|
Email({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
this.emailType,
|
||||||
|
this.email,
|
||||||
|
e,
|
||||||
|
});
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'email_model_hive.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// TypeAdapterGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class EmailAdapter extends TypeAdapter<Email> {
|
||||||
|
@override
|
||||||
|
final int typeId = 38;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Email read(BinaryReader reader) {
|
||||||
|
final numOfFields = reader.readByte();
|
||||||
|
final fields = <int, dynamic>{
|
||||||
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||||
|
};
|
||||||
|
return Email(
|
||||||
|
id: fields[0] as int,
|
||||||
|
userId: fields[1] as int,
|
||||||
|
emailType: fields[2] as String?,
|
||||||
|
email: fields[3] as String?,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void write(BinaryWriter writer, Email obj) {
|
||||||
|
writer
|
||||||
|
..writeByte(4)
|
||||||
|
..writeByte(0)
|
||||||
|
..write(obj.id)
|
||||||
|
..writeByte(1)
|
||||||
|
..write(obj.userId)
|
||||||
|
..writeByte(2)
|
||||||
|
..write(obj.emailType)
|
||||||
|
..writeByte(3)
|
||||||
|
..write(obj.email);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => typeId.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is EmailAdapter &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
typeId == other.typeId;
|
||||||
|
}
|
|
@ -0,0 +1,76 @@
|
||||||
|
// import 'package:konectar_events/storage_hive/events_data/event_model_hive.dart';
|
||||||
|
// import 'package:konectar_events/storage_hive/pub_data/pub_model_hive.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/events_data/event_model_hive.dart';
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
|
||||||
|
addEvent(List publist) async {
|
||||||
|
// static final apihcpdata = Hive.box("hcpdata");
|
||||||
|
|
||||||
|
var box = await Hive.openBox<Events>('eventhive');
|
||||||
|
//
|
||||||
|
//var box = await Hive.openBox<Affiliation>('affiliationshive');
|
||||||
|
|
||||||
|
// print("IamPublication_dataaa: ${publist},${publist.}");
|
||||||
|
|
||||||
|
// Convert JSON list to List<Affiliation>
|
||||||
|
List<Events> events = publist.map((json) {
|
||||||
|
return Events(
|
||||||
|
id: json.id,
|
||||||
|
userId: json.userId,
|
||||||
|
event_name: json.eventName ?? '',
|
||||||
|
event_type: '',
|
||||||
|
session_type: json.sessionType ?? '',
|
||||||
|
session_Name: '',
|
||||||
|
role: json.role ?? '',
|
||||||
|
topic: json.topic ?? '',
|
||||||
|
start: '',
|
||||||
|
end: '',
|
||||||
|
organizer: '',
|
||||||
|
organizer_Type: '',
|
||||||
|
sponsor: '',
|
||||||
|
sponsor_Type: '',
|
||||||
|
location: '',
|
||||||
|
address: '',
|
||||||
|
country: '',
|
||||||
|
state: '',
|
||||||
|
city: '',
|
||||||
|
postal_Code: '',
|
||||||
|
url1: '',
|
||||||
|
url2: '');
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
print("Events_isss: ${events}");
|
||||||
|
|
||||||
|
for (var events in events) {
|
||||||
|
print("Storing_Affff: ${events.event_name}");
|
||||||
|
await box.put(events.id, events); // Use `put` with id as key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> retrieveEventss() async {
|
||||||
|
var box = await Hive.openBox<Events>('eventhive');
|
||||||
|
print('Retrive Doctor}');
|
||||||
|
|
||||||
|
List<Events> events1 = box.values.toList();
|
||||||
|
print('Retrive Doctor Events ${events1}}');
|
||||||
|
|
||||||
|
for (var Events in events1) {
|
||||||
|
print('Retrive Events Name: ${Events.event_name}');
|
||||||
|
print('Events: ${Events.event_type}');
|
||||||
|
// Access other fields as needed
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
retrieveidEvent(int id) async {
|
||||||
|
var box = await Hive.openBox<Events>('eventhive');
|
||||||
|
print('Retrive Doctor}');
|
||||||
|
|
||||||
|
var events = box.get(id);
|
||||||
|
print('Retrive Doctor publications ${events}}');
|
||||||
|
|
||||||
|
List<Events> datapub = [];
|
||||||
|
if (events != null) {
|
||||||
|
datapub.add(events); // Add to the list if not null
|
||||||
|
}
|
||||||
|
return datapub;
|
||||||
|
}
|
|
@ -0,0 +1,96 @@
|
||||||
|
import 'package:hive/hive.dart';
|
||||||
|
|
||||||
|
part 'event_model_hive.g.dart'; // This part file will be generated
|
||||||
|
|
||||||
|
@HiveType(typeId: 33) // Use a unique typeId for this class
|
||||||
|
class Events extends HiveObject {
|
||||||
|
@HiveField(0)
|
||||||
|
final int? id;
|
||||||
|
|
||||||
|
@HiveField(1)
|
||||||
|
final int? userId;
|
||||||
|
|
||||||
|
@HiveField(2)
|
||||||
|
final String? event_name;
|
||||||
|
|
||||||
|
@HiveField(3)
|
||||||
|
final String? event_type;
|
||||||
|
|
||||||
|
@HiveField(4)
|
||||||
|
final String? session_type;
|
||||||
|
|
||||||
|
@HiveField(5)
|
||||||
|
final String? session_Name;
|
||||||
|
|
||||||
|
@HiveField(6)
|
||||||
|
final String? role;
|
||||||
|
|
||||||
|
@HiveField(7)
|
||||||
|
final String? topic;
|
||||||
|
|
||||||
|
@HiveField(8)
|
||||||
|
final String? start;
|
||||||
|
|
||||||
|
@HiveField(9)
|
||||||
|
final String? end;
|
||||||
|
|
||||||
|
@HiveField(10)
|
||||||
|
final String? organizer;
|
||||||
|
|
||||||
|
@HiveField(11)
|
||||||
|
final String? organizer_Type;
|
||||||
|
|
||||||
|
@HiveField(12)
|
||||||
|
final String? sponsor;
|
||||||
|
|
||||||
|
@HiveField(13)
|
||||||
|
final String? sponsor_Type;
|
||||||
|
|
||||||
|
@HiveField(14)
|
||||||
|
final String? location;
|
||||||
|
|
||||||
|
@HiveField(15)
|
||||||
|
final String? address;
|
||||||
|
|
||||||
|
@HiveField(16)
|
||||||
|
final String? country;
|
||||||
|
|
||||||
|
@HiveField(17)
|
||||||
|
final String? state;
|
||||||
|
|
||||||
|
@HiveField(18)
|
||||||
|
final String? city;
|
||||||
|
|
||||||
|
@HiveField(19)
|
||||||
|
final String? postal_Code;
|
||||||
|
|
||||||
|
@HiveField(20)
|
||||||
|
final String? url1; // Nullable
|
||||||
|
@HiveField(21)
|
||||||
|
final String? url2; // Nullable
|
||||||
|
|
||||||
|
Events({
|
||||||
|
this.id,
|
||||||
|
this.userId,
|
||||||
|
this.event_name,
|
||||||
|
this.event_type,
|
||||||
|
this.session_type,
|
||||||
|
this.session_Name,
|
||||||
|
this.role,
|
||||||
|
this.topic,
|
||||||
|
this.start,
|
||||||
|
this.end,
|
||||||
|
this.organizer,
|
||||||
|
this.organizer_Type,
|
||||||
|
this.sponsor,
|
||||||
|
this.sponsor_Type,
|
||||||
|
this.location,
|
||||||
|
this.address,
|
||||||
|
this.country,
|
||||||
|
this.state,
|
||||||
|
this.city,
|
||||||
|
this.postal_Code,
|
||||||
|
this.url1,
|
||||||
|
this.url2,
|
||||||
|
});
|
||||||
|
}
|
|
@ -0,0 +1,104 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'event_model_hive.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// TypeAdapterGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class EventsAdapter extends TypeAdapter<Events> {
|
||||||
|
@override
|
||||||
|
final int typeId = 33;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Events read(BinaryReader reader) {
|
||||||
|
final numOfFields = reader.readByte();
|
||||||
|
final fields = <int, dynamic>{
|
||||||
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||||
|
};
|
||||||
|
return Events(
|
||||||
|
id: fields[0] as int?,
|
||||||
|
userId: fields[1] as int?,
|
||||||
|
event_name: fields[2] as String?,
|
||||||
|
event_type: fields[3] as String?,
|
||||||
|
session_type: fields[4] as String?,
|
||||||
|
session_Name: fields[5] as String?,
|
||||||
|
role: fields[6] as String?,
|
||||||
|
topic: fields[7] as String?,
|
||||||
|
start: fields[8] as String?,
|
||||||
|
end: fields[9] as String?,
|
||||||
|
organizer: fields[10] as String?,
|
||||||
|
organizer_Type: fields[11] as String?,
|
||||||
|
sponsor: fields[12] as String?,
|
||||||
|
sponsor_Type: fields[13] as String?,
|
||||||
|
location: fields[14] as String?,
|
||||||
|
address: fields[15] as String?,
|
||||||
|
country: fields[16] as String?,
|
||||||
|
state: fields[17] as String?,
|
||||||
|
city: fields[18] as String?,
|
||||||
|
postal_Code: fields[19] as String?,
|
||||||
|
url1: fields[20] as String?,
|
||||||
|
url2: fields[21] as String?,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void write(BinaryWriter writer, Events obj) {
|
||||||
|
writer
|
||||||
|
..writeByte(22)
|
||||||
|
..writeByte(0)
|
||||||
|
..write(obj.id)
|
||||||
|
..writeByte(1)
|
||||||
|
..write(obj.userId)
|
||||||
|
..writeByte(2)
|
||||||
|
..write(obj.event_name)
|
||||||
|
..writeByte(3)
|
||||||
|
..write(obj.event_type)
|
||||||
|
..writeByte(4)
|
||||||
|
..write(obj.session_type)
|
||||||
|
..writeByte(5)
|
||||||
|
..write(obj.session_Name)
|
||||||
|
..writeByte(6)
|
||||||
|
..write(obj.role)
|
||||||
|
..writeByte(7)
|
||||||
|
..write(obj.topic)
|
||||||
|
..writeByte(8)
|
||||||
|
..write(obj.start)
|
||||||
|
..writeByte(9)
|
||||||
|
..write(obj.end)
|
||||||
|
..writeByte(10)
|
||||||
|
..write(obj.organizer)
|
||||||
|
..writeByte(11)
|
||||||
|
..write(obj.organizer_Type)
|
||||||
|
..writeByte(12)
|
||||||
|
..write(obj.sponsor)
|
||||||
|
..writeByte(13)
|
||||||
|
..write(obj.sponsor_Type)
|
||||||
|
..writeByte(14)
|
||||||
|
..write(obj.location)
|
||||||
|
..writeByte(15)
|
||||||
|
..write(obj.address)
|
||||||
|
..writeByte(16)
|
||||||
|
..write(obj.country)
|
||||||
|
..writeByte(17)
|
||||||
|
..write(obj.state)
|
||||||
|
..writeByte(18)
|
||||||
|
..write(obj.city)
|
||||||
|
..writeByte(19)
|
||||||
|
..write(obj.postal_Code)
|
||||||
|
..writeByte(20)
|
||||||
|
..write(obj.url1)
|
||||||
|
..writeByte(21)
|
||||||
|
..write(obj.url2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => typeId.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is EventsAdapter &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
typeId == other.typeId;
|
||||||
|
}
|
|
@ -0,0 +1,86 @@
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
// import 'package:konectar_events/storage_hive/kol_info/kol_info_model_hive.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/kol_info/kol_info_model_hive.dart';
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
|
||||||
|
addKolInfo(Map<String, dynamic> kollist) async {
|
||||||
|
var box = await Hive.openBox<KolInfo>('kolshive');
|
||||||
|
print("IamKolInfo_dataaa: ${kollist}");
|
||||||
|
|
||||||
|
var doctor = KolInfo(
|
||||||
|
id: kollist['id'],
|
||||||
|
name: kollist['name'],
|
||||||
|
email: kollist['email'],
|
||||||
|
summarry: kollist['summarry'],
|
||||||
|
addr: kollist['addr'],
|
||||||
|
license_no: kollist['license_no'].toString(),
|
||||||
|
p_suffix: kollist['p_suffix'],
|
||||||
|
speciality: kollist['speciality'],
|
||||||
|
sub_speciality: kollist['sub_speciality'],
|
||||||
|
phone_no: kollist['phone_no'].toString(),
|
||||||
|
// created_at: DateTime.parse('2023-11-28T15:58:08.000000Z'),
|
||||||
|
// updated_at: DateTime.parse('2024-01-16T11:26:10.000000Z'),
|
||||||
|
img_path: kollist['img_path'].toString(),
|
||||||
|
country: kollist['country'].toString(),
|
||||||
|
);
|
||||||
|
|
||||||
|
print("Checkinggg_thatt : ${doctor}, ${doctor.id}");
|
||||||
|
|
||||||
|
await box.put(doctor.id, doctor);
|
||||||
|
|
||||||
|
// await box.put(affiliation.id, affiliation); // Use `put` with id as key
|
||||||
|
|
||||||
|
// return KolInfo(id : json['id'], name : json['id'], email :json['email'], summarry, addr, license_no, p_suffix, speciality, sub_speciality, phone_no, created_at, updated_at, img_path, country)
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
|
retrievekol() async {
|
||||||
|
var box = await Hive.openBox<KolInfo>('kolshive');
|
||||||
|
print('Retrive Kol Namehii}');
|
||||||
|
|
||||||
|
List doctordata = box.values.toList();
|
||||||
|
print('Retrive Kol123 ${doctordata}, ${doctordata.length}');
|
||||||
|
|
||||||
|
for (var affiliation in doctordata) {
|
||||||
|
print(' Name: ${affiliation.name}');
|
||||||
|
print('email: ${affiliation.email}');
|
||||||
|
// Access other fields as needed
|
||||||
|
}
|
||||||
|
return doctordata;
|
||||||
|
}
|
||||||
|
|
||||||
|
deletekol(id) async {
|
||||||
|
var box = await Hive.openBox<KolInfo>('kolshive');
|
||||||
|
|
||||||
|
print("DeletingKolll");
|
||||||
|
|
||||||
|
await box.delete(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
searchkol(String query) async {
|
||||||
|
var box = await Hive.openBox<KolInfo>('kolshive');
|
||||||
|
print('Retrive Kol Namehii}');
|
||||||
|
|
||||||
|
List doctordata = box.values.toList();
|
||||||
|
print('Searchh Kol123 ${doctordata}, ${doctordata.length}');
|
||||||
|
|
||||||
|
List data = doctordata
|
||||||
|
.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();
|
||||||
|
|
||||||
|
print("Checking_Name_data : ${data}");
|
||||||
|
|
||||||
|
// for (var affiliation in doctordata) {
|
||||||
|
// print(' Name: ${affiliation.name}');
|
||||||
|
// print('email: ${affiliation.email}');
|
||||||
|
// // Access other fields as needed
|
||||||
|
// }
|
||||||
|
return data.toList();
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
part 'kol_info_model_hive.g.dart'; // This part file will be generated
|
||||||
|
|
||||||
|
@HiveType(typeId: 31)
|
||||||
|
class KolInfo extends HiveObject {
|
||||||
|
@HiveField(0)
|
||||||
|
final int id;
|
||||||
|
|
||||||
|
@HiveField(1)
|
||||||
|
final String name;
|
||||||
|
|
||||||
|
@HiveField(2)
|
||||||
|
final String? email;
|
||||||
|
|
||||||
|
@HiveField(3)
|
||||||
|
final String? summarry;
|
||||||
|
|
||||||
|
@HiveField(4)
|
||||||
|
final String? addr;
|
||||||
|
|
||||||
|
@HiveField(5)
|
||||||
|
final String? license_no;
|
||||||
|
|
||||||
|
@HiveField(6)
|
||||||
|
final String? p_suffix;
|
||||||
|
|
||||||
|
@HiveField(7)
|
||||||
|
final String? speciality;
|
||||||
|
|
||||||
|
@HiveField(8)
|
||||||
|
final String? sub_speciality;
|
||||||
|
|
||||||
|
@HiveField(9)
|
||||||
|
final String? phone_no;
|
||||||
|
|
||||||
|
@HiveField(10)
|
||||||
|
final String? created_at;
|
||||||
|
|
||||||
|
@HiveField(11)
|
||||||
|
final String? updated_at;
|
||||||
|
|
||||||
|
@HiveField(12)
|
||||||
|
final String? img_path;
|
||||||
|
|
||||||
|
@HiveField(13)
|
||||||
|
final String? country;
|
||||||
|
|
||||||
|
KolInfo(
|
||||||
|
{required this.id,
|
||||||
|
required this.name,
|
||||||
|
this.email,
|
||||||
|
this.summarry,
|
||||||
|
this.addr,
|
||||||
|
this.license_no,
|
||||||
|
this.p_suffix,
|
||||||
|
this.speciality,
|
||||||
|
this.sub_speciality,
|
||||||
|
this.phone_no,
|
||||||
|
this.created_at,
|
||||||
|
this.updated_at,
|
||||||
|
required this.img_path,
|
||||||
|
this.country});
|
||||||
|
}
|
|
@ -0,0 +1,80 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'kol_info_model_hive.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// TypeAdapterGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class KolInfoAdapter extends TypeAdapter<KolInfo> {
|
||||||
|
@override
|
||||||
|
final int typeId = 31;
|
||||||
|
|
||||||
|
@override
|
||||||
|
KolInfo read(BinaryReader reader) {
|
||||||
|
final numOfFields = reader.readByte();
|
||||||
|
final fields = <int, dynamic>{
|
||||||
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||||
|
};
|
||||||
|
return KolInfo(
|
||||||
|
id: fields[0] as int,
|
||||||
|
name: fields[1] as String,
|
||||||
|
email: fields[2] as String?,
|
||||||
|
summarry: fields[3] as String?,
|
||||||
|
addr: fields[4] as String?,
|
||||||
|
license_no: fields[5] as String?,
|
||||||
|
p_suffix: fields[6] as String?,
|
||||||
|
speciality: fields[7] as String?,
|
||||||
|
sub_speciality: fields[8] as String?,
|
||||||
|
phone_no: fields[9] as String?,
|
||||||
|
created_at: fields[10] as String?,
|
||||||
|
updated_at: fields[11] as String?,
|
||||||
|
img_path: fields[12] as String?,
|
||||||
|
country: fields[13] as String?,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void write(BinaryWriter writer, KolInfo obj) {
|
||||||
|
writer
|
||||||
|
..writeByte(14)
|
||||||
|
..writeByte(0)
|
||||||
|
..write(obj.id)
|
||||||
|
..writeByte(1)
|
||||||
|
..write(obj.name)
|
||||||
|
..writeByte(2)
|
||||||
|
..write(obj.email)
|
||||||
|
..writeByte(3)
|
||||||
|
..write(obj.summarry)
|
||||||
|
..writeByte(4)
|
||||||
|
..write(obj.addr)
|
||||||
|
..writeByte(5)
|
||||||
|
..write(obj.license_no)
|
||||||
|
..writeByte(6)
|
||||||
|
..write(obj.p_suffix)
|
||||||
|
..writeByte(7)
|
||||||
|
..write(obj.speciality)
|
||||||
|
..writeByte(8)
|
||||||
|
..write(obj.sub_speciality)
|
||||||
|
..writeByte(9)
|
||||||
|
..write(obj.phone_no)
|
||||||
|
..writeByte(10)
|
||||||
|
..write(obj.created_at)
|
||||||
|
..writeByte(11)
|
||||||
|
..write(obj.updated_at)
|
||||||
|
..writeByte(12)
|
||||||
|
..write(obj.img_path)
|
||||||
|
..writeByte(13)
|
||||||
|
..write(obj.country);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => typeId.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is KolInfoAdapter &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
typeId == other.typeId;
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
// import 'package:konectar_events/storage_hive/loc_data/location_model_hive.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/loc_data/location_model_hive.dart';
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
|
||||||
|
addLoc(List loclist) async {
|
||||||
|
// static final apihcpdata = Hive.box("hcpdata");
|
||||||
|
|
||||||
|
var box = await Hive.openBox<Location>('lochive');
|
||||||
|
//
|
||||||
|
//var box = await Hive.openBox<Affiliation>('affiliationshive');
|
||||||
|
|
||||||
|
// print("IamPublication_dataaa: ${publist},${publist.}");
|
||||||
|
|
||||||
|
// Convert JSON list to List<Affiliation>
|
||||||
|
List<Location> locations = loclist.map((json) {
|
||||||
|
return Location(
|
||||||
|
id: json.id,
|
||||||
|
userId: json.userId,
|
||||||
|
institution: json.institution ?? '',
|
||||||
|
address: json.address ?? '',
|
||||||
|
city: json.city ?? '',
|
||||||
|
state: json.state ?? '',
|
||||||
|
postalCode: json.postalCode.toString() ?? '',
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
print("Publicattionnsss_isss: ${locations}");
|
||||||
|
|
||||||
|
for (var loc in locations) {
|
||||||
|
print("Storing_Affff: ${loc.institution}");
|
||||||
|
await box.put(loc.id, loc); // Use `put` with id as key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Future<void> retrievePublications() async {
|
||||||
|
// var box = await Hive.openBox<Location>('pubhive');
|
||||||
|
// print('Retrive Doctor}');
|
||||||
|
|
||||||
|
// List<Location> publications = box.values.toList();
|
||||||
|
// print('Retrive Doctor publications ${publications}}');
|
||||||
|
|
||||||
|
// for (var publications in publications) {
|
||||||
|
// print('Retrive artical_title Name: ${publications.artical_title}');
|
||||||
|
// print('journal_name: ${publications.journal_name}');
|
||||||
|
// // Access other fields as needed
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
retrieveidlocations(int id) async {
|
||||||
|
var box = await Hive.openBox<Location>('lochive');
|
||||||
|
print('Retrive Doctor}');
|
||||||
|
|
||||||
|
var locations = box.get(id);
|
||||||
|
print('Retrive Doctor locations ${locations}}');
|
||||||
|
|
||||||
|
List<Location> dataloc = [];
|
||||||
|
if (locations != null) {
|
||||||
|
dataloc.add(locations); // Add to the list if not null
|
||||||
|
}
|
||||||
|
return dataloc;
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
part 'location_model_hive.g.dart'; // This part file will be generated
|
||||||
|
|
||||||
|
@HiveType(typeId: 36)
|
||||||
|
class Location extends HiveObject {
|
||||||
|
@HiveField(0)
|
||||||
|
final int id;
|
||||||
|
|
||||||
|
@HiveField(1)
|
||||||
|
final int userId;
|
||||||
|
|
||||||
|
@HiveField(2)
|
||||||
|
final String? institution;
|
||||||
|
|
||||||
|
@HiveField(3)
|
||||||
|
final String? address;
|
||||||
|
|
||||||
|
@HiveField(4)
|
||||||
|
final String? city;
|
||||||
|
|
||||||
|
@HiveField(5)
|
||||||
|
final String? state;
|
||||||
|
|
||||||
|
@HiveField(6)
|
||||||
|
final String? postalCode;
|
||||||
|
|
||||||
|
Location({
|
||||||
|
required this.id,
|
||||||
|
required this.userId,
|
||||||
|
this.institution,
|
||||||
|
this.address,
|
||||||
|
this.city,
|
||||||
|
this.state,
|
||||||
|
this.postalCode,
|
||||||
|
});
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'location_model_hive.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// TypeAdapterGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class LocationAdapter extends TypeAdapter<Location> {
|
||||||
|
@override
|
||||||
|
final int typeId = 36;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Location read(BinaryReader reader) {
|
||||||
|
final numOfFields = reader.readByte();
|
||||||
|
final fields = <int, dynamic>{
|
||||||
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||||
|
};
|
||||||
|
return Location(
|
||||||
|
id: fields[0] as int,
|
||||||
|
userId: fields[1] as int,
|
||||||
|
institution: fields[2] as String?,
|
||||||
|
address: fields[3] as String?,
|
||||||
|
city: fields[4] as String?,
|
||||||
|
state: fields[5] as String?,
|
||||||
|
postalCode: fields[6] as String?,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void write(BinaryWriter writer, Location obj) {
|
||||||
|
writer
|
||||||
|
..writeByte(7)
|
||||||
|
..writeByte(0)
|
||||||
|
..write(obj.id)
|
||||||
|
..writeByte(1)
|
||||||
|
..write(obj.userId)
|
||||||
|
..writeByte(2)
|
||||||
|
..write(obj.institution)
|
||||||
|
..writeByte(3)
|
||||||
|
..write(obj.address)
|
||||||
|
..writeByte(4)
|
||||||
|
..write(obj.city)
|
||||||
|
..writeByte(5)
|
||||||
|
..write(obj.state)
|
||||||
|
..writeByte(6)
|
||||||
|
..write(obj.postalCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => typeId.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is LocationAdapter &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
typeId == other.typeId;
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
// import 'package:konectar_events/storage_hive/nih_grant_data/nih_model_hive.dart';
|
||||||
|
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/nih_grant_data/nih_model_hive.dart';
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
|
||||||
|
addNih(List nihlist) async {
|
||||||
|
var box = await Hive.openBox<Nih>('nihhive');
|
||||||
|
|
||||||
|
List<Nih> nihs = nihlist.map((json) {
|
||||||
|
print("Checkingggg: ${json.piNames}");
|
||||||
|
return Nih(
|
||||||
|
id: json.id,
|
||||||
|
userId: json.userId,
|
||||||
|
piNames: json.piNames ?? '',
|
||||||
|
firstName: json.firstName ?? '',
|
||||||
|
middleName: json.middleName ?? '',
|
||||||
|
lastName: json.lastName ?? '',
|
||||||
|
organizationName: json.organizationName ?? '',
|
||||||
|
departmentName: json.departmentName ?? '',
|
||||||
|
orgCity: json.orgCity ?? '',
|
||||||
|
orgState: json.orgState ?? '',
|
||||||
|
purpose: json.purpose ?? '',
|
||||||
|
institute: json.institute ?? '',
|
||||||
|
totalCost: json.totalCost ?? '',
|
||||||
|
projectStart: json.projectStart ?? '',
|
||||||
|
projectEnd: json.projectEnd ?? '',
|
||||||
|
budgetStart: json.budgetStart ?? '',
|
||||||
|
budgetEnd: json.budgetEnd ?? '',
|
||||||
|
createdOn: json.createdOn ?? '',
|
||||||
|
piId: json.piId ?? '',
|
||||||
|
);
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
print("Eduactionnsss ${nihs}");
|
||||||
|
|
||||||
|
for (var nih in nihs) {
|
||||||
|
print("Storing_Eduactionnsss: ${nih.piNames}");
|
||||||
|
await box.put(nih.id, nih); // Use `put` with id as key
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
retrieveidnih(int id) async {
|
||||||
|
var box = await Hive.openBox<Nih>('nihhive');
|
||||||
|
|
||||||
|
print('Retrive Doctor}');
|
||||||
|
|
||||||
|
var nihs = box.get(id);
|
||||||
|
print('Retrive Doctor Eduuu ${nihs}}');
|
||||||
|
|
||||||
|
List<Nih> datanih = [];
|
||||||
|
if (nihs != null) {
|
||||||
|
datanih.add(nihs); // Add to the list if not null
|
||||||
|
}
|
||||||
|
return datanih;
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue