code optimized

This commit is contained in:
snehalathad@aissel.com 2024-10-07 18:15:45 +05:30
parent 38870a3a8c
commit a362cbc773
48 changed files with 2313 additions and 205650 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,444 +0,0 @@
{
"data": {
"eventsdetail": [
{
"proj_kol_id": true,
"eid": "140846",
"event_topics": "Hematologic Neoplasms",
"npi_num": "1518014307",
"hcp_pin_alias": "862156",
"session_name": "Hematological Malignancies",
"name": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"kol_id": "862156",
"first_name": "Leonard",
"middle_name": "Jefferson",
"last_name": "Harris",
"org_name": "The University of Tennessee Medical Center",
"Country": "United States",
"Region": "Tennessee",
"City": "Memphis",
"num_sess": "1",
"opt_in_out_status": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"session_note": null,
"events_session": "Hematological Malignancies",
"rest_events_session_count": 0,
"rest_events_session": "",
"events_topic": "Hematologic Neoplasms",
"rest_events_topic_count": 0,
"rest_events_topic": "",
"kol_name": "<a class='link' target='new' href='https://cardio.konectar.io/kols/view/862156'>Leonard Jefferson Harris</a>",
"kol_full_name": "Leonard Jefferson Harris"
},
{
"proj_kol_id": true,
"eid": "140846",
"event_topics": "Gastrointestinal Neoplasms",
"npi_num": "1043576952",
"hcp_pin_alias": "636750",
"session_name": "Gastrointestinal Cancer",
"name": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"kol_id": "636750",
"first_name": "Saurin",
"middle_name": "Akshay",
"last_name": "Chokshi",
"org_name": "UT Regional One Physicians Inc",
"Country": "United States",
"Region": "Tennessee",
"City": "Memphis",
"num_sess": "1",
"opt_in_out_status": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"session_note": null,
"events_session": "Gastrointestinal Cancer",
"rest_events_session_count": 0,
"rest_events_session": "",
"events_topic": "Gastrointestinal Neoplasms",
"rest_events_topic_count": 0,
"rest_events_topic": "",
"kol_name": "<a class='link' target='new' href='https://cardio.konectar.io/kols/view/636750'>Saurin Akshay Chokshi</a>",
"kol_full_name": "Saurin Akshay Chokshi"
},
{
"proj_kol_id": true,
"eid": "140846",
"event_topics": "Admin. & Management | Diversity, Equity, Inclusion | Research",
"npi_num": "1992879456",
"hcp_pin_alias": "632325",
"session_name": "The Intersection of Research Practice and DE&I,Program Committee",
"name": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"kol_id": "632325",
"first_name": "Karen",
"middle_name": "Marie",
"last_name": "Winkfield",
"org_name": "Vanderbilt University Medical Center",
"Country": "United States",
"Region": "Tennessee",
"City": "Nashville",
"num_sess": "2",
"opt_in_out_status": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"session_note": null,
"events_session": "The Intersection of Research",
"rest_events_session_count": 3,
"rest_events_session": " Practice, and DE&I,Program Committee",
"events_topic": "Admin. & Management | Diversity, Equity, Inclusion ",
"rest_events_topic_count": 1,
"rest_events_topic": " Research",
"kol_name": "<a class='link' target='new' href='https://cardio.konectar.io/kols/view/632325'>Karen Marie Winkfield</a>",
"kol_full_name": "Karen Marie Winkfield"
},
{
"proj_kol_id": true,
"eid": "140846",
"event_topics": "Health Status Disparities | Palliative Care",
"npi_num": "1801076138",
"hcp_pin_alias": "623091",
"session_name": "Reducing Disparities in Palliative Care and End of Life",
"name": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"kol_id": "623091",
"first_name": "Manali",
"middle_name": "Indravadan",
"last_name": "Patel",
"org_name": "Stanford Health Care",
"Country": "United States",
"Region": "California",
"City": "Stanford",
"num_sess": "1",
"opt_in_out_status": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"session_note": null,
"events_session": "Reducing Disparities in Palliative Care and End of Life",
"rest_events_session_count": 0,
"rest_events_session": "",
"events_topic": "Health Status Disparities | Palliative Care",
"rest_events_topic_count": 0,
"rest_events_topic": "",
"kol_name": "<a class='link' target='new' href='https://cardio.konectar.io/kols/view/623091'>Manali Indravadan Patel</a>",
"kol_full_name": "Manali Indravadan Patel"
},
{
"proj_kol_id": true,
"eid": "140846",
"event_topics": "Lung Neoplasms",
"npi_num": "1134485410",
"hcp_pin_alias": "577804",
"session_name": "Lung Cancer Updates",
"name": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"kol_id": "577804",
"first_name": "Wade",
"middle_name": "Thomas",
"last_name": "Iams",
"org_name": "Vanderbilt University Medical Center",
"Country": "United States",
"Region": "Tennessee",
"City": "Nashville",
"num_sess": "1",
"opt_in_out_status": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"session_note": null,
"events_session": "Lung Cancer Updates",
"rest_events_session_count": 0,
"rest_events_session": "",
"events_topic": "Lung Neoplasms",
"rest_events_topic_count": 0,
"rest_events_topic": "",
"kol_name": "<a class='link' target='new' href='https://cardio.konectar.io/kols/view/577804'>Wade Thomas Iams</a>",
"kol_full_name": "Wade Thomas Iams"
},
{
"proj_kol_id": true,
"eid": "140846",
"event_topics": "Admin. & Management | Prostatic Neoplasms",
"npi_num": "1851320691",
"hcp_pin_alias": "570492",
"session_name": "Prostate Cancer,Program Committee",
"name": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"kol_id": "570492",
"first_name": "Bradley",
"middle_name": "G",
"last_name": "Somer",
"org_name": "West Cancer Center",
"Country": "United States",
"Region": "Mississippi",
"City": "Southaven",
"num_sess": "2",
"opt_in_out_status": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"session_note": null,
"events_session": "Prostate Cancer",
"rest_events_session_count": 1,
"rest_events_session": "Program Committee",
"events_topic": "Admin. & Management | Prostatic Neoplasms",
"rest_events_topic_count": 0,
"rest_events_topic": "",
"kol_name": "<a class='link' target='new' href='https://cardio.konectar.io/kols/view/570492'>Bradley G Somer</a>",
"kol_full_name": "Bradley G Somer"
},
{
"proj_kol_id": true,
"eid": "140846",
"event_topics": "Melanoma",
"npi_num": "1619075207",
"hcp_pin_alias": "559030",
"session_name": "Melanomas",
"name": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"kol_id": "559030",
"first_name": "Kent",
"middle_name": "C",
"last_name": "Shih",
"org_name": "Tennessee Oncology Pllc",
"Country": "United States",
"Region": "Tennessee",
"City": "Nashville",
"num_sess": "1",
"opt_in_out_status": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"session_note": null,
"events_session": "Melanomas",
"rest_events_session_count": 0,
"rest_events_session": "",
"events_topic": "Melanoma",
"rest_events_topic_count": 0,
"rest_events_topic": "",
"kol_name": "<a class='link' target='new' href='https://cardio.konectar.io/kols/view/559030'>Kent C Shih</a>",
"kol_full_name": "Kent C Shih"
},
{
"proj_kol_id": true,
"eid": "140846",
"event_topics": "Breast Neoplasms",
"npi_num": "1306878228",
"hcp_pin_alias": "556254",
"session_name": "Early and Metastatic Breast Cancer",
"name": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"kol_id": "556254",
"first_name": "Lee",
"middle_name": "S",
"last_name": "Schwartzberg",
"org_name": "William N. Pennington Cancer Institute at Renown Health",
"Country": "United States",
"Region": "Nevada",
"City": "Reno",
"num_sess": "1",
"opt_in_out_status": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"session_note": null,
"events_session": "Early and Metastatic Breast Cancer",
"rest_events_session_count": 0,
"rest_events_session": "",
"events_topic": "Breast Neoplasms",
"rest_events_topic_count": 0,
"rest_events_topic": "",
"kol_name": "<a class='link' target='new' href='https://cardio.konectar.io/kols/view/556254'>Lee S Schwartzberg</a>",
"kol_full_name": "Lee S Schwartzberg"
},
{
"proj_kol_id": true,
"eid": "140846",
"event_topics": "Multiple Myeloma",
"npi_num": "1033491642",
"hcp_pin_alias": "528288",
"session_name": "Multiple Myeloma",
"name": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"kol_id": "528288",
"first_name": "Bhagirathbhai",
"middle_name": "Ravjibhai",
"last_name": "Dholaria",
"org_name": "Vanderbilt University Medical Center",
"Country": "United States",
"Region": "Tennessee",
"City": "Nashville",
"num_sess": "1",
"opt_in_out_status": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"session_note": null,
"events_session": "Multiple Myeloma",
"rest_events_session_count": 0,
"rest_events_session": "",
"events_topic": "Multiple Myeloma",
"rest_events_topic_count": 0,
"rest_events_topic": "",
"kol_name": "<a class='link' target='new' href='https://cardio.konectar.io/kols/view/528288'>Bhagirathbhai Ravjibhai Dholaria</a>",
"kol_full_name": "Bhagirathbhai Ravjibhai Dholaria"
},
{
"proj_kol_id": true,
"eid": "140846",
"event_topics": "Prostatic Neoplasms",
"npi_num": "1003349440",
"hcp_pin_alias": "364462",
"session_name": "Non-Prostate Cancer",
"name": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"kol_id": "364462",
"first_name": "Ruchika",
"middle_name": "",
"last_name": "Talwar",
"org_name": "Vanderbilt University Medical Center",
"Country": "United States",
"Region": "Tennessee",
"City": "Nashville",
"num_sess": "1",
"opt_in_out_status": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"session_note": null,
"events_session": "Non-Prostate Cancer",
"rest_events_session_count": 0,
"rest_events_session": "",
"events_topic": "Prostatic Neoplasms",
"rest_events_topic_count": 0,
"rest_events_topic": "",
"kol_name": "<a class='link' target='new' href='https://cardio.konectar.io/kols/view/364462'>Ruchika Talwar</a>",
"kol_full_name": "Ruchika Talwar"
},
{
"proj_kol_id": true,
"eid": "140846",
"event_topics": "Head And Neck Neoplasms",
"npi_num": "1558479188",
"hcp_pin_alias": "219696",
"session_name": "Head and Neck Cancer",
"name": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"kol_id": "219696",
"first_name": "Nabil",
"middle_name": "F",
"last_name": "Saba",
"org_name": "Emory University Hospital",
"Country": "United States",
"Region": "Georgia",
"City": "Atlanta",
"num_sess": "1",
"opt_in_out_status": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"session_note": null,
"events_session": "Head and Neck Cancer",
"rest_events_session_count": 0,
"rest_events_session": "",
"events_topic": "Head And Neck Neoplasms",
"rest_events_topic_count": 0,
"rest_events_topic": "",
"kol_name": "<a class='link' target='new' href='https://cardio.konectar.io/kols/view/219696'>Nabil F Saba</a>",
"kol_full_name": "Nabil F Saba"
},
{
"proj_kol_id": false,
"eid": "140846",
"event_topics": "Diversity, Equity, Inclusion",
"npi_num": "1871866830",
"hcp_pin_alias": "FU_HCP_5441541",
"session_name": "DEI from a Nurse Perspective",
"name": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"kol_id": "0",
"first_name": "Clesheree Stepter",
"middle_name": null,
"last_name": null,
"org_name": "Baptist Cancer Center",
"Country": null,
"Region": null,
"City": null,
"num_sess": "1",
"opt_in_out_status": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"session_note": null,
"events_session": "DEI from a Nurse Perspective",
"rest_events_session_count": 0,
"rest_events_session": "",
"events_topic": "Diversity, Equity, Inclusion",
"rest_events_topic_count": 0,
"rest_events_topic": "",
"kol_name": "<div class=\"sprite_iconSet newIconSet\">\n\t\t\t\t\t<a class=\"requestProfileIcon \" href=\"#\" onclick=\"requestProfile(1871866830,'FU_HCP_5441541');return false;\" rel=\"tooltip\" data-original-title=\"Request Profile\">&nbsp;</a>\n\t\t\t\t\t</div>Clesheree Stepter ",
"kol_full_name": "Clesheree Stepter "
},
{
"proj_kol_id": false,
"eid": "140846",
"event_topics": "Patient Care",
"npi_num": "0",
"hcp_pin_alias": "FU_HCP_5441539",
"session_name": "Listening to Patients (Advocacy Corner)",
"name": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"kol_id": "0",
"first_name": "Doretha Burrell",
"middle_name": null,
"last_name": null,
"org_name": "Dee Burrell Coaching",
"Country": "United States",
"Region": "District of Columbia",
"City": "Washington",
"num_sess": "1",
"opt_in_out_status": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"session_note": null,
"events_session": "Listening to Patients (Advocacy Corner)",
"rest_events_session_count": 0,
"rest_events_session": "",
"events_topic": "Patient Care",
"rest_events_topic_count": 0,
"rest_events_topic": "",
"kol_name": "<div class=\"sprite_iconSet newIconSet\">\n\t\t\t\t\t<a class=\"requestProfileIcon \" href=\"#\" onclick=\"requestProfile(0,'FU_HCP_5441539');return false;\" rel=\"tooltip\" data-original-title=\"Request Profile\">&nbsp;</a>\n\t\t\t\t\t</div>Doretha Burrell ",
"kol_full_name": "Doretha Burrell "
},
{
"proj_kol_id": false,
"eid": "140846",
"event_topics": "Healthy Lifestyle",
"npi_num": "0",
"hcp_pin_alias": "FU_HCP_5441535",
"session_name": "Lifestyle Tips and Strategies",
"name": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"kol_id": "0",
"first_name": "Sami Mansfield",
"middle_name": null,
"last_name": null,
"org_name": "Cancer Wellness for Life",
"Country": "United States",
"Region": "Kansas",
"City": "Lenexa",
"num_sess": "1",
"opt_in_out_status": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"session_note": null,
"events_session": "Lifestyle Tips and Strategies",
"rest_events_session_count": 0,
"rest_events_session": "",
"events_topic": "Healthy Lifestyle",
"rest_events_topic_count": 0,
"rest_events_topic": "",
"kol_name": "<div class=\"sprite_iconSet newIconSet\">\n\t\t\t\t\t<a class=\"requestProfileIcon \" href=\"#\" onclick=\"requestProfile(0,'FU_HCP_5441535');return false;\" rel=\"tooltip\" data-original-title=\"Request Profile\">&nbsp;</a>\n\t\t\t\t\t</div>Sami Mansfield ",
"kol_full_name": "Sami Mansfield "
},
{
"proj_kol_id": false,
"eid": "140846",
"event_topics": "State Health Plans",
"npi_num": "0",
"hcp_pin_alias": "FU_HCP_5441536",
"session_name": "Memphis Tennessee: State of Health",
"name": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"kol_id": "0",
"first_name": "Shalini Parekh",
"middle_name": null,
"last_name": null,
"org_name": "Tennessee Department of Health",
"Country": "United States",
"Region": "Tennessee",
"City": "Nashville",
"num_sess": "1",
"opt_in_out_status": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"session_note": null,
"events_session": "Memphis Tennessee: State of Health",
"rest_events_session_count": 0,
"rest_events_session": "",
"events_topic": "State Health Plans",
"rest_events_topic_count": 0,
"rest_events_topic": "",
"kol_name": "<div class=\"sprite_iconSet newIconSet\">\n\t\t\t\t\t<a class=\"requestProfileIcon \" href=\"#\" onclick=\"requestProfile(0,'FU_HCP_5441536');return false;\" rel=\"tooltip\" data-original-title=\"Request Profile\">&nbsp;</a>\n\t\t\t\t\t</div>Shalini Parekh ",
"kol_full_name": "Shalini Parekh "
}
]
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,385 +0,0 @@
{
"data": {
"events": [
{
"therapeutic_area": "Oncology | Pediatrics",
"hcp_pin": "FU_HCP_5455134",
"cnt": "431",
"id": "2394176",
"kol_id": "0",
"type": "conference",
"event_type": "Congress",
"event_id": "142682",
"session_type": "CME",
"session_name": "Scientific Committee",
"role": "Chair",
"topic": "",
"start": "10/17/2024",
"end": "10/20/2024",
"organizer": "International Society of Paediatric Oncology (SIOP)",
"sponsor_type": "1",
"session_sponsor": "International Society of Paediatric Oncology (SIOP)",
"organizer_type": "1",
"location": "Hawaii Convention Center",
"address": "1801 Kalākaua Avenue",
"city_id": "1221",
"state_id": "133",
"country_id": "254",
"postal_code": "96815",
"subject": null,
"url1": "https://cslide.ctimeetingtech.com/siop24/attendee/confcal/session/list",
"url2": null,
"notes": null,
"created_by": "1304",
"created_on": "08/14/2024",
"modified_by": null,
"modified_on": "2024-08-14 09:15:28",
"client_id": "1",
"project_id": null,
"activity_type": "Organizing Committee",
"profile_type": "1",
"global_event_id": null,
"event_unique_id": "_2394176",
"old_kol_event_id": null,
"stype": "Association",
"otype": "Association",
"name1": "2024 International Society of Paediatric Oncology Annual Congress (SIOP)",
"partially_released_event": "1",
"Country": "United States",
"Region": "Hawaii",
"City": "Honolulu",
"topic_name": "Admin. & Management",
"eventLat": "21.3084",
"eventLong": "-157.846",
"user_count": "1",
"partialcount": "431",
"session_note1": null,
"session_note": null,
"organizerAlias": "ISPO",
"eAllowed": true,
"dAllowed": true,
"updated": true,
"speakerscount":"431",
"topTopics":"1. Neoplasms \n2. Solid Tumors \n3. Wilms Tumor",
"topSpeakers":"1. Marilyn Hockenberry \n2. Rob Pieters \n3. Avram Denburg",
"sponsors":"1. LES LABORATOIRES SERVIER, SERB \n2. International Society of Paediatric Oncology (SIOP)"
},
{
"therapeutic_area": "Medical Imaging",
"hcp_pin": "",
"cnt": "187",
"id": "2096326",
"kol_id": "0",
"type": "conference",
"event_type": "Annual Meeting",
"event_id": "130546",
"session_type": "",
"session_name": "",
"role": "",
"topic": "",
"start": "09/21/2024",
"end": "09/24/2024",
"organizer": "North American Society for Cardiovascular Imaging (NASCI)",
"sponsor_type": "11",
"session_sponsor": "",
"organizer_type": "1",
"location": "The Westin Boston Seaport District",
"address": "425 Summer Street",
"city_id": "8816",
"state_id": "143",
"country_id": "254",
"postal_code": "02210",
"subject": null,
"url1": "https://nasci.org/annual-meeting/",
"url2": null,
"notes": null,
"created_by": "663",
"created_on": "01/25/2024",
"modified_by": null,
"modified_on": "2024-01-25 10:09:44",
"client_id": "1",
"project_id": null,
"activity_type": "Speaking",
"profile_type": "1",
"global_event_id": null,
"event_unique_id": "_2096326",
"old_kol_event_id": null,
"stype": "",
"otype": "Association",
"name1": "2024 North American Society for Cardiovascular Imaging Annual Meeting (NASCI)",
"partially_released_event": "1",
"Country": "United States",
"Region": "Massachusetts",
"City": "Boston",
"topic_name": null,
"eventLat": "42.3535",
"eventLong": "-71.0627",
"user_count": "1",
"partialcount": "188",
"session_note1": null,
"session_note": null,
"organizerAlias": "NASFCI",
"eAllowed": true,
"dAllowed": true,
"updated": false,
"speakerscount":"187",
"topTopics":"1. Cardiac Imaging Techniques \n2. Admin. & Management \n3. Diagnostic Imaging",
"topSpeakers":"1. Monesha L Gupta \n2. Seyed Ali Nabipoorashrafi \n3. Yuval Liberman",
"sponsors":"1. North American Society for Cardiovascular Imaging (NASCI)"
},
{
"therapeutic_area": "Precision Oncology | Oncology | Oncology Syros | Cancer Screening | Oncology_Puma",
"hcp_pin": "FU_HCP_5454224",
"cnt": "739",
"id": "2392698",
"kol_id": "0",
"type": "conference",
"event_type": "Congress",
"event_id": "128202",
"session_type": "CME",
"session_name": "Clinics and research in LMIC",
"role": "Speaker",
"topic": "",
"start": "09/13/2024",
"end": "09/17/2024",
"organizer": "European Society for Medical Oncology (ESMO)",
"sponsor_type": "1",
"session_sponsor": "European Society for Medical Oncology (ESMO)",
"organizer_type": "1",
"location": "Fira Barcelona Gran Via",
"address": "Av. Joan Carles I, 64, L'Hospitalet de Llobregat",
"city_id": null,
"state_id": null,
"country_id": "226",
"postal_code": "08908",
"subject": null,
"url1": "https://cslide.ctimeetingtech.com/esmo2024/attendee/confcal/session",
"url2": null,
"notes": null,
"created_by": "1304",
"created_on": "08/12/2024",
"modified_by": null,
"modified_on": "2024-08-12 11:53:46",
"client_id": "1",
"project_id": null,
"activity_type": "Speaking",
"profile_type": "1",
"global_event_id": null,
"event_unique_id": "_2392698",
"old_kol_event_id": null,
"stype": "Association",
"otype": "Association",
"name1": "2024 European Society for Medical Oncology Congress (ESMO)",
"partially_released_event": "0",
"Country": "Spain",
"Region": null,
"City": null,
"topic_name": "Clinical Research",
"eventLat": null,
"eventLong": null,
"user_count": "1",
"partialcount": "739",
"session_note1": null,
"session_note": null,
"organizerAlias": "ESFMO",
"eAllowed": true,
"dAllowed": true,
"updated": true,
"speakerscount":"739",
"topTopics":"1. Breast Neoplasms \n2. Solid Tumors \n3. Carcinoma, Non-Small-Cell Lung",
"topSpeakers":"1. Elena Garralda \n2. Jarushka Naidoo \n3. Matthew N. Fowler",
"sponsors":"1. F. Hoffmann-La Roche Ltd \n2. Eli Lilly and Company \n3. Novocure GmbH"
},
{
"therapeutic_area": "Oncology",
"hcp_pin": "FU_HCP_100356",
"cnt": "15",
"id": "2360942",
"kol_id": "570492",
"type": "conference",
"event_type": "Conference",
"event_id": "140846",
"session_type": "CME",
"session_name": "Program Committee",
"role": "Chair",
"topic": "",
"start": "09/07/2024",
"end": "09/08/2024",
"organizer": "Total Health Information Services, LLC (THISL)",
"sponsor_type": "4",
"session_sponsor": "Total Health Information Services, LLC",
"organizer_type": "5",
"location": "Hilton Memphis",
"address": "939 Ridge Lake Boulevard",
"city_id": "10913",
"state_id": "164",
"country_id": "254",
"postal_code": "38120",
"subject": null,
"url1": "https://www.totalhealthoncology.com/upcoming-oncology-conferences/asco-memphis-2024",
"url2": null,
"notes": null,
"created_by": "663",
"created_on": "07/05/2024",
"modified_by": null,
"modified_on": "2024-07-05 12:57:49",
"client_id": "1",
"project_id": null,
"activity_type": "Organizing Committee",
"profile_type": "1",
"global_event_id": null,
"event_unique_id": "_2360942",
"old_kol_event_id": null,
"stype": "Other",
"otype": "Other",
"name1": "2024 Total Health Best of ASCO Memphis Conference (ASCO)",
"partially_released_event": "1",
"Country": "United States",
"Region": "Tennessee",
"City": "Memphis",
"topic_name": "Admin. & Management",
"eventLat": "35.1292",
"eventLong": "-89.9892",
"user_count": "1",
"partialcount": "15",
"session_note1": null,
"session_note": null,
"organizerAlias": "THISL",
"eAllowed": true,
"dAllowed": true,
"updated": false,
"speakerscount":"15",
"topTopics":"1. Admin. & Management \n2. Breast Neoplasms \n3. Prostatic Neoplasms",
"topSpeakers":"1. Bradley G Somer \n2. Karen Marie Winkfield \n3. Bhagirathbhai Ravjibhai Dholaria",
"sponsors":"1. Total Health Information Services, LLC"
},
{
"therapeutic_area": "Oncology_Syros",
"hcp_pin": "",
"cnt": "169",
"id": "2062445",
"kol_id": "0",
"type": "conference",
"event_type": "Annual Meeting",
"event_id": "129314",
"session_type": "",
"session_name": "",
"role": "",
"topic": "",
"start": "09/04/2024",
"end": "09/07/2024",
"organizer": "Society of Hematologic Oncology (SOHO)",
"sponsor_type": "11",
"session_sponsor": "",
"organizer_type": "1",
"location": "George R. Brown Convention Center",
"address": "1001 Avenida De Las Americas",
"city_id": "11109",
"state_id": "165",
"country_id": "254",
"postal_code": "77010",
"subject": null,
"url1": "https://sohoonline.org/SOHO/iCore/Events/Event_display.aspx?EventKey=SOHO24",
"url2": null,
"notes": null,
"created_by": "490",
"created_on": "12/18/2023",
"modified_by": null,
"modified_on": "2023-12-18 12:53:20",
"client_id": "1",
"project_id": null,
"activity_type": "Speaking",
"profile_type": "1",
"global_event_id": null,
"event_unique_id": "_2062445",
"old_kol_event_id": null,
"stype": "",
"otype": "Association",
"name1": "2024 Society of Hematologic Oncology Annual Meeting (SOHO)",
"partially_released_event": "1",
"Country": "United States",
"Region": "Texas",
"City": "Houston",
"topic_name": null,
"eventLat": "29.7716",
"eventLong": "-95.393",
"user_count": "1",
"partialcount": "170",
"session_note1": null,
"session_note": null,
"organizerAlias": "SHO",
"eAllowed": true,
"dAllowed": true,
"updated": false,
"speakerscount":"169",
"topTopics":"1. Myelodysplastic Syndromes \n2. Leukemia, Myeloid, Acute \n3. Precursor Cell Lymphoblastic Leukemia-Lymphoma",
"topSpeakers":"1. Angela Dispenzieri \n2. Elias J Jabbour \n3. Grzegorz Stanislaw Nowakowski",
"sponsors":"1. Medical Learning Institute Inc, ADC Therapeutics SA, Genentech Inc, F. Hoffmann-La Roche Ltd, Genmab A/S \n2. Medical Learning Institute Inc, Haymarket Media Inc, Bristol-Myers Squibb Company, Janssen Global Services, LLC \n3. Medical Learning Institute Inc, Medscape LLC, Novartis AG, Enliven Therapeutics"
},
{
"therapeutic_area": "Cardiology | Cardiology_Abbott | Critical Care | Chiesi_GMA | Cardiac_Imaging | Medical Imaging",
"hcp_pin": "FU_HCP_5455877",
"cnt": "5445",
"id": "2395349",
"kol_id": "906494",
"type": "conference",
"event_type": "Congress",
"event_id": "129934",
"session_type": "CME",
"session_name": "Infections and the heart: all we need to know given new migration patterns",
"role": "Chair",
"topic": "",
"start": "08/30/2024",
"end": "09/02/2024",
"organizer": "European Society of Cardiology Congress (ESC)",
"sponsor_type": "1",
"session_sponsor": "InterAmerican Society of Cardiology (IASC), European Society of Cardiology (ESC)",
"organizer_type": "1",
"location": "ExCeL London",
"address": "Royal Victoria Dock, 1 Western Gateway",
"city_id": "12008",
"state_id": "5392",
"country_id": "253",
"postal_code": "E16 1XL",
"subject": null,
"url1": "https://esc365.escardio.org/ESC-Congress/programme?text=&docType=DigitalSession&page=1",
"url2": null,
"notes": null,
"created_by": "1304",
"created_on": "08/14/2024",
"modified_by": null,
"modified_on": "2024-08-14 09:15:58",
"client_id": "1",
"project_id": null,
"activity_type": "Speaking",
"profile_type": "1",
"global_event_id": null,
"event_unique_id": "_2395349",
"old_kol_event_id": null,
"stype": "Association",
"otype": "Association",
"name1": "2024 European Society of Cardiology Congress (ESC)",
"partially_released_event": "1",
"Country": "United Kingdom",
"Region": "England",
"City": "London",
"topic_name": "Heart Diseases",
"eventLat": "51.517",
"eventLong": "-0.105",
"user_count": "1",
"partialcount": "5445",
"session_note1": null,
"session_note": null,
"organizerAlias": "ESCC",
"eAllowed": true,
"dAllowed": true,
"updated": true,
"speakerscount":"5445",
"topTopics":"1. Heart Failure \n2. Atrial Fibrillation \n3. Cardiovascular Diseases",
"topSpeakers":"1. Kang-Yin Chen \n2. Kausik Ray \n3. Mohamed Abouzid",
"sponsors":"1. Radcliffe Medical Education, AstraZeneca \n2. Radcliffe Medical Education, AtriCure Inc \n3. Great Wall International Congress of Cardiology (GW-ICC), European Society of Cardiology (ESC)"
}
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -90,6 +90,10 @@ PODS:
- GoogleUtilities/Privacy - GoogleUtilities/Privacy
- image_picker_ios (0.0.1): - image_picker_ios (0.0.1):
- Flutter - Flutter
- JNKeychain (0.1.4)
- mobile_device_identifier (0.0.1):
- Flutter
- JNKeychain
- package_info_plus (0.4.5): - package_info_plus (0.4.5):
- Flutter - Flutter
- path_provider_foundation (0.0.1): - path_provider_foundation (0.0.1):
@ -118,6 +122,7 @@ DEPENDENCIES:
- firebase_remote_config (from `.symlinks/plugins/firebase_remote_config/ios`) - firebase_remote_config (from `.symlinks/plugins/firebase_remote_config/ios`)
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- mobile_device_identifier (from `.symlinks/plugins/mobile_device_identifier/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
@ -137,6 +142,7 @@ SPEC REPOS:
- FirebaseRemoteConfigInterop - FirebaseRemoteConfigInterop
- FirebaseSharedSwift - FirebaseSharedSwift
- GoogleUtilities - GoogleUtilities
- JNKeychain
- PromisesObjC - PromisesObjC
- ReachabilitySwift - ReachabilitySwift
- SDWebImage - SDWebImage
@ -159,6 +165,8 @@ EXTERNAL SOURCES:
:path: Flutter :path: Flutter
image_picker_ios: image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios" :path: ".symlinks/plugins/image_picker_ios/ios"
mobile_device_identifier:
:path: ".symlinks/plugins/mobile_device_identifier/ios"
package_info_plus: package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios" :path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation: path_provider_foundation:
@ -190,6 +198,8 @@ SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15 GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
image_picker_ios: b545a5f16c0fa88e3ecbbce3ed4de45567a8ec18 image_picker_ios: b545a5f16c0fa88e3ecbbce3ed4de45567a8ec18
JNKeychain: fb6cc9ec95959ba46cd95d0ee6f7a05e41da9f42
mobile_device_identifier: 34f80c8985bb1506880c2ae10cb24cfb9918f1a7
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85 package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2

View File

@ -1,11 +1,13 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'dart:io';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_remote_config/firebase_remote_config.dart'; import 'package:firebase_remote_config/firebase_remote_config.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:hive_flutter/hive_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart';
@ -17,6 +19,7 @@ import 'package:konectar_events/model/userdata_model.dart';
import 'package:konectar_events/utils/sessionmanager.dart'; import 'package:konectar_events/utils/sessionmanager.dart';
import 'package:konectar_events/view/home.dart'; import 'package:konectar_events/view/home.dart';
import 'package:konectar_events/view/login.dart'; import 'package:konectar_events/view/login.dart';
import 'package:konectar_events/view/navigation_home_screen.dart';
import 'package:konectar_events/viewmodel/eventsprovider.dart'; import 'package:konectar_events/viewmodel/eventsprovider.dart';
import 'package:konectar_events/viewmodel/hcpprofprovider.dart'; import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
import 'package:konectar_events/viewmodel/loginprovider.dart'; import 'package:konectar_events/viewmodel/loginprovider.dart';
@ -122,7 +125,7 @@ Future main() async {
final isLoggedIn = snapshot.data ?? false; final isLoggedIn = snapshot.data ?? false;
print("isLoggedIn_is : $isLoggedIn"); print("isLoggedIn_is : $isLoggedIn");
print("secret : $secretkey"); print("secret : $secretkey");
return isLoggedIn ? HomeScreen() : HomeScreen(); return isLoggedIn ? MyApp() : LoginScreen();
} }
}, },
), //userInfo != null ? const Home() : OpenidScreen(credential: credential,), ), //userInfo != null ? const Home() : OpenidScreen(credential: credential,),
@ -134,3 +137,28 @@ Future main() async {
); );
}); });
} }
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarIconBrightness: Brightness.dark,
statusBarBrightness:
!kIsWeb && Platform.isAndroid ? Brightness.dark : Brightness.light,
systemNavigationBarColor: Colors.white,
systemNavigationBarDividerColor: Colors.transparent,
systemNavigationBarIconBrightness: Brightness.dark,
));
return MaterialApp(
title: 'Flutter UI',
debugShowCheckedModeBanner: false,
// theme: ThemeData(
// primarySwatch: Colors.blue,
// textTheme: AppTheme.textTheme,
// platform: TargetPlatform.iOS,
// ),
home: NavigationHomeScreen(),
);
}
}

View File

@ -11,7 +11,7 @@ String affiliationsDataToJson(AffiliationsData data) =>
json.encode(data.toJson()); json.encode(data.toJson());
class AffiliationsData { class AffiliationsData {
List<Map<String, Datum>> data; List<Map<String, Affiliations>> data;
AffiliationsData({ AffiliationsData({
required this.data, required this.data,
@ -19,8 +19,9 @@ class AffiliationsData {
factory AffiliationsData.fromJson(Map<String, dynamic> json) => factory AffiliationsData.fromJson(Map<String, dynamic> json) =>
AffiliationsData( AffiliationsData(
data: List<Map<String, Datum>>.from(json["data"].map((x) => Map.from(x) data: List<Map<String, Affiliations>>.from(json["data"].map((x) =>
.map((k, v) => MapEntry<String, Datum>(k, Datum.fromJson(v))))), Map.from(x).map((k, v) =>
MapEntry<String, Affiliations>(k, Affiliations.fromJson(v))))),
); );
Map<String, dynamic> toJson() => { Map<String, dynamic> toJson() => {
@ -29,16 +30,33 @@ class AffiliationsData {
}; };
} }
class Datum { class AffiliationsResp {
Affiliations data;
AffiliationsResp({
required this.data,
});
factory AffiliationsResp.fromJson(Map<String, dynamic> json) =>
AffiliationsResp(
data: Affiliations.fromJson(json["data"]),
);
Map<String, dynamic> toJson() => {
"data": data.toJson(),
};
}
class Affiliations {
List<String> affiliationNames; List<String> affiliationNames;
List<String> affiliationCount; List<String> affiliationCount;
Datum({ Affiliations({
required this.affiliationNames, required this.affiliationNames,
required this.affiliationCount, required this.affiliationCount,
}); });
factory Datum.fromJson(Map<String, dynamic> json) => Datum( factory Affiliations.fromJson(Map<String, dynamic> json) => Affiliations(
affiliationNames: affiliationNames:
List<String>.from(json["affiliationNames"].map((x) => x)), List<String>.from(json["affiliationNames"].map((x) => x)),
affiliationCount: affiliationCount:

View File

@ -0,0 +1,353 @@
// To parse this JSON data, do
//
// final eventsDetailsResp = eventsDetailsRespFromJson(jsonString);
import 'dart:convert';
EventsDetailsResp eventsDetailsRespFromJson(String str) =>
EventsDetailsResp.fromJson(json.decode(str));
String eventsDetailsRespToJson(EventsDetailsResp data) =>
json.encode(data.toJson());
class EventsDetailsResp {
OverviewData data;
EventsDetailsResp({
required this.data,
});
factory EventsDetailsResp.fromJson(Map<String, dynamic> json) =>
EventsDetailsResp(
data: OverviewData.fromJson(json["data"]),
);
Map<String, dynamic> toJson() => {
"data": data.toJson(),
};
}
class OverviewData {
bool cal;
int grid;
String eventFor;
String eventId;
List<EventDatum> eventData;
List<EventTopic> eventTopics;
List<EventSponsor> eventSponsors;
bool eventUserAttendee;
bool eventUserInterest;
List<ArrEvent> arrEvents;
int attendeeCount;
int projectKolAttendee;
OverviewData({
required this.cal,
required this.grid,
required this.eventFor,
required this.eventId,
required this.eventData,
required this.eventTopics,
required this.eventSponsors,
required this.eventUserAttendee,
required this.eventUserInterest,
required this.arrEvents,
required this.attendeeCount,
required this.projectKolAttendee,
});
factory OverviewData.fromJson(Map<String, dynamic> json) => OverviewData(
cal: json["cal"],
grid: json["grid"],
eventFor: json["eventFor"],
eventId: json["eventId"],
eventData: List<EventDatum>.from(
json["eventData"].map((x) => EventDatum.fromJson(x))),
eventTopics: List<EventTopic>.from(
json["eventTopics"].map((x) => EventTopic.fromJson(x))),
eventSponsors: List<EventSponsor>.from(
json["eventSponsers"].map((x) => EventSponsor.fromJson(x))),
eventUserAttendee: json["event_user_attendee"],
eventUserInterest: json["event_user_interest"],
arrEvents: List<ArrEvent>.from(
json["arrEvents"].map((x) => ArrEvent.fromJson(x))),
attendeeCount: json["attendeeCount"],
projectKolAttendee: json["project_kol_attendee"],
);
Map<String, dynamic> toJson() => {
"cal": cal,
"grid": grid,
"eventFor": eventFor,
"eventId": eventId,
"eventData": List<dynamic>.from(eventData.map((x) => x.toJson())),
"eventTopics": List<dynamic>.from(eventTopics.map((x) => x.toJson())),
"eventSponsers":
List<dynamic>.from(eventSponsors.map((x) => x.toJson())),
"event_user_attendee": eventUserAttendee,
"event_user_interest": eventUserInterest,
"arrEvents": List<dynamic>.from(arrEvents.map((x) => x.toJson())),
"attendeeCount": attendeeCount,
"project_kol_attendee": projectKolAttendee,
};
}
class ArrEvent {
String sponsorType;
String sponsorTypeName;
String id;
String kolId;
String type;
String eventType;
String eventId;
String sessionType;
String sessionName;
String role;
String topic;
String start;
String end;
String organizer;
String sessionSponsor;
String organizerType;
String location;
String address;
String cityId;
String stateId;
String countryId;
String postalCode;
dynamic subject;
String url1;
dynamic url2;
dynamic notes;
String createdBy;
DateTime createdOn;
dynamic modifiedBy;
DateTime modifiedOn;
String clientId;
dynamic projectId;
String activityType;
String profileType;
dynamic globalEventId;
String eventUniqueId;
String name;
String confEventType;
String country;
String eventTopic;
String confSessionType;
String region;
String city;
ArrEvent({
required this.sponsorType,
required this.sponsorTypeName,
required this.id,
required this.kolId,
required this.type,
required this.eventType,
required this.eventId,
required this.sessionType,
required this.sessionName,
required this.role,
required this.topic,
required this.start,
required this.end,
required this.organizer,
required this.sessionSponsor,
required this.organizerType,
required this.location,
required this.address,
required this.cityId,
required this.stateId,
required this.countryId,
required this.postalCode,
required this.subject,
required this.url1,
required this.url2,
required this.notes,
required this.createdBy,
required this.createdOn,
required this.modifiedBy,
required this.modifiedOn,
required this.clientId,
required this.projectId,
required this.activityType,
required this.profileType,
required this.globalEventId,
required this.eventUniqueId,
required this.name,
required this.confEventType,
required this.country,
required this.eventTopic,
required this.confSessionType,
required this.region,
required this.city,
});
factory ArrEvent.fromJson(Map<String, dynamic> json) => ArrEvent(
sponsorType: json["sponsor_type"],
sponsorTypeName: json["sponsor_type_name"],
id: json["id"],
kolId: json["kol_id"],
type: json["type"],
eventType: json["event_type"],
eventId: json["event_id"],
sessionType: json["session_type"],
sessionName: json["session_name"],
role: json["role"],
topic: json["topic"],
start: json["start"],
end: json["end"],
organizer: json["organizer"],
sessionSponsor: json["session_sponsor"],
organizerType: json["organizer_type"],
location: json["location"],
address: json["address"],
cityId: json["city_id"],
stateId: json["state_id"],
countryId: json["country_id"],
postalCode: json["postal_code"],
subject: json["subject"],
url1: json["url1"],
url2: json["url2"],
notes: json["notes"],
createdBy: json["created_by"],
createdOn: DateTime.parse(json["created_on"]),
modifiedBy: json["modified_by"],
modifiedOn: DateTime.parse(json["modified_on"]),
clientId: json["client_id"],
projectId: json["project_id"],
activityType: json["activity_type"],
profileType: json["profile_type"],
globalEventId: json["global_event_id"],
eventUniqueId: json["event_unique_id"],
name: json["name"],
confEventType: json["conf_event_type"],
country: json["country"],
eventTopic: json["event_topic"],
confSessionType: json["conf_session_type"],
region: json["region"],
city: json["city"],
);
Map<String, dynamic> toJson() => {
"sponsor_type": sponsorType,
"sponsor_type_name": sponsorTypeName,
"id": id,
"kol_id": kolId,
"type": type,
"event_type": eventType,
"event_id": eventId,
"session_type": sessionType,
"session_name": sessionName,
"role": role,
"topic": topic,
"start": start,
"end": end,
"organizer": organizer,
"session_sponsor": sessionSponsor,
"organizer_type": organizerType,
"location": location,
"address": address,
"city_id": cityId,
"state_id": stateId,
"country_id": countryId,
"postal_code": postalCode,
"subject": subject,
"url1": url1,
"url2": url2,
"notes": notes,
"created_by": createdBy,
"created_on": createdOn.toIso8601String(),
"modified_by": modifiedBy,
"modified_on": modifiedOn.toIso8601String(),
"client_id": clientId,
"project_id": projectId,
"activity_type": activityType,
"profile_type": profileType,
"global_event_id": globalEventId,
"event_unique_id": eventUniqueId,
"name": name,
"conf_event_type": confEventType,
"country": country,
"event_topic": eventTopic,
"conf_session_type": confSessionType,
"region": region,
"city": city,
};
}
class EventDatum {
String firstName;
dynamic middleName;
dynamic lastName;
String numSess;
EventDatum({
required this.firstName,
required this.middleName,
required this.lastName,
required this.numSess,
});
factory EventDatum.fromJson(Map<String, dynamic> json) => EventDatum(
firstName: json["first_name"],
middleName: json["middle_name"],
lastName: json["last_name"],
numSess: json["num_sess"],
);
Map<String, dynamic> toJson() => {
"first_name": firstName,
"middle_name": middleName,
"last_name": lastName,
"num_sess": numSess,
};
}
class EventSponsor {
String numSess;
String sessionSponsor;
String type;
String sponsorsType;
EventSponsor({
required this.numSess,
required this.sessionSponsor,
required this.type,
required this.sponsorsType,
});
factory EventSponsor.fromJson(Map<String, dynamic> json) => EventSponsor(
numSess: json["num_sess"],
sessionSponsor: json["session_sponsor"],
type: json["type"],
sponsorsType: json["sponsors_type"],
);
Map<String, dynamic> toJson() => {
"num_sess": numSess,
"session_sponsor": sessionSponsor,
"type": type,
"sponsors_type": sponsorsType,
};
}
class EventTopic {
String numTopics;
String eventTopics;
EventTopic({
required this.numTopics,
required this.eventTopics,
});
factory EventTopic.fromJson(Map<String, dynamic> json) => EventTopic(
numTopics: json["num_topics"],
eventTopics: json["event_topics"],
);
Map<String, dynamic> toJson() => {
"num_topics": numTopics,
"event_topics": eventTopics,
};
}

View File

@ -45,6 +45,28 @@ class EventsData {
} }
} }
class EventsDataStaging {
List<EventsList>? events;
EventsDataStaging({this.events});
EventsDataStaging.fromJson(Map<String, dynamic> json) {
if (json["data"] is List) {
events = json["data"] == null
? null
: (json["data"] as List).map((e) => EventsList.fromJson(e)).toList();
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> _data = <String, dynamic>{};
if (events != null) {
_data["data"] = events?.map((e) => e.toJson()).toList();
}
return _data;
}
}
@HiveType(typeId: 2) @HiveType(typeId: 2)
class EventsList { class EventsList {
@HiveField(0) @HiveField(0)

View File

@ -10,16 +10,16 @@ SpecialtyData specialtyDataFromJson(String str) =>
String specialtyDataToJson(SpecialtyData data) => json.encode(data.toJson()); String specialtyDataToJson(SpecialtyData data) => json.encode(data.toJson());
class SpecialtyData { class SpecialtyData {
List<Map<String, List<Datum>>> data; List<Map<String, List<Specialty>>> data;
SpecialtyData({ SpecialtyData({
required this.data, required this.data,
}); });
factory SpecialtyData.fromJson(Map<String, dynamic> json) => SpecialtyData( factory SpecialtyData.fromJson(Map<String, dynamic> json) => SpecialtyData(
data: List<Map<String, List<Datum>>>.from(json["data"].map((x) => data: List<Map<String, List<Specialty>>>.from(json["data"].map((x) =>
Map.from(x).map((k, v) => MapEntry<String, List<Datum>>( Map.from(x).map((k, v) => MapEntry<String, List<Specialty>>(k,
k, List<Datum>.from(v.map((x) => Datum.fromJson(x))))))), List<Specialty>.from(v.map((x) => Specialty.fromJson(x))))))),
); );
Map<String, dynamic> toJson() => { Map<String, dynamic> toJson() => {
@ -29,16 +29,33 @@ class SpecialtyData {
}; };
} }
class Datum { class Specialtyresp {
List<Specialty> data;
Specialtyresp({
required this.data,
});
factory Specialtyresp.fromJson(Map<String, dynamic> json) => Specialtyresp(
data: List<Specialty>.from(
json["data"].map((x) => Specialty.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"data": List<dynamic>.from(data.map((x) => x.toJson())),
};
}
class Specialty {
String specialtyCount; String specialtyCount;
String specialtyName; String specialtyName;
Datum({ Specialty({
required this.specialtyCount, required this.specialtyCount,
required this.specialtyName, required this.specialtyName,
}); });
factory Datum.fromJson(Map<String, dynamic> json) => Datum( factory Specialty.fromJson(Map<String, dynamic> json) => Specialty(
specialtyCount: json["specialty_count"], specialtyCount: json["specialty_count"],
specialtyName: json["specialty_name"], specialtyName: json["specialty_name"],
); );

View File

@ -37,6 +37,23 @@ class TopicsCloudResp {
}; };
} }
class Topicsresp {
List<TopicsCloudData> data;
Topicsresp({
required this.data,
});
factory Topicsresp.fromJson(Map<String, dynamic> json) => Topicsresp(
data: List<TopicsCloudData>.from(
json["data"].map((x) => TopicsCloudData.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"data": List<dynamic>.from(data.map((x) => x.toJson())),
};
}
class TopicsCloudData { class TopicsCloudData {
String? total; String? total;
String? topic; String? topic;

View File

@ -4,12 +4,15 @@ import 'dart:io';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:dio/io.dart'; import 'package:dio/io.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:konectar_events/model/affiliationsmodel.dart';
import 'package:konectar_events/model/eventsdetailmodel.dart'; import 'package:konectar_events/model/eventsdetailmodel.dart';
import 'package:konectar_events/model/eventsmodel.dart'; import 'package:konectar_events/model/eventsmodel.dart';
import 'package:konectar_events/model/eventsoverview.dart';
import 'package:konectar_events/model/keywords_model.dart'; import 'package:konectar_events/model/keywords_model.dart';
import 'package:konectar_events/model/neweventsmodel.dart'; import 'package:konectar_events/model/neweventsmodel.dart';
import 'package:konectar_events/model/scope_model.dart'; import 'package:konectar_events/model/scope_model.dart';
import 'package:konectar_events/model/sessionnotesmodel.dart'; import 'package:konectar_events/model/sessionnotesmodel.dart';
import 'package:konectar_events/model/specialtymodel.dart';
import 'package:konectar_events/model/topics_cloud_model.dart'; import 'package:konectar_events/model/topics_cloud_model.dart';
import 'package:konectar_events/utils/constants.dart'; import 'package:konectar_events/utils/constants.dart';
@ -119,27 +122,176 @@ class ApiCall {
return keywordList; return keywordList;
} }
Future<List<EventsList>?> getEvents() async { Future<List<EventsList>?> getStagingEvents() async {
// Dio dio = Dio(); Dio dio = Dio();
// (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate = (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
// (HttpClient client) { (HttpClient client) {
// client.badCertificateCallback = client.badCertificateCallback =
// (X509Certificate cert, String host, int port) => true; (X509Certificate cert, String host, int port) => true;
// return client; return client;
// }; };
// Response response; Response response;
var formData = FormData.fromMap({
"user_email": "vinodh@aissel.com",
"project_id": "",
"start": "",
"end": "",
"order_by": "7",
"type": "1"
});
response =
await dio.post('${Constants.stagingUrl}${Constants.eventslistapi}',
options: Options(),
queryParameters: {
"user_email": "vinodh@aissel.com",
},
data: formData);
print("response user eventssssss here!!!!!!!!!!!!!!!!!!!!! ");
print(response.data.toString());
Map<String, dynamic> jsondata = json.decode(response.data);
EventsDataStaging? eventdata = EventsDataStaging.fromJson(jsondata);
List<EventsList>? eventList = eventdata.events;
// response = await dio.post( return eventList;
// //'http://192.168.2.109:8007/api/method/events_list_api', }
// '${Constants.domainUrl}eventsapi.api.getEventsList',
// options: Options(), Future<dynamic> verifyEmail(
// ); String email, String deviceid, String platform) async {
// print("response user keywords here########## "); Dio dio = Dio();
// print(response.data.toString()); (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
dynamic jsonResult = (HttpClient client) {
jsonDecode(await rootBundle.loadString("assets/eventsnew.json")); client.badCertificateCallback =
(X509Certificate cert, String host, int port) => true;
return client;
};
Response response;
var formData = FormData.fromMap({
"email": email,
});
response = await dio.post('${Constants.getTokenApi}',
options: Options(),
queryParameters: {
"email": email,
"device_id": deviceid,
"platform": platform,
},
data: formData);
if (response.statusCode == 200) {
print("response user login!!!!!!!!!!!!!!!!!!!!! ");
print(response.data.toString());
return response.data;
} else {
print("isEmplty");
return null;
}
}
Future<dynamic> verifyCode(String email, String code) async {
Dio dio = Dio();
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
(HttpClient client) {
client.badCertificateCallback =
(X509Certificate cert, String host, int port) => true;
return client;
};
Response response;
var formData = FormData.fromMap({
"email": email,
});
response = await dio.post('${Constants.validateTokenApi}',
options: Options(),
queryParameters: {
"email": email,
"token": code,
},
data: formData);
print("response user login!!!!!!!!!!!!!!!!!!!!! ");
print(response.data.toString());
return response.data;
}
//LOGOUT
Future<dynamic> logout(String token) async {
print("token:::::$token");
Dio dio = Dio();
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
(HttpClient client) {
client.badCertificateCallback =
(X509Certificate cert, String host, int port) => true;
return client;
};
Response response;
// var formData = FormData.fromMap({
// "email": email,
// });
response = await dio.post(
'${Constants.logoutApi}',
options: Options(headers: {"Authorization": "Bearer $token"}),
// queryParameters: {
// "token": token,
// },
);
print("response user LOGOUT!!!!!!!!!!!!!!!!!!!!! ");
print(response.data.toString());
return response.data;
}
Future<OverviewData> getEventsOverview(
String eventid, String startDate, String endDate) async {
Dio dio = Dio();
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
(HttpClient client) {
client.badCertificateCallback =
(X509Certificate cert, String host, int port) => true;
return client;
};
Response response;
var formData = FormData.fromMap({
"user_email": "vinodh@aissel.com",
"start": startDate,
"end": endDate,
"event_id": eventid,
});
response =
await dio.post('${Constants.stagingUrl}${Constants.eventslistapi}',
options: Options(),
queryParameters: {
"user_email": "vinodh@aissel.com",
},
data: formData);
print("response user eventssssss here!!!!!!!!!!!!!!!!!!!!! ");
print(response.data.toString());
Map<String, dynamic> jsondata = json.decode(response.data);
EventsDetailsResp? eventdata = EventsDetailsResp.fromJson(jsondata);
OverviewData overviewData = eventdata.data;
return overviewData;
}
Future<List<EventsList>?> getEvents() async {
Dio dio = Dio();
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
(HttpClient client) {
client.badCertificateCallback =
(X509Certificate cert, String host, int port) => true;
return client;
};
Response response;
response = await dio.post(
'http://192.168.2.109:8007/api/method/events_list_api',
//'${Constants.domainUrl}eventsapi.api.getEventsList',
options: Options(),
);
print("response user keywords here########## ");
print(response.data.toString());
// dynamic jsonResult =
// jsonDecode(await rootBundle.loadString("assets/eventsnew.json"));
// Map<String, dynamic> jsondata = json.decode(jsonResult.toString()); // Map<String, dynamic> jsondata = json.decode(jsonResult.toString());
Map<String, dynamic> jsondata = jsonResult; //dynamic json = jsonDecode(response.data.toString());
Map<String, dynamic> jsondata = response.data;
EventsResp eventresponse = EventsResp.fromJson(jsondata); EventsResp eventresponse = EventsResp.fromJson(jsondata);
EventsData? eventdata = eventresponse.data; EventsData? eventdata = eventresponse.data;
List<EventsList>? eventList = eventdata!.events; List<EventsList>? eventList = eventdata!.events;
@ -247,21 +399,21 @@ class ApiCall {
} }
Future<List<Eventsdetail>?> getLocalEventsDetail(String eventid) async { Future<List<Eventsdetail>?> getLocalEventsDetail(String eventid) async {
// Dio dio = Dio(); Dio dio = Dio();
// (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate = (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
// (HttpClient client) { (HttpClient client) {
// client.badCertificateCallback = client.badCertificateCallback =
// (X509Certificate cert, String host, int port) => true; (X509Certificate cert, String host, int port) => true;
// return client; return client;
// }; };
// Response response; Response response;
// response = await dio.post( response = await dio.post(
// '${Constants.domainUrl}eventsdetail?eventid=$eventid', 'http://192.168.2.109:8007/api/method/eventsmethod?eventid=$eventid',
// options: Options(), options: Options(),
// ); );
// print("response user keywords here########## "); print("response user detailssssss here########## ");
// print(response.data.toString()); print(response.data.toString());
dynamic jsonResult; dynamic jsonResult;
print("eventid:${eventid}"); print("eventid:${eventid}");
// if (eventid == "140846") { // if (eventid == "140846") {
@ -279,7 +431,7 @@ class ApiCall {
// jsonDecode(await rootBundle.loadString("assets/eventsdetail2.json")); // jsonDecode(await rootBundle.loadString("assets/eventsdetail2.json"));
// } // }
//Map<String, dynamic> jsondata = json.decode(response.toString()); //Map<String, dynamic> jsondata = json.decode(response.toString());
Map<String, dynamic> jsondata = jsonResult; Map<String, dynamic> jsondata = response.data;
EventsDetailResp eventresponse = EventsDetailResp.fromJson(jsondata); EventsDetailResp eventresponse = EventsDetailResp.fromJson(jsondata);
EventsDetailData? eventdata = eventresponse.data; EventsDetailData? eventdata = eventresponse.data;
List<Eventsdetail>? eventsdetailList = eventdata!.eventsdetail; List<Eventsdetail>? eventsdetailList = eventdata!.eventsdetail;
@ -342,21 +494,21 @@ class ApiCall {
// (X509Certificate cert, String host, int port) => true; // (X509Certificate cert, String host, int port) => true;
// return client; // return client;
// }; // };
// Response response; // Response response3;
// response = await dio.post( // response3 = await dio.post(
// //'http://192.168.2.109:8007/api/method/events_list_api', // 'http://192.168.2.109:8007/api/method/tagclouds?message=129934',
// '${Constants.domainUrl}eventsapi.api.getEventsList', // // '${Constants.domainUrl}eventsapi.api.getEventsList',
// options: Options(), // options: Options(),
// ); // );
// print("response user keywords here########## "); // print("response user keywords here########## ");
// print(response.data.toString()); // print(response3.data.toString());
dynamic jsonResult = dynamic jsonResult =
jsonDecode(await rootBundle.loadString("assets/topicnotes.json")); jsonDecode(await rootBundle.loadString("assets/topicnotes.json"));
// Map<String, dynamic> jsondata = json.decode(jsonResult.toString()); // Map<String, dynamic> jsondata = json.decode(jsonResult.toString());
Map<String, dynamic> jsondata = jsonResult; Map<String, dynamic> jsondata = jsonResult;
NotesResp response = NotesResp.fromJson(jsondata); NotesResp response2 = NotesResp.fromJson(jsondata);
NotesData? data = response.data; NotesData? data = response2.data;
List<SessionNotesModel>? eventList = data!.events; List<SessionNotesModel>? eventList = data!.events;
return eventList; return eventList;
@ -365,33 +517,105 @@ class ApiCall {
//TOPICS CLOUD //TOPICS CLOUD
Future<List<TopicsCloudData>?> getTopicsCloudData(String eventid) async { Future<List<TopicsCloudData>?> getTopicsCloudData(String eventid) async {
// Dio dio = Dio(); Dio dio = Dio();
// (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate = (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
// (HttpClient client) { (HttpClient client) {
// client.badCertificateCallback = client.badCertificateCallback =
// (X509Certificate cert, String host, int port) => true; (X509Certificate cert, String host, int port) => true;
// return client; return client;
// }; };
// Response response; Response response3;
response3 = await dio.post(
'http://192.168.2.109:8007/api/method/tagclouds?message=$eventid',
// '${Constants.domainUrl}eventsapi.api.getEventsList',
options: Options(),
);
print("response user cloudsssss here########## ");
print(response3.data.toString());
// response = await dio.post(
// //'http://192.168.2.109:8007/api/method/events_list_api',
// '${Constants.domainUrl}eventsapi.api.getEventsList',
// options: Options(),
// );
// print("response user keywords here########## ");
// print(response.data.toString());
dynamic jsonResult = dynamic jsonResult =
jsonDecode(await rootBundle.loadString("assets/tagclouds.json")); jsonDecode(await rootBundle.loadString("assets/tagclouds.json"));
// Map<String, dynamic> jsondata = json.decode(jsonResult.toString()); // Map<String, dynamic> jsondata = json.decode(jsonResult.toString());
Map<String, dynamic> jsondata = jsonResult; Map<String, dynamic> jsondata = response3.data;
TopicsCloudResp response = TopicsCloudResp.fromJson(jsondata); // TopicsCloudResp response = TopicsCloudResp.fromJson(jsondata);
List<TopicsCloudData> data = []; Topicsresp resp = Topicsresp.fromJson(jsondata);
for (var obj in response.data!) { List<TopicsCloudData> data = resp.data;
if (obj.keys.contains(eventid)) { // for (var obj in response.data!) {
data = obj[eventid]!; // if (obj.keys.contains(eventid)) {
} // data = obj[eventid]!;
} // }
// }
return data;
}
Future<List<Specialty>?> getSpecialty(String eventid) async {
Dio dio = Dio();
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
(HttpClient client) {
client.badCertificateCallback =
(X509Certificate cert, String host, int port) => true;
return client;
};
Response response3;
response3 = await dio.post(
'http://192.168.2.109:8007/api/method/specialtyapi?eventid=$eventid',
// '${Constants.domainUrl}eventsapi.api.getEventsList',
options: Options(),
);
print("response user cloudsssss here########## ");
print(response3.data.toString());
dynamic jsonResult =
jsonDecode(await rootBundle.loadString("assets/tagclouds.json"));
// Map<String, dynamic> jsondata = json.decode(jsonResult.toString());
Map<String, dynamic> jsondata = response3.data;
// TopicsCloudResp response = TopicsCloudResp.fromJson(jsondata);
Specialtyresp resp = Specialtyresp.fromJson(jsondata);
List<Specialty> data = resp.data;
// for (var obj in response.data!) {
// if (obj.keys.contains(eventid)) {
// data = obj[eventid]!;
// }
// }
return data;
}
//http://192.168.2.109:8007/api/method/affiliationsapi?eventid=129934
Future<Affiliations?> getSpeakerCounts(String eventid) async {
Dio dio = Dio();
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
(HttpClient client) {
client.badCertificateCallback =
(X509Certificate cert, String host, int port) => true;
return client;
};
Response response3;
response3 = await dio.post(
'http://192.168.2.109:8007/api/method/affiliationsapi?eventid=$eventid',
// '${Constants.domainUrl}eventsapi.api.getEventsList',
options: Options(),
);
print("response user cloudsssss here########## ");
print(response3.data.toString());
dynamic jsonResult =
jsonDecode(await rootBundle.loadString("assets/tagclouds.json"));
// Map<String, dynamic> jsondata = json.decode(jsonResult.toString());
Map<String, dynamic> jsondata = response3.data;
// TopicsCloudResp response = TopicsCloudResp.fromJson(jsondata);
AffiliationsResp resp = AffiliationsResp.fromJson(jsondata);
Affiliations data = resp.data;
// for (var obj in response.data!) {
// if (obj.keys.contains(eventid)) {
// data = obj[eventid]!;
// }
// }
return data; return data;
} }

95
lib/utils/app_theme.dart Normal file
View File

@ -0,0 +1,95 @@
import 'package:flutter/material.dart';
class AppTheme {
AppTheme._();
static const Color notWhite = Color(0xFFEDF0F2);
static const Color nearlyWhite = Color(0xFFFEFEFE);
static const Color white = Color(0xFFFFFFFF);
static const Color nearlyBlack = Color(0xFF213333);
static const Color grey = Color(0xFF3A5160);
static const Color dark_grey = Color(0xFF313A44);
static const Color darkText = Color(0xFF253840);
static const Color darkerText = Color(0xFF17262A);
static const Color lightText = Color(0xFF4A6572);
static const Color deactivatedText = Color(0xFF767676);
static const Color dismissibleBackground = Color(0xFF364A54);
static const Color chipBackground = Color(0xFFEEF1F3);
static const Color spacer = Color(0xFFF2F2F2);
static const String fontName = 'WorkSans';
static const TextTheme textTheme = TextTheme(
headline4: display1,
headline5: headline,
headline6: title,
subtitle2: subtitle,
bodyText2: body2,
bodyText1: body1,
caption: caption,
);
static const TextStyle display1 = TextStyle(
// h4 -> display1
fontFamily: fontName,
fontWeight: FontWeight.bold,
fontSize: 36,
letterSpacing: 0.4,
height: 0.9,
color: darkerText,
);
static const TextStyle headline = TextStyle(
// h5 -> headline
fontFamily: fontName,
fontWeight: FontWeight.bold,
fontSize: 24,
letterSpacing: 0.27,
color: darkerText,
);
static const TextStyle title = TextStyle(
// h6 -> title
fontFamily: fontName,
fontWeight: FontWeight.bold,
fontSize: 16,
letterSpacing: 0.18,
color: darkerText,
);
static const TextStyle subtitle = TextStyle(
// subtitle2 -> subtitle
fontFamily: fontName,
fontWeight: FontWeight.w400,
fontSize: 14,
letterSpacing: -0.04,
color: darkText,
);
static const TextStyle body2 = TextStyle(
// body1 -> body2
fontFamily: fontName,
fontWeight: FontWeight.w400,
fontSize: 14,
letterSpacing: 0.2,
color: darkText,
);
static const TextStyle body1 = TextStyle(
// body2 -> body1
fontFamily: fontName,
fontWeight: FontWeight.w400,
fontSize: 16,
letterSpacing: -0.05,
color: darkText,
);
static const TextStyle caption = TextStyle(
// Caption -> caption
fontFamily: fontName,
fontWeight: FontWeight.w400,
fontSize: 12,
letterSpacing: 0.2,
color: lightText, // was lightText
);
}

View File

@ -22,4 +22,14 @@ class AppColors {
static const Color contentColorPink = Color(0xFFFF3AF2); static const Color contentColorPink = Color(0xFFFF3AF2);
static const Color contentColorRed = Color(0xFFE80054); static const Color contentColorRed = Color(0xFFE80054);
static const Color contentColorCyan = Color(0xFF50E4FF); static const Color contentColorCyan = Color(0xFF50E4FF);
List<Color> appcolors = [
contentColorYellow,
contentColorBlue,
contentColorOrange,
contentColorGreen,
contentColorPurple,
contentColorPink,
contentColorRed,
contentColorCyan
];
} }

View File

@ -16,12 +16,26 @@ class Constants {
static const String domainUrl = "http://192.168.2.109:8007/api/method/"; static const String domainUrl = "http://192.168.2.109:8007/api/method/";
//192.0.0.2:8007 - iphone //192.0.0.2:8007 - iphone
// 192.168.2.109:8007 - office // 192.168.2.109:8007 - office
static const String stagingUrl =
"https://cardio-staging.konectar.io/reports/";
static const String eventslistapi = "load_future_events";
static const String speakerslistapi = "view_micro_event_data";
static const String eventdetailsapi = "view_micro_event";
static const String getTokenApi =
"http://192.168.2.155:8002/api/auth/mobile/get_token";
static const String validateTokenApi =
"http://192.168.2.155:8002/api/auth/mobile/validate_token";
static const String logoutApi =
"http://192.168.2.155:8002/api/auth/mobile/app_logout";
static const String file = ''' static const String file = '''
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class MyApp extends StatelessWidget { class MyApp extends StatelessWidget {

View File

@ -15,4 +15,10 @@ class CustomDateFormatter {
final String formatted = formatter.format(DateTime.now()); final String formatted = formatter.format(DateTime.now());
return formatted; return formatted;
} }
String formatYearDate(DateTime date) {
final DateFormat formatter = DateFormat('yyyy-MM-dd');
final String formatted = formatter.format(date);
return formatted;
}
} }

View File

@ -24,4 +24,9 @@ class SessionManager {
final prefs = await SharedPreferences.getInstance(); final prefs = await SharedPreferences.getInstance();
await prefs.clear(); await prefs.clear();
} }
Future<void> logoutSession(bool value) async {
final prefs = await SharedPreferences.getInstance();
await prefs.setBool("isloggedin", value);
}
} }

View File

@ -29,7 +29,7 @@ class FieldValidation {
static String validateSecretKey(String domain) { static String validateSecretKey(String domain) {
if (domain.isEmpty) { if (domain.isEmpty) {
return 'Please enter secret key'; return 'Please enter code';
} else { } else {
return ''; return '';
} }

View File

@ -1,160 +1,160 @@
import 'package:flutter/material.dart'; // import 'package:flutter/material.dart';
import 'package:konectar_events/utils/util.dart'; // import 'package:konectar_events/utils/util.dart';
import 'package:konectar_events/widgets/custombutton.dart'; // import 'package:konectar_events/widgets/custombutton.dart';
import 'package:konectar_events/widgets/customeventsappbar.dart'; // import 'package:konectar_events/widgets/customeventsappbar.dart';
import 'package:konectar_events/widgets/eventdetailscontainer.dart'; // import 'package:konectar_events/widgets/eventdetailscontainer.dart';
import 'package:konectar_events/widgets/eventdetailslistview.dart';
class EventsDetails extends StatefulWidget {
const EventsDetails({super.key});
@override // class EventsDetails extends StatefulWidget {
State<EventsDetails> createState() => _EventsDetailsState(); // const EventsDetails({super.key});
}
class _EventsDetailsState extends State<EventsDetails> { // @override
@override // State<EventsDetails> createState() => _EventsDetailsState();
Widget build(BuildContext context) { // }
return Scaffold(
appBar: EventsAppBar(),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: LayoutBuilder(builder:
(BuildContext context, BoxConstraints viewportConstraints) {
return SingleChildScrollView(
child: ConstrainedBox(
constraints: BoxConstraints(
minHeight: viewportConstraints.maxHeight,
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: EventDetailsContainer(
isEventDetail: true,
),
),
expandableDetails(),
SizedBox(
height: 20,
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'Event Speakers',
style: TextStyle(
fontSize: isTablet ? 18 : 16,
fontWeight: FontWeight.bold),
),
CustomButton(
backgroundColor: Colors.green,
onPressed: () {},
textColor: Colors.black,
title: "Add To My Contacts",
fontsize: 16,
)
// const SizedBox(
// width: 10,
// ),
//
],
),
),
EventsDetailsDataTable(),
],
),
),
);
}),
),
);
}
Widget expandableDetails() { // class _EventsDetailsState extends State<EventsDetails> {
return isTablet // @override
? Container( // Widget build(BuildContext context) {
margin: EdgeInsets.symmetric(vertical: 20.0), // return Scaffold(
height: 200.0, // appBar: EventsAppBar(),
child: Row( // body: Padding(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, // padding: const EdgeInsets.all(8.0),
children: <Widget>[ // child: LayoutBuilder(builder:
_topicCard("Top 3 topics", // (BuildContext context, BoxConstraints viewportConstraints) {
" 1. Hematologic Neoplasms \n 2. Antibodies, Bispecific \n 3. Multiple Myeloma"), // return SingleChildScrollView(
_topicCard("Speakers with most sessions", // child: ConstrainedBox(
" 1. James A. Davis \n 2. Sandra Cuellar \n 3. Allison Butts"), // constraints: BoxConstraints(
_topicCard("Sponsors", // minHeight: viewportConstraints.maxHeight,
" 1. Amgen Inc \n 2. Bristol-Myers Squibb Company \n 3. Genmab A/S") // ),
], // child: Column(
)) // mainAxisSize: MainAxisSize.min,
: SizedBox( // children: [
height: MediaQuery.of(context).size.height * 0.45, // Padding(
child: Column(children: [ // padding: const EdgeInsets.all(8.0),
listViewTopicCard("Top 3 topics", // child: EventDetailsContainer(
" 1. Hematologic Neoplasms \n 2. Antibodies, Bispecific \n 3. Multiple Myeloma"), // isEventDetail: true,
listViewTopicCard("Speakers with most sessions", // ),
" 1. James A. Davis \n 2. Sandra Cuellar \n 3. Allison Butts"), // ),
listViewTopicCard("Sponsors", // expandableDetails(),
" 1. Amgen Inc \n 2. Bristol-Myers Squibb Company \n 3. Genmab A/S ") // SizedBox(
]), // height: 20,
); // ),
} // Padding(
// padding: const EdgeInsets.all(8.0),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Text(
// 'Event Speakers',
// style: TextStyle(
// fontSize: isTablet ? 18 : 16,
// fontWeight: FontWeight.bold),
// ),
// CustomButton(
// backgroundColor: Colors.green,
// onPressed: () {},
// textColor: Colors.black,
// title: "Add To My Contacts",
// fontsize: 16,
// )
// // const SizedBox(
// // width: 10,
// // ),
// //
// ],
// ),
// ),
// EventsDetailsDataTable(),
// ],
// ),
// ),
// );
// }),
// ),
// );
// }
Widget _topicCard(String title, String content) { // Widget expandableDetails() {
return SizedBox( // return isTablet
width: MediaQuery.of(context).size.width / 3.2, // ? Container(
child: Card( // margin: EdgeInsets.symmetric(vertical: 20.0),
child: Padding( // height: 200.0,
padding: const EdgeInsets.only(top: 18.0, left: 3.0), // child: Row(
child: Column( // mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, // children: <Widget>[
children: [ // _topicCard("Top 3 topics",
Center( // " 1. Hematologic Neoplasms \n 2. Antibodies, Bispecific \n 3. Multiple Myeloma"),
child: Text( // _topicCard("Speakers with most sessions",
title, // " 1. James A. Davis \n 2. Sandra Cuellar \n 3. Allison Butts"),
style: TextStyle(fontSize: 16), // _topicCard("Sponsors",
maxLines: 2, // " 1. Amgen Inc \n 2. Bristol-Myers Squibb Company \n 3. Genmab A/S")
), // ],
), // ))
SizedBox( // : SizedBox(
height: 20, // height: MediaQuery.of(context).size.height * 0.45,
), // child: Column(children: [
Text( // listViewTopicCard("Top 3 topics",
content, // " 1. Hematologic Neoplasms \n 2. Antibodies, Bispecific \n 3. Multiple Myeloma"),
style: TextStyle(fontSize: 16), // listViewTopicCard("Speakers with most sessions",
maxLines: 6, // " 1. James A. Davis \n 2. Sandra Cuellar \n 3. Allison Butts"),
), // listViewTopicCard("Sponsors",
], // " 1. Amgen Inc \n 2. Bristol-Myers Squibb Company \n 3. Genmab A/S ")
), // ]),
), // );
), // }
);
}
Widget listViewTopicCard(String title, String content) { // Widget _topicCard(String title, String content) {
return Container( // return SizedBox(
width: double.infinity, // width: MediaQuery.of(context).size.width / 3.2,
padding: EdgeInsets.all(10.0), // child: Card(
child: Card( // child: Padding(
elevation: 2.0, // padding: const EdgeInsets.only(top: 18.0, left: 3.0),
child: Theme( // child: Column(
data: Theme.of(context).copyWith(dividerColor: Colors.transparent), // crossAxisAlignment: CrossAxisAlignment.start,
child: Column( // children: [
crossAxisAlignment: CrossAxisAlignment.start, // Center(
children: [ // child: Text(
Center(child: Text(title)), // title,
Text( // style: TextStyle(fontSize: 16),
content, // maxLines: 2,
style: TextStyle(fontSize: 16), // ),
), // ),
], // SizedBox(
), // height: 20,
), // ),
), // Text(
); // content,
} // style: TextStyle(fontSize: 16),
} // maxLines: 6,
// ),
// ],
// ),
// ),
// ),
// );
// }
// Widget listViewTopicCard(String title, String content) {
// return Container(
// width: double.infinity,
// padding: EdgeInsets.all(10.0),
// child: Card(
// elevation: 2.0,
// child: Theme(
// data: Theme.of(context).copyWith(dividerColor: Colors.transparent),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Center(child: Text(title)),
// Text(
// content,
// style: TextStyle(fontSize: 16),
// ),
// ],
// ),
// ),
// ),
// );
// }
// }

View File

@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:intl/intl.dart';
import 'package:konectar_events/model/eventsdetailmodel.dart'; import 'package:konectar_events/model/eventsdetailmodel.dart';
import 'package:konectar_events/model/eventsmodel.dart'; import 'package:konectar_events/model/eventsmodel.dart';
import 'package:konectar_events/model/neweventsmodel.dart'; import 'package:konectar_events/model/neweventsmodel.dart';
@ -49,11 +50,21 @@ class _EventsListingScreenState extends State<EventsListingScreen>
} }
init() async { init() async {
String start = CustomDateFormatter().formatYearDate(
CustomDateFormatter().convertStringToDate(widget.event.start!));
String end = CustomDateFormatter().formatYearDate(
CustomDateFormatter().convertStringToDate(widget.event.end!));
await Provider.of<EventsProvider>(context, listen: false) await Provider.of<EventsProvider>(context, listen: false)
.getEventsDetails(widget.event.eventId!); .getEventsDetails(widget.event.eventId!);
await Provider.of<EventsProvider>(context, listen: false).getSessionCount(); await Provider.of<EventsProvider>(context, listen: false).getSessionCount();
await Provider.of<EventsProvider>(context, listen: false) await Provider.of<EventsProvider>(context, listen: false)
.getTopicsCloud(widget.event.eventId!); .getTopicsCloud(widget.event.eventId!);
await Provider.of<EventsProvider>(context, listen: false)
.getSpecialtyData(widget.event.eventId!);
await Provider.of<EventsProvider>(context, listen: false)
.getAffiliations(widget.event.eventId!);
// await Provider.of<EventsProvider>(context, listen: false)
// .getOverviewData(widget.event.eventId!, start, end);
setState(() {}); setState(() {});
} }
@ -353,12 +364,6 @@ class _EventsListingScreenState extends State<EventsListingScreen>
// Container( // Container(
// padding: EdgeInsets.symmetric(horizontal: 8.0), // padding: EdgeInsets.symmetric(horizontal: 8.0),
// width: MediaQuery.of(context).size.width, // width: MediaQuery.of(context).size.width,
// child: ElevatedButton(
// child: const Text('Download excel sheet',
// style: TextStyle(color: Colors.black)),
// onPressed: () => Navigator.pop(context),
// ),
// ),
// Container( // Container(
// padding: EdgeInsets.symmetric(horizontal: 8.0), // padding: EdgeInsets.symmetric(horizontal: 8.0),
// width: MediaQuery.of(context).size.width, // width: MediaQuery.of(context).size.width,
@ -422,8 +427,11 @@ class _EventsListingScreenState extends State<EventsListingScreen>
_ProfileInfoRow([ _ProfileInfoRow([
ProfileInfoItem( ProfileInfoItem(
"Session(s)", provider.eventSessionCount), "Session(s)", provider.eventSessionCount),
ProfileInfoItem("Speakers(s)", ProfileInfoItem(
int.parse(widget.event.speakerscount!)), "Speakers(s)",
// int.parse(
// provider.overviewData!.attendeeCount
0),
//ProfileInfoItem("Note(s)", 1), //ProfileInfoItem("Note(s)", 1),
], widget.event, provider), ], widget.event, provider),
SizedBox( SizedBox(
@ -461,6 +469,8 @@ class _EventsListingScreenState extends State<EventsListingScreen>
EventsInsights( EventsInsights(
eventid: widget.event.eventId!, eventid: widget.event.eventId!,
kFlutterHashtags: provider.kFlutterHashtags, kFlutterHashtags: provider.kFlutterHashtags,
specialtyList: provider.specialtyList,
affiliations: provider.affiliations,
), ),
SocialMedia(), SocialMedia(),
], ],
@ -836,7 +846,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
), ),
TextSpan( TextSpan(
text: text:
' ${event.city != null ? "${event.city}, " : ""}${event.region != null ? "${event.region}, " : ""}${event.country != null ? "${event.country}" : ""}', ' ${event.city != null && event.city != "" ? "${event.city}, " : ""}${event.region != null && event.region != "" ? "${event.region}, " : ""}${event.country != null && event.country != "" ? "${event.country}" : ""}',
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
//fontStyle: FontStyle.italic, //fontStyle: FontStyle.italic,

View File

@ -3,24 +3,16 @@ import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:konectar_events/model/eventsmodel.dart';
import 'package:konectar_events/model/keywords_model.dart'; import 'package:konectar_events/model/keywords_model.dart';
import 'package:konectar_events/model/neweventsmodel.dart'; import 'package:konectar_events/model/neweventsmodel.dart';
import 'package:konectar_events/utils/apicall.dart';
import 'package:konectar_events/utils/constants.dart'; import 'package:konectar_events/utils/constants.dart';
import 'package:konectar_events/utils/util.dart'; import 'package:konectar_events/utils/util.dart';
import 'package:konectar_events/view/eventsdetails.dart';
import 'package:konectar_events/view/eventslist.dart'; import 'package:konectar_events/view/eventslist.dart';
import 'package:konectar_events/view/eventstab.dart'; import 'package:konectar_events/view/eventstab.dart';
import 'package:konectar_events/viewmodel/eventsprovider.dart'; import 'package:konectar_events/viewmodel/eventsprovider.dart';
import 'package:konectar_events/widgets/autocompletetags_widget.dart'; import 'package:konectar_events/widgets/autocompletetags_widget.dart';
import 'package:konectar_events/widgets/customappbar.dart';
import 'package:konectar_events/widgets/custombutton.dart';
import 'package:konectar_events/widgets/customdropdown.dart';
import 'package:konectar_events/widgets/customlistview.dart';
import 'package:dropdown_button2/dropdown_button2.dart'; import 'package:dropdown_button2/dropdown_button2.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:konectar_events/widgets/gridview.dart';
import 'package:konectar_events/widgets/responsive_utils.dart'; import 'package:konectar_events/widgets/responsive_utils.dart';
import 'package:konectar_events/widgets/snackbar.dart'; import 'package:konectar_events/widgets/snackbar.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -95,7 +87,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
// title: "Events", // title: "Events",
// backgroundcolor: Color.fromARGB(255, 0, 71, 132), // backgroundcolor: Color.fromARGB(255, 0, 71, 132),
// ), // ),
// // backgroundColor: const Color.fromARGB(255, 222, 237, 247), // // backgroundColor: const Color.fromARGB(255, 222 , 237, 247),
// backgroundColor: Constants.bgcolor, // backgroundColor: Constants.bgcolor,
// // endDrawer: populateDrawer(provider),Color(0xf6f8fc) // // endDrawer: populateDrawer(provider),Color(0xf6f8fc)
// // backgroundColor:Color(0xf6f8fc), // // backgroundColor:Color(0xf6f8fc),
@ -218,35 +210,41 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
return Container( return Container(
child: Scaffold( child: Scaffold(
key: _scaffoldKey, key: _scaffoldKey,
// drawer: Drawer(
// child: Text("This will swipe from left to right"),
// ),
endDrawer: populateDrawer(provider), endDrawer: populateDrawer(provider),
appBar: AppBar( appBar: AppBar(
automaticallyImplyLeading: false, automaticallyImplyLeading: false,
backgroundColor: Constants.blueColor, backgroundColor: Constants.blueColor,
centerTitle: false, centerTitle: true,
title: _isSearch title: _isSearch
? Container( ? Padding(
height: 40, padding: EdgeInsets.only(left: 30),
decoration: BoxDecoration( child: Container(
color: Colors.white, height: 40,
borderRadius: BorderRadius.circular(5.0)), decoration: BoxDecoration(
child: TextField( color: Colors.white,
controller: searchtextEditingController, borderRadius: BorderRadius.circular(5.0)),
onChanged: (String txt) async { child: TextField(
if (txt.length >= 2) { controller: searchtextEditingController,
provider.OnSearch(txt); onChanged: (String txt) async {
} if (txt.length >= 2) {
if (txt.length < 2) { provider.OnSearch(txt);
await provider.onSearchReset(); }
} if (txt.length < 2) {
}, await provider.onSearchReset();
decoration: InputDecoration( }
fillColor: Constants.blueColor, },
contentPadding: EdgeInsets.symmetric(vertical: 9.0), decoration: InputDecoration(
border: OutlineInputBorder(), fillColor: Constants.blueColor,
hintText: "Search for events...", contentPadding: EdgeInsets.symmetric(vertical: 9.0),
// labelText: ' Search', border: OutlineInputBorder(),
prefixIcon: Icon( hintText: "Search for events...",
Icons.search, // labelText: ' Search',
prefixIcon: Icon(
Icons.search,
),
), ),
), ),
), ),
@ -255,6 +253,13 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
"Events", "Events",
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
// leading: IconButton(
// onPressed: () {},
// icon: Icon(
// Icons.person_4_outlined,
// size: 20,
// color: Colors.white,
// )),
actions: [ actions: [
IconButton( IconButton(
onPressed: () async { onPressed: () async {
@ -408,6 +413,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
// ), // ),
// ), // ),
// ), // ),
Container( Container(
child: Wrap( child: Wrap(
children: [ children: [
@ -1511,7 +1517,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
), ),
TextSpan( TextSpan(
text: text:
' ${event.city != null ? "${event.city}, " : ""}${event.region != null ? "${event.region}, " : ""}${event.country != null ? "${event.country}" : ""}', ' ${event.city != null && event.city != "" ? "${event.city}, " : ""}${event.region != null && event.region != "" ? "${event.region}, " : ""}${event.country != null && event.country != "" ? "${event.country}" : ""}',
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
//fontStyle: FontStyle.italic, //fontStyle: FontStyle.italic,

View File

@ -1,12 +1,17 @@
import 'dart:math';
import 'package:fl_chart/fl_chart.dart'; import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:flutter_scatter/flutter_scatter.dart'; import 'package:flutter_scatter/flutter_scatter.dart';
import 'package:konectar_events/model/affiliationsmodel.dart';
import 'package:konectar_events/model/eventsdetailmodel.dart'; import 'package:konectar_events/model/eventsdetailmodel.dart';
import 'package:konectar_events/model/neweventsmodel.dart'; import 'package:konectar_events/model/neweventsmodel.dart';
import 'package:konectar_events/model/specialtymodel.dart';
import 'package:konectar_events/utils/constants.dart'; import 'package:konectar_events/utils/constants.dart';
import 'package:konectar_events/utils/util.dart'; import 'package:konectar_events/utils/util.dart';
import 'package:konectar_events/viewmodel/eventsprovider.dart';
import 'package:konectar_events/viewmodel/hcpprofprovider.dart'; import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
import 'package:konectar_events/widgets/chartline.dart'; import 'package:konectar_events/widgets/chartline.dart';
import 'package:konectar_events/widgets/customappbar.dart'; import 'package:konectar_events/widgets/customappbar.dart';
@ -22,11 +27,14 @@ class EventsInsights extends StatefulWidget {
//EventsList eventsdetail; //EventsList eventsdetail;
String eventid; String eventid;
List<FlutterHashtag> kFlutterHashtags = []; List<FlutterHashtag> kFlutterHashtags = [];
EventsInsights({ List<Specialty> specialtyList = [];
super.key, Affiliations affiliations;
required this.eventid, EventsInsights(
required this.kFlutterHashtags, {super.key,
}); required this.eventid,
required this.kFlutterHashtags,
required this.affiliations,
required this.specialtyList});
@override @override
State<EventsInsights> createState() => _EventsInsightsState(); State<EventsInsights> createState() => _EventsInsightsState();
@ -58,6 +66,11 @@ class _EventsInsightsState extends State<EventsInsights> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
final ratio = screenSize.width / (screenSize.height / 2); final ratio = screenSize.width / (screenSize.height / 2);
List<int> affCountList = [];
for (var obj in widget.affiliations.affiliationCount) {
affCountList.add(int.parse(obj));
}
int maximum = affCountList.reduce(max);
return Consumer<HcpProfileProvider>( return Consumer<HcpProfileProvider>(
builder: (BuildContext context, provider, Widget? child) { builder: (BuildContext context, provider, Widget? child) {
List<Widget> widgets = <Widget>[]; List<Widget> widgets = <Widget>[];
@ -145,7 +158,9 @@ class _EventsInsightsState extends State<EventsInsights> {
borderRadius: BorderRadius.all(Radius.circular(20)), borderRadius: BorderRadius.all(Radius.circular(20)),
color: Colors.white, color: Colors.white,
), ),
child: CustomPieChart(), child: CustomPieChart(
specialtyList: widget.specialtyList,
),
// child: PieChartWidget([ // child: PieChartWidget([
// Sector( // Sector(
// value: 35.0, // value: 35.0,
@ -175,21 +190,22 @@ class _EventsInsightsState extends State<EventsInsights> {
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: List.generate(
ChartLine( widget.affiliations.affiliationCount.length,
title: 'Memorial sloan Kettering Cancer Center', (index) {
number: 4, return ChartLine(
rate: 1), title:
ChartLine( widget.affiliations.affiliationNames[index],
title: 'The university of Texas', number: int.parse(
number: 3, widget.affiliations.affiliationCount[index]),
rate: 0.8), rate: int.parse(widget.affiliations
ChartLine( .affiliationCount[index]) ==
title: 'Huntsman Cancer Institute', maximum
number: 2, ? 1
rate: 0.4), : int.parse(widget.affiliations
ChartLine(title: 'Mayo Clinic', number: 2, rate: 0.4), .affiliationCount[index]) /
], maximum);
}),
)), )),
), ),
SizedBox( SizedBox(

View File

@ -1,12 +1,19 @@
import 'dart:convert';
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:konectar_events/firebaseexample.dart'; import 'package:konectar_events/firebaseexample.dart';
import 'package:konectar_events/model/userdata_model.dart'; import 'package:konectar_events/model/userdata_model.dart';
import 'package:konectar_events/utils/apicall.dart'; import 'package:konectar_events/utils/apicall.dart';
import 'package:konectar_events/utils/constants.dart';
import 'package:konectar_events/utils/sessionmanager.dart'; import 'package:konectar_events/utils/sessionmanager.dart';
import 'package:konectar_events/utils/util.dart'; import 'package:konectar_events/utils/util.dart';
import 'package:konectar_events/utils/validations.dart'; import 'package:konectar_events/utils/validations.dart';
import 'package:konectar_events/view/home.dart'; import 'package:konectar_events/view/home.dart';
import 'package:konectar_events/view/navigation_home_screen.dart';
import 'package:konectar_events/viewmodel/loginprovider.dart'; import 'package:konectar_events/viewmodel/loginprovider.dart';
import 'package:konectar_events/widgets/customappbar.dart';
import 'package:konectar_events/widgets/custombutton.dart'; import 'package:konectar_events/widgets/custombutton.dart';
import 'package:konectar_events/widgets/customtextfield.dart'; import 'package:konectar_events/widgets/customtextfield.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -31,6 +38,7 @@ class _LoginScreenState extends State<LoginScreen> {
late Future<String> _domain; late Future<String> _domain;
late Future<String> _key; late Future<String> _key;
late Future<bool> _login; late Future<bool> _login;
String platform = "android";
var provider; var provider;
@override @override
void initState() { void initState() {
@ -38,17 +46,25 @@ class _LoginScreenState extends State<LoginScreen> {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
init(); init();
provider = Provider.of<LoginProvider>(context, listen: false); provider = Provider.of<LoginProvider>(context, listen: false);
provider.initDeviceId();
if (Platform.isAndroid) {
platform = "android";
} else if (Platform.isIOS) {
platform = "ios";
}
}); });
_username = _prefs.then((SharedPreferences prefs) { // _username = _prefs.then((SharedPreferences prefs) {
return prefs.getString('username') ?? ""; // return prefs.getString('username') ?? "";
}); // });
_useremail = _prefs.then((SharedPreferences prefs) { _useremail = _prefs.then((SharedPreferences prefs) {
emailTextController.text = prefs.getString('useremail') ?? "";
return prefs.getString('useremail') ?? ""; return prefs.getString('useremail') ?? "";
}); });
_domain = _prefs.then((SharedPreferences prefs) { // _domain = _prefs.then((SharedPreferences prefs) {
return prefs.getString('domain') ?? ""; // return prefs.getString('domain') ?? "";
}); // });
_key = _prefs.then((SharedPreferences prefs) { _key = _prefs.then((SharedPreferences prefs) {
secretKeyTextConrtroller.text = prefs.getString('secretkey') ?? "";
return prefs.getString('secretkey') ?? ""; return prefs.getString('secretkey') ?? "";
}); });
_login = _prefs.then((SharedPreferences prefs) { _login = _prefs.then((SharedPreferences prefs) {
@ -62,65 +78,79 @@ class _LoginScreenState extends State<LoginScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder( return Consumer<LoginProvider>(
builder: (BuildContext context, Orientation orientation) { builder: (BuildContext context, provider, Widget? child) {
return Scaffold( return OrientationBuilder(
// resizeToAvoidBottomInset: true, builder: (BuildContext context, Orientation orientation) {
body: orientation == Orientation.portrait return Scaffold(
? Column( appBar: CustomAppBar(
children: _buildBody(orientation), backgroundcolor: Constants.blueColor,
) title: "Sign In",
: Row( ),
children: _buildBody(orientation), // resizeToAvoidBottomInset: true,
body: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/background_login.jpg"),
fit: BoxFit.fitHeight,
),
), ),
); child: orientation == Orientation.portrait
? Column(
children: _buildBody(orientation, provider),
)
: Row(
children: _buildBody(orientation, provider),
),
));
});
}); });
} }
List<Widget> _buildBody(Orientation orientation) { List<Widget> _buildBody(Orientation orientation, LoginProvider provider) {
return [ return [
Expanded( // Expanded(
flex: 1, // flex: 1,
child: Container( // child: Container(
width: orientation == Orientation.portrait // width: orientation == Orientation.portrait
? double.infinity // ? double.infinity
: MediaQuery.of(context).size.height * 0.45, // : MediaQuery.of(context).size.height * 0.45,
decoration: const BoxDecoration( // decoration: const BoxDecoration(
gradient: LinearGradient( // gradient: LinearGradient(
begin: Alignment.topRight, // begin: Alignment.topRight,
end: Alignment.bottomLeft, // end: Alignment.bottomLeft,
colors: [ // colors: [
Color.fromARGB(255, 8, 39, 92), // Color.fromARGB(255, 8, 39, 92),
Color.fromARGB(255, 11, 60, 144), // Color.fromARGB(255, 11, 60, 144),
Color.fromARGB(255, 26, 64, 129), // Color.fromARGB(255, 26, 64, 129),
], // ],
)), // )),
child: Column( // child: Column(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: [ // children: [
SizedBox( // // SizedBox(
width: isTablet ? 160 : 80, // // width: isTablet ? 160 : 80,
height: isTablet ? 160 : 80, // // height: isTablet ? 160 : 80,
child: CircleAvatar( // // child: CircleAvatar(
backgroundColor: const Color.fromARGB(255, 126, 134, 147), // // backgroundColor: const Color.fromARGB(255, 126, 134, 147),
child: Icon( // // child: Icon(
Icons.person, // // Icons.person,
size: isTablet ? 120 : 60, // // size: isTablet ? 120 : 60,
), // // ),
), // // ),
), // // ),
const SizedBox( // // const SizedBox(
height: 20, // // height: 20,
), // // ),
Text( // Text(
'Welcome, you are almost there!', // 'Welcome, you are almost there!',
style: TextStyle( // style: TextStyle(
fontSize: isTablet ? 22 : 18, color: Colors.white), // fontSize: isTablet ? 22 : 18, color: Colors.white),
) // )
], // ],
), // ),
), // ),
), // ),
Expanded( Expanded(
flex: 2, flex: 2,
child: Container( child: Container(
@ -147,90 +177,171 @@ class _LoginScreenState extends State<LoginScreen> {
// Color.fromARGB(255, 214, 217, 223), // Color.fromARGB(255, 214, 217, 223),
// ], // ],
// )), // )),
child: _buildform(), child: _buildform(provider),
), ),
) )
]; ];
} }
Widget _buildform() { Widget _buildform(LoginProvider provider) {
return SingleChildScrollView( return SingleChildScrollView(
child: Column(mainAxisAlignment: MainAxisAlignment.start, children: [ child: Column(mainAxisAlignment: MainAxisAlignment.start, children: [
Text( // Text(
'Please fill the details', // 'Please fill the details',
style: TextStyle( // style: TextStyle(
fontSize: isTablet ? 22.0 : 16, // fontSize: isTablet ? 22.0 : 16,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.blue[900]), // color: Colors.blue[900]),
// ),
SizedBox(
height: 30,
child: Image.asset(
"assets/images/konector_image_logo.png",
fit: BoxFit.cover,
),
), ),
const SizedBox( const SizedBox(
height: 20, height: 40,
),
CustomTextField(labelText: "Name", controller: nameTextController),
const SizedBox(
height: 20,
), ),
// CustomTextField(labelText: "Name", controller: nameTextController),
// const SizedBox(
// height: 20,
// ),
CustomTextField(labelText: "Email", controller: emailTextController), CustomTextField(labelText: "Email", controller: emailTextController),
const SizedBox( // const SizedBox(),
), // CustomTextField(
CustomTextField( // labelText: "Application url", controller: domainTextConrtroller),
labelText: "Application url", controller: domainTextConrtroller), provider.showCodeField
const SizedBox( ? Column(
height: 20, children: [
), const SizedBox(
CustomTextField( height: 20,
labelText: "Secret key", controller: secretKeyTextConrtroller), ),
CustomTextField(
labelText: "Enter code",
obscure: true,
controller: secretKeyTextConrtroller),
],
)
: SizedBox.shrink(),
SizedBox( SizedBox(
height: isTablet ? 40 : 20, height: isTablet ? 40 : 20,
), ),
CustomButton( CustomButton(
backgroundColor: Colors.indigoAccent, backgroundColor: Constants.blueColor,
onPressed: () { onPressed: () async {
if (textFieldsValidation().isEmpty) { setState(() {
print("loading");
provider.loading = true;
});
if (textFieldsValidation(provider).isEmpty) {
print("email:${emailTextController.text}");
if (!provider.showCodeField) {
provider.email = emailTextController.text;
String encoded =
base64.encode(utf8.encode(provider.deviceId));
Map<String, dynamic> resp = await provider.verifyEmail(
emailTextController.text, encoded, platform);
print("resp:${resp["code"]}");
if (resp.isEmpty) {
print("isEmplty");
}
if (resp["code"] == "1200") {
provider.loading = false;
provider.showCodeField = true;
provider.showMessage = true;
} else {
provider.loading = false;
provider.showCodeField = false;
provider.showMessage = true;
}
provider.message = resp["message"];
setState(() {
emailTextController.text = provider.email!;
});
} else {
provider.code = secretKeyTextConrtroller.text;
Map<String, dynamic> resp = await provider.verifyCode(
emailTextController.text, secretKeyTextConrtroller.text);
if (resp["code"] == "1200") {
provider.loading = false;
provider.showCodeField = false;
provider.showMessage = true;
_displaySnackBar("You have logged in successfully");
_saveprefs(resp["token"], emailTextController.text,
secretKeyTextConrtroller.text, true)
.then((value) {
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (context) => NavigationHomeScreen()),
);
});
} else {
provider.message = resp["message"];
}
setState(() {
emailTextController.text = provider.email!;
secretKeyTextConrtroller.text = provider.code!;
});
}
//_joinMeeting(roomText.text, "demo meet2"); //_joinMeeting(roomText.text, "demo meet2");
_saveprefs( // _saveprefs(
nameTextController.text,
emailTextController.text, // emailTextController.text,
domainTextConrtroller.text,
secretKeyTextConrtroller.text, // true)
true) // .then((value) {
.then((value) { // Navigator.of(context).pushReplacement(
Navigator.of(context).pushReplacement( // MaterialPageRoute(
MaterialPageRoute( // builder: (context) => FirebaseExample(
builder: (context) => FirebaseExample( // title: secretKeyTextConrtroller.text,
title: secretKeyTextConrtroller.text, // )),
)), // );
); // }
}); // );
} else { } else {
_displaySnackBar(textFieldsValidation()); _displaySnackBar(textFieldsValidation(provider));
} }
}, },
textColor: Colors.white, textColor: Colors.white,
fontsize: isTablet ? 22 : 18, fontsize: isTablet ? 22 : 18,
title: "Submit"), title: provider.showCodeField ? "Verify" : "Submit"),
SizedBox(
height: 10,
),
provider.showMessage
? Text(provider.message!)
: provider.loading
? Center(child: CircularProgressIndicator())
: SizedBox.shrink(),
]), ]),
); );
} }
Future<void> _saveprefs( Future<void> _saveprefs(
String name, String email, String domain, String key, bool login) async { String token, String email, String key, bool login) async {
final SharedPreferences prefs = await _prefs; final SharedPreferences prefs = await _prefs;
final String useremail = (prefs.getString('useremail') ?? ''); final String useremail = (prefs.getString('useremail') ?? '');
final String username = (prefs.getString('username') ?? ''); final String username = (prefs.getString('username') ?? '');
final String userdomain = (prefs.getString('domain') ?? '');
final String secretkey = (prefs.getString('secretkey') ?? ''); final String secretkey = (prefs.getString('secretkey') ?? '');
final bool isloggedin = (prefs.getBool('isloggedin') ?? false); final bool isloggedin = (prefs.getBool('isloggedin') ?? false);
setState(() { setState(() {
_useremail = prefs.setString('useremail', email).then((bool success) { _useremail = prefs.setString('useremail', email).then((bool success) {
return useremail; return useremail;
}); });
_username = prefs.setString('username', name).then((bool success) { _username = prefs.setString('token', token).then((bool success) {
return username; return username;
}); });
_domain = prefs.setString('domain', domain).then((bool success) {
return userdomain;
});
_key = prefs.setString('secretkey', key).then((bool success) { _key = prefs.setString('secretkey', key).then((bool success) {
return secretkey; return secretkey;
}); });
@ -239,9 +350,9 @@ class _LoginScreenState extends State<LoginScreen> {
}); });
SessionManager().setLoggedIn(isloggedin); SessionManager().setLoggedIn(isloggedin);
}); });
UserData userData = // UserData userData =
UserData(email: email, name: name, domainUrl: domain, secretkey: key); // UserData(email: email, name: token, domainUrl: domain, secretkey: key);
await provider.saveUserData(userData); // await provider.saveUserData(userData);
} }
_displaySnackBar(String msg) { _displaySnackBar(String msg) {
@ -250,19 +361,23 @@ class _LoginScreenState extends State<LoginScreen> {
//scaffoldKeyLogin.currentState!.showSnackBar(snackBar); //scaffoldKeyLogin.currentState!.showSnackBar(snackBar);
} }
String textFieldsValidation() { String textFieldsValidation(LoginProvider provider) {
if (FieldValidation.validateName(nameTextController.text).isNotEmpty) { // if (FieldValidation.validateName(nameTextController.text).isNotEmpty) {
return FieldValidation.validateName(nameTextController.text); // return FieldValidation.validateName(nameTextController.text);
} // }
if (FieldValidation.validateEmail(emailTextController.text).isNotEmpty) { if (FieldValidation.validateEmail(emailTextController.text).isNotEmpty) {
return FieldValidation.validateEmail(emailTextController.text); return FieldValidation.validateEmail(emailTextController.text);
} }
if (FieldValidation.validateUrl(domainTextConrtroller.text).isNotEmpty) { // if (FieldValidation.validateUrl(domainTextConrtroller.text).isNotEmpty) {
return FieldValidation.validateUrl(domainTextConrtroller.text); // return FieldValidation.validateUrl(domainTextConrtroller.text);
} // }
if (FieldValidation.validateSecretKey(secretKeyTextConrtroller.text) if (provider.showCodeField) {
.isNotEmpty) { if (FieldValidation.validateSecretKey(secretKeyTextConrtroller.text)
return FieldValidation.validateSecretKey(secretKeyTextConrtroller.text); .isNotEmpty) {
return FieldValidation.validateSecretKey(secretKeyTextConrtroller.text);
} else {
return '';
}
} else { } else {
return ''; return '';
} }

View File

View File

@ -0,0 +1,76 @@
import 'package:flutter/material.dart';
import 'package:konectar_events/utils/app_theme.dart';
import 'package:konectar_events/view/home.dart';
import 'package:konectar_events/widgets/drawerusercontroller.dart';
import 'package:konectar_events/widgets/home_drawer.dart';
class NavigationHomeScreen extends StatefulWidget {
@override
_NavigationHomeScreenState createState() => _NavigationHomeScreenState();
}
class _NavigationHomeScreenState extends State<NavigationHomeScreen> {
Widget? screenView;
DrawerIndex? drawerIndex;
@override
void initState() {
drawerIndex = DrawerIndex.HOME;
screenView = const HomeScreen();
super.initState();
}
@override
Widget build(BuildContext context) {
return Container(
color: AppTheme.white,
child: SafeArea(
top: false,
bottom: false,
child: Scaffold(
backgroundColor: AppTheme.nearlyWhite,
body: DrawerUserController(
screenIndex: drawerIndex,
drawerWidth: MediaQuery.of(context).size.width * 0.75,
onDrawerCall: (DrawerIndex drawerIndexdata) {
changeIndex(drawerIndexdata);
//callback from drawer for replace screen as user need with passing DrawerIndex(Enum index)
},
screenView: screenView,
//we replace screen view as we need on navigate starting screens like MyHomePage, HelpScreen, FeedbackScreen, etc...
),
),
),
);
}
void changeIndex(DrawerIndex drawerIndexdata) {
if (drawerIndex != drawerIndexdata) {
drawerIndex = drawerIndexdata;
switch (drawerIndex) {
case DrawerIndex.HOME:
setState(() {
screenView = const HomeScreen();
});
break;
case DrawerIndex.Help:
setState(() {
screenView = HomeScreen();
});
break;
case DrawerIndex.FeedBack:
setState(() {
screenView = HomeScreen();
});
break;
case DrawerIndex.Invite:
setState(() {
screenView = HomeScreen();
});
break;
default:
break;
}
}
}
}

View File

@ -7,7 +7,7 @@ import 'package:konectar_events/utils/constants.dart';
import 'package:konectar_events/utils/util.dart'; import 'package:konectar_events/utils/util.dart';
import 'package:konectar_events/widgets/customappbar.dart'; import 'package:konectar_events/widgets/customappbar.dart';
import 'package:konectar_events/widgets/customeventsappbar.dart'; import 'package:konectar_events/widgets/customeventsappbar.dart';
import 'package:konectar_events/widgets/customsociallistview.dart';
import 'package:konectar_events/widgets/flutter_hashtags.dart'; import 'package:konectar_events/widgets/flutter_hashtags.dart';
import 'package:konectar_events/widgets/heatmapcalendar.dart'; import 'package:konectar_events/widgets/heatmapcalendar.dart';
import 'package:konectar_events/widgets/timelinechart.dart'; import 'package:konectar_events/widgets/timelinechart.dart';

View File

@ -1,13 +1,17 @@
import 'dart:async'; import 'dart:async';
import 'dart:math';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hive_flutter/hive_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart';
import 'package:konectar_events/model/affiliationsmodel.dart';
import 'package:konectar_events/model/eventsdetailmodel.dart'; import 'package:konectar_events/model/eventsdetailmodel.dart';
import 'package:konectar_events/model/eventsmodel.dart'; import 'package:konectar_events/model/eventsmodel.dart';
import 'package:konectar_events/model/eventsoverview.dart';
import 'package:konectar_events/model/keywords_model.dart'; import 'package:konectar_events/model/keywords_model.dart';
import 'package:konectar_events/model/neweventsmodel.dart'; import 'package:konectar_events/model/neweventsmodel.dart';
import 'package:konectar_events/model/scope_model.dart'; import 'package:konectar_events/model/scope_model.dart';
import 'package:konectar_events/model/sessionnotesmodel.dart'; import 'package:konectar_events/model/sessionnotesmodel.dart';
import 'package:konectar_events/model/specialtymodel.dart';
import 'package:konectar_events/model/topics_cloud_model.dart'; import 'package:konectar_events/model/topics_cloud_model.dart';
import 'package:konectar_events/utils/apicall.dart'; import 'package:konectar_events/utils/apicall.dart';
import 'package:konectar_events/utils/dateformater.dart'; import 'package:konectar_events/utils/dateformater.dart';
@ -33,6 +37,10 @@ class EventsProvider extends ChangeNotifier {
bool isSearchSpeakers = false; bool isSearchSpeakers = false;
List<FlutterHashtag> kFlutterHashtags = []; List<FlutterHashtag> kFlutterHashtags = [];
List<TopicsCloudData> topics = []; List<TopicsCloudData> topics = [];
List<Specialty> specialtyList = [];
OverviewData? overviewData;
Affiliations affiliations =
Affiliations(affiliationCount: [], affiliationNames: []);
onSelectAll() async { onSelectAll() async {
// isFavSeleted = false; // isFavSeleted = false;
@ -158,7 +166,7 @@ class EventsProvider extends ChangeNotifier {
initFiltersData() async { initFiltersData() async {
// keywordList = await ApiCall().getkeywords(''); // keywordList = await ApiCall().getkeywords('');
therapeuticList = await ApiCall().getscopes(); // therapeuticList = await ApiCall().getscopes();
notifyListeners(); notifyListeners();
} }
@ -172,6 +180,7 @@ class EventsProvider extends ChangeNotifier {
eventList = await getAllEventsData(); eventList = await getAllEventsData();
if (eventList.isEmpty) { if (eventList.isEmpty) {
eventList = (await ApiCall().getEvents())!; eventList = (await ApiCall().getEvents())!;
//eventList = (await ApiCall().getStagingEvents())!;
for (var events in eventList) { for (var events in eventList) {
await saveEventsData(events); await saveEventsData(events);
} }
@ -322,4 +331,24 @@ class EventsProvider extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
FutureOr getSpecialtyData(String eventid) async {
specialtyList = (await ApiCall().getSpecialty(eventid))!;
notifyListeners();
}
FutureOr getAffiliations(String eventid) async {
affiliations = (await ApiCall().getSpeakerCounts(eventid))!;
notifyListeners();
}
FutureOr getOverviewData(
String eventid, String startDate, String endDate) async {
overviewData =
(await ApiCall().getEventsOverview(eventid, startDate, endDate));
notifyListeners();
}
} }

View File

@ -1,10 +1,34 @@
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:hive_flutter/hive_flutter.dart'; import 'package:hive_flutter/hive_flutter.dart';
import 'package:konectar_events/model/userdata_model.dart'; import 'package:konectar_events/model/userdata_model.dart';
import 'package:konectar_events/utils/apicall.dart';
import 'package:flutter/services.dart';
import 'package:mobile_device_identifier/mobile_device_identifier.dart';
class LoginProvider extends ChangeNotifier { class LoginProvider extends ChangeNotifier {
late Box<UserData> box; late Box<UserData> box;
bool showCodeField = false;
bool showMessage = false;
bool loading = false;
String? message;
String? email;
String? code;
String deviceId = 'Unknown';
final _mobileDeviceIdentifierPlugin = MobileDeviceIdentifier();
init() {} init() {}
Future<dynamic> verifyEmail(String email, String deviceid, String platform) {
final response = ApiCall().verifyEmail(email, deviceid, platform);
loading = true;
return response;
}
Future<dynamic> verifyCode(String email, String code) {
final response = ApiCall().verifyCode(email, code);
loading = true;
return response;
}
Future<void> saveUserData(UserData userData) async { Future<void> saveUserData(UserData userData) async {
box = await Hive.openBox<UserData>('UserDataBox'); box = await Hive.openBox<UserData>('UserDataBox');
@ -33,4 +57,21 @@ class LoginProvider extends ChangeNotifier {
box = await Hive.openBox<UserData>('UserDataBox'); box = await Hive.openBox<UserData>('UserDataBox');
box.clear(); box.clear();
} }
//GET DEVICE UNIQUE ID
Future<void> initDeviceId() async {
String deviceId;
try {
deviceId = await _mobileDeviceIdentifierPlugin.getDeviceId() ??
'Unknown platform version';
} on PlatformException {
deviceId = 'Failed to get platform version.';
}
//if (!mounted) return;
deviceId = deviceId;
print("DEVICE ID :$deviceId");
notifyListeners();
}
} }

View File

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:konectar_events/utils/constants.dart';
class ChartLine extends StatelessWidget { class ChartLine extends StatelessWidget {
const ChartLine({ const ChartLine({
@ -26,7 +27,7 @@ class ChartLine extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
constraints: BoxConstraints(minWidth: lineWidget), //constraints: BoxConstraints(minWidth: lineWidget),
child: IntrinsicWidth( child: IntrinsicWidth(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -34,7 +35,7 @@ class ChartLine extends StatelessWidget {
Text( Text(
title, title,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 14,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
), ),
@ -43,16 +44,18 @@ class ChartLine extends StatelessWidget {
), ),
), ),
Container( Container(
color: Colors.blue, //constraints: BoxConstraints(maxWidth: lineWidget),
color: Constants.blueColor,
height: 40, height: 40,
width: lineWidget, width: lineWidget,
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Align( child: Align(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: Text( child: Text(
number.toString(), '${number.toString()}',
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 16,
color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),

View File

@ -1,62 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:konectar_events/utils/util.dart';
class CustomHcpCard extends StatelessWidget {
const CustomHcpCard({super.key});
@override
Widget build(BuildContext context) {
return Container(
width: isTablet
? MediaQuery.of(context).size.width / 2
: MediaQuery.of(context).size.width,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CircleAvatar(
child: Icon(
Icons.person,
color: Colors.black,
),
),
SizedBox(
width: 10,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Rabe, Klaus F.',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
_hcpdetails(Icons.star, 'Pulmonary Disease'),
_hcpdetails(Icons.school, 'LungenClinic Grosshansdorf'),
_hcpdetails(Icons.location_on, 'Germany'),
_hcpdetails(Icons.location_on, 'Ahrensburg')
],
)
],
),
);
}
_hcpdetails(IconData iconData, String title) {
return Row(
children: [
Icon(
iconData,
size: isTablet ? 18 : 14,
color: const Color.fromARGB(255, 77, 77, 77),
),
SizedBox(
width: 5,
),
Text(
title,
style: TextStyle(fontSize: isTablet ? 18 : 14, color: Colors.grey),
)
],
);
}
}

View File

@ -1,46 +0,0 @@
import 'package:flutter/material.dart';
import 'package:info_popup/info_popup.dart';
import 'package:konectar_events/widgets/customhcpcard.dart';
class CustomInfoPopup extends StatelessWidget {
const CustomInfoPopup({super.key});
@override
Widget build(BuildContext context) {
return InfoPopupWidget(
customContent: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
),
padding: const EdgeInsets.all(10),
child: CustomHcpCard(),
),
arrowTheme: const InfoPopupArrowTheme(
color: Colors.white,
arrowDirection: ArrowDirection.up,
),
dismissTriggerBehavior: PopupDismissTriggerBehavior.anyWhere,
areaBackgroundColor: Colors.transparent,
indicatorOffset: Offset.zero,
contentOffset: Offset.zero,
onControllerCreated: (controller) {
print('Info Popup Controller Created');
},
onAreaPressed: (InfoPopupController controller) {
print('Area Pressed');
},
infoPopupDismissed: () {
// Navigator.pop(context);
print('Info Popup Dismissed');
},
onLayoutMounted: (Size size) {
print('Info Popup Layout Mounted');
},
child: Icon(
Icons.info,
color: Colors.blue,
),
);
}
}

View File

@ -1,248 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:info_popup/info_popup.dart';
import 'package:konectar_events/utils/util.dart';
import 'package:konectar_events/view/eventstab.dart';
import 'package:konectar_events/widgets/custominfopopup.dart';
class DataTableDemo extends StatelessWidget {
Widget build(BuildContext context) {
return Expanded(
child: ListView(
padding: const EdgeInsets.all(2),
children: [
PaginatedDataTable(
dataRowMaxHeight: isTablet ? 150.0 : 150.0,
//dataRowMinHeight: 100.0,
columnSpacing: 32.0,
// header: Row(
// children: [
// Text('Events'),
// const SizedBox(
// width: 20,
// ),
// SizedBox(
// width: double.minPositive,
// child: SearchBar(
// hintText: 'Search',
// shape: MaterialStateProperty.all(RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10))),
// ),
// ),
// ],
// ),
header: SizedBox.shrink(),
rowsPerPage: 6,
actions: [],
columns: [
DataColumn(label: Center(child: Text(' Event Name'))),
DataColumn(label: Text('Start Date')),
DataColumn(label: Text('End Date')),
DataColumn(label: Text('Number of Attendees')),
DataColumn(label: Text('Client Attendees')),
],
source: _DataSource(context),
),
],
),
);
}
}
class _Row {
_Row(this.name, this.startDate, this.endDate, this.noOfAttendees,
this.clientAttendees);
final String name;
final String startDate;
final String endDate;
final int noOfAttendees;
final int clientAttendees;
bool selected = false;
}
class _DataSource extends DataTableSource {
_DataSource(this.context) {
_rows = <_Row>[
_Row('Cell A1', '12-09-2024', '12-11-2024', 10, 1),
_Row('Cell A2', '12-09-2024', '12-11-2024', 10, 2),
_Row('Cell A3', '12-09-2024', '12-11-2024', 20, 3),
_Row('Cell A4', '12-09-2024', '12-11-2024', 30, 4),
_Row('Cell A1', '12-09-2024', '12-11-2024', 40, 5),
_Row('Cell A2', '12-09-2024', '12-11-2024', 10, 6),
_Row('Cell A3', '12-09-2024', '12-11-2024', 10, 7),
_Row('Cell A4', '12-09-2024', '12-11-2024', 90, 8),
];
}
final BuildContext context;
late List<_Row> _rows;
int _selectedCount = 0;
@override
DataRow? getRow(int index) {
assert(index >= 0);
if (index >= _rows.length) return null;
final row = _rows[index];
return DataRow.byIndex(
index: index,
selected: row.selected,
onSelectChanged: (value) {
if (row.selected != value) {
_selectedCount += value! ? 1 : -1;
assert(_selectedCount >= 0);
row.selected = value;
notifyListeners();
}
},
cells: [
DataCell(InkWell(
// onTap: () =>
// Navigator.of(context).push(
// MaterialPageRoute(
// builder: (context) => EventsTab(),
// ),
// ),
child: eventNameContainer(),
)),
DataCell(Text(row.startDate)),
DataCell(Text(row.endDate)),
DataCell(Text(row.noOfAttendees.toString())),
DataCell(Text(row.clientAttendees.toString())),
],
);
}
@override
int get rowCount => _rows.length;
@override
bool get isRowCountApproximate => false;
@override
int get selectedRowCount => _selectedCount;
Widget eventNameContainer() {
return Container(
height: 300,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// IconButton(
// onPressed: () {
// MaterialPageRoute<void>(
// builder: (_) {
// return const CustomInfoPopup();
// },
// );
// },
// icon: const Icon(
// Icons.info,
// size: 20,
// )),
_infopopup(context),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: isTablet
? MediaQuery.of(context).size.width * 0.50
: MediaQuery.of(context).size.width * 0.65,
child: Text(
'2024 Hematology/Oncology Pharmacy Association Annual Conference (HOPA)',
style: TextStyle(
// decoration: TextDecoration.underline,
// decorationColor: Colors.blue,
color: Colors.blue,
fontWeight: FontWeight.bold,
fontSize: 16,
),
maxLines: 2,
softWrap: true,
overflow: TextOverflow.ellipsis,
),
),
SizedBox(
width: isTablet
? MediaQuery.of(context).size.width * 0.25
: MediaQuery.of(context).size.width * 0.5,
child: Text(
'Tampa,Florida,United States',
style: TextStyle(
color: Colors.black,
fontStyle: FontStyle.italic,
fontSize: 14),
),
),
SizedBox(
width: isTablet
? MediaQuery.of(context).size.width * 0.25
: MediaQuery.of(context).size.width * 0.35,
child: Text(
'Organizer: Hematology/Oncology Pharmacy Association (HOPA)',
style: TextStyle(
color: Colors.black,
fontStyle: FontStyle.italic,
fontSize: 14),
),
),
],
),
],
),
);
}
_infopopup(BuildContext context) {
return InfoPopupWidget(
customContent: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
),
padding: const EdgeInsets.all(10),
child: Column(
children: const <Widget>[
Text(
' Speaker Count : 1 \n Session Notes : 0 \n Surveys : 0 \n Program: Completed',
style: TextStyle(
fontSize: 16.0,
color: Colors.black,
),
),
],
),
),
arrowTheme: const InfoPopupArrowTheme(
color: Color.fromARGB(255, 248, 238, 238),
arrowDirection: ArrowDirection.up,
),
dismissTriggerBehavior: PopupDismissTriggerBehavior.anyWhere,
areaBackgroundColor: Colors.transparent,
indicatorOffset: Offset.zero,
contentOffset: Offset.zero,
onControllerCreated: (controller) {
print('Info Popup Controller Created');
},
onAreaPressed: (InfoPopupController controller) {
print('Area Pressed');
},
infoPopupDismissed: () {
// Navigator.pop(context);
print('Info Popup Dismissed');
},
onLayoutMounted: (Size size) {
print('Info Popup Layout Mounted');
},
child: Icon(
Icons.info,
color: Colors.blue,
),
);
}
}

View File

@ -1,423 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:info_popup/info_popup.dart';
import 'package:konectar_events/utils/util.dart';
import 'package:konectar_events/view/eventstab.dart';
import 'package:konectar_events/widgets/custominfopopup.dart';
class SocialMediaDataTable extends StatelessWidget {
final bool isTweets;
const SocialMediaDataTable({super.key, required this.isTweets});
Widget build(BuildContext context) {
return ListView(
padding: const EdgeInsets.all(2),
children: [
PaginatedDataTable(
dataRowMaxHeight: isTablet ? 80.0 : 60.0,
showEmptyRows: false,
headingRowHeight: 60,
//dataRowMinHeight: 100.0,
columnSpacing: 44.0,
// header: Row(
// children: [
// Text('Events'),
// const SizedBox(
// width: 20,
// ),
// SizedBox(
// width: double.minPositive,
// child: SearchBar(
// hintText: 'Search',
// shape: MaterialStateProperty.all(RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10))),
// ),
// ),
// ],
// ),
header: Text(isTweets ? 'Top 10 Tweets' : 'Top 20 Profiles'),
headingRowColor: MaterialStateProperty.all(Colors.blueAccent),
rowsPerPage: isTablet ? 5 : 4,
showCheckboxColumn: false,
actions: [],
columns: isTweets
? [
DataColumn(
label: Center(
child: Text(
'SLNO.',
style: TextStyle(color: Colors.white),
))),
DataColumn(
label: Text('Handle',
style: TextStyle(color: Colors.white))),
DataColumn(
label:
Text('Tweet', style: TextStyle(color: Colors.white))),
DataColumn(
label: Text('Total Engagement',
style: TextStyle(color: Colors.white))),
]
: [
DataColumn(
label: Center(
child: Text(
'SLNO.',
style: TextStyle(color: Colors.white),
))),
DataColumn(
label: Text('Handle',
style: TextStyle(color: Colors.white))),
DataColumn(
label:
Text('Bio', style: TextStyle(color: Colors.white))),
DataColumn(
label: Text('Followers',
style: TextStyle(color: Colors.white))),
DataColumn(
label: Text('Tweets',
style: TextStyle(color: Colors.white))),
DataColumn(
label: Text('Tweet Sentiments',
style: TextStyle(color: Colors.white))),
],
source: _DataSource(context, isTweets),
),
],
);
}
}
class _Row {
_Row(this.name, this.bio, this.followers, this.tweets, this.tweetsentiments);
final String name;
final String bio;
final String followers;
final int tweets;
final int tweetsentiments;
bool selected = false;
}
class _DataSource extends DataTableSource {
final bool isTweets;
_DataSource(this.context, this.isTweets) {
_rows = <_Row>[
_Row(
'Hany Ragy',
'Cardiologist,Expert in Women & Heart Disease, Prevention, Author Saving Women\'s\n Hearts - Heals President of ASPC #earlyinterventionalist @CedarsSinai',
'63.8K',
10,
100),
_Row(
'Hany Ragy',
'Cardiologist,Expert in Women & Heart Disease, Prevention, Author Saving Women\'s\n Hearts- Heals President of ASPC #earlyinterventionalist @CedarsSinai',
'63.8K',
10,
100),
_Row(
'Hany Ragy',
'Cardiologist,Expert in Women & Heart Disease, Prevention, Author Saving Women\'s \n Hearts- Heals President of ASPC #earlyinterventionalist @CedarsSinai',
'63.8K',
10,
100),
_Row(
'Hany Ragy',
'Cardiologist,Expert in Women & Heart Disease, Prevention, Author Saving Women\'s \n Hearts- Heals President of ASPC #earlyinterventionalist @CedarsSinai',
'63.8K',
10,
100),
_Row(
'Hany Ragy',
'Cardiologist,Expert in Women & Heart Disease, Prevention, Author Saving Women\'s\n Hearts- Heals President of ASPC #earlyinterventionalist @CedarsSinai',
'63.8K',
10,
100),
_Row(
'Hany Ragy',
'Cardiologist,Expert in Women & Heart Disease, Prevention, Author Saving Women\'s\n Hearts- Heals President of ASPC #earlyinterventionalist @CedarsSinai',
'63.8K',
10,
100),
_Row(
'Hany Ragy',
'Cardiologist,Expert in Women & Heart Disease, Prevention, Author Saving Women\'s\n Hearts- Heals President of ASPC #earlyinterventionalist @CedarsSinai',
'63.8K',
10,
100),
_Row(
'Hany Ragy',
'Cardiologist,Expert in Women & Heart Disease, Prevention, Author Saving Women\'s\n Hearts- Heals President of ASPC #earlyinterventionalist @CedarsSinai',
'63.8K',
10,
100),
_Row(
'Hany Ragy',
'Cardiologist,Expert in Women & Heart Disease, Prevention, Author Saving Women\'s\n Hearts- Heals President of ASPC #earlyinterventionalist @CedarsSinai',
'63.8K',
10,
100),
_Row(
'Hany Ragy',
'Cardiologist,Expert in Women & Heart Disease, Prevention, Author Saving Women\'s\n Hearts- Heals President of ASPC #earlyinterventionalist @CedarsSinai',
'63.8K',
10,
1),
_Row(
'Hany Ragy',
'Cardiologist,Expert in Women & Heart Disease, Prevention, Author Saving Women\'s\n Hearts- Heals President of ASPC #earlyinterventionalist @CedarsSinai',
'63.8K',
10,
100),
_Row(
'Hany Ragy',
'Cardiologist,Expert in Women & Heart Disease, Prevention, Author Saving Women\'s\n Hearts- Heals President of ASPC #earlyinterventionalist @CedarsSinai',
'63.8K',
100,
1),
_Row(
'Hany Ragy',
'Cardiologist,Expert in Women & Heart Disease, Prevention, Author Saving Women\'s\n Hearts- Heals President of ASPC #earlyinterventionalist @CedarsSinai',
'63.8K',
10,
100),
_Row(
'Hany Ragy',
'Cardiologist,Expert in Women & Heart Disease, Prevention, Author Saving Women\'s\n Hearts- Heals President of ASPC #earlyinterventionalist @CedarsSinai',
'63.8K',
10,
100),
_Row(
'Hany Ragy',
'Cardiologist,Expert in Women & Heart Disease, Prevention, Author Saving Women\'s\n Hearts- Heals President of ASPC #earlyinterventionalist @CedarsSinai',
'63.8K',
10,
100),
];
}
final BuildContext context;
late List<_Row> _rows;
int _selectedCount = 0;
@override
DataRow? getRow(int index) {
assert(index >= 0);
if (index >= _rows.length) return null;
final row = _rows[index];
return DataRow.byIndex(
index: index,
selected: row.selected,
onSelectChanged: (value) {
if (row.selected != value) {
_selectedCount += value! ? 1 : -1;
assert(_selectedCount >= 0);
row.selected = value;
notifyListeners();
}
},
cells: isTweets
? [
DataCell(Text("${index + 1}")),
DataCell(Text(
row.name,
maxLines: 2,
)),
DataCell(Text(row.bio)),
DataCell(Text(row.tweets.toString())),
]
: [
DataCell(Text("${index + 1}")),
DataCell(Text(
row.name,
maxLines: 2,
)),
DataCell(Text(row.bio)),
DataCell(Text(row.followers)),
DataCell(Text(row.tweets.toString())),
DataCell(Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Container(
height: isTablet ? 40 : 34,
width: isTablet ? 40 : 34,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.green,
),
child: Icon(
Icons.thumb_up,
color: Colors.white,
size: isTablet ? 24 : 18,
),
alignment: Alignment.center,
),
Text(" ${row.tweetsentiments.toString()} % "),
Container(
height: isTablet ? 40 : 34,
width: isTablet ? 40 : 34,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.yellow,
),
child: Icon(
Icons.thumbs_up_down,
color: Colors.white,
size: isTablet ? 24 : 18,
),
alignment: Alignment.center,
),
Text(" ${row.tweetsentiments.toString()} % "),
Container(
height: isTablet ? 40 : 34,
width: isTablet ? 40 : 34,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.red,
),
child: Icon(
Icons.thumb_down,
color: Colors.white,
size: isTablet ? 24 : 18,
),
alignment: Alignment.center,
),
Text(" 0 % "),
],
)),
],
);
}
@override
int get rowCount => _rows.length;
@override
bool get isRowCountApproximate => false;
@override
int get selectedRowCount => _selectedCount;
Widget eventNameContainer() {
return Container(
height: 300,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// IconButton(
// onPressed: () {
// MaterialPageRoute<void>(
// builder: (_) {
// return const CustomInfoPopup();
// },
// );
// },
// icon: const Icon(
// Icons.info,
// size: 20,
// )),
_infopopup(context),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: isTablet
? MediaQuery.of(context).size.width * 0.50
: MediaQuery.of(context).size.width * 0.65,
child: Text(
'2024 Hematology/Oncology Pharmacy Association Annual Conference (HOPA)',
style: TextStyle(
decoration: TextDecoration.underline,
decorationColor: Colors.blue,
color: Colors.blue,
fontWeight: FontWeight.bold,
fontSize: 17,
),
maxLines: 2,
softWrap: true,
overflow: TextOverflow.ellipsis,
),
),
SizedBox(
width: isTablet
? MediaQuery.of(context).size.width * 0.25
: MediaQuery.of(context).size.width * 0.5,
child: Text(
'Tampa,Florida,United States',
style: TextStyle(
color: Colors.blue,
fontStyle: FontStyle.italic,
fontSize: 14),
),
),
SizedBox(
width: isTablet
? MediaQuery.of(context).size.width * 0.25
: MediaQuery.of(context).size.width * 0.35,
child: Text(
'Organizer: Hematology/Oncology Pharmacy Association (HOPA)',
style: TextStyle(
color: Colors.blue,
fontStyle: FontStyle.italic,
fontSize: 14),
),
),
],
),
],
),
);
}
_infopopup(BuildContext context) {
return InfoPopupWidget(
customContent: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
),
padding: const EdgeInsets.all(10),
child: Column(
children: const <Widget>[
Text(
' Speaker Count : 1 \n Session Notes : 0 \n Surveys : 0 \n Program: Completed',
style: TextStyle(
fontSize: 16.0,
color: Colors.black,
),
),
],
),
),
arrowTheme: const InfoPopupArrowTheme(
color: Color.fromARGB(255, 248, 238, 238),
arrowDirection: ArrowDirection.up,
),
dismissTriggerBehavior: PopupDismissTriggerBehavior.anyWhere,
areaBackgroundColor: Colors.transparent,
indicatorOffset: Offset.zero,
contentOffset: Offset.zero,
onControllerCreated: (controller) {
print('Info Popup Controller Created');
},
onAreaPressed: (InfoPopupController controller) {
print('Area Pressed');
},
infoPopupDismissed: () {
// Navigator.pop(context);
print('Info Popup Dismissed');
},
onLayoutMounted: (Size size) {
print('Info Popup Layout Mounted');
},
child: Icon(
Icons.info,
color: Colors.blue,
),
);
}
}

View File

@ -19,18 +19,21 @@ class CustomTextField extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return TextField( return SizedBox(
controller: controller, height: 50,
style: TextStyle(fontSize: isTablet ? 18.0 : 16), child: TextField(
enabled: enabled, controller: controller,
obscureText: obscure ?? false, style: TextStyle(fontSize: isTablet ? 18.0 : 16),
decoration: InputDecoration( enabled: enabled,
border: const OutlineInputBorder(), obscureText: obscure ?? false,
labelStyle: TextStyle(fontSize: isTablet ? 18.0 : 16), decoration: InputDecoration(
labelText: labelText, border: const OutlineInputBorder(),
hintStyle: TextStyle(fontSize: isTablet ? 18.0 : 16), labelStyle: TextStyle(fontSize: isTablet ? 18.0 : 16),
suffixIcon: suffixIcon, labelText: labelText,
hintText: hintText), hintStyle: TextStyle(fontSize: isTablet ? 18.0 : 16),
suffixIcon: suffixIcon,
hintText: hintText),
),
); );
} }
} }

View File

@ -0,0 +1,223 @@
import 'package:flutter/material.dart';
import 'package:konectar_events/utils/app_theme.dart';
import 'package:konectar_events/widgets/home_drawer.dart';
class DrawerUserController extends StatefulWidget {
const DrawerUserController({
Key? key,
this.drawerWidth = 250,
this.onDrawerCall,
this.screenView,
this.animatedIconData = AnimatedIcons.arrow_menu,
this.menuView,
this.drawerIsOpen,
this.screenIndex,
}) : super(key: key);
final double drawerWidth;
final Function(DrawerIndex)? onDrawerCall;
final Widget? screenView;
final Function(bool)? drawerIsOpen;
final AnimatedIconData? animatedIconData;
final Widget? menuView;
final DrawerIndex? screenIndex;
@override
_DrawerUserControllerState createState() => _DrawerUserControllerState();
}
class _DrawerUserControllerState extends State<DrawerUserController>
with TickerProviderStateMixin {
ScrollController? scrollController;
AnimationController? iconAnimationController;
AnimationController? animationController;
double scrolloffset = 0.0;
@override
void initState() {
animationController = AnimationController(
duration: const Duration(milliseconds: 2000), vsync: this);
iconAnimationController = AnimationController(
vsync: this, duration: const Duration(milliseconds: 0));
iconAnimationController
?..animateTo(1.0,
duration: const Duration(milliseconds: 0),
curve: Curves.fastOutSlowIn);
scrollController =
ScrollController(initialScrollOffset: widget.drawerWidth);
scrollController!
..addListener(() {
if (scrollController!.offset <= 0) {
if (scrolloffset != 1.0) {
setState(() {
scrolloffset = 1.0;
try {
widget.drawerIsOpen!(true);
} catch (_) {}
});
}
iconAnimationController?.animateTo(0.0,
duration: const Duration(milliseconds: 0),
curve: Curves.fastOutSlowIn);
} else if (scrollController!.offset > 0 &&
scrollController!.offset < widget.drawerWidth.floor()) {
iconAnimationController?.animateTo(
(scrollController!.offset * 100 / (widget.drawerWidth)) / 100,
duration: const Duration(milliseconds: 0),
curve: Curves.fastOutSlowIn);
} else {
if (scrolloffset != 0.0) {
setState(() {
scrolloffset = 0.0;
try {
widget.drawerIsOpen!(false);
} catch (_) {}
});
}
iconAnimationController?.animateTo(1.0,
duration: const Duration(milliseconds: 0),
curve: Curves.fastOutSlowIn);
}
});
WidgetsBinding.instance.addPostFrameCallback((_) => getInitState());
super.initState();
}
Future<bool> getInitState() async {
scrollController?.jumpTo(
widget.drawerWidth,
);
return true;
}
@override
Widget build(BuildContext context) {
var brightness = MediaQuery.of(context).platformBrightness;
bool isLightMode = brightness == Brightness.light;
return Scaffold(
backgroundColor: isLightMode ? AppTheme.white : AppTheme.nearlyBlack,
body: SingleChildScrollView(
controller: scrollController,
scrollDirection: Axis.horizontal,
physics: const PageScrollPhysics(parent: ClampingScrollPhysics()),
child: SizedBox(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width + widget.drawerWidth,
//we use with as screen width and add drawerWidth (from navigation_home_screen)
child: Row(
children: <Widget>[
SizedBox(
width: widget.drawerWidth,
//we divided first drawer Width with HomeDrawer and second full-screen Width with all home screen, we called screen View
height: MediaQuery.of(context).size.height,
child: AnimatedBuilder(
animation: iconAnimationController!,
builder: (BuildContext context, Widget? child) {
return Transform(
//transform we use for the stable drawer we, not need to move with scroll view
transform: Matrix4.translationValues(
scrollController!.offset, 0.0, 0.0),
child: HomeDrawer(
screenIndex: widget.screenIndex == null
? DrawerIndex.HOME
: widget.screenIndex,
iconAnimationController: iconAnimationController,
callBackIndex: (DrawerIndex indexType) {
onDrawerClick();
try {
widget.onDrawerCall!(indexType);
} catch (e) {}
},
),
);
},
),
),
SizedBox(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
//full-screen Width with widget.screenView
child: Container(
decoration: BoxDecoration(
color: AppTheme.white,
boxShadow: <BoxShadow>[
BoxShadow(
color: AppTheme.grey.withOpacity(0.6),
blurRadius: 24),
],
),
child: Stack(
children: <Widget>[
//this IgnorePointer we use as touch(user Interface) widget.screen View, for example scrolloffset == 1 means drawer is close we just allow touching all widget.screen View
IgnorePointer(
ignoring: scrolloffset == 1 || false,
child: widget.screenView,
),
//alternative touch(user Interface) for widget.screen, for example, drawer is close we need to tap on a few home screen area and close the drawer
if (scrolloffset == 1.0)
InkWell(
onTap: () {
onDrawerClick();
},
),
// this just menu and arrow icon animation
Padding(
padding: EdgeInsets.only(
top: MediaQuery.of(context).padding.top + 8,
left: 8),
child: SizedBox(
width: AppBar().preferredSize.height - 8,
height: AppBar().preferredSize.height - 8,
child: Material(
color: Colors.transparent,
child: InkWell(
borderRadius: BorderRadius.circular(
AppBar().preferredSize.height),
child: Center(
// if you use your own menu view UI you add form initialization
child: widget.menuView != null
? widget.menuView
: AnimatedIcon(
color: AppTheme.white,
icon: widget.animatedIconData ??
AnimatedIcons.arrow_menu,
progress: iconAnimationController!),
),
onTap: () {
FocusScope.of(context)
.requestFocus(FocusNode());
onDrawerClick();
},
),
),
),
),
],
),
),
),
],
),
),
),
);
}
void onDrawerClick() {
//if scrollcontroller.offset != 0.0 then we set to closed the drawer(with animation to offset zero position) if is not 1 then open the drawer
if (scrollController!.offset != 0.0) {
scrollController?.animateTo(
0.0,
duration: const Duration(milliseconds: 400),
curve: Curves.fastOutSlowIn,
);
} else {
scrollController?.animateTo(
widget.drawerWidth,
duration: const Duration(milliseconds: 400),
curve: Curves.fastOutSlowIn,
);
}
}
}

View File

@ -1,249 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:info_popup/info_popup.dart';
import 'package:konectar_events/utils/util.dart';
import 'package:konectar_events/view/eventstab.dart';
import 'package:konectar_events/widgets/custombutton.dart';
import 'package:konectar_events/widgets/customhcpcard.dart';
import 'package:konectar_events/widgets/custominfopopup.dart';
import 'package:konectar_events/widgets/customtopicscard.dart';
import 'package:konectar_events/widgets/eventdetailscontainer.dart';
class EventsDetailsDataTable extends StatelessWidget {
TextEditingController selecttextEditingController = TextEditingController();
Widget build(BuildContext context) {
return LayoutBuilder(builder: (context, constraints) {
return SizedBox(
height: isTablet
? MediaQuery.of(context).size.height * 0.75
: MediaQuery.of(context).size.height * 0.80,
child: ListView(
padding: const EdgeInsets.symmetric(horizontal: 2),
children: [
PaginatedDataTable(
dataRowMaxHeight: isTablet ? 120.0 : 120.0,
showCheckboxColumn: true,
showEmptyRows: false,
sortColumnIndex: 1,
//dataRowMinHeight: 100.0,
showFirstLastButtons: true,
columnSpacing: 32.0,
headingRowHeight: 44,
// header: SizedBox(
// height: 150,
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Text('Events Speakers'),
// CustomButton(
// backgroundColor: Colors.green,
// onPressed: () {},
// textColor: Colors.black,
// title: "Add To My Contacts",
// fontsize: 16,
// )
// // const SizedBox(
// // width: 10,
// // ),
// //
// ],
// ),
// ),
header: buildTextFieldWidget(context),
rowsPerPage: isTablet ? 4 : 3,
actions: [],
columns: [
DataColumn(
label: Center(child: Text(' HCP \n Topics')),
onSort: (columnIndex, ascending) {},
),
DataColumn(label: Text('Session Notes')),
DataColumn(label: Text('Medical Insights')),
DataColumn(label: Text('Survey')),
DataColumn(label: Text('Actions')),
],
source: _DataSource(context),
),
],
),
);
});
}
Widget buildTextFieldWidget(BuildContext context) {
return SizedBox(
width: isTablet ? 150 : MediaQuery.of(context).size.width,
height: isTablet ? 40 : 35,
child: TextField(
textAlignVertical: TextAlignVertical.center,
cursorHeight: 16.0,
maxLines: 1,
controller:
selecttextEditingController, //editing controller of this TextField
decoration: InputDecoration(
// border: OutlineInputBorder(),
hintText: 'Search',
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10.0),
),
hintStyle: const TextStyle(fontSize: 16),
),
),
);
}
}
class _Row {
_Row(this.name, this.startDate, this.endDate, this.noOfAttendees,
this.clientAttendees);
final String name;
final String startDate;
final String endDate;
final int noOfAttendees;
final int clientAttendees;
bool selected = false;
}
class _DataSource extends DataTableSource {
_DataSource(this.context) {
_rows = <_Row>[
_Row('Cell A1', '12', '10', 10, 1),
_Row('Cell A1', '12', '10', 10, 1),
_Row('Cell A1', '12', '10', 10, 1),
_Row('Cell A1', '12', '10', 10, 1),
_Row('Cell A1', '12', '10', 10, 1),
_Row('Cell A1', '12', '10', 10, 1),
_Row('Cell A1', '12', '10', 10, 1),
];
}
final BuildContext context;
late List<_Row> _rows;
int _selectedCount = 0;
@override
DataRow? getRow(int index) {
assert(index >= 0);
if (index >= _rows.length) return null;
final row = _rows[index];
return DataRow.byIndex(
index: index,
selected: row.selected,
onSelectChanged: (value) {
if (row.selected != value) {
_selectedCount += value! ? 1 : -1;
assert(_selectedCount >= 0);
row.selected = value;
notifyListeners();
}
},
cells: [
DataCell(eventNameContainer()),
DataCell(Text(row.startDate)),
DataCell(Text(row.endDate)),
DataCell(Text(row.noOfAttendees.toString())),
DataCell(Text(row.clientAttendees.toString())),
],
);
}
@override
int get rowCount => _rows.length;
@override
bool get isRowCountApproximate => false;
@override
int get selectedRowCount => _selectedCount;
Widget eventNameContainer() {
return Container(
height: 300,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
FittedBox(child: CustomInfoPopup()),
SizedBox(
width: 5,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: isTablet
? MediaQuery.of(context).size.width * 0.50
: MediaQuery.of(context).size.width * 0.40,
child: Text(
'Husain Hatim',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 17,
),
maxLines: 2,
softWrap: true,
overflow: TextOverflow.ellipsis,
),
),
FittedBox(
child: InfoPopupWidget(
customContent: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
),
padding: EdgeInsets.all(isTablet ? 10 : 5),
child: CustomEventTopicsCard(),
),
arrowTheme: const InfoPopupArrowTheme(
color: Colors.white,
arrowDirection: ArrowDirection.down,
),
dismissTriggerBehavior: PopupDismissTriggerBehavior.onTapArea,
areaBackgroundColor: Colors.transparent,
indicatorOffset: Offset.zero,
// contentOffset: isTablet ? Offset(100, 100) : Offset(0, 100),
onControllerCreated: (controller) {
print('Info Popup Controller Created');
},
onAreaPressed: (InfoPopupController controller) {
controller.dismissInfoPopup();
print('Area Pressed');
},
infoPopupDismissed: () {
// Navigator.pop(context);
print('Info Popup Dismissed');
},
onLayoutMounted: (Size size) {
print('Info Popup Layout Mounted');
},
child: SizedBox(
width: isTablet
? MediaQuery.of(context).size.width * 0.25
: MediaQuery.of(context).size.width * 0.5,
child: Text(
'Programmed Cell Death 1 Receptor | Human Epidermal Growth Factor Receptor 2 +6more',
style: TextStyle(
decoration: TextDecoration.underline,
decorationColor: Colors.blue,
color: Colors.blue,
//fontStyle: FontStyle.italic,
fontSize: 14),
),
),
),
),
],
),
],
),
);
}
}

View File

@ -0,0 +1,360 @@
import 'package:flutter/material.dart';
import 'package:konectar_events/utils/apicall.dart';
import 'package:konectar_events/utils/app_theme.dart';
import 'package:konectar_events/utils/constants.dart';
import 'package:konectar_events/utils/sessionmanager.dart';
import 'package:konectar_events/view/login.dart';
import 'package:shared_preferences/shared_preferences.dart';
class HomeDrawer extends StatefulWidget {
const HomeDrawer(
{Key? key,
this.screenIndex,
this.iconAnimationController,
this.callBackIndex})
: super(key: key);
final AnimationController? iconAnimationController;
final DrawerIndex? screenIndex;
final Function(DrawerIndex)? callBackIndex;
@override
_HomeDrawerState createState() => _HomeDrawerState();
}
class _HomeDrawerState extends State<HomeDrawer> {
List<DrawerList>? drawerList;
final Future<SharedPreferences> _prefs = SharedPreferences.getInstance();
late Future<String> _useremail;
late Future<String> _key;
@override
void initState() {
setDrawerListArray();
_useremail = _prefs.then((SharedPreferences prefs) {
return prefs.getString('useremail') ?? "";
});
_key = _prefs.then((SharedPreferences prefs) {
return prefs.getString('token') ?? "";
});
super.initState();
}
void setDrawerListArray() {
drawerList = <DrawerList>[
DrawerList(
index: DrawerIndex.HOME,
labelName: 'Events',
//icon: Icon(Icons.home),
),
// DrawerList(
// index: DrawerIndex.Help,
// labelName: 'Help',
// isAssetsImage: true,
// imageName: 'assets/images/supportIcon.png',
// ),
// DrawerList(
// index: DrawerIndex.FeedBack,
// labelName: 'FeedBack',
// icon: Icon(Icons.help),
// ),
// DrawerList(
// index: DrawerIndex.Invite,
// labelName: 'Invite Friend',
// icon: Icon(Icons.group),
// ),
// DrawerList(
// index: DrawerIndex.Share,
// labelName: 'Rate the app',
// icon: Icon(Icons.share),
// ),
// DrawerList(
// index: DrawerIndex.About,
// labelName: 'About Us',
// icon: Icon(Icons.info),
// ),
];
}
@override
Widget build(BuildContext context) {
var brightness = MediaQuery.of(context).platformBrightness;
bool isLightMode = brightness == Brightness.light;
return Scaffold(
backgroundColor: AppTheme.notWhite.withOpacity(0.5),
body: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
width: double.infinity,
padding: const EdgeInsets.only(top: 20.0),
child: Container(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
AnimatedBuilder(
animation: widget.iconAnimationController!,
builder: (BuildContext context, Widget? child) {
return ScaleTransition(
scale: AlwaysStoppedAnimation<double>(1.0 -
(widget.iconAnimationController!.value) * 0.2),
child: RotationTransition(
turns: AlwaysStoppedAnimation<double>(Tween<double>(
begin: 0.0, end: 24.0)
.animate(CurvedAnimation(
parent: widget.iconAnimationController!,
curve: Curves.fastOutSlowIn))
.value /
360),
child: Container(
height: 100,
width: 100,
decoration: BoxDecoration(
shape: BoxShape.circle,
boxShadow: <BoxShadow>[
BoxShadow(
color: AppTheme.grey.withOpacity(0.6),
offset: const Offset(2.0, 4.0),
blurRadius: 8),
],
),
child: ClipRRect(
borderRadius:
const BorderRadius.all(Radius.circular(60.0)),
child: CircleAvatar(
radius: 24,
backgroundColor: Constants.blueColor,
// child: Icon(
// Icons.person,
// size: 18,
// color: Colors.white,
// ),
child: Text(
"S",
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: Colors.white),
),
),
),
),
),
);
},
),
Padding(
padding: const EdgeInsets.only(top: 8, left: 4),
child: Text(
'Snehalatha Desai',
style: TextStyle(
fontWeight: FontWeight.w600,
color: isLightMode ? AppTheme.grey : AppTheme.white,
fontSize: 18,
),
),
),
],
),
),
),
const SizedBox(
height: 4,
),
Divider(
height: 1,
color: AppTheme.grey.withOpacity(0.6),
),
Expanded(
child: ListView.builder(
physics: const BouncingScrollPhysics(),
padding: const EdgeInsets.all(0.0),
itemCount: drawerList?.length,
itemBuilder: (BuildContext context, int index) {
return inkwell(drawerList![index]);
},
),
),
Divider(
height: 1,
color: AppTheme.grey.withOpacity(0.6),
),
Column(
children: <Widget>[
ListTile(
title: Text(
'Sign Out',
style: TextStyle(
fontFamily: AppTheme.fontName,
fontWeight: FontWeight.w600,
fontSize: 16,
color: AppTheme.darkText,
),
textAlign: TextAlign.left,
),
trailing: Icon(
Icons.power_settings_new,
color: Colors.red,
),
onTap: () {
onTapped();
},
),
SizedBox(
height: MediaQuery.of(context).padding.bottom,
)
],
),
],
),
);
}
void onTapped() async {
final resp = ApiCall().logout(await _key);
print("resp:$resp");
await SessionManager().logoutSession(false).then((value) {
Navigator.of(context).popUntil((route) => route.isFirst);
// Navigator.of(context, rootNavigator: true).pushReplacementNamed("/");
Navigator.pushReplacement(
context,
MaterialPageRoute(builder: (context) => LoginScreen()),
);
});
}
Widget inkwell(DrawerList listData) {
return Material(
color: Colors.transparent,
child: InkWell(
splashColor: Colors.grey.withOpacity(0.1),
highlightColor: Colors.transparent,
onTap: () {
navigationtoScreen(listData.index!);
},
child: Stack(
children: <Widget>[
Container(
padding: const EdgeInsets.only(top: 8.0, bottom: 8.0),
child: Row(
children: <Widget>[
Container(
width: 6.0,
height: 46.0,
// decoration: BoxDecoration(
// color: widget.screenIndex == listData.index
// ? Colors.blue
// : Colors.transparent,
// borderRadius: new BorderRadius.only(
// topLeft: Radius.circular(0),
// topRight: Radius.circular(16),
// bottomLeft: Radius.circular(0),
// bottomRight: Radius.circular(16),
// ),
// ),
),
const Padding(
padding: EdgeInsets.all(4.0),
),
listData.isAssetsImage
? Container(
width: 24,
height: 24,
child: Image.asset(listData.imageName,
color: widget.screenIndex == listData.index
? Colors.blue
: AppTheme.nearlyBlack),
)
: Icon(listData.icon?.icon,
color: widget.screenIndex == listData.index
? Colors.blue
: AppTheme.nearlyBlack),
const Padding(
padding: EdgeInsets.all(4.0),
),
Text(
listData.labelName,
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 16,
color: widget.screenIndex == listData.index
? Colors.black
: AppTheme.nearlyBlack,
),
textAlign: TextAlign.left,
),
],
),
),
widget.screenIndex == listData.index
? AnimatedBuilder(
animation: widget.iconAnimationController!,
builder: (BuildContext context, Widget? child) {
return Transform(
transform: Matrix4.translationValues(
(MediaQuery.of(context).size.width * 0.75 - 64) *
(1.0 -
widget.iconAnimationController!.value -
1.0),
0.0,
0.0),
child: Padding(
padding: EdgeInsets.only(top: 8, bottom: 8),
child: Container(
width:
MediaQuery.of(context).size.width * 0.75 - 64,
height: 46,
decoration: BoxDecoration(
color: Colors.blue.withOpacity(0.2),
borderRadius: new BorderRadius.only(
topLeft: Radius.circular(0),
topRight: Radius.circular(28),
bottomLeft: Radius.circular(0),
bottomRight: Radius.circular(28),
),
),
),
),
);
},
)
: const SizedBox()
],
),
),
);
}
Future<void> navigationtoScreen(DrawerIndex indexScreen) async {
widget.callBackIndex!(indexScreen);
}
}
enum DrawerIndex {
HOME,
FeedBack,
Help,
Share,
About,
Invite,
Testing,
}
class DrawerList {
DrawerList({
this.isAssetsImage = false,
this.labelName = '',
this.icon,
this.index,
this.imageName = '',
});
String labelName;
Icon? icon;
bool isAssetsImage;
String imageName;
DrawerIndex? index;
}

View File

@ -32,11 +32,12 @@ class Indicator extends StatelessWidget {
), ),
Text( Text(
text, text,
maxLines: 3,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: textColor, color: textColor,
), overflow: TextOverflow.clip),
) )
], ],
); );

View File

@ -1,17 +1,19 @@
import 'package:fl_chart/fl_chart.dart'; import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:konectar_events/model/specialtymodel.dart';
import 'package:konectar_events/utils/appcolors.dart'; import 'package:konectar_events/utils/appcolors.dart';
import 'package:konectar_events/widgets/indicators.dart'; import 'package:konectar_events/widgets/indicators.dart';
class CustomPieChart extends StatefulWidget { class CustomPieChart extends StatefulWidget {
const CustomPieChart({super.key}); List<Specialty> specialtyList;
CustomPieChart({super.key, required this.specialtyList});
@override @override
State<StatefulWidget> createState() => CustomPieChartState(); State<StatefulWidget> createState() => CustomPieChartState();
} }
class CustomPieChartState extends State { class CustomPieChartState extends State<CustomPieChart> {
int touchedIndex = -1; int touchedIndex = -1;
@override @override
@ -47,67 +49,76 @@ class CustomPieChartState extends State {
), ),
sectionsSpace: 0, sectionsSpace: 0,
centerSpaceRadius: 60, centerSpaceRadius: 60,
sections: showingSections(), sections: showingSections(widget.specialtyList),
), ),
), ),
), ),
), ),
SizedBox( // SizedBox(
height: 5, // height: 5,
), // ),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.only(top: 8.0, bottom: 8.0, left: 8.0),
child: const Column( child: Column(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: List.generate(widget.specialtyList.length, (i) {
Indicator( return Indicator(
size: 8, size: 10,
color: AppColors.contentColorBlue, color: AppColors().appcolors[i],
text: 'Medical Oncology', text: widget.specialtyList[i].specialtyName,
isSquare: true, isSquare: true,
);
})
// <Widget>[
// Indicator(
// size: 8,
// color: AppColors.contentColorBlue,
// text: 'Medical Oncology',
// isSquare: true,
// ),
// SizedBox(
// height: 2,
// ),
// Indicator(
// size: 8,
// color: AppColors.contentColorYellow,
// text: 'Hematology/Oncology',
// isSquare: true,
// ),
// SizedBox(
// height: 2,
// ),
// Indicator(
// size: 8,
// color: AppColors.contentColorPurple,
// text: 'Internal Medicine',
// isSquare: true,
// ),
// SizedBox(
// height: 2,
// ),
// Indicator(
// size: 8,
// color: AppColors.contentColorGreen,
// text: 'Radiation Oncology',
// isSquare: true,
// ),
// SizedBox(
// height: 2,
// ),
// Indicator(
// size: 8,
// color: AppColors.contentColorOrange,
// text: 'Pediatric Hematology/Oncology',
// isSquare: true,
// ),
// SizedBox(
// height: 5,
// ),
// ],
), ),
SizedBox(
height: 2,
),
Indicator(
size: 8,
color: AppColors.contentColorYellow,
text: 'Hematology/Oncology',
isSquare: true,
),
SizedBox(
height: 2,
),
Indicator(
size: 8,
color: AppColors.contentColorPurple,
text: 'Internal Medicine',
isSquare: true,
),
SizedBox(
height: 2,
),
Indicator(
size: 8,
color: AppColors.contentColorGreen,
text: 'Radiation Oncology',
isSquare: true,
),
SizedBox(
height: 2,
),
Indicator(
size: 8,
color: AppColors.contentColorOrange,
text: 'Pediatric Hematology/Oncology',
isSquare: true,
),
SizedBox(
height: 5,
),
],
),
), ),
const SizedBox( const SizedBox(
width: 9, width: 9,
@ -117,82 +128,103 @@ class CustomPieChartState extends State {
); );
} }
List<PieChartSectionData> showingSections() { List<PieChartSectionData> showingSections(List<Specialty> specialtyList) {
return List.generate(5, (i) { double total = 0.0;
for (var obj in specialtyList) {
total += double.parse(obj.specialtyCount);
}
return List.generate(specialtyList.length, (i) {
final isTouched = i == touchedIndex; final isTouched = i == touchedIndex;
final fontSize = isTouched ? 25.0 : 16.0; final fontSize = isTouched ? 14.0 : 12.0;
final radius = isTouched ? 60.0 : 50.0; final radius = isTouched ? 60.0 : 50.0;
const shadows = [Shadow(color: Colors.black, blurRadius: 2)]; const shadows = [Shadow(color: Colors.black, blurRadius: 2)];
switch (i) { return PieChartSectionData(
case 0: color: AppColors().appcolors[i],
return PieChartSectionData( value: ((double.parse(specialtyList[i].specialtyCount) / total) * 100)
color: AppColors.contentColorBlue, .roundToDouble(),
value: 40, title:
title: '40%', '${((double.parse(specialtyList[i].specialtyCount) / total) * 100).roundToDouble()}%',
radius: radius, radius: radius,
titleStyle: TextStyle( titleStyle: TextStyle(
fontSize: fontSize, fontSize: fontSize,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: AppColors.mainTextColor1, color: AppColors.mainTextColor1,
shadows: shadows, shadows: shadows,
), ),
); );
case 1: // switch (i) {
return PieChartSectionData( // case 0:
color: AppColors.contentColorYellow, // return PieChartSectionData(
value: 44, // color: AppColors.contentColorBlue,
title: '44%', // value:
radius: radius, // (double.parse(specialtyList[i].specialtyCount) * total) / 100,
titleStyle: TextStyle( // title:
fontSize: fontSize, // '${(double.parse(specialtyList[i].specialtyCount) * total) / 100}%',
fontWeight: FontWeight.bold, // radius: radius,
color: AppColors.mainTextColor1, // titleStyle: TextStyle(
shadows: shadows, // fontSize: fontSize,
), // fontWeight: FontWeight.bold,
); // color: AppColors.mainTextColor1,
case 2: // shadows: shadows,
return PieChartSectionData( // ),
color: AppColors.contentColorPurple, // );
value: 40.5, // case 1:
title: '40.5%', // return PieChartSectionData(
radius: radius, // color: AppColors.contentColorYellow,
titleStyle: TextStyle( // value: double.parse(specialtyList[i].specialtyCount) / 100,
fontSize: fontSize, // title: '${double.parse(specialtyList[i].specialtyCount) / 100}%',
fontWeight: FontWeight.bold, // radius: radius,
color: AppColors.mainTextColor1, // titleStyle: TextStyle(
shadows: shadows, // fontSize: fontSize,
), // fontWeight: FontWeight.bold,
); // color: AppColors.mainTextColor1,
case 3: // shadows: shadows,
return PieChartSectionData( // ),
color: AppColors.contentColorGreen, // );
value: 8.2, // case 2:
title: '8.2%', // return PieChartSectionData(
radius: radius, // color: AppColors.contentColorPurple,
titleStyle: TextStyle( // value: double.parse(specialtyList[i].specialtyCount) / 100,
fontSize: fontSize, // title: '${double.parse(specialtyList[i].specialtyCount) / 100}%',
fontWeight: FontWeight.bold, // radius: radius,
color: AppColors.mainTextColor1, // titleStyle: TextStyle(
shadows: shadows, // fontSize: fontSize,
), // fontWeight: FontWeight.bold,
); // color: AppColors.mainTextColor1,
case 4: // shadows: shadows,
return PieChartSectionData( // ),
color: AppColors.contentColorOrange, // );
value: 5.2, // case 3:
title: '5.2%', // return PieChartSectionData(
radius: radius, // color: AppColors.contentColorGreen,
titleStyle: TextStyle( // value: double.parse(specialtyList[i].specialtyCount) / 100,
fontSize: fontSize, // title: '${double.parse(specialtyList[i].specialtyCount) / 100}%',
fontWeight: FontWeight.bold, // radius: radius,
color: AppColors.mainTextColor1, // titleStyle: TextStyle(
shadows: shadows, // fontSize: fontSize,
), // fontWeight: FontWeight.bold,
); // color: AppColors.mainTextColor1,
// shadows: shadows,
// ),
// );
// case 4:
// return PieChartSectionData(
// color: AppColors.contentColorOrange,
// value: double.parse(specialtyList[i].specialtyCount) / 100,
// title: '${double.parse(specialtyList[i].specialtyCount)}%',
// radius: radius,
// titleStyle: TextStyle(
// fontSize: fontSize,
// fontWeight: FontWeight.bold,
// color: AppColors.mainTextColor1,
// shadows: shadows,
// ),
// );
default: // default:
throw Error(); // throw Error();
} // }
}); });
} }
} }

File diff suppressed because one or more lines are too long

View File

@ -904,6 +904,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.5" version: "1.0.5"
mobile_device_identifier:
dependency: "direct dev"
description:
name: mobile_device_identifier
sha256: b59462637ed54a83766c4b955c0c87e010989ccfb0716c7e2ec21fc2939b08bf
url: "https://pub.dev"
source: hosted
version: "0.0.2"
nested: nested:
dependency: transitive dependency: transitive
description: description:

View File

@ -70,6 +70,7 @@ dev_dependencies:
textfield_tags: ^3.0.1 textfield_tags: ^3.0.1
add_2_calendar: ^3.0.1 add_2_calendar: ^3.0.1
font_awesome_flutter: ^10.1.0 font_awesome_flutter: ^10.1.0
mobile_device_identifier: ^0.0.2
# flutter_launcher_icons: ^0.13.1 # flutter_launcher_icons: ^0.13.1
# flutter_launcher_icons: # flutter_launcher_icons:
@ -104,7 +105,7 @@ flutter:
- assets/response.json - assets/response.json
- shorebird.yaml - shorebird.yaml
- assets/ - assets/
- assets/events.json # - assets/events.json
# - images/a_dot_ham.jpeg # - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see # An image asset can refer to one or more resolution-specific "variants", see