diff --git a/assets/cmsu_medicalInsight.json b/assets/cmsu_medicalInsight.json
new file mode 100644
index 0000000..d1e9f61
--- /dev/null
+++ b/assets/cmsu_medicalInsight.json
@@ -0,0 +1,231 @@
+{
+ "data": [
+ {
+ "id": "CMSUMedInsight",
+ "name": "ADD CMSU INSIGHT(SHARED WITH SALESFORCE)",
+ "form-fields": [
+ {
+ "sectionName": "CMSU Insight",
+ "multiple": false,
+ "sectionList": [
+ {
+ "name": "HCP Name",
+ "id": "hcpname",
+ "depid": "",
+ "widget": "label",
+ "input": "label",
+ "validation": {
+ "isRequired": false
+ }
+ },
+ {
+ "name": "Insight Open Date",
+ "id": "date",
+ "depid": "",
+ "widget": "text",
+ "input": "Date",
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Insight Modality",
+ "param": "insight_modality",
+ "id": "insight_modality",
+ "selectedValue": [],
+ "depid": "",
+ "widget": "dropdown",
+ "input": "dropdown",
+ "inputList": [
+ {
+ "id": "CT",
+ "name": "CT"
+ },
+ {
+ "id": "HIT",
+ "name": "HIT"
+ },
+ {
+ "id": "MI",
+ "name": "MI"
+ },
+ {
+ "id": "MR",
+ "name": "MR"
+ },
+ {
+ "id": "Postdoc",
+ "name": "Postdoc"
+ },
+ {
+ "id": "UL",
+ "name": "UL"
+ },
+ {
+ "id": "VL",
+ "name": "VL"
+ },
+ {
+ "id": "XR",
+ "name": "XR"
+ }
+ ],
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Discussion Type",
+ "id": "discussion_type",
+ "depid": "",
+ "widget": "dropdown",
+ "input": "dropdown",
+ "inputList": [
+ {
+ "id": "Proactive",
+
+ "name": "Proactive"
+ },
+ {
+ "id": "Reactive",
+
+ "name": "Reactive"
+ }
+ ],
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Insight Temperature",
+ "id": "insight_temperature",
+ "depid": "",
+ "widget": "dropdown",
+ "input": "dropdown",
+ "inputList": [
+ {
+ "id": "Green",
+ "name": "Green"
+ },
+ {
+ "id": "Red",
+ "name": "Red"
+ },
+ {
+ "id": "Yellow",
+ "name": "Yellow "
+ }
+ ],
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Insight Owners",
+ "id": "insight_owners",
+ "depid": "",
+ "widget": "dropdown",
+ "input": "dropdown",
+ "inputList": [
+ {
+ "id": "Applications",
+
+ "name": "Applications"
+ },
+ {
+ "id": "BU",
+
+ "name": "BU"
+ },
+ {
+ "id": "Commercial",
+
+ "name": "Commercial"
+ },
+ {
+ "id": "Service",
+
+ "name": "Service"
+ }
+ ],
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Initiate Alert",
+ "id": "initiate_alert",
+ "depid": "",
+ "widget": "dropdown",
+ "input": "dropdown",
+ "inputList": [
+ {
+ "id": "No",
+
+ "name": "No"
+ },
+ {
+ "id": "Yes",
+
+ "name": "Yes"
+ }
+
+ ],
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Status",
+ "id": "status",
+ "depid": "sourcetype",
+ "widget": "dropdown",
+ "input": "dropdown",
+ "inputList": [
+ {
+ "id": "Open",
+
+ "name": "Open"
+ },
+ {
+ "id": "Closed",
+
+ "name": "Closed"
+ },
+ {
+ "id": "Cancelled",
+
+ "name": "Cancelled"
+ }
+
+ ],
+ "validation": {
+ "isRequired": true
+ }
+ }
+
+ ]
+ },
+
+ {
+ "sectionName": "Comments",
+ "multiple": false,
+ "sectionList": [
+ {
+ "name": "Insight Comments",
+ "id": "insight_comments",
+ "depid": "",
+ "widget": "text",
+ "input": "textArea",
+ "validation": {
+ "isRequired": true,
+ "maxchars": "300"
+ }
+ }
+
+ ]
+ }
+ ]
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/assets/images/a2sc2.svg b/assets/images/a2sc2.svg
new file mode 100644
index 0000000..30c5a7f
--- /dev/null
+++ b/assets/images/a2sc2.svg
@@ -0,0 +1,17 @@
+
diff --git a/assets/images/konectar.png b/assets/images/konectar.png
deleted file mode 100644
index 17e6198..0000000
Binary files a/assets/images/konectar.png and /dev/null differ
diff --git a/assets/images/konectar_logo.svg b/assets/images/konectar_logo.svg
new file mode 100644
index 0000000..6ff15ee
--- /dev/null
+++ b/assets/images/konectar_logo.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/images/newa2sc2.svg b/assets/images/newa2sc2.svg
new file mode 100644
index 0000000..5dff07e
--- /dev/null
+++ b/assets/images/newa2sc2.svg
@@ -0,0 +1,17 @@
+
diff --git a/assets/images/newsc2img.svg b/assets/images/newsc2img.svg
new file mode 100644
index 0000000..8cfece6
--- /dev/null
+++ b/assets/images/newsc2img.svg
@@ -0,0 +1,2400 @@
+
diff --git a/assets/images/newsc2iphone.svg b/assets/images/newsc2iphone.svg
new file mode 100644
index 0000000..5e2d803
--- /dev/null
+++ b/assets/images/newsc2iphone.svg
@@ -0,0 +1,16 @@
+
diff --git a/assets/images/sc1bg.svg b/assets/images/sc1bg.svg
new file mode 100644
index 0000000..47b7e12
--- /dev/null
+++ b/assets/images/sc1bg.svg
@@ -0,0 +1,17 @@
+
diff --git a/assets/images/sc1bg1500.svg b/assets/images/sc1bg1500.svg
new file mode 100644
index 0000000..e72261e
--- /dev/null
+++ b/assets/images/sc1bg1500.svg
@@ -0,0 +1,17 @@
+
diff --git a/assets/images/sc1devices.png b/assets/images/sc1devices.png
new file mode 100644
index 0000000..c9eb4ff
Binary files /dev/null and b/assets/images/sc1devices.png differ
diff --git a/assets/images/sc1img.svg b/assets/images/sc1img.svg
new file mode 100644
index 0000000..191c9df
--- /dev/null
+++ b/assets/images/sc1img.svg
@@ -0,0 +1,9 @@
+
diff --git a/assets/images/sc1img2x.png b/assets/images/sc1img2x.png
new file mode 100644
index 0000000..c9eb4ff
Binary files /dev/null and b/assets/images/sc1img2x.png differ
diff --git a/assets/images/sc2bg500.svg b/assets/images/sc2bg500.svg
new file mode 100644
index 0000000..d33abc1
--- /dev/null
+++ b/assets/images/sc2bg500.svg
@@ -0,0 +1,17 @@
+
diff --git a/assets/images/sc2img.svg b/assets/images/sc2img.svg
new file mode 100644
index 0000000..db75729
--- /dev/null
+++ b/assets/images/sc2img.svg
@@ -0,0 +1,2400 @@
+
diff --git a/assets/images/sc2img2x.png b/assets/images/sc2img2x.png
new file mode 100644
index 0000000..6dcb058
Binary files /dev/null and b/assets/images/sc2img2x.png differ
diff --git a/assets/images/sc3img2x.png b/assets/images/sc3img2x.png
new file mode 100644
index 0000000..450508d
Binary files /dev/null and b/assets/images/sc3img2x.png differ
diff --git a/assets/images/screen1bg.svg b/assets/images/screen1bg.svg
new file mode 100644
index 0000000..83f6612
--- /dev/null
+++ b/assets/images/screen1bg.svg
@@ -0,0 +1,16 @@
+
diff --git a/assets/images/screen2.svg b/assets/images/screen2.svg
new file mode 100644
index 0000000..d8ab821
--- /dev/null
+++ b/assets/images/screen2.svg
@@ -0,0 +1,18 @@
+
diff --git a/assets/images/screen2bg.svg b/assets/images/screen2bg.svg
new file mode 100644
index 0000000..a397664
--- /dev/null
+++ b/assets/images/screen2bg.svg
@@ -0,0 +1,16 @@
+
diff --git a/assets/introduction_animation/care_image.png b/assets/introduction_animation/care_image.png
new file mode 100644
index 0000000..7881c2b
Binary files /dev/null and b/assets/introduction_animation/care_image.png differ
diff --git a/assets/images/events3.jpg b/assets/introduction_animation/events3.jpg
similarity index 100%
rename from assets/images/events3.jpg
rename to assets/introduction_animation/events3.jpg
diff --git a/assets/introduction_animation/introduction_animation.png b/assets/introduction_animation/introduction_animation.png
new file mode 100644
index 0000000..5013b4c
Binary files /dev/null and b/assets/introduction_animation/introduction_animation.png differ
diff --git a/assets/introduction_animation/introduction_image.png b/assets/introduction_animation/introduction_image.png
new file mode 100644
index 0000000..703317a
Binary files /dev/null and b/assets/introduction_animation/introduction_image.png differ
diff --git a/assets/introduction_animation/introduction_image1.png b/assets/introduction_animation/introduction_image1.png
new file mode 100644
index 0000000..d39b345
Binary files /dev/null and b/assets/introduction_animation/introduction_image1.png differ
diff --git a/assets/introduction_animation/mood_dairy_image.png b/assets/introduction_animation/mood_dairy_image.png
new file mode 100644
index 0000000..595a971
Binary files /dev/null and b/assets/introduction_animation/mood_dairy_image.png differ
diff --git a/assets/introduction_animation/relax_image.png b/assets/introduction_animation/relax_image.png
new file mode 100644
index 0000000..091c932
Binary files /dev/null and b/assets/introduction_animation/relax_image.png differ
diff --git a/assets/introduction_animation/welcome.png b/assets/introduction_animation/welcome.png
new file mode 100644
index 0000000..c980acd
Binary files /dev/null and b/assets/introduction_animation/welcome.png differ
diff --git a/assets/medicalinsightform.json b/assets/medicalinsightform.json
new file mode 100644
index 0000000..76af1c9
--- /dev/null
+++ b/assets/medicalinsightform.json
@@ -0,0 +1,184 @@
+{
+ "data": [
+ {
+ "id": "MedInsight",
+ "name": "Medical Insights Form",
+ "form-fields": [
+ {
+ "sectionName": "Medical Insight",
+ "multiple": false,
+ "sectionList": [
+ {
+ "name": "HCP Name",
+ "id": "hcpname",
+ "depid": "",
+ "widget": "label",
+ "input": "label",
+ "validation": {
+ "isRequired": false
+ }
+ },
+ {
+ "name": "Date",
+ "id": "date",
+ "depid": "",
+ "widget": "text",
+ "input": "Date",
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Therapeutic Area",
+ "param": "therapeutic_area",
+ "id": "therapeutic",
+ "selectedValue": [],
+ "depid": "",
+ "widget": "dropdown",
+ "input": "dropdown",
+ "inputList": [
+ {
+ "id": "Acute Neurology1",
+ "name": "Acute Neurology1"
+ },
+ {
+ "id": "Cystic Fibrosis",
+ "name": "Cystic Fibrosis"
+ }
+ ],
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Product",
+ "id": "product",
+ "depid": "therapeutic",
+ "widget": "dropdown",
+ "input": "dropdown",
+ "inputList": [
+ {
+ "id": "Prometra Pump",
+ "pid": "Acute Neurology1",
+ "name": "Prometra Pump"
+ },
+ {
+ "id": "Prometra Pump",
+ "pid": "Cystic Fibrosis",
+ "name": "Prometra Pump"
+ },
+ {
+ "id": "Prometra Catheter",
+ "pid": "Cystic Fibrosis",
+ "name": "Prometra Catheter"
+ }
+ ],
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Source Type",
+ "id": "sourcetype",
+ "depid": "",
+ "widget": "dropdown",
+ "input": "dropdown",
+ "inputList": [
+ {
+ "id": "Advisory Board/Expert Committee",
+ "name": "Advisory Board/Expert Committee"
+ },
+ {
+ "id": "Congress",
+ "name": "Congress"
+ },
+ {
+ "id": "Industry professional direct knowledge ",
+ "name": "Industry professional direct knowledge "
+ }
+ ],
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Congress Source",
+ "id": "congresssource",
+ "depid": "sourcetype",
+ "widget": "dropdown",
+ "input": "dropdown",
+ "inputList": [
+ {
+ "id": "Industry professional",
+ "pid": "Congress",
+ "name": "Industry professional"
+ },
+ {
+ "id": "Symposium",
+ "pid": "Congress",
+ "name": "Symposium"
+ }
+
+ ],
+ "validation": {
+ "isRequired": false
+ }
+ },
+ {
+ "name": "Congress Name",
+ "id": "congressName",
+ "depid": "sourcetype",
+ "widget": "text",
+ "input": "text",
+ "validation": {
+ "isRequired": false
+ }
+ }
+ ]
+ },
+ {
+ "sectionName": "Key Insight Topics",
+ "multiple": false,
+ "sectionList": [
+ {
+ "name": "Key Insight Topics",
+ "id": "keyinsighttopics",
+ "depid": "",
+ "param": "keyinsighttopics",
+ "widget": "dropdown",
+ "input": "dropdown",
+ "inputList": [
+ {
+ "id": "Data Gap",
+ "name": "Data Gap"
+ }
+
+ ],
+ "validation": {
+ "isRequired": true
+ }
+ }
+ ]
+ },
+ {
+ "sectionName": "Medical Insights Details",
+ "multiple": false,
+ "sectionList": [
+ {
+ "name": "Medical Insight Summary",
+ "id": "summary",
+ "depid": "",
+ "widget": "text",
+ "input": "textArea",
+ "validation": {
+ "isRequired": true,
+ "maxchars": "300"
+ }
+ }
+
+ ]
+ }
+ ]
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/assets/sarepta_medicalinsights.json b/assets/sarepta_medicalinsights.json
new file mode 100644
index 0000000..30ae302
--- /dev/null
+++ b/assets/sarepta_medicalinsights.json
@@ -0,0 +1,216 @@
+{
+ "data": [
+ {
+ "id": "MedInsight",
+ "name": "Medical Insights Form",
+ "form-fields": [
+ {
+ "sectionName": "Medical Insight",
+ "multiple": false,
+ "sectionList": [
+ {
+ "name": "HCP Name",
+ "id": "hcpname",
+ "depid": "",
+ "widget": "label",
+ "input": "label",
+ "validation": {
+ "isRequired": false
+ }
+ },
+ {
+ "name": "Date",
+ "id": "date",
+ "depid": "",
+ "widget": "text",
+ "input": "Date",
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Therapeutic Area",
+ "param": "therapeutic_area",
+ "id": "therapeutic",
+ "selectedValue": [],
+ "depid": "",
+ "widget": "dropdown",
+ "input": "dropdown",
+ "inputList": [
+ {
+ "id": "Acute Neurology1",
+ "name": "Acute Neurology1"
+ },
+ {
+ "id": "Cystic Fibrosis",
+ "name": "Cystic Fibrosis"
+ }
+ ],
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Product",
+ "id": "product",
+ "depid": "therapeutic",
+ "widget": "dropdown",
+ "input": "dropdown",
+ "inputList": [
+ {
+ "id": "Prometra Pump",
+ "pid": "Acute Neurology1",
+ "name": "Prometra Pump"
+ },
+ {
+ "id": "Prometra Pump",
+ "pid": "Cystic Fibrosis",
+ "name": "Prometra Pump"
+ },
+ {
+ "id": "Prometra Catheter",
+ "pid": "Cystic Fibrosis",
+ "name": "Prometra Catheter"
+ }
+ ],
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Source Type",
+ "id": "sourcetype",
+ "depid": "",
+ "widget": "dropdown",
+ "input": "dropdown",
+ "inputList": [
+ {
+ "id": "Advisory Board/Expert Committee",
+ "name": "Advisory Board/Expert Committee"
+ },
+ {
+ "id": "Congress",
+ "name": "Congress"
+ },
+ {
+ "id": "Industry professional direct knowledge ",
+ "name": "Industry professional direct knowledge "
+ }
+ ],
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Congress Source",
+ "id": "congresssource",
+ "depid": "sourcetype",
+ "widget": "dropdown",
+ "input": "dropdown",
+ "inputList": [
+ {
+ "id": "Industry professional",
+ "pid": "Congress",
+ "name": "Industry professional"
+ },
+ {
+ "id": "Symposium",
+ "pid": "Congress",
+ "name": "Symposium"
+ }
+
+ ],
+ "validation": {
+ "isRequired": false
+ }
+ },
+ {
+ "name": "Congress Name",
+ "id": "congressName",
+ "depid": "sourcetype",
+ "widget": "text",
+ "input": "text",
+ "validation": {
+ "isRequired": false
+ }
+ }
+ ]
+ },
+
+ {
+ "sectionName": "Medical Insights Details",
+ "multiple": false,
+ "sectionList": [
+ {
+ "name": "Key Insight Topics",
+ "id": "keyinsighttopics",
+ "depid": "",
+ "param": "keyinsighttopics",
+ "widget": "multiselect",
+ "input": "multiselect",
+ "inputList": [
+ {
+ "id": "Data Gap",
+ "name": "Data Gap"
+ }
+
+ ],
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Medical Insight Summary",
+ "id": "summary",
+ "depid": "",
+ "widget": "text",
+ "input": "textArea",
+ "validation": {
+ "isRequired": true,
+ "maxchars": "300"
+ }
+ }
+
+ ]
+ },
+ {
+ "sectionName": "Attach Document(s)",
+ "multiple": true,
+ "sectionList": [
+ {
+ "name": "Document Name",
+ "id": "documentName_21",
+ "depid": "",
+ "widget": "text",
+ "input": "text",
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Description",
+ "id": "documentDescription_21",
+ "depid": "",
+ "widget": "text",
+ "input": "text",
+ "validation": {
+ "isRequired": true
+ }
+ },
+ {
+ "name": "Choose file",
+ "id": "chooseFile_22",
+ "depid": "",
+ "widget": "button",
+ "input": "chooseFile",
+ "validation": {
+ "isRequired": true,
+ "multipleFiles": true
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index eedaa08..a7979f8 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -3,9 +3,7 @@ PODS:
- Flutter
- connectivity_plus (0.0.1):
- Flutter
- - ReachabilitySwift
- - device_info_plus (0.0.1):
- - Flutter
+ - FlutterMacOS
- DKImagePickerController/Core (4.3.4):
- DKImagePickerController/ImageDataManager
- DKImagePickerController/Resource
@@ -94,7 +92,7 @@ PODS:
- mobile_device_identifier (0.0.1):
- Flutter
- JNKeychain
- - package_info_plus (0.4.5):
+ - open_file (0.0.1):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
@@ -102,31 +100,33 @@ PODS:
- permission_handler_apple (9.3.0):
- Flutter
- PromisesObjC (2.4.0)
- - ReachabilitySwift (5.0.0)
- SDWebImage (5.18.10):
- SDWebImage/Core (= 5.18.10)
- SDWebImage/Core (5.18.10)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
+ - sqflite (0.0.3):
+ - Flutter
+ - FlutterMacOS
- SwiftyGif (5.4.4)
- url_launcher_ios (0.0.1):
- Flutter
DEPENDENCIES:
- add_2_calendar (from `.symlinks/plugins/add_2_calendar/ios`)
- - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
+ - connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_remote_config (from `.symlinks/plugins/firebase_remote_config/ios`)
- Flutter (from `Flutter`)
- 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`)
+ - open_file (from `.symlinks/plugins/open_file/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
+ - sqflite (from `.symlinks/plugins/sqflite/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
SPEC REPOS:
@@ -144,7 +144,6 @@ SPEC REPOS:
- GoogleUtilities
- JNKeychain
- PromisesObjC
- - ReachabilitySwift
- SDWebImage
- SwiftyGif
@@ -152,9 +151,7 @@ EXTERNAL SOURCES:
add_2_calendar:
:path: ".symlinks/plugins/add_2_calendar/ios"
connectivity_plus:
- :path: ".symlinks/plugins/connectivity_plus/ios"
- device_info_plus:
- :path: ".symlinks/plugins/device_info_plus/ios"
+ :path: ".symlinks/plugins/connectivity_plus/darwin"
file_picker:
:path: ".symlinks/plugins/file_picker/ios"
firebase_core:
@@ -167,24 +164,25 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/image_picker_ios/ios"
mobile_device_identifier:
:path: ".symlinks/plugins/mobile_device_identifier/ios"
- package_info_plus:
- :path: ".symlinks/plugins/package_info_plus/ios"
+ open_file:
+ :path: ".symlinks/plugins/open_file/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
+ sqflite:
+ :path: ".symlinks/plugins/sqflite/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
SPEC CHECKSUMS:
add_2_calendar: 5eee66d5a3b99cd5e1487a7e03abd4e3ac4aff11
- connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e
- device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
+ connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
- file_picker: 15fd9539e4eb735dc54bae8c0534a7a9511a03de
+ file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
Firebase: 0312a2352584f782ea56f66d91606891d4607f06
firebase_core: 0b39f4f424e02eecabb2356ddf331fa07b772af8
firebase_remote_config: f57c28ff78d1d933bbe1b2cc11659cc82f9978e8
@@ -200,13 +198,13 @@ SPEC CHECKSUMS:
image_picker_ios: b545a5f16c0fa88e3ecbbce3ed4de45567a8ec18
JNKeychain: fb6cc9ec95959ba46cd95d0ee6f7a05e41da9f42
mobile_device_identifier: 34f80c8985bb1506880c2ae10cb24cfb9918f1a7
- package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
+ open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
- ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
SDWebImage: fc8f2d48bbfd72ef39d70e981bd24a3f3be53fec
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
+ sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 0f1ee7f..05fec41 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -668,6 +668,8 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
+ CODE_SIGN_IDENTITY = "Apple Development";
+ CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 69ERN967NS;
ENABLE_BITCODE = NO;
@@ -678,6 +680,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.konectarEvents;
PRODUCT_NAME = "$(TARGET_NAME)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
diff --git a/lib/contacts_module/ui_screen/interactionform/configprovider.dart b/lib/contacts_module/ui_screen/interactionform/configprovider.dart
index b6e79d2..f7ce8a7 100644
--- a/lib/contacts_module/ui_screen/interactionform/configprovider.dart
+++ b/lib/contacts_module/ui_screen/interactionform/configprovider.dart
@@ -3,6 +3,9 @@
// import 'package:konectar_events/ui_screen/interactionform/model/interaction_config_data.dart';
// import 'package:konectar_events/ui_screen/interactionform/model/interaction_data.dart';
// import 'package:konectar_events/ui_screen/interactionform/util.dart';
+import 'dart:convert';
+
+import 'package:flutter/services.dart';
import 'package:konectar_events/contacts_module/ui_screen/interactionform/NewtworkConnectivity.dart';
import 'package:konectar_events/contacts_module/ui_screen/interactionform/mockapi.dart';
import 'package:konectar_events/contacts_module/ui_screen/interactionform/model/interaction_config_data.dart';
@@ -151,6 +154,39 @@ class ConfigDataProvider extends ChangeNotifier {
notifyListeners();
}
+ Future initConfigUIDataMediccalInsight() async {
+ List interactionConfigData = [];
+ // interactionConfigData = await fetchInteactionConfigData();
+ //interactionConfigData = fetchInteactionUIConfigData(jsonResult);
+
+ NetworkConnectivity networkConnectivity = NetworkConnectivity();
+ bool isOnline = await networkConnectivity.isInternetAvailable();
+ if (isOnline) {
+ // if (await InternetConnectionChecker().hasConnection) {
+ interactionConfigData = await fetchLocalMedicalInsight();
+ var box = Hive.box('InteractionConfigDataBox');
+
+ if (!box.isOpen) {
+ box = await Hive.openBox(
+ 'InteractionConfigDataBox');
+ }
+
+ if (box.isEmpty) {
+ for (InteractionConfigData data in interactionConfigData) {
+ box.put(await getNextAutoIncrementValue(), data);
+ }
+ } else {
+ box.clear();
+ print("IamELse");
+
+ for (InteractionConfigData data in interactionConfigData) {
+ box.put(await getNextAutoIncrementValue(), data);
+ }
+ }
+ }
+ notifyListeners();
+ }
+
Future>
fetchLocalInteactionConfigDataMedical() async {
// dynamic jsonResult = jsonDecode(
@@ -171,6 +207,25 @@ class ConfigDataProvider extends ChangeNotifier {
return interactionConfigData;
}
+ Future> fetchLocalMedicalInsight() async {
+ dynamic jsonResult = jsonDecode(
+ await rootBundle.loadString("assets/sarepta_medicalinsights.json"));
+ //dynamic jsonResult = await MockApiCall().getConfigDataMedical();
+
+ List interactionConfigData = [];
+
+ ResponseData responseData = ResponseDataFromJson(jsonResult);
+ print('Response_data_is: $responseData');
+ print('Response_data_dta_is: ${responseData.data}');
+
+ for (InteractionResultData obj in responseData.data) {
+ interactionConfigData
+ .add(InteractionConfigData(widgets: obj, id: obj.id, name: obj.name));
+ }
+ print("interactionConfigData_issss: ${interactionConfigData.length}");
+ return interactionConfigData;
+ }
+
Future initConfigUIDataEng() async {
List interactionConfigData = [];
// interactionConfigData = await fetchInteactionConfigData();
diff --git a/lib/contacts_module/ui_screen/interactionform/interaction_screen.dart b/lib/contacts_module/ui_screen/interactionform/interaction_screen.dart
index a7f47e5..b7a813a 100644
--- a/lib/contacts_module/ui_screen/interactionform/interaction_screen.dart
+++ b/lib/contacts_module/ui_screen/interactionform/interaction_screen.dart
@@ -560,11 +560,12 @@ class _InteractionScreenState extends State {
),
),
);
- case InteractionWidget.DROPDOWN:
- // return customdropdown(sectionItem, provider, list, multiple);
- return customAutoCompletedropdown(
- sectionItem, provider, list, multiple);
+ case InteractionWidget.DROPDOWN:
+ return customdropdown(sectionItem, provider, list, multiple);
+
+ // return customAutoCompletedropdown(
+ // sectionItem, provider, list, multiple);
}
}
@@ -671,7 +672,7 @@ class _InteractionScreenState extends State {
backgroundColor: Colors.green.shade500,
onPressed: () async {
String record =
- await provider.saveJsonObject(context, widget.form);
+ await provider.saveJsonObject(context, widget.form, "hc");
print("Validation_isss: ${provider.isLoading}");
diff --git a/lib/contacts_module/ui_screen/interactionform/interactionprovider.dart b/lib/contacts_module/ui_screen/interactionform/interactionprovider.dart
index 51ffe72..7dce420 100644
--- a/lib/contacts_module/ui_screen/interactionform/interactionprovider.dart
+++ b/lib/contacts_module/ui_screen/interactionform/interactionprovider.dart
@@ -1496,7 +1496,8 @@ class InteractionProvider extends ChangeNotifier {
return false;
}
- Future saveJsonObject(BuildContext context, String form,
+ Future saveJsonObject(
+ BuildContext context, String form, String? title,
{bool isEdit = false}) async {
print("form_data: $form");
// for (var ob in interactionReponseList) {
@@ -1562,6 +1563,7 @@ class InteractionProvider extends ChangeNotifier {
id: generateId,
updatedTime: DateTime.now().toString(),
form: form,
+ hcp: title,
intId: intId ?? "id",
intName: intName ?? "name");
var box = Hive.box('InteractionDataBox');
diff --git a/lib/contacts_module/ui_screen/interactionform/model/save_interaction.dart b/lib/contacts_module/ui_screen/interactionform/model/save_interaction.dart
index e34b857..a646c7c 100644
--- a/lib/contacts_module/ui_screen/interactionform/model/save_interaction.dart
+++ b/lib/contacts_module/ui_screen/interactionform/model/save_interaction.dart
@@ -38,6 +38,8 @@ class SaveInteraction {
String intId;
@HiveField(5)
String intName;
+ @HiveField(6)
+ String? hcp;
SaveInteraction(
{required this.save,
@@ -45,6 +47,7 @@ class SaveInteraction {
this.form,
this.updatedTime,
required this.intId,
+ this.hcp,
required this.intName});
factory SaveInteraction.fromJson(Map json) =>
@@ -53,6 +56,7 @@ class SaveInteraction {
json["save"].map((x) => SaveData.fromJson(x))),
intId: 'intId',
intName: 'intName',
+ hcp: 'hcp',
id: 'id');
Map toJson() => {
@@ -62,6 +66,7 @@ class SaveInteraction {
Map savetoJson() => {
"form": form,
"intId": intId,
+ "hcp": hcp,
};
@override
diff --git a/lib/contacts_module/ui_screen/interactionform/model/save_interaction.g.dart b/lib/contacts_module/ui_screen/interactionform/model/save_interaction.g.dart
index fb41995..83bfdb7 100644
--- a/lib/contacts_module/ui_screen/interactionform/model/save_interaction.g.dart
+++ b/lib/contacts_module/ui_screen/interactionform/model/save_interaction.g.dart
@@ -22,6 +22,7 @@ class SaveInteractionAdapter extends TypeAdapter {
form: fields[2] as String?,
updatedTime: fields[3] as String?,
intId: fields[4] as String,
+ hcp: fields[6] as String?,
intName: fields[5] as String,
);
}
@@ -29,7 +30,7 @@ class SaveInteractionAdapter extends TypeAdapter {
@override
void write(BinaryWriter writer, SaveInteraction obj) {
writer
- ..writeByte(6)
+ ..writeByte(7)
..writeByte(0)
..write(obj.id)
..writeByte(1)
@@ -41,7 +42,9 @@ class SaveInteractionAdapter extends TypeAdapter {
..writeByte(4)
..write(obj.intId)
..writeByte(5)
- ..write(obj.intName);
+ ..write(obj.intName)
+ ..writeByte(6)
+ ..write(obj.hcp);
}
@override
diff --git a/lib/contacts_module/ui_screen/interactionform/new_dynamicform.dart b/lib/contacts_module/ui_screen/interactionform/new_dynamicform.dart
index 75ff031..0f28f25 100644
--- a/lib/contacts_module/ui_screen/interactionform/new_dynamicform.dart
+++ b/lib/contacts_module/ui_screen/interactionform/new_dynamicform.dart
@@ -5,6 +5,7 @@ import 'package:konectar_events/contacts_module/constants.dart';
import 'package:konectar_events/contacts_module/ui_screen/interactionform/interactionprovider.dart';
import 'package:konectar_events/contacts_module/ui_screen/interactionform/model/interaction_data.dart';
import 'package:konectar_events/contacts_module/ui_screen/interactionform/util.dart';
+import 'package:konectar_events/contacts_module/ui_screen/interactionform/viewinteractionprovider.dart';
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/custombutton.dart';
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/customrangeslider.dart';
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/responsive_ext.dart';
@@ -34,7 +35,9 @@ import 'widget/interatciontextfield.dart';
class InteractionScreen1 extends StatefulWidget {
int index;
String form;
- InteractionScreen1({super.key, required this.index, required this.form});
+ String? title;
+ InteractionScreen1(
+ {super.key, required this.index, required this.form, this.title});
@override
State createState() => _InteractionScreen1State();
@@ -119,10 +122,11 @@ class _InteractionScreen1State extends State {
child: Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
- title: const FittedBox(
+ backgroundColor: Constants.k2color,
+ title: FittedBox(
fit: BoxFit.scaleDown,
child: Text(
- 'Record New Interaction',
+ widget.title ?? 'Record New Interaction',
style: TextStyle(color: Colors.white, fontSize: 18.0),
),
),
@@ -316,7 +320,7 @@ class _InteractionScreen1State extends State {
: 4.8
: isTablet
? 2.8
- : 4.5,
+ : 5.5,
children: List.generate(
sectionList.length,
@@ -484,7 +488,9 @@ class _InteractionScreen1State extends State {
onPressed: () async {
String record =
await provider.saveJsonObject(
- context, widget.form);
+ context,
+ widget.form,
+ widget.title);
print(
"Validation_isss: ${provider.isLoading}");
@@ -618,7 +624,14 @@ class _InteractionScreen1State extends State {
: buildRadio(sectionItem, provider);
case InteractionWidget.LABEL:
- return Text(sectionItem.input!);
+ sectionItem.selectedValue!.add(widget.title ?? "NA");
+ return Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Text(
+ "${widget.title}",
+ style: TextStyle(fontSize: 18),
+ ),
+ );
case InteractionWidget.RANGESLIDER:
return CustomRangeSlider(
@@ -687,8 +700,8 @@ class _InteractionScreen1State extends State {
// maxchars: int.parse(sectionItem.validation!.chars ?? "0"),
controller: sectionItem.controller!,
labelText: sectionItem.name,
- // maxlines: 8,
- //minlines: 4,
+ maxlines: 8,
+ minlines: 8,
onChanged: (val) {
sectionItem.selectedValue = [];
setState(() {});
@@ -997,10 +1010,10 @@ class _InteractionScreen1State extends State {
),
);
case InteractionWidget.DROPDOWN:
- // return customdropdown(sectionItem, provider, list, multiple);
+ return customdropdown(sectionItem, provider, list, multiple);
- return customAutoCompletedropdown(
- sectionItem, provider, list, multiple);
+ // return customAutoCompletedropdown(
+ // sectionItem, provider, list, multiple);
}
}
@@ -1015,11 +1028,13 @@ class _InteractionScreen1State extends State {
}
Widget buildDateWidget(SectionList sectionItem) {
+ // sectionItem.controller!.text =
+ // DateFormat('yyyy-MM-dd').format(DateTime.now());
return Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: SizedBox(
// width: isTablet ? 200 : MediaQuery.of(context).size.width,
- // height: isTablet ? 50 : 40,
+ height: isTablet ? 50 : 40,
width: MediaQuery.of(context).size.width,
child: TextField(
controller:
@@ -1106,8 +1121,8 @@ class _InteractionScreen1State extends State {
child: CustomButton(
backgroundColor: Colors.green.shade500,
onPressed: () async {
- String record =
- await provider.saveJsonObject(context, widget.form);
+ String record = await provider.saveJsonObject(
+ context, widget.form, widget.title);
print("Validation_isss: ${provider.isLoading}");
@@ -1843,6 +1858,8 @@ class _InteractionScreen1State extends State {
Widget cancelButton = TextButton(
child: const Text("Ok"),
onPressed: () async {
+ await Provider.of(context, listen: false)
+ .getRecords(widget.form, hcp: widget.title ?? "");
Navigator.of(context).pop();
Navigator.of(context).pop();
},
diff --git a/lib/contacts_module/ui_screen/interactionform/view_interaction_screen.dart b/lib/contacts_module/ui_screen/interactionform/view_interaction_screen.dart
index 8e4afc2..2deaa2e 100644
--- a/lib/contacts_module/ui_screen/interactionform/view_interaction_screen.dart
+++ b/lib/contacts_module/ui_screen/interactionform/view_interaction_screen.dart
@@ -300,7 +300,7 @@ class _ViewInteractionScreenState extends State {
sectionItem.id, sectionItem.selectedValue!.last));
case InteractionWidget.LABEL:
- return Text(sectionItem.input!);
+ return Text(sectionItem.selectedValue!.last.toString());
case InteractionWidget.RANGESLIDER:
return Text(sectionItem.selectedValue!.isNotEmpty
diff --git a/lib/contacts_module/ui_screen/interactionform/viewinteractionprovider.dart b/lib/contacts_module/ui_screen/interactionform/viewinteractionprovider.dart
index 03b50ee..8f71e9c 100644
--- a/lib/contacts_module/ui_screen/interactionform/viewinteractionprovider.dart
+++ b/lib/contacts_module/ui_screen/interactionform/viewinteractionprovider.dart
@@ -61,13 +61,13 @@ class ViewInteractionProvider extends ChangeNotifier {
notifyListeners();
}
- Future getRecords(String formname) async {
+ Future getRecords(String formname, {String? hcp}) async {
var box = await Hive.openBox('InteractionDataBox');
savedList = box.values.toList();
savedList = savedList
- .where(
- (element) => element.form == formname,
- )
+ .where((element) => element.form == formname && element.hcp != null
+ ? element.hcp == hcp
+ : element.form == formname)
.toList();
notifyListeners();
}
diff --git a/lib/contacts_module/ui_screen/new_editinteraction.dart b/lib/contacts_module/ui_screen/new_editinteraction.dart
index e4183b7..825eb8a 100644
--- a/lib/contacts_module/ui_screen/new_editinteraction.dart
+++ b/lib/contacts_module/ui_screen/new_editinteraction.dart
@@ -122,6 +122,7 @@ class _EditInteractionScreenState extends State {
return SafeArea(
child: Scaffold(
appBar: AppBar(
+ backgroundColor: Constants.k2color,
title: Text(
widget.saveInteraction.id,
style: TextStyle(
@@ -258,7 +259,7 @@ class _EditInteractionScreenState extends State {
: 4.8
: isTablet
? 2.8
- : 3.5,
+ : 4.5,
children: List.generate(
sectionList.length,
(i) {
@@ -474,7 +475,13 @@ class _EditInteractionScreenState extends State {
: buildRadio(sectionItem, provider);
case InteractionWidget.LABEL:
- return Text(sectionItem.input!);
+ return Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Text(
+ sectionItem.selectedValue!.last.toString(),
+ style: TextStyle(fontSize: 18),
+ ),
+ );
case InteractionWidget.RANGESLIDER:
return CustomRangeSlider(
@@ -579,10 +586,10 @@ class _EditInteractionScreenState extends State {
),
);
case InteractionWidget.DROPDOWN:
- // return customdropdown(sectionItem, provider, list, multiple);
+ return customdropdown(sectionItem, provider, list, multiple);
- return customAutoCompletedropdown(
- sectionItem, provider, list, multiple);
+ // return customAutoCompletedropdown(
+ // sectionItem, provider, list, multiple);
}
}
@@ -593,7 +600,7 @@ class _EditInteractionScreenState extends State {
// width: isTablet ? 200 : MediaQuery.of(context).size.width,
width: MediaQuery.of(context).size.width,
- // height: isTablet ? 50 : 40,
+ height: isTablet ? 50 : 40,
child: TextField(
controller:
sectionItem.controller, //editing controller of this TextField
@@ -764,13 +771,17 @@ class _EditInteractionScreenState extends State {
// sectionItem.value = '';
// print("%%%%${sectionItem.selectedValue!.last}");
print("ItemList_is: $list");
+ // if (list.isEmpty) {
+ // print("###list empty###");
+ // list = [];
+ // InputClass inputClass =
+ // InputClass(id: "no value", name: "Select ${sectionItem.name}");
+ // list.add(inputClass);
+ // sectionItem.selectedObject = list[0];
+ // }
+
if (list.isEmpty) {
- print("###list empty###");
- list = [];
- InputClass inputClass =
- InputClass(id: "no value", name: "Select ${sectionItem.name}");
- list.add(inputClass);
- sectionItem.selectedObject = list[0];
+ list = sectionItem.inputList!;
}
// InputClass selectedObj = list[0];
return Padding(
diff --git a/lib/contacts_module/ui_screen/new_viewinteraction.dart b/lib/contacts_module/ui_screen/new_viewinteraction.dart
index 1d63cc4..f1917a0 100644
--- a/lib/contacts_module/ui_screen/new_viewinteraction.dart
+++ b/lib/contacts_module/ui_screen/new_viewinteraction.dart
@@ -63,6 +63,7 @@ class _ViewInteractionScreenState extends State {
backgroundColor: Colors.white,
//resizeToAvoidBottomInset: false,
appBar: AppBar(
+ backgroundColor: Constants.k2color,
title: Text(
widget.saveInteraction.id,
style: TextStyle(
@@ -320,7 +321,7 @@ class _ViewInteractionScreenState extends State {
case InteractionWidget.LABEL:
return Text(
- sectionItem.input!,
+ sectionItem.selectedValue!.last.toString(),
style: TextStyle(fontSize: 18.0),
);
diff --git a/lib/main.dart b/lib/main.dart
index 48f16fb..24ca5f0 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
+import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:dio/dio.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_remote_config/firebase_remote_config.dart';
@@ -70,10 +71,12 @@ import 'package:konectar_events/model/userdata_model.dart';
import 'package:konectar_events/utils/sessionmanager.dart';
import 'package:konectar_events/view/home.dart';
import 'package:konectar_events/view/login.dart';
+import 'package:konectar_events/view/login_components/intropaging.dart';
import 'package:konectar_events/view/navigation_home_screen.dart';
import 'package:konectar_events/viewmodel/eventsprovider.dart';
import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
import 'package:konectar_events/viewmodel/loginprovider.dart';
+import 'package:overlay_support/overlay_support.dart';
import 'package:provider/provider.dart';
@@ -190,11 +193,25 @@ Future main() async {
// userInfo = await credential!.getUserInfo();
//runApp(const MyApp());
// activateTimer();
- SharedPreferences.getInstance().then((instance) async {
+ SharedPreferences.getInstance().then((instance) {
//StorageService().sharedPreferencesInstance = instance;
bool isloggedIn = instance.getBool('isloggedin') ?? false;
- String secretkey = instance.getString('secretkey') ?? "";
+ print("checkhere before:$isloggedIn");
+ String secretkey = instance.getString('secretkey') ?? "";
+ OverlaySupportEntry entry;
+ Connectivity().onConnectivityChanged.listen((event) {
+ print("CHECK INTERNET");
+ print(event);
+ if (event.toString().contains("ConnectivityResult.none")) {
+ entry = showOverlayNotification((context) {
+ return Text("this is a message from simple notification");
+ }, duration: Duration(hours: 1));
+ }
+ });
+ OverlaySupport overlaySupport = OverlaySupport.global(
+ child: Text("ONLINE"),
+ );
runApp(
MultiProvider(
providers: [
@@ -242,32 +259,38 @@ Future main() async {
],
child: SafeArea(
top: true,
- child: MaterialApp(
- theme: ThemeData(
- fontFamily: "OpenSans",
+ child: new OverlaySupport.global(
+ toastTheme: ToastThemeData(background: Colors.green),
+ child: MaterialApp(
+ theme: ThemeData(
+ //fontFamily: "SourceSerif",
+ ),
+ debugShowCheckedModeBanner: false,
+ title: 'Dynamic Links Example',
+ initialRoute: '/',
+ routes: {
+ '/': (BuildContext context) => FutureBuilder(
+ future: SessionManager().isLoggedIn(),
+ builder: (context, snapshot) {
+ print("Data_is : $snapshot");
+ if (snapshot.connectionState ==
+ ConnectionState.waiting) {
+ return const CircularProgressIndicator();
+ } else if (snapshot.hasError) {
+ return Text('Error: ${snapshot.error}');
+ } else {
+ final isLoggedIn = snapshot.data ?? false;
+ print("isLoggedIn_is : $isLoggedIn");
+ print("secret : $secretkey");
+ return isLoggedIn
+ ? IntroductionAnimationScreen()
+ : IntroductionAnimationScreen();
+ }
+ },
+ ), //userInfo != null ? const Home() : OpenidScreen(credential: credential,),
+ // '/details': (BuildContext context) => const HomeScreen(),
+ },
),
- debugShowCheckedModeBanner: false,
- title: 'Dynamic Links Example',
- initialRoute: '/',
- routes: {
- '/': (BuildContext context) => FutureBuilder(
- future: SessionManager().isLoggedIn(),
- builder: (context, snapshot) {
- print("Data_is : $snapshot");
- if (snapshot.connectionState == ConnectionState.waiting) {
- return const CircularProgressIndicator();
- } else if (snapshot.hasError) {
- return Text('Error: ${snapshot.error}');
- } else {
- final isLoggedIn = snapshot.data ?? false;
- print("isLoggedIn_is : $isLoggedIn");
- print("secret : $secretkey");
- return isLoggedIn ? MyApp() : LoginScreen();
- }
- },
- ), //userInfo != null ? const Home() : OpenidScreen(credential: credential,),
- // '/details': (BuildContext context) => const HomeScreen(),
- },
),
),
),
@@ -275,7 +298,27 @@ Future main() async {
});
}
-class MyApp extends StatelessWidget {
+class MyApp extends StatefulWidget {
+ @override
+ _MyAppState createState() => _MyAppState();
+}
+
+class _MyAppState extends State {
+ @override
+ void initState() {
+ OverlaySupportEntry entry;
+ Connectivity().onConnectivityChanged.listen((event) {
+ print("CHECK INTERNET");
+ print(event);
+ if (event.toString().contains("ConnectivityResult.wifi")) {
+ entry = showOverlayNotification((context) {
+ return Text("this is a message from simple notification");
+ }, duration: Duration(hours: 1));
+ }
+ });
+ super.initState();
+ }
+
@override
Widget build(BuildContext context) {
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
@@ -287,15 +330,55 @@ class MyApp extends StatelessWidget {
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(),
+ return OverlaySupport(
+ child: MaterialApp(
+ title: 'Flutter UI',
+ debugShowCheckedModeBanner: false,
+ // theme: ThemeData(
+ // primarySwatch: Colors.blue,
+ // textTheme: AppTheme.textTheme,
+ // platform: TargetPlatform.iOS,
+ // ),
+ home: NavigationHomeScreen(),
+ ),
);
}
+
+ @override
+ State createState() {
+ // TODO: implement createState
+ throw UnimplementedError();
+ }
}
+
+// class App extends StatefulWidget {
+// @override
+// _AppState createState() => _AppState();
+// }
+
+// class _AppState extends State {
+// @override
+// void initState() {
+// OverlaySupportEntry entry;
+// Connectivity().onConnectivityChanged.listen((event) {
+// print(event);
+// if (event.toString().contains("ConnectivityResult.none")) {
+// entry = showOverlayNotification((context) {
+// return Text("this is a message from simple notification");
+// }, duration: Duration(hours: 1));
+// }
+// });
+// super.initState();
+// }
+
+// @override
+// Widget build(BuildContext context) {
+// return OverlaySupport(
+// child: MaterialApp(
+// title: 'Network Checker App',
+// debugShowCheckedModeBanner: false,
+// home: Homepage(),
+// ),
+// );
+// }
+// }
diff --git a/lib/model/affiliationsmodel.dart b/lib/model/affiliationsmodel.dart
index 5e5b448..b590f60 100644
--- a/lib/model/affiliationsmodel.dart
+++ b/lib/model/affiliationsmodel.dart
@@ -47,24 +47,54 @@ class AffiliationsResp {
};
}
+List affiliationsFromJson(String str) => List.from(
+ json.decode(str).map((x) => Affiliations.fromJson(x)));
+
+String affiliationsToJson(List data) =>
+ json.encode(List.from(data.map((x) => x.toJson())));
+
class Affiliations {
- List affiliationNames;
- List affiliationCount;
+ String? id;
+ String? orgCount;
+ String? orgName;
Affiliations({
- required this.affiliationNames,
- required this.affiliationCount,
+ this.id,
+ this.orgCount,
+ this.orgName,
});
factory Affiliations.fromJson(Map json) => Affiliations(
- affiliationNames:
- List.from(json["affiliationNames"].map((x) => x)),
- affiliationCount:
- List.from(json["affiliationCount"].map((x) => x)),
+ id: json["id"],
+ orgCount: json["org_count"],
+ orgName: json["org_name"],
);
Map toJson() => {
- "affiliationNames": List.from(affiliationNames.map((x) => x)),
- "affiliationCount": List.from(affiliationCount.map((x) => x)),
+ "id": id,
+ "org_count": orgCount,
+ "org_name": orgName,
};
}
+
+// class Affiliations {
+// List affiliationNames;
+// List affiliationCount;
+
+// Affiliations({
+// required this.affiliationNames,
+// required this.affiliationCount,
+// });
+
+// factory Affiliations.fromJson(Map json) => Affiliations(
+// affiliationNames:
+// List.from(json["affiliationNames"].map((x) => x)),
+// affiliationCount:
+// List.from(json["affiliationCount"].map((x) => x)),
+// );
+
+// Map toJson() => {
+// "affiliationNames": List.from(affiliationNames.map((x) => x)),
+// "affiliationCount": List.from(affiliationCount.map((x) => x)),
+// };
+// }
diff --git a/lib/model/events_details.dart b/lib/model/events_details.dart
new file mode 100644
index 0000000..9667a3e
--- /dev/null
+++ b/lib/model/events_details.dart
@@ -0,0 +1,364 @@
+// To parse this JSON data, do
+//
+// final eventsOverviewDetails = eventsOverviewDetailsFromJson(jsonString);
+
+import 'dart:convert';
+
+import 'package:hive_flutter/hive_flutter.dart';
+import 'package:konectar_events/utils/hivetypeids.dart';
+part 'events_details.g.dart';
+
+EventsOverviewDetails eventsOverviewDetailsFromJson(String str) =>
+ EventsOverviewDetails.fromJson(json.decode(str));
+
+String eventsOverviewDetailsToJson(EventsOverviewDetails data) =>
+ json.encode(data.toJson());
+
+class EventsOverviewDetails {
+ EventsOverviewData? data;
+
+ EventsOverviewDetails({
+ this.data,
+ });
+
+ factory EventsOverviewDetails.fromJson(Map json) =>
+ EventsOverviewDetails(
+ data: json["data"] == null
+ ? null
+ : EventsOverviewData.fromJson(json["data"]),
+ );
+
+ Map toJson() => {
+ "data": data?.toJson(),
+ };
+}
+
+class EventsOverviewData {
+ int? projectKolAttendee;
+ bool? cal;
+ int? grid;
+ String? eventFor;
+ String? eventId;
+ List? topSpeakers;
+ dynamic eventTopics;
+ List? eventSponsers;
+ bool? eventUserAttendee;
+ bool? eventUserInterest;
+ List? arrEvents;
+ int? attendeeCount;
+
+ EventsOverviewData({
+ this.projectKolAttendee,
+ this.cal,
+ this.grid,
+ this.eventFor,
+ this.eventId,
+ this.topSpeakers,
+ this.eventTopics,
+ this.eventSponsers,
+ this.eventUserAttendee,
+ this.eventUserInterest,
+ this.arrEvents,
+ this.attendeeCount,
+ });
+
+ factory EventsOverviewData.fromJson(Map json) =>
+ EventsOverviewData(
+ projectKolAttendee: json["project_kol_attendee"],
+ cal: json["cal"],
+ grid: json["grid"],
+ eventFor: json["eventFor"],
+ eventId: json["eventId"],
+ topSpeakers: json["eventData"] == null
+ ? []
+ : List.from(
+ json["eventData"]!.map((x) => TopSpeakers.fromJson(x))),
+ eventTopics: json["eventTopics"],
+ eventSponsers: json["eventSponsers"] == null
+ ? []
+ : List.from(
+ json["eventSponsers"]!.map((x) => EventSponser.fromJson(x))),
+ eventUserAttendee: json["event_user_attendee"],
+ eventUserInterest: json["event_user_interest"],
+ arrEvents: json["arrEvents"] == null
+ ? []
+ : List.from(
+ json["arrEvents"]!.map((x) => ArrEvent.fromJson(x))),
+ attendeeCount: json["attendeeCount"],
+ );
+
+ Map toJson() => {
+ "project_kol_attendee": projectKolAttendee,
+ "cal": cal,
+ "grid": grid,
+ "eventFor": eventFor,
+ "eventId": eventId,
+ "eventData": topSpeakers == null
+ ? []
+ : List.from(topSpeakers!.map((x) => x.toJson())),
+ "eventTopics": eventTopics,
+ "eventSponsers": eventSponsers == null
+ ? []
+ : List.from(eventSponsers!.map((x) => x.toJson())),
+ "event_user_attendee": eventUserAttendee,
+ "event_user_interest": eventUserInterest,
+ "arrEvents": arrEvents == null
+ ? []
+ : List.from(arrEvents!.map((x) => x.toJson())),
+ "attendeeCount": attendeeCount,
+ };
+}
+
+class ArrEvent {
+ String? sponsorType;
+ String? sponsorTypeName;
+ String? id;
+ String? kolId;
+ String? type;
+ String? eventType;
+ String? eventId;
+ String? sessionType;
+ String? sessionName;
+ String? role;
+ dynamic 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;
+ dynamic eventTopic;
+ String? confSessionType;
+ String? region;
+ String? city;
+
+ ArrEvent({
+ this.sponsorType,
+ this.sponsorTypeName,
+ this.id,
+ this.kolId,
+ this.type,
+ this.eventType,
+ this.eventId,
+ this.sessionType,
+ this.sessionName,
+ this.role,
+ this.topic,
+ this.start,
+ this.end,
+ this.organizer,
+ this.sessionSponsor,
+ this.organizerType,
+ this.location,
+ this.address,
+ this.cityId,
+ this.stateId,
+ this.countryId,
+ this.postalCode,
+ this.subject,
+ this.url1,
+ this.url2,
+ this.notes,
+ this.createdBy,
+ this.createdOn,
+ this.modifiedBy,
+ this.modifiedOn,
+ this.clientId,
+ this.projectId,
+ this.activityType,
+ this.profileType,
+ this.globalEventId,
+ this.eventUniqueId,
+ this.name,
+ this.confEventType,
+ this.country,
+ this.eventTopic,
+ this.confSessionType,
+ this.region,
+ this.city,
+ });
+
+ factory ArrEvent.fromJson(Map 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: json["created_on"] == null
+ ? null
+ : DateTime.parse(json["created_on"]),
+ modifiedBy: json["modified_by"],
+ modifiedOn: json["modified_on"] == null
+ ? null
+ : 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 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,
+ };
+}
+
+@HiveType(typeId: HiveTypeIdConstants.topspeakersHiveId)
+class TopSpeakers {
+ @HiveField(0)
+ String? firstName;
+ @HiveField(1)
+ dynamic middleName;
+ @HiveField(2)
+ dynamic lastName;
+ @HiveField(3)
+ String? numSess;
+
+ TopSpeakers({
+ this.firstName,
+ this.middleName,
+ this.lastName,
+ this.numSess,
+ });
+
+ factory TopSpeakers.fromJson(Map json) => TopSpeakers(
+ firstName: json["first_name"],
+ middleName: json["middle_name"],
+ lastName: json["last_name"],
+ numSess: json["num_sess"],
+ );
+
+ Map toJson() => {
+ "first_name": firstName,
+ "middle_name": middleName,
+ "last_name": lastName,
+ "num_sess": numSess,
+ };
+}
+
+@HiveType(typeId: HiveTypeIdConstants.topSponsorsHiveId)
+class EventSponser {
+ @HiveField(0)
+ String? numSess;
+ @HiveField(1)
+ String? sessionSponsor;
+ @HiveField(2)
+ String? type;
+ @HiveField(3)
+ String? sponsorsType;
+
+ EventSponser({
+ this.numSess,
+ this.sessionSponsor,
+ this.type,
+ this.sponsorsType,
+ });
+
+ factory EventSponser.fromJson(Map json) => EventSponser(
+ numSess: json["num_sess"],
+ sessionSponsor: json["session_sponsor"],
+ type: json["type"],
+ sponsorsType: json["sponsors_type"],
+ );
+
+ Map toJson() => {
+ "num_sess": numSess,
+ "session_sponsor": sessionSponsor,
+ "type": type,
+ "sponsors_type": sponsorsType,
+ };
+}
diff --git a/lib/model/events_details.g.dart b/lib/model/events_details.g.dart
new file mode 100644
index 0000000..f8b8d80
--- /dev/null
+++ b/lib/model/events_details.g.dart
@@ -0,0 +1,93 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'events_details.dart';
+
+// **************************************************************************
+// TypeAdapterGenerator
+// **************************************************************************
+
+class TopSpeakersAdapter extends TypeAdapter {
+ @override
+ final int typeId = 103;
+
+ @override
+ TopSpeakers read(BinaryReader reader) {
+ final numOfFields = reader.readByte();
+ final fields = {
+ for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
+ };
+ return TopSpeakers(
+ firstName: fields[0] as String?,
+ middleName: fields[1] as dynamic,
+ lastName: fields[2] as dynamic,
+ numSess: fields[3] as String?,
+ );
+ }
+
+ @override
+ void write(BinaryWriter writer, TopSpeakers obj) {
+ writer
+ ..writeByte(4)
+ ..writeByte(0)
+ ..write(obj.firstName)
+ ..writeByte(1)
+ ..write(obj.middleName)
+ ..writeByte(2)
+ ..write(obj.lastName)
+ ..writeByte(3)
+ ..write(obj.numSess);
+ }
+
+ @override
+ int get hashCode => typeId.hashCode;
+
+ @override
+ bool operator ==(Object other) =>
+ identical(this, other) ||
+ other is TopSpeakersAdapter &&
+ runtimeType == other.runtimeType &&
+ typeId == other.typeId;
+}
+
+class EventSponserAdapter extends TypeAdapter {
+ @override
+ final int typeId = 104;
+
+ @override
+ EventSponser read(BinaryReader reader) {
+ final numOfFields = reader.readByte();
+ final fields = {
+ for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
+ };
+ return EventSponser(
+ numSess: fields[0] as String?,
+ sessionSponsor: fields[1] as String?,
+ type: fields[2] as String?,
+ sponsorsType: fields[3] as String?,
+ );
+ }
+
+ @override
+ void write(BinaryWriter writer, EventSponser obj) {
+ writer
+ ..writeByte(4)
+ ..writeByte(0)
+ ..write(obj.numSess)
+ ..writeByte(1)
+ ..write(obj.sessionSponsor)
+ ..writeByte(2)
+ ..write(obj.type)
+ ..writeByte(3)
+ ..write(obj.sponsorsType);
+ }
+
+ @override
+ int get hashCode => typeId.hashCode;
+
+ @override
+ bool operator ==(Object other) =>
+ identical(this, other) ||
+ other is EventSponserAdapter &&
+ runtimeType == other.runtimeType &&
+ typeId == other.typeId;
+}
diff --git a/lib/model/events_list_resp_2.dart b/lib/model/events_list_resp_2.dart
new file mode 100644
index 0000000..b2b1625
--- /dev/null
+++ b/lib/model/events_list_resp_2.dart
@@ -0,0 +1,219 @@
+class EventsListResp2 {
+ int? code;
+ String? message;
+ List? data;
+ int? lastPage;
+ int? lastRow;
+ int? count;
+
+ EventsListResp2(
+ {this.code,
+ this.message,
+ this.data,
+ this.lastPage,
+ this.lastRow,
+ this.count});
+
+ EventsListResp2.fromJson(Map json) {
+ if (json["code"] is int) {
+ code = json["code"];
+ }
+ if (json["message"] is String) {
+ message = json["message"];
+ }
+ if (json["data"] is List) {
+ data = json["data"] == null
+ ? null
+ : (json["data"] as List)
+ .map((e) => EventsListingData.fromJson(e))
+ .toList();
+ }
+ if (json["last_page"] is int) {
+ lastPage = json["last_page"];
+ }
+ if (json["last_row"] is int) {
+ lastRow = json["last_row"];
+ }
+ if (json["count"] is int) {
+ count = json["count"];
+ }
+ }
+
+ Map toJson() {
+ final Map _data = {};
+ _data["code"] = code;
+ _data["message"] = message;
+ if (data != null) {
+ _data["data"] = data?.map((e) => e.toJson()).toList();
+ }
+ _data["last_page"] = lastPage;
+ _data["last_row"] = lastRow;
+ _data["count"] = count;
+ return _data;
+ }
+}
+
+class EventsListingData {
+ String? uniqueId;
+ String? sessionName;
+ String? startDate;
+ String? endDate;
+ String? organizer;
+ String? sessionSponsor;
+ dynamic location;
+ dynamic address;
+ dynamic postalCode;
+ dynamic url;
+ String? activityType;
+ String? role;
+ String? eventTypeName;
+ String? countryName;
+ String? stateName;
+ String? cityName;
+ String? organizerTypeName;
+ String? sponsorTypeName;
+ String? sessionTypeName;
+ String? kolName;
+ dynamic kolUniqueId;
+ String? eventName;
+ String? eventUniqueId;
+ String? createdByUser;
+ String? updatedByUser;
+ String? formattedCreatedAt;
+ String? formattedUpdatedAt;
+
+ EventsListingData(
+ {this.uniqueId,
+ this.sessionName,
+ this.startDate,
+ this.endDate,
+ this.organizer,
+ this.sessionSponsor,
+ this.location,
+ this.address,
+ this.postalCode,
+ this.url,
+ this.activityType,
+ this.role,
+ this.eventTypeName,
+ this.countryName,
+ this.stateName,
+ this.cityName,
+ this.organizerTypeName,
+ this.sponsorTypeName,
+ this.sessionTypeName,
+ this.kolName,
+ this.kolUniqueId,
+ this.eventName,
+ this.eventUniqueId,
+ this.createdByUser,
+ this.updatedByUser,
+ this.formattedCreatedAt,
+ this.formattedUpdatedAt});
+
+ EventsListingData.fromJson(Map json) {
+ if (json["unique_id"] is String) {
+ uniqueId = json["unique_id"];
+ }
+ if (json["session_name"] is String) {
+ sessionName = json["session_name"];
+ }
+ if (json["start_date"] is String) {
+ startDate = json["start_date"];
+ }
+ if (json["end_date"] is String) {
+ endDate = json["end_date"];
+ }
+ if (json["organizer"] is String) {
+ organizer = json["organizer"];
+ }
+ if (json["session_sponsor"] is String) {
+ sessionSponsor = json["session_sponsor"];
+ }
+ location = json["location"];
+ address = json["address"];
+ postalCode = json["postal_code"];
+ url = json["url"];
+ if (json["activity_type"] is String) {
+ activityType = json["activity_type"];
+ }
+ if (json["role"] is String) {
+ role = json["role"];
+ }
+ if (json["event_type_name"] is String) {
+ eventTypeName = json["event_type_name"];
+ }
+ if (json["country_name"] is String) {
+ countryName = json["country_name"];
+ }
+ if (json["state_name"] is String) {
+ stateName = json["state_name"];
+ }
+ if (json["city_name"] is String) {
+ cityName = json["city_name"];
+ }
+ if (json["organizer_type_name"] is String) {
+ organizerTypeName = json["organizer_type_name"];
+ }
+ if (json["sponsor_type_name"] is String) {
+ sponsorTypeName = json["sponsor_type_name"];
+ }
+ if (json["session_type_name"] is String) {
+ sessionTypeName = json["session_type_name"];
+ }
+ if (json["kol_name"] is String) {
+ kolName = json["kol_name"];
+ }
+ kolUniqueId = json["kol_unique_id"];
+ if (json["event_name"] is String) {
+ eventName = json["event_name"];
+ }
+ if (json["event_unique_id"] is String) {
+ eventUniqueId = json["event_unique_id"];
+ }
+ if (json["created_by_user"] is String) {
+ createdByUser = json["created_by_user"];
+ }
+ if (json["updated_by_user"] is String) {
+ updatedByUser = json["updated_by_user"];
+ }
+ if (json["formatted_created_at"] is String) {
+ formattedCreatedAt = json["formatted_created_at"];
+ }
+ if (json["formatted_updated_at"] is String) {
+ formattedUpdatedAt = json["formatted_updated_at"];
+ }
+ }
+
+ Map toJson() {
+ final Map _data = {};
+ _data["unique_id"] = uniqueId;
+ _data["session_name"] = sessionName;
+ _data["start_date"] = startDate;
+ _data["end_date"] = endDate;
+ _data["organizer"] = organizer;
+ _data["session_sponsor"] = sessionSponsor;
+ _data["location"] = location;
+ _data["address"] = address;
+ _data["postal_code"] = postalCode;
+ _data["url"] = url;
+ _data["activity_type"] = activityType;
+ _data["role"] = role;
+ _data["event_type_name"] = eventTypeName;
+ _data["country_name"] = countryName;
+ _data["state_name"] = stateName;
+ _data["city_name"] = cityName;
+ _data["organizer_type_name"] = organizerTypeName;
+ _data["sponsor_type_name"] = sponsorTypeName;
+ _data["session_type_name"] = sessionTypeName;
+ _data["kol_name"] = kolName;
+ _data["kol_unique_id"] = kolUniqueId;
+ _data["event_name"] = eventName;
+ _data["event_unique_id"] = eventUniqueId;
+ _data["created_by_user"] = createdByUser;
+ _data["updated_by_user"] = updatedByUser;
+ _data["formatted_created_at"] = formattedCreatedAt;
+ _data["formatted_updated_at"] = formattedUpdatedAt;
+ return _data;
+ }
+}
diff --git a/lib/model/events_speakers_k1.dart b/lib/model/events_speakers_k1.dart
new file mode 100644
index 0000000..428b654
--- /dev/null
+++ b/lib/model/events_speakers_k1.dart
@@ -0,0 +1,211 @@
+// To parse this JSON data, do
+//
+// final eventSpeakersResponse = eventSpeakersResponseFromJson(jsonString);
+
+import 'dart:convert';
+
+EventSpeakersResponse eventSpeakersResponseFromJson(String str) =>
+ EventSpeakersResponse.fromJson(json.decode(str));
+
+String eventSpeakersResponseToJson(EventSpeakersResponse data) =>
+ json.encode(data.toJson());
+
+class EventSpeakersResponse {
+ List? data;
+
+ EventSpeakersResponse({
+ this.data,
+ });
+
+ factory EventSpeakersResponse.fromJson(Map json) =>
+ EventSpeakersResponse(
+ data: json["data"] == null
+ ? []
+ : List.from(
+ json["data"]!.map((x) => EventSpeakersData.fromJson(x))),
+ );
+
+ Map toJson() => {
+ "data": data == null
+ ? []
+ : List.from(data!.map((x) => x.toJson())),
+ };
+}
+
+class EventSpeakersData {
+ String? eid;
+ dynamic eventTopics;
+ String? npiNum;
+ String? hcpPinAlias;
+ String? sessionName;
+ String? name;
+ String? kolId;
+ String? firstName;
+ dynamic middleName;
+ dynamic lastName;
+ String? orgName;
+ String? country;
+ String? region;
+ String? city;
+ String? numSess;
+ dynamic optInOutStatus;
+ String? url1;
+ dynamic sessionNote;
+ String? cntNotes;
+ String? eventAttendeesId;
+ dynamic medicalInsightId;
+ String? cntMedicalInsight;
+ String? kId;
+ String? id;
+ int? projKolId;
+ String? eventsSession;
+ int? restEventsSessionCount;
+ String? restEventsSession;
+ String? eventsTopic;
+ int? restEventsTopicCount;
+ String? restEventsTopic;
+ String? kolName;
+ String? kolFullName;
+
+ EventSpeakersData({
+ this.eid,
+ this.eventTopics,
+ this.npiNum,
+ this.hcpPinAlias,
+ this.sessionName,
+ this.name,
+ this.kolId,
+ this.firstName,
+ this.middleName,
+ this.lastName,
+ this.orgName,
+ this.country,
+ this.region,
+ this.city,
+ this.numSess,
+ this.optInOutStatus,
+ this.url1,
+ this.sessionNote,
+ this.cntNotes,
+ this.eventAttendeesId,
+ this.medicalInsightId,
+ this.cntMedicalInsight,
+ this.kId,
+ this.id,
+ this.projKolId,
+ this.eventsSession,
+ this.restEventsSessionCount,
+ this.restEventsSession,
+ this.eventsTopic,
+ this.restEventsTopicCount,
+ this.restEventsTopic,
+ this.kolName,
+ this.kolFullName,
+ });
+
+ factory EventSpeakersData.fromJson(Map json) =>
+ EventSpeakersData(
+ eid: json["eid"],
+ eventTopics: json["event_topics"],
+ npiNum: json["npi_num"],
+ hcpPinAlias: json["hcp_pin_alias"],
+ sessionName: json["session_name"],
+ name: json["name"],
+ kolId: json["kol_id"],
+ firstName: json["first_name"],
+ middleName: json["middle_name"],
+ lastName: json["last_name"],
+ orgName: json["org_name"],
+ country: json["Country"],
+ region: json["Region"],
+ city: json["City"],
+ numSess: json["num_sess"],
+ optInOutStatus: json["opt_in_out_status"],
+ url1: json["url1"],
+ sessionNote: json["session_note"],
+ cntNotes: json["cnt_notes"],
+ eventAttendeesId: json["event_attendees_id"],
+ medicalInsightId: json["medical_insight_id"],
+ cntMedicalInsight: json["cnt_medical_insight"],
+ kId: json["k_id"],
+ id: json["id"],
+ projKolId: json["proj_kol_id"],
+ eventsSession: json["events_session"],
+ restEventsSessionCount: json["rest_events_session_count"],
+ restEventsSession: json["rest_events_session"],
+ eventsTopic: json["events_topic"],
+ restEventsTopicCount: json["rest_events_topic_count"],
+ restEventsTopic: json["rest_events_topic"],
+ kolName: json["kol_name"],
+ kolFullName: json["kol_full_name"],
+ );
+
+ Map toJson() => {
+ "eid": eid,
+ "event_topics": eventTopics,
+ "npi_num": npiNum,
+ "hcp_pin_alias": hcpPinAlias,
+ "session_name": sessionName,
+ "name": nameValues.reverse[name],
+ "kol_id": kolId,
+ "first_name": firstName,
+ "middle_name": middleName,
+ "last_name": lastName,
+ "org_name": orgName,
+ "Country": countryValues.reverse[country],
+ "Region": region,
+ "City": city,
+ "num_sess": numSess,
+ "opt_in_out_status": optInOutStatus,
+ "url1": url1,
+ "session_note": sessionNote,
+ "cnt_notes": cntNotes,
+ "event_attendees_id": eventAttendeesId,
+ "medical_insight_id": medicalInsightId,
+ "cnt_medical_insight": cntMedicalInsight,
+ "k_id": kId,
+ "id": id,
+ "proj_kol_id": projKolId,
+ "events_session": eventsSession,
+ "rest_events_session_count": restEventsSessionCount,
+ "rest_events_session": restEventsSession,
+ "events_topic": eventsTopic,
+ "rest_events_topic_count": restEventsTopicCount,
+ "rest_events_topic": restEventsTopic,
+ "kol_name": kolName,
+ "kol_full_name": kolFullName,
+ };
+}
+
+enum Country { BELGIUM, GERMANY, UNITED_STATES }
+
+final countryValues = EnumValues({
+ "Belgium": Country.BELGIUM,
+ "Germany": Country.GERMANY,
+ "United States": Country.UNITED_STATES
+});
+
+enum Name { THE_2036_AMERICAN_ACADEMY_OF_AAI }
+
+final nameValues = EnumValues({
+ "2036 American Academy of (AAI)": Name.THE_2036_AMERICAN_ACADEMY_OF_AAI
+});
+
+enum RestEventsSession { BUSINESS_MEETING_AND_FORUM, EMPTY }
+
+final restEventsSessionValues = EnumValues({
+ " Business Meeting and Forum": RestEventsSession.BUSINESS_MEETING_AND_FORUM,
+ "": RestEventsSession.EMPTY
+});
+
+class EnumValues {
+ Map map;
+ late Map reverseMap;
+
+ EnumValues(this.map);
+
+ Map get reverse {
+ reverseMap = map.map((k, v) => MapEntry(v, k));
+ return reverseMap;
+ }
+}
diff --git a/lib/model/eventspeakers.dart b/lib/model/eventspeakers.dart
new file mode 100644
index 0000000..69de2bb
--- /dev/null
+++ b/lib/model/eventspeakers.dart
@@ -0,0 +1,330 @@
+// To parse this JSON data, do
+//
+// final speakersResponse = speakersResponseFromJson(jsonString);
+
+import 'dart:convert';
+
+import 'package:hive_flutter/hive_flutter.dart';
+import 'package:konectar_events/contacts_module/model_class/speaker.dart';
+
+part 'eventspeakers.g.dart';
+
+SpeakersResponse speakersResponseFromJson(String str) =>
+ SpeakersResponse.fromJson(json.decode(str));
+
+String speakersResponseToJson(SpeakersResponse data) =>
+ json.encode(data.toJson());
+
+class SpeakersResponse {
+ int? code;
+ String? message;
+ List? data;
+ int? lastPage;
+ int? lastRow;
+ int? count;
+
+ SpeakersResponse({
+ this.code,
+ this.message,
+ this.data,
+ this.lastPage,
+ this.lastRow,
+ this.count,
+ });
+
+ factory SpeakersResponse.fromJson(Map json) =>
+ SpeakersResponse(
+ code: json["code"],
+ message: json["message"],
+ data: json["data"] == null
+ ? []
+ : List.from(
+ json["data"]!.map((x) => SpeakersList.fromJson(x))),
+ lastPage: json["last_page"],
+ lastRow: json["last_row"],
+ count: json["count"],
+ );
+
+ Map toJson() => {
+ "code": code,
+ "message": message,
+ "data": data == null
+ ? []
+ : List.from(data!.map((x) => x.toJson())),
+ "last_page": lastPage,
+ "last_row": lastRow,
+ "count": count,
+ };
+}
+
+class SpeakersResponse1 {
+ Data1? data;
+
+ SpeakersResponse1({
+ this.data,
+ });
+
+ factory SpeakersResponse1.fromJson(Map json) =>
+ SpeakersResponse1(
+ data: json["data"] == null ? null : Data1.fromJson(json["data"]),
+ );
+
+ Map toJson() => {
+ "data": data?.toJson(),
+ };
+}
+
+class Data1 {
+ List? data;
+
+ Data1({
+ this.data,
+ });
+
+ factory Data1.fromJson(Map json) => Data1(
+ data: json["data"] == null
+ ? []
+ : List.from(
+ json["data"]!.map((x) => SpeakersList.fromJson(x))),
+ );
+
+ Map toJson() => {
+ "data": data == null
+ ? []
+ : List.from(data!.map((x) => x.toJson())),
+ };
+}
+
+@HiveType(typeId: 25)
+class SpeakersList {
+ @HiveField(0)
+ String? uniqueId;
+ @HiveField(1)
+ String? hcpFullName;
+ @HiveField(2)
+ String? hcpPin;
+ @HiveField(3)
+ int? npiNum;
+ @HiveField(4)
+ String? specialty;
+ @HiveField(5)
+ String? organization;
+ @HiveField(6)
+ String? therapeuticArea;
+ @HiveField(7)
+ dynamic cleansStatus;
+ @HiveField(8)
+ int? isDeleted;
+ @HiveField(9)
+ CreatedByUser? createdByUser;
+ @HiveField(10)
+ CreatedByUser? updatedByUser;
+ @HiveField(11)
+ String? cityName;
+ @HiveField(12)
+ String? stateName;
+ @HiveField(13)
+ String? countryName;
+ @HiveField(14)
+ dynamic deletedByUser;
+ @HiveField(15)
+ DateTime? formattedCreatedAt;
+ @HiveField(16)
+ DateTime? formattedUpdatedAt;
+ @HiveField(17)
+ dynamic formattedDeletedAt;
+ @HiveField(18)
+ List? sessionNames;
+ @HiveField(19)
+ List? topics;
+
+ SpeakersList({
+ this.uniqueId,
+ this.hcpFullName,
+ this.hcpPin,
+ this.npiNum,
+ this.specialty,
+ this.organization,
+ this.therapeuticArea,
+ this.cleansStatus,
+ this.isDeleted,
+ this.createdByUser,
+ this.updatedByUser,
+ this.cityName,
+ this.stateName,
+ this.countryName,
+ this.deletedByUser,
+ this.formattedCreatedAt,
+ this.formattedUpdatedAt,
+ this.formattedDeletedAt,
+ this.sessionNames,
+ this.topics,
+ });
+
+ // SpeakersList.fromJson(Map json) {
+
+ // if (json["unique_id"] is String) {
+ // city = json["city_name"] ?? null;
+ // }
+ // if (json["country_name"] is String) {
+ // country = json["country_name"] ?? null;
+ // }
+ // if (json["state_name"] is String) {
+ // region = json["state_name"] ?? null;
+ // }
+ // if (json["activity_type"] is String) {
+ // activityType = json["activity_type"];
+ // }
+ // if (json["address"] is String) {
+ // address = json["address"];
+ // }
+ // if (json["city_id"] is String) {
+ // cityId = json["city_id"];
+ // }
+ // if (json["client_id"] is String) {
+ // clientId = json["client_id"];
+ // }
+ // if (json["cnt"] is String) {
+ // cnt = json["cnt"];
+ // }
+ // if (json["country_id"] is String) {
+ // countryId = json["country_id"];
+ // }
+ // if (json["created_by"] is String) {
+ // createdBy = json["created_by"];
+ // }
+ // if (json["created_on"] is String) {
+ // createdOn = json["created_on"];
+ // }
+ // if (json["dAllowed"] is bool) {
+ // dAllowed = json["dAllowed"];
+ // }
+ // if (json["eAllowed"] is bool) {
+ // eAllowed = json["eAllowed"];
+ // }
+ // if (json["end_date"] is String) {
+ // end = json["end_date"];
+ // }
+ // if (json["eventLat"] is String) {
+ // eventLat = json["eventLat"];
+ // }
+ // if (json["eventLong"] is String) {
+ // eventLong = json["eventLong"];
+ // }
+ // if (json["unique_id"] is String) {
+ // eventId = json["unique_id"];
+ // }
+ // if (json["event_type_name"] is String) {
+ // eventType = json["event_type_name"];
+ // }
+ // if (json["event_unique_id"] is String) {
+ // eventUniqueId = json["event_unique_id"];
+ // }
+ // if (json["event_user_attendee"] is bool) {
+ // eventUserAttendee = json["event_user_attendee"];
+ // }
+ // if (json["global_event_id"] is String) {
+ // globalEventId = json["global_event_id"];
+ // }
+ // if (json["hcp_pin"] is String) {
+ // hcpPin = json["hcp_pin"];
+ // }
+ // if (json["id"] is String) {
+ // id = json["id"];
+ // }
+ // if (json["kol_id"] is String) {
+ // kolId = json["kol_id"];
+ // }
+ // if (json["location"] is String) {
+ // location = json["location"];
+ // }
+ // if (json["modified_by"] is String) {
+ // modifiedBy = json["modified_by"];
+ // }
+ // if (json["modified_on"] is String) {
+ // modifiedOn = json["modified_on"];
+ // }
+ // if (json["event_name"] is String) {
+ // name1 = json["event_name"];
+ // }
+
+ // }
+ factory SpeakersList.fromJson(Map json) => SpeakersList(
+ uniqueId: json["unique_id"],
+ hcpFullName: json["hcp_full_name"] ?? null,
+ hcpPin: json["hcp_pin"] ?? null,
+ npiNum: json["npi_num"] ?? null,
+ specialty: json["specialty"] ?? null,
+ organization: json["organization"] ?? null,
+ therapeuticArea: json["therapeutic_area"] ?? null,
+ cleansStatus: json["cleans_status"] ?? null,
+ isDeleted: json["is_deleted"] ?? null,
+ createdByUser: CreatedByUserValues.map[json["created_by_user"]] ?? null,
+ updatedByUser: CreatedByUserValues.map[json["updated_by_user"]] ?? null,
+ cityName: json["city_name"] ?? null,
+ stateName: json["state_name"] ?? null,
+ countryName: json["country_name"] ?? null,
+ deletedByUser: json["deleted_by_user"],
+ formattedCreatedAt: json["formatted_created_at"] == null
+ ? null
+ : DateTime.parse(json["formatted_created_at"]),
+ formattedUpdatedAt: json["formatted_updated_at"] == null
+ ? null
+ : DateTime.parse(json["formatted_updated_at"]),
+ formattedDeletedAt: json["formatted_deleted_at"],
+ sessionNames: json["session_names"] == null
+ ? []
+ : List.from(json["session_names"]!.map((x) => x)),
+ topics: json["topics"] == null
+ ? []
+ : List.from(json["topics"]!.map((x) => x)),
+ );
+
+ Map toJson() => {
+ "unique_id": uniqueId,
+ "hcp_full_name": hcpFullName,
+ "hcp_pin": hcpPin,
+ "npi_num": npiNum,
+ "specialty": specialty,
+ "organization": organization,
+ "therapeutic_area": therapeuticAreaValues.reverse[therapeuticArea],
+ "cleans_status": cleansStatus,
+ "is_deleted": isDeleted,
+ "created_by_user": CreatedByUserValues.reverse[createdByUser],
+ "updated_by_user": CreatedByUserValues.reverse[updatedByUser],
+ "city_name": cityName,
+ "state_name": stateName,
+ "country_name": countryName,
+ "deleted_by_user": deletedByUser,
+ "formatted_created_at": formattedCreatedAt?.toIso8601String(),
+ "formatted_updated_at": formattedUpdatedAt?.toIso8601String(),
+ "formatted_deleted_at": formattedDeletedAt,
+ "session_names": sessionNames == null
+ ? []
+ : List.from(sessionNames!.map((x) => x)),
+ "topics":
+ topics == null ? [] : List.from(topics!.map((x) => x)),
+ };
+}
+
+enum CreatedByUser { ADMIN_SUPER_ROOT }
+
+final CreatedByUserValues =
+ EnumValues({"admin super root": CreatedByUser.ADMIN_SUPER_ROOT});
+
+enum TherapeuticArea { ONCOLOGY_WOMENS_HEALTH }
+
+final therapeuticAreaValues = EnumValues(
+ {"Oncology | Womens Health": TherapeuticArea.ONCOLOGY_WOMENS_HEALTH});
+
+class EnumValues {
+ Map map;
+ late Map reverseMap;
+
+ EnumValues(this.map);
+
+ Map get reverse {
+ reverseMap = map.map((k, v) => MapEntry(v, k));
+ return reverseMap;
+ }
+}
diff --git a/lib/model/eventspeakers.g.dart b/lib/model/eventspeakers.g.dart
new file mode 100644
index 0000000..d944da1
--- /dev/null
+++ b/lib/model/eventspeakers.g.dart
@@ -0,0 +1,98 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'eventspeakers.dart';
+
+// **************************************************************************
+// TypeAdapterGenerator
+// **************************************************************************
+
+class SpeakersListAdapter extends TypeAdapter {
+ @override
+ final int typeId = 25;
+
+ @override
+ SpeakersList read(BinaryReader reader) {
+ final numOfFields = reader.readByte();
+ final fields = {
+ for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
+ };
+ return SpeakersList(
+ uniqueId: fields[0] as String?,
+ hcpFullName: fields[1] as String?,
+ hcpPin: fields[2] as String?,
+ npiNum: fields[3] as int?,
+ specialty: fields[4] as String?,
+ organization: fields[5] as String?,
+ therapeuticArea: fields[6] as String?,
+ cleansStatus: fields[7] as dynamic,
+ isDeleted: fields[8] as int?,
+ createdByUser: fields[9] as CreatedByUser?,
+ updatedByUser: fields[10] as CreatedByUser?,
+ cityName: fields[11] as String?,
+ stateName: fields[12] as String?,
+ countryName: fields[13] as String?,
+ deletedByUser: fields[14] as dynamic,
+ formattedCreatedAt: fields[15] as DateTime?,
+ formattedUpdatedAt: fields[16] as DateTime?,
+ formattedDeletedAt: fields[17] as dynamic,
+ sessionNames: (fields[18] as List?)?.cast(),
+ topics: (fields[19] as List?)?.cast(),
+ );
+ }
+
+ @override
+ void write(BinaryWriter writer, SpeakersList obj) {
+ writer
+ ..writeByte(20)
+ ..writeByte(0)
+ ..write(obj.uniqueId)
+ ..writeByte(1)
+ ..write(obj.hcpFullName)
+ ..writeByte(2)
+ ..write(obj.hcpPin)
+ ..writeByte(3)
+ ..write(obj.npiNum)
+ ..writeByte(4)
+ ..write(obj.specialty)
+ ..writeByte(5)
+ ..write(obj.organization)
+ ..writeByte(6)
+ ..write(obj.therapeuticArea)
+ ..writeByte(7)
+ ..write(obj.cleansStatus)
+ ..writeByte(8)
+ ..write(obj.isDeleted)
+ ..writeByte(9)
+ ..write(obj.createdByUser)
+ ..writeByte(10)
+ ..write(obj.updatedByUser)
+ ..writeByte(11)
+ ..write(obj.cityName)
+ ..writeByte(12)
+ ..write(obj.stateName)
+ ..writeByte(13)
+ ..write(obj.countryName)
+ ..writeByte(14)
+ ..write(obj.deletedByUser)
+ ..writeByte(15)
+ ..write(obj.formattedCreatedAt)
+ ..writeByte(16)
+ ..write(obj.formattedUpdatedAt)
+ ..writeByte(17)
+ ..write(obj.formattedDeletedAt)
+ ..writeByte(18)
+ ..write(obj.sessionNames)
+ ..writeByte(19)
+ ..write(obj.topics);
+ }
+
+ @override
+ int get hashCode => typeId.hashCode;
+
+ @override
+ bool operator ==(Object other) =>
+ identical(this, other) ||
+ other is SpeakersListAdapter &&
+ runtimeType == other.runtimeType &&
+ typeId == other.typeId;
+}
diff --git a/lib/model/my_events_list_model.dart b/lib/model/my_events_list_model.dart
new file mode 100644
index 0000000..5ac4b2e
--- /dev/null
+++ b/lib/model/my_events_list_model.dart
@@ -0,0 +1,486 @@
+import 'package:hive_flutter/hive_flutter.dart';
+
+class MyEventsListModel {
+ int? code;
+ String? message;
+ List? data;
+ int? lastPage;
+ int? lastRow;
+ int? count;
+
+ MyEventsListModel(
+ {this.code,
+ this.message,
+ this.data,
+ this.lastPage,
+ this.lastRow,
+ this.count});
+
+ MyEventsListModel.fromJson(Map json) {
+ if (json["code"] is int) {
+ code = json["code"];
+ }
+ if (json["message"] is String) {
+ message = json["message"];
+ }
+ if (json["data"] is List) {
+ data = json["data"] == null
+ ? null
+ : (json["data"] as List)
+ .map((e) => MyEventsData.fromJson(e))
+ .toList();
+ }
+ if (json["last_page"] is int) {
+ lastPage = json["last_page"];
+ }
+ if (json["last_row"] is int) {
+ lastRow = json["last_row"];
+ }
+ if (json["count"] is int) {
+ count = json["count"];
+ }
+ }
+
+ Map toJson() {
+ final Map _data = {};
+ _data["code"] = code;
+ _data["message"] = message;
+ if (data != null) {
+ _data["data"] = data?.map((e) => e.toJson()).toList();
+ }
+ _data["last_page"] = lastPage;
+ _data["last_row"] = lastRow;
+ _data["count"] = count;
+ return _data;
+ }
+}
+
+class MyEventsData {
+ String? uniqueId;
+ dynamic switchedId;
+ String? createdByUser;
+ String? updatedByUser;
+ dynamic deletedByUser;
+ String? formattedCreatedAt;
+ String? formattedUpdatedAt;
+ dynamic formattedDeletedAt;
+ List? events;
+
+ MyEventsData(
+ {this.uniqueId,
+ this.switchedId,
+ this.createdByUser,
+ this.updatedByUser,
+ this.deletedByUser,
+ this.formattedCreatedAt,
+ this.formattedUpdatedAt,
+ this.formattedDeletedAt,
+ this.events});
+
+ MyEventsData.fromJson(Map json) {
+ if (json["unique_id"] is String) {
+ uniqueId = json["unique_id"];
+ }
+ switchedId = json["switched_id"];
+ if (json["created_by_user"] is String) {
+ createdByUser = json["created_by_user"];
+ }
+ if (json["updated_by_user"] is String) {
+ updatedByUser = json["updated_by_user"];
+ }
+ deletedByUser = json["deleted_by_user"];
+ if (json["formatted_created_at"] is String) {
+ formattedCreatedAt = json["formatted_created_at"];
+ }
+ if (json["formatted_updated_at"] is String) {
+ formattedUpdatedAt = json["formatted_updated_at"];
+ }
+ formattedDeletedAt = json["formatted_deleted_at"];
+ if (json["events"] is List) {
+ events = json["events"] == null
+ ? null
+ : (json["events"] as List)
+ .map((e) => MyEventsList.fromJson(e))
+ .toList();
+ }
+ }
+
+ Map toJson() {
+ final Map _data = {};
+ _data["unique_id"] = uniqueId;
+ _data["switched_id"] = switchedId;
+ _data["created_by_user"] = createdByUser;
+ _data["updated_by_user"] = updatedByUser;
+ _data["deleted_by_user"] = deletedByUser;
+ _data["formatted_created_at"] = formattedCreatedAt;
+ _data["formatted_updated_at"] = formattedUpdatedAt;
+ _data["formatted_deleted_at"] = formattedDeletedAt;
+ if (events != null) {
+ _data["events"] = events?.map((e) => e.toJson()).toList();
+ }
+ return _data;
+ }
+}
+
+@HiveType(typeId: 101)
+class MyEventsList {
+ @HiveField(0)
+ String? myeventid;
+ @HiveField(1)
+ String? eventid;
+ @HiveField(2)
+ String? sessionName;
+ @HiveField(3)
+ String? start;
+ @HiveField(4)
+ String? end;
+ @HiveField(5)
+ String? organizer;
+ @HiveField(6)
+ String? sessionSponsor;
+ @HiveField(7)
+ dynamic location;
+ @HiveField(8)
+ dynamic address;
+ @HiveField(9)
+ dynamic postalCode;
+ @HiveField(10)
+ String? url;
+ @HiveField(11)
+ String? activityType;
+ @HiveField(12)
+ dynamic topic;
+ @HiveField(13)
+ String? role;
+ @HiveField(14)
+ String? eventTypeName;
+ @HiveField(15)
+ String? country;
+ @HiveField(16)
+ String? region;
+ @HiveField(17)
+ String? city;
+ @HiveField(18)
+ String? organizerTypeName;
+ @HiveField(19)
+ String? sponsorTypeName;
+ @HiveField(20)
+ String? sessionTypeName;
+ @HiveField(21)
+ String? kolName;
+ @HiveField(22)
+ dynamic kolUniqueId;
+ @HiveField(23)
+ String? name1;
+ @HiveField(24)
+ String? eventUniqueId;
+ @HiveField(25)
+ String? createdByUser;
+ @HiveField(26)
+ String? updatedByUser;
+ @HiveField(27)
+ String? formattedCreatedAt;
+ @HiveField(28)
+ String? formattedUpdatedAt;
+ @HiveField(29)
+ List? attendees;
+ @HiveField(30)
+ bool isfav = false;
+ @HiveField(31)
+ bool isAttending = false;
+ @HiveField(32)
+ String? speakerscount;
+ @HiveField(33)
+ String? topTopics;
+ @HiveField(34)
+ String? topSpeakers;
+
+ MyEventsList(
+ {this.eventid,
+ this.sessionName,
+ this.start,
+ this.end,
+ this.organizer,
+ this.sessionSponsor,
+ this.location,
+ this.address,
+ this.postalCode,
+ this.url,
+ this.activityType,
+ this.topic,
+ this.role,
+ this.eventTypeName,
+ this.country,
+ this.region,
+ this.city,
+ this.organizerTypeName,
+ this.sponsorTypeName,
+ this.sessionTypeName,
+ this.kolName,
+ this.kolUniqueId,
+ this.name1,
+ this.eventUniqueId,
+ this.createdByUser,
+ this.updatedByUser,
+ this.formattedCreatedAt,
+ this.formattedUpdatedAt,
+ this.attendees});
+
+ MyEventsList.fromJson(Map json) {
+ if (json["unique_id"] is String) {
+ eventid = json["unique_id"];
+ }
+ if (json["session_name"] is String) {
+ sessionName = json["session_name"];
+ }
+ if (json["start_date"] is String) {
+ start = json["start_date"];
+ }
+ if (json["end_date"] is String) {
+ end = json["end_date"];
+ }
+ if (json["organizer"] is String) {
+ organizer = json["organizer"];
+ }
+ if (json["session_sponsor"] is String) {
+ sessionSponsor = json["session_sponsor"];
+ }
+ location = json["location"];
+ address = json["address"];
+ postalCode = json["postal_code"];
+ if (json["url"] is String) {
+ url = json["url"];
+ }
+ if (json["activity_type"] is String) {
+ activityType = json["activity_type"];
+ }
+ topic = json["topic"];
+ if (json["role"] is String) {
+ role = json["role"];
+ }
+ if (json["event_type_name"] is String) {
+ eventTypeName = json["event_type_name"];
+ }
+ if (json["country_name"] is String) {
+ country = json["country_name"];
+ }
+ if (json["state_name"] is String) {
+ region = json["state_name"];
+ }
+ if (json["city_name"] is String) {
+ city = json["city_name"];
+ }
+ if (json["organizer_type_name"] is String) {
+ organizerTypeName = json["organizer_type_name"];
+ }
+ if (json["sponsor_type_name"] is String) {
+ sponsorTypeName = json["sponsor_type_name"];
+ }
+ if (json["session_type_name"] is String) {
+ sessionTypeName = json["session_type_name"];
+ }
+ if (json["kol_name"] is String) {
+ kolName = json["kol_name"];
+ }
+ kolUniqueId = json["kol_unique_id"];
+ if (json["event_name"] is String) {
+ name1 = json["event_name"];
+ }
+ if (json["event_unique_id"] is String) {
+ eventUniqueId = json["event_unique_id"];
+ }
+ if (json["created_by_user"] is String) {
+ createdByUser = json["created_by_user"];
+ }
+ if (json["updated_by_user"] is String) {
+ updatedByUser = json["updated_by_user"];
+ }
+ if (json["formatted_created_at"] is String) {
+ formattedCreatedAt = json["formatted_created_at"];
+ }
+ if (json["formatted_updated_at"] is String) {
+ formattedUpdatedAt = json["formatted_updated_at"];
+ }
+ if (json["attendees"] is List) {
+ attendees = json["attendees"] == null
+ ? null
+ : (json["attendees"] as List)
+ .map((e) => Attendees.fromJson(e))
+ .toList();
+ }
+ }
+
+ Map toJson() {
+ final Map _data = {};
+ _data["unique_id"] = eventid;
+ _data["session_name"] = sessionName;
+ _data["start_date"] = start;
+ _data["end_date"] = end;
+ _data["organizer"] = organizer;
+ _data["session_sponsor"] = sessionSponsor;
+ _data["location"] = location;
+ _data["address"] = address;
+ _data["postal_code"] = postalCode;
+ _data["url"] = url;
+ _data["activity_type"] = activityType;
+ _data["topic"] = topic;
+ _data["role"] = role;
+ _data["event_type_name"] = eventTypeName;
+ _data["country_name"] = country;
+ _data["state_name"] = region;
+ _data["city_name"] = city;
+ _data["organizer_type_name"] = organizerTypeName;
+ _data["sponsor_type_name"] = sponsorTypeName;
+ _data["session_type_name"] = sessionTypeName;
+ _data["kol_name"] = kolName;
+ _data["kol_unique_id"] = kolUniqueId;
+ _data["event_name"] = name1;
+ _data["event_unique_id"] = eventUniqueId;
+ _data["created_by_user"] = createdByUser;
+ _data["updated_by_user"] = updatedByUser;
+ _data["formatted_created_at"] = formattedCreatedAt;
+ _data["formatted_updated_at"] = formattedUpdatedAt;
+ if (attendees != null) {
+ _data["attendees"] = attendees?.map((e) => e.toJson()).toList();
+ }
+ return _data;
+ }
+}
+
+@HiveType(typeId: 102)
+class Attendees {
+ @HiveField(0)
+ String? uniqueId;
+ @HiveField(1)
+ int? kolEventId;
+ @HiveField(2)
+ int? kolId;
+ @HiveField(3)
+ String? hcpFullName;
+ @HiveField(4)
+ String? hcpPin;
+ @HiveField(5)
+ int? npiNum;
+ @HiveField(6)
+ dynamic specialty;
+ @HiveField(7)
+ dynamic organization;
+ @HiveField(8)
+ String? therapeuticArea;
+ @HiveField(9)
+ dynamic cityId;
+ @HiveField(10)
+ dynamic stateId;
+ @HiveField(11)
+ dynamic countryId;
+ @HiveField(12)
+ dynamic cleansStatus;
+ @HiveField(13)
+ int? isDeleted;
+ @HiveField(14)
+ String? createdByUser;
+ @HiveField(15)
+ String? updatedByUser;
+ @HiveField(16)
+ dynamic deletedByUser;
+ @HiveField(17)
+ String? formattedCreatedAt;
+ @HiveField(18)
+ String? formattedUpdatedAt;
+ @HiveField(19)
+ dynamic formattedDeletedAt;
+
+ Attendees(
+ {this.uniqueId,
+ this.kolEventId,
+ this.kolId,
+ this.hcpFullName,
+ this.hcpPin,
+ this.npiNum,
+ this.specialty,
+ this.organization,
+ this.therapeuticArea,
+ this.cityId,
+ this.stateId,
+ this.countryId,
+ this.cleansStatus,
+ this.isDeleted,
+ this.createdByUser,
+ this.updatedByUser,
+ this.deletedByUser,
+ this.formattedCreatedAt,
+ this.formattedUpdatedAt,
+ this.formattedDeletedAt});
+
+ Attendees.fromJson(Map json) {
+ if (json["unique_id"] is String) {
+ uniqueId = json["unique_id"];
+ }
+ if (json["kol_event_id"] is int) {
+ kolEventId = json["kol_event_id"];
+ }
+ if (json["kol_id"] is int) {
+ kolId = json["kol_id"];
+ }
+ if (json["hcp_full_name"] is String) {
+ hcpFullName = json["hcp_full_name"];
+ }
+ if (json["hcp_pin"] is String) {
+ hcpPin = json["hcp_pin"];
+ }
+ if (json["npi_num"] is int) {
+ npiNum = json["npi_num"];
+ }
+ specialty = json["specialty"];
+ organization = json["organization"];
+ if (json["therapeutic_area"] is String) {
+ therapeuticArea = json["therapeutic_area"];
+ }
+ cityId = json["city_id"];
+ stateId = json["state_id"];
+ countryId = json["country_id"];
+ cleansStatus = json["cleans_status"];
+ if (json["is_deleted"] is int) {
+ isDeleted = json["is_deleted"];
+ }
+ if (json["created_by_user"] is String) {
+ createdByUser = json["created_by_user"];
+ }
+ if (json["updated_by_user"] is String) {
+ updatedByUser = json["updated_by_user"];
+ }
+ deletedByUser = json["deleted_by_user"];
+ if (json["formatted_created_at"] is String) {
+ formattedCreatedAt = json["formatted_created_at"];
+ }
+ if (json["formatted_updated_at"] is String) {
+ formattedUpdatedAt = json["formatted_updated_at"];
+ }
+ formattedDeletedAt = json["formatted_deleted_at"];
+ }
+
+ Map toJson() {
+ final Map _data = {};
+ _data["unique_id"] = uniqueId;
+ _data["kol_event_id"] = kolEventId;
+ _data["kol_id"] = kolId;
+ _data["hcp_full_name"] = hcpFullName;
+ _data["hcp_pin"] = hcpPin;
+ _data["npi_num"] = npiNum;
+ _data["specialty"] = specialty;
+ _data["organization"] = organization;
+ _data["therapeutic_area"] = therapeuticArea;
+ _data["city_id"] = cityId;
+ _data["state_id"] = stateId;
+ _data["country_id"] = countryId;
+ _data["cleans_status"] = cleansStatus;
+ _data["is_deleted"] = isDeleted;
+ _data["created_by_user"] = createdByUser;
+ _data["updated_by_user"] = updatedByUser;
+ _data["deleted_by_user"] = deletedByUser;
+ _data["formatted_created_at"] = formattedCreatedAt;
+ _data["formatted_updated_at"] = formattedUpdatedAt;
+ _data["formatted_deleted_at"] = formattedDeletedAt;
+ return _data;
+ }
+}
diff --git a/lib/model/neweventsmodel.dart b/lib/model/neweventsmodel.dart
index 228698d..6f5d0db 100644
--- a/lib/model/neweventsmodel.dart
+++ b/lib/model/neweventsmodel.dart
@@ -1,4 +1,5 @@
import 'package:hive_flutter/hive_flutter.dart';
+import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_event_k2.dart';
part 'neweventsmodel.g.dart';
class EventsResp {
@@ -27,12 +28,10 @@ class EventsData {
EventsData({this.events});
EventsData.fromJson(Map json) {
- if (json["events"] is List) {
- events = json["events"] == null
+ if (json["data"] is List) {
+ events = json["data"] == null
? null
- : (json["events"] as List)
- .map((e) => EventsList.fromJson(e))
- .toList();
+ : (json["data"] as List).map((e) => EventsList.fromJson(e)).toList();
}
}
@@ -67,6 +66,61 @@ class EventsDataStaging {
}
}
+// RESPONSE FROM K2
+
+class EventsListRespK2 {
+ int? code;
+ String? message;
+ List? data;
+ int? lastPage;
+ int? lastRow;
+ int? count;
+
+ EventsListRespK2(
+ {this.code,
+ this.message,
+ this.data,
+ this.lastPage,
+ this.lastRow,
+ this.count});
+
+ EventsListRespK2.fromJson(Map json) {
+ if (json["code"] is int) {
+ code = json["code"];
+ }
+ if (json["message"] is String) {
+ message = json["message"];
+ }
+ if (json["data"] is List) {
+ data = json["data"] == null
+ ? null
+ : (json["data"] as List).map((e) => EventsList.fromJson(e)).toList();
+ }
+ if (json["last_page"] is int) {
+ lastPage = json["last_page"];
+ }
+ if (json["last_row"] is int) {
+ lastRow = json["last_row"];
+ }
+ if (json["count"] is int) {
+ count = json["count"];
+ }
+ }
+
+ Map toJson() {
+ final Map _data = {};
+ _data["code"] = code;
+ _data["message"] = message;
+ if (data != null) {
+ _data["data"] = data?.map((e) => e.toJson()).toList();
+ }
+ _data["last_page"] = lastPage;
+ _data["last_row"] = lastRow;
+ _data["count"] = count;
+ return _data;
+ }
+}
+
@HiveType(typeId: 2)
class EventsList {
@HiveField(0)
@@ -195,319 +249,449 @@ class EventsList {
String? topSpeakers;
@HiveField(62)
String? sponsors;
+ @HiveField(63)
+ late bool? eventUserInterest;
- EventsList(
- {this.city,
- this.sponsors,
- this.speakerscount,
- this.topSpeakers,
- this.topTopics,
- this.isfav = false,
- this.isAttending = false,
- this.country,
- this.region,
- this.activityType,
- this.address,
- this.cityId,
- this.clientId,
- this.cnt,
- this.countryId,
- this.createdBy,
- this.createdOn,
- this.dAllowed,
- this.eAllowed,
- this.end,
- this.eventLat,
- this.eventLong,
- this.eventId,
- this.eventType,
- this.eventUniqueId,
- this.eventUserAttendee,
- this.globalEventId,
- this.hcpPin,
- this.id,
- this.kolId,
- this.location,
- this.modifiedBy,
- this.modifiedOn,
- this.name1,
- this.notes,
- this.organizer,
- this.organizerAlias,
- this.organizerType,
- this.otype,
- this.partialcount,
- this.partiallyReleasedEvent,
- this.postalCode,
- this.profileType,
- this.projectId,
- this.role,
- this.sessionName,
- this.sessionNote,
- this.sessionNote1,
- this.sessionSponsor,
- this.sessionType,
- this.sponsorType,
- this.start,
- this.stateId,
- this.stype,
- this.subject,
- this.therapeuticArea,
- this.topic,
- this.topicName,
- this.type,
- this.updated,
- this.url1,
- this.url2,
- this.userCount});
+ EventsList({
+ this.city,
+ this.sponsors,
+ this.speakerscount,
+ this.topSpeakers,
+ this.topTopics,
+ this.isfav = false,
+ this.isAttending = false,
+ this.country,
+ this.region,
+ this.activityType,
+ this.address,
+ this.cityId,
+ this.clientId,
+ this.cnt,
+ this.countryId,
+ this.createdBy,
+ this.createdOn,
+ this.dAllowed,
+ this.eAllowed,
+ this.end,
+ this.eventLat,
+ this.eventLong,
+ this.eventId,
+ this.eventType,
+ this.eventUniqueId,
+ this.eventUserAttendee,
+ this.globalEventId,
+ this.hcpPin,
+ this.id,
+ this.kolId,
+ this.location,
+ this.modifiedBy,
+ this.modifiedOn,
+ this.name1,
+ this.notes,
+ this.organizer,
+ this.organizerAlias,
+ this.organizerType,
+ this.otype,
+ this.partialcount,
+ this.partiallyReleasedEvent,
+ this.postalCode,
+ this.profileType,
+ this.projectId,
+ this.role,
+ this.sessionName,
+ this.sessionNote,
+ this.sessionNote1,
+ this.sessionSponsor,
+ this.sessionType,
+ this.sponsorType,
+ this.start,
+ this.stateId,
+ this.stype,
+ this.subject,
+ this.therapeuticArea,
+ this.topic,
+ this.topicName,
+ this.type,
+ this.updated,
+ this.url1,
+ this.url2,
+ this.userCount,
+ this.eventUserInterest,
+ });
- EventsList.fromJson(Map json) {
- isfav = false;
- if (json["City"] is String) {
- city = json["City"] ?? null;
- }
- if (json["Country"] is String) {
- country = json["Country"] ?? null;
- }
- if (json["Region"] is String) {
- region = json["Region"] ?? null;
- }
- if (json["activity_type"] is String) {
- activityType = json["activity_type"];
- }
- if (json["address"] is String) {
- address = json["address"];
- }
- if (json["city_id"] is String) {
- cityId = json["city_id"];
- }
- if (json["client_id"] is String) {
- clientId = json["client_id"];
- }
- if (json["cnt"] is String) {
- cnt = json["cnt"];
- }
- if (json["country_id"] is String) {
- countryId = json["country_id"];
- }
- if (json["created_by"] is String) {
- createdBy = json["created_by"];
- }
- if (json["created_on"] is String) {
- createdOn = json["created_on"];
- }
- if (json["dAllowed"] is bool) {
- dAllowed = json["dAllowed"];
- }
- if (json["eAllowed"] is bool) {
- eAllowed = json["eAllowed"];
- }
- if (json["end"] is String) {
- end = json["end"];
- }
- if (json["eventLat"] is String) {
- eventLat = json["eventLat"];
- }
- if (json["eventLong"] is String) {
- eventLong = json["eventLong"];
- }
- if (json["event_id"] is String) {
- eventId = json["event_id"];
- }
- if (json["event_type"] is String) {
- eventType = json["event_type"];
- }
- if (json["event_unique_id"] is String) {
- eventUniqueId = json["event_unique_id"];
- }
- if (json["event_user_attendee"] is bool) {
- eventUserAttendee = json["event_user_attendee"];
- }
- if (json["global_event_id"] is String) {
- globalEventId = json["global_event_id"];
- }
- if (json["hcp_pin"] is String) {
- hcpPin = json["hcp_pin"];
- }
- if (json["id"] is String) {
- id = json["id"];
- }
- if (json["kol_id"] is String) {
- kolId = json["kol_id"];
- }
- if (json["location"] is String) {
- location = json["location"];
- }
- if (json["modified_by"] is String) {
- modifiedBy = json["modified_by"];
- }
- if (json["modified_on"] is String) {
- modifiedOn = json["modified_on"];
- }
- if (json["name1"] is String) {
- name1 = json["name1"];
- }
- if (json["notes"] is String) {
- notes = json["notes"];
- }
- if (json["organizer"] is String) {
- organizer = json["organizer"];
- }
- if (json["organizerAlias"] is String) {
- organizerAlias = json["organizerAlias"];
- }
- if (json["organizer_type"] is String) {
- organizerType = json["organizer_type"];
- }
- if (json["otype"] is String) {
- otype = json["otype"];
- }
- if (json["partialcount"] is String) {
- partialcount = json["partialcount"];
- }
- if (json["partially_released_event"] is String) {
- partiallyReleasedEvent = json["partially_released_event"];
- }
- if (json["postal_code"] is String) {
- postalCode = json["postal_code"];
- }
- if (json["profile_type"] is String) {
- profileType = json["profile_type"];
- }
- if (json["project_id"] is String) {
- projectId = json["project_id"];
- }
- if (json["role"] is String) {
- role = json["role"];
- }
- if (json["session_name"] is String) {
- sessionName = json["session_name"];
- }
- if (json["session_note"] is String) {
- sessionNote = json["session_note"];
- }
- if (json["session_note1"] is String) {
- sessionNote1 = json["session_note1"];
- }
- if (json["session_sponsor"] is String) {
- sessionSponsor = json["session_sponsor"];
- }
- if (json["session_type"] is String) {
- sessionType = json["session_type"];
- }
- if (json["sponsor_type"] is String) {
- sponsorType = json["sponsor_type"];
- }
- if (json["start"] is String) {
- start = json["start"];
- }
- if (json["state_id"] is String) {
- stateId = json["state_id"];
- }
- if (json["stype"] is String) {
- stype = json["stype"];
- }
- if (json["subject"] is String) {
- subject = json["subject"];
- }
- if (json["therapeutic_area"] is String) {
- therapeuticArea = json["therapeutic_area"];
- }
- if (json["topic"] is String) {
- topic = json["topic"];
- }
- if (json["topic_name"] is String) {
- topicName = json["topic_name"];
- }
- if (json["type"] is String) {
- type = json["type"];
- }
- if (json["updated"] is bool) {
- updated = json["updated"];
- }
- if (json["url1"] is String) {
- url1 = json["url1"];
- }
- if (json["url2"] is String) {
- url2 = json["url2"];
- }
- if (json["user_count"] is String) {
- userCount = json["user_count"];
- }
+ factory EventsList.fromJson(Map json) => EventsList(
+ therapeuticArea: json["therapeutic_area"],
+ hcpPin: json["hcp_pin"],
+ cnt: json["cnt"],
+ 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"],
+ sponsorType: json["sponsor_type"],
+ 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: json["created_on"],
+ modifiedBy: json["modified_by"],
+ modifiedOn: json[
+ "modified_on"], // == null ? null : 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"],
+ stype: json["stype"],
+ otype: json["otype"],
+ // name: json["name"],
+ partiallyReleasedEvent: json["partially_released_event"],
+ country: json["Country"],
+ region: json["Region"],
+ city: json["City"],
+ topicName: json["topic_name"],
+ eventLat: json["eventLat"],
+ eventLong: json["eventLong"],
+ userCount: json["user_count"],
+ partialcount: json["partialcount"],
+ sessionNote1: json["session_note1"],
+ sessionNote: json["session_note"],
+ organizerAlias: json["organizerAlias"],
+ eAllowed: json["eAllowed"],
+ dAllowed: json["dAllowed"],
+ updated: json["updated"],
+ eventUserAttendee: json["event_user_attendee"],
+ eventUserInterest: json["event_user_interest"],
+ name1: json["name1"],
+ );
- if (json["speakerscount"] is String) {
- speakerscount = json["speakerscount"];
- }
- if (json["topTopics"] is String) {
- topTopics = json["topTopics"];
- }
- if (json["topSpeakers"] is String) {
- topSpeakers = json["topSpeakers"];
- }
- if (json["sponsors"] is String) {
- sponsors = json["sponsors"];
- }
- }
-
- Map toJson() {
- final Map _data = {};
- _data["City"] = city;
- _data["country"] = country;
- _data["region"] = region;
- _data["activity_type"] = activityType;
- _data["address"] = address;
- _data["city_id"] = cityId;
- _data["client_id"] = clientId;
- _data["cnt"] = cnt;
- _data["country_id"] = countryId;
- _data["created_by"] = createdBy;
- _data["created_on"] = createdOn;
- _data["dAllowed"] = dAllowed;
- _data["eAllowed"] = eAllowed;
- _data["end"] = end;
- _data["eventLat"] = eventLat;
- _data["eventLong"] = eventLong;
- _data["event_id"] = eventId;
- _data["event_type"] = eventType;
- _data["event_unique_id"] = eventUniqueId;
- _data["event_user_attendee"] = eventUserAttendee;
- _data["global_event_id"] = globalEventId;
- _data["hcp_pin"] = hcpPin;
- _data["id"] = id;
- _data["kol_id"] = kolId;
- _data["location"] = location;
- _data["modified_by"] = modifiedBy;
- _data["modified_on"] = modifiedOn;
- _data["name1"] = name1;
- _data["notes"] = notes;
- _data["organizer"] = organizer;
- _data["organizerAlias"] = organizerAlias;
- _data["organizer_type"] = organizerType;
- _data["otype"] = otype;
- _data["partialcount"] = partialcount;
- _data["partially_released_event"] = partiallyReleasedEvent;
- _data["postal_code"] = postalCode;
- _data["profile_type"] = profileType;
- _data["project_id"] = projectId;
- _data["role"] = role;
- _data["session_name"] = sessionName;
- _data["session_note"] = sessionNote;
- _data["session_note1"] = sessionNote1;
- _data["session_sponsor"] = sessionSponsor;
- _data["session_type"] = sessionType;
- _data["sponsor_type"] = sponsorType;
- _data["start"] = start;
- _data["state_id"] = stateId;
- _data["stype"] = stype;
- _data["subject"] = subject;
- _data["therapeutic_area"] = therapeuticArea;
- _data["topic"] = topic;
- _data["topic_name"] = topicName;
- _data["type"] = type;
- _data["updated"] = updated;
- _data["url1"] = url1;
- _data["url2"] = url2;
- _data["user_count"] = userCount;
- return _data;
- }
+ Map toJson() => {
+ "therapeutic_area": therapeuticArea,
+ "hcp_pin": hcpPin,
+ "cnt": cnt,
+ "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,
+ "sponsor_type": sponsorType,
+ "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,
+ "modified_by": modifiedBy,
+ "modified_on": modifiedOn,
+ "client_id": clientId,
+ "project_id": projectId,
+ "activity_type": activityType,
+ "profile_type": profileType,
+ "global_event_id": globalEventId,
+ "event_unique_id": eventUniqueId,
+ "stype": stype,
+ "otype": otype,
+ // "name": name,
+ "partially_released_event": partiallyReleasedEvent,
+ "Country": country,
+ "Region": region,
+ "City": city,
+ "topic_name": topicName,
+ "eventLat": eventLat,
+ "eventLong": eventLong,
+ "user_count": userCount,
+ "partialcount": partialcount,
+ "session_note1": sessionNote1,
+ "session_note": sessionNote,
+ "organizerAlias": organizerAlias,
+ "eAllowed": eAllowed,
+ "dAllowed": dAllowed,
+ "updated": updated,
+ "event_user_attendee": eventUserAttendee,
+ "event_user_interest": eventUserInterest,
+ "name1": name1,
+ };
}
+
+// EventsList.fromJson(Map json) {
+// isfav = false;
+// if (json["city_name"] is String) {
+// city = json["city_name"] ?? null;
+// }
+// if (json["country_name"] is String) {
+// country = json["country_name"] ?? null;
+// }
+// if (json["state_name"] is String) {
+// region = json["state_name"] ?? null;
+// }
+// if (json["activity_type"] is String) {
+// activityType = json["activity_type"];
+// }
+// if (json["address"] is String) {
+// address = json["address"];
+// }
+// if (json["city_id"] is String) {
+// cityId = json["city_id"];
+// }
+// if (json["client_id"] is String) {
+// clientId = json["client_id"];
+// }
+// if (json["cnt"] is String) {
+// cnt = json["cnt"];
+// }
+// if (json["country_id"] is String) {
+// countryId = json["country_id"];
+// }
+// if (json["created_by"] is String) {
+// createdBy = json["created_by"];
+// }
+// if (json["created_on"] is String) {
+// createdOn = json["created_on"];
+// }
+// if (json["dAllowed"] is bool) {
+// dAllowed = json["dAllowed"];
+// }
+// if (json["eAllowed"] is bool) {
+// eAllowed = json["eAllowed"];
+// }
+// if (json["end_date"] is String) {
+// end = json["end_date"];
+// }
+// if (json["eventLat"] is String) {
+// eventLat = json["eventLat"];
+// }
+// if (json["eventLong"] is String) {
+// eventLong = json["eventLong"];
+// }
+// if (json["unique_id"] is String) {
+// eventId = json["unique_id"];
+// }
+// if (json["event_type_name"] is String) {
+// eventType = json["event_type_name"];
+// }
+// if (json["event_unique_id"] is String) {
+// eventUniqueId = json["event_unique_id"];
+// }
+// if (json["event_user_attendee"] is bool) {
+// eventUserAttendee = json["event_user_attendee"];
+// }
+// if (json["global_event_id"] is String) {
+// globalEventId = json["global_event_id"];
+// }
+// if (json["hcp_pin"] is String) {
+// hcpPin = json["hcp_pin"];
+// }
+// if (json["id"] is String) {
+// id = json["id"];
+// }
+// if (json["kol_id"] is String) {
+// kolId = json["kol_id"];
+// }
+// if (json["location"] is String) {
+// location = json["location"];
+// }
+// if (json["modified_by"] is String) {
+// modifiedBy = json["modified_by"];
+// }
+// if (json["modified_on"] is String) {
+// modifiedOn = json["modified_on"];
+// }
+// if (json["event_name"] is String) {
+// name1 = json["event_name"];
+// }
+// if (json["notes"] is String) {
+// notes = json["notes"];
+// }
+// if (json["organizer"] is String) {
+// organizer = json["organizer"];
+// }
+// if (json["organizerAlias"] is String) {
+// organizerAlias = json["organizerAlias"];
+// }
+// if (json["organizer_type_name"] is String) {
+// organizerType = json["organizer_type_name"];
+// }
+// if (json["otype"] is String) {
+// otype = json["otype"];
+// }
+// if (json["partialcount"] is String) {
+// partialcount = json["partialcount"];
+// }
+// if (json["partially_released_event"] is String) {
+// partiallyReleasedEvent = json["partially_released_event"];
+// }
+// if (json["postal_code"] is String) {
+// postalCode = json["postal_code"];
+// }
+// if (json["profile_type"] is String) {
+// profileType = json["profile_type"];
+// }
+// if (json["project_id"] is String) {
+// projectId = json["project_id"];
+// }
+// if (json["role"] is String) {
+// role = json["role"];
+// }
+// if (json["session_name"] is String) {
+// sessionName = json["session_name"];
+// }
+// if (json["session_note"] is String) {
+// sessionNote = json["session_note"];
+// }
+// if (json["session_note1"] is String) {
+// sessionNote1 = json["session_note1"];
+// }
+// if (json["session_sponsor"] is String) {
+// sessionSponsor = json["session_sponsor"];
+// }
+// if (json["session_type"] is String) {
+// sessionType = json["session_type"];
+// }
+// if (json["sponsor_type_name"] is String) {
+// sponsorType = json["sponsor_type_name"];
+// }
+// if (json["start_date"] is String) {
+// start = json["start_date"];
+// }
+// if (json["state_id"] is String) {
+// stateId = json["state_id"];
+// }
+// if (json["stype"] is String) {
+// stype = json["stype"];
+// }
+// if (json["subject"] is String) {
+// subject = json["subject"];
+// }
+// if (json["therapeutic_area"] is String) {
+// therapeuticArea = json["therapeutic_area"];
+// }
+// if (json["topic"] is String) {
+// topic = json["topic"];
+// }
+// if (json["topic_name"] is String) {
+// topicName = json["topic_name"];
+// }
+// if (json["type"] is String) {
+// type = json["type"];
+// }
+// if (json["updated"] is bool) {
+// updated = json["updated"];
+// }
+// if (json["url"] is String) {
+// url1 = json["url"];
+// }
+// if (json["url2"] is String) {
+// url2 = json["url2"];
+// }
+// if (json["user_count"] is String) {
+// userCount = json["user_count"];
+// }
+
+// if (json["speakerscount"] is String) {
+// speakerscount = json["speakerscount"];
+// }
+// if (json["topTopics"] is String) {
+// topTopics = json["topTopics"];
+// }
+// if (json["topSpeakers"] is String) {
+// topSpeakers = json["topSpeakers"];
+// }
+// if (json["sponsors"] is String) {
+// sponsors = json["sponsors"];
+// }
+// }
+
+// Map toJson() {
+// final Map _data = {};
+// _data["City"] = city;
+// _data["country"] = country;
+// _data["region"] = region;
+// _data["activity_type"] = activityType;
+// _data["address"] = address;
+// _data["city_id"] = cityId;
+// _data["client_id"] = clientId;
+// _data["cnt"] = cnt;
+// _data["country_id"] = countryId;
+// _data["created_by"] = createdBy;
+// _data["created_on"] = createdOn;
+// _data["dAllowed"] = dAllowed;
+// _data["eAllowed"] = eAllowed;
+// _data["end"] = end;
+// _data["eventLat"] = eventLat;
+// _data["eventLong"] = eventLong;
+// _data["event_id"] = eventId;
+// _data["event_type"] = eventType;
+// _data["event_unique_id"] = eventUniqueId;
+// _data["event_user_attendee"] = eventUserAttendee;
+// _data["global_event_id"] = globalEventId;
+// _data["hcp_pin"] = hcpPin;
+// _data["id"] = id;
+// _data["kol_id"] = kolId;
+// _data["location"] = location;
+// _data["modified_by"] = modifiedBy;
+// _data["modified_on"] = modifiedOn;
+// _data["name1"] = name1;
+// _data["notes"] = notes;
+// _data["organizer"] = organizer;
+// _data["organizerAlias"] = organizerAlias;
+// _data["organizer_type"] = organizerType;
+// _data["otype"] = otype;
+// _data["partialcount"] = partialcount;
+// _data["partially_released_event"] = partiallyReleasedEvent;
+// _data["postal_code"] = postalCode;
+// _data["profile_type"] = profileType;
+// _data["project_id"] = projectId;
+// _data["role"] = role;
+// _data["session_name"] = sessionName;
+// _data["session_note"] = sessionNote;
+// _data["session_note1"] = sessionNote1;
+// _data["session_sponsor"] = sessionSponsor;
+// _data["session_type"] = sessionType;
+// _data["sponsor_type"] = sponsorType;
+// _data["start"] = start;
+// _data["state_id"] = stateId;
+// _data["stype"] = stype;
+// _data["subject"] = subject;
+// _data["therapeutic_area"] = therapeuticArea;
+// _data["topic"] = topic;
+// _data["topic_name"] = topicName;
+// _data["type"] = type;
+// _data["updated"] = updated;
+// _data["url1"] = url1;
+// _data["url2"] = url2;
+// _data["user_count"] = userCount;
+// return _data;
+// }
+// }
diff --git a/lib/model/neweventsmodel.g.dart b/lib/model/neweventsmodel.g.dart
index 99652ee..ca95532 100644
--- a/lib/model/neweventsmodel.g.dart
+++ b/lib/model/neweventsmodel.g.dart
@@ -80,13 +80,14 @@ class EventsListAdapter extends TypeAdapter {
url1: fields[54] as String?,
url2: fields[55] as String?,
userCount: fields[56] as String?,
+ eventUserInterest: fields[63] as bool?,
);
}
@override
void write(BinaryWriter writer, EventsList obj) {
writer
- ..writeByte(63)
+ ..writeByte(64)
..writeByte(0)
..write(obj.city)
..writeByte(1)
@@ -212,7 +213,9 @@ class EventsListAdapter extends TypeAdapter {
..writeByte(61)
..write(obj.topSpeakers)
..writeByte(62)
- ..write(obj.sponsors);
+ ..write(obj.sponsors)
+ ..writeByte(63)
+ ..write(obj.eventUserInterest);
}
@override
diff --git a/lib/model/sessionstopics_model.dart b/lib/model/sessionstopics_model.dart
new file mode 100644
index 0000000..cd9dc33
--- /dev/null
+++ b/lib/model/sessionstopics_model.dart
@@ -0,0 +1,102 @@
+// To parse this JSON data, do
+//
+// final sessionTopicsResponse = sessionTopicsResponseFromJson(jsonString);
+
+import 'dart:convert';
+
+SessionTopicsResponse sessionTopicsResponseFromJson(String str) =>
+ SessionTopicsResponse.fromJson(json.decode(str));
+
+String sessionTopicsResponseToJson(SessionTopicsResponse data) =>
+ json.encode(data.toJson());
+
+class SessionTopicsResponse {
+ List? data;
+
+ SessionTopicsResponse({
+ this.data,
+ });
+
+ factory SessionTopicsResponse.fromJson(Map json) =>
+ SessionTopicsResponse(
+ data: json["data"] == null
+ ? []
+ : List.from(
+ json["data"]!.map((x) => SessionsTopicsData.fromJson(x))),
+ );
+
+ Map toJson() => {
+ "data": data == null
+ ? []
+ : List.from(data!.map((x) => x.toJson())),
+ };
+}
+
+class SessionsTopicsData {
+ String? sessionName;
+ String? eventTopics;
+ String? kolEventsId;
+ String? eventAttendeesId;
+ String? myEventId;
+ String? note;
+ String? kolId;
+ String? id;
+ bool? canEditNotes;
+ bool? canAddNotes;
+ String? noteCount;
+ String? projKolId;
+ bool? canAddInsights;
+ bool? canEditInsights;
+
+ SessionsTopicsData({
+ this.sessionName,
+ this.eventTopics,
+ this.kolEventsId,
+ this.eventAttendeesId,
+ this.myEventId,
+ this.note,
+ this.kolId,
+ this.id,
+ this.canEditNotes,
+ this.canAddNotes,
+ this.noteCount,
+ this.projKolId,
+ this.canAddInsights,
+ this.canEditInsights,
+ });
+
+ factory SessionsTopicsData.fromJson(Map json) =>
+ SessionsTopicsData(
+ sessionName: json["session_name"],
+ eventTopics: json["event_topics"],
+ kolEventsId: json["kol_events_id"],
+ eventAttendeesId: json["event_attendees_id"],
+ myEventId: json["my_event_id"],
+ note: json["note"],
+ kolId: json["kol_id"],
+ id: json["id"],
+ canEditNotes: json["can_edit_notes"],
+ canAddNotes: json["can_add_notes"],
+ noteCount: json["note_count"],
+ projKolId: json["proj_kol_id"],
+ canAddInsights: json["can_add_insights"],
+ canEditInsights: json["can_edit_insights"],
+ );
+
+ Map toJson() => {
+ "session_name": sessionName,
+ "event_topics": eventTopics,
+ "kol_events_id": kolEventsId,
+ "event_attendees_id": eventAttendeesId,
+ "my_event_id": myEventId,
+ "note": note,
+ "kol_id": kolId,
+ "id": id,
+ "can_edit_notes": canEditNotes,
+ "can_add_notes": canAddNotes,
+ "note_count": noteCount,
+ "proj_kol_id": projKolId,
+ "can_add_insights": canAddInsights,
+ "can_edit_insights": canEditInsights,
+ };
+}
diff --git a/lib/model/specialtymodel.dart b/lib/model/specialtymodel.dart
index 6eb51f0..8034a6f 100644
--- a/lib/model/specialtymodel.dart
+++ b/lib/model/specialtymodel.dart
@@ -46,13 +46,19 @@ class Specialtyresp {
};
}
+List specialtyFromJson(String str) =>
+ List.from(json.decode(str).map((x) => Specialty.fromJson(x)));
+
+String specialtyToJson(List data) =>
+ json.encode(List.from(data.map((x) => x.toJson())));
+
class Specialty {
- String specialtyCount;
- String specialtyName;
+ String? specialtyCount;
+ String? specialtyName;
Specialty({
- required this.specialtyCount,
- required this.specialtyName,
+ this.specialtyCount,
+ this.specialtyName,
});
factory Specialty.fromJson(Map json) => Specialty(
diff --git a/lib/model/topics_cloud_model.dart b/lib/model/topics_cloud_model.dart
index 3afbca0..2848079 100644
--- a/lib/model/topics_cloud_model.dart
+++ b/lib/model/topics_cloud_model.dart
@@ -54,6 +54,13 @@ class Topicsresp {
};
}
+List topicsCloudDataFromJson(String str) =>
+ List.from(
+ json.decode(str).map((x) => TopicsCloudData.fromJson(x)));
+
+String topicsCloudDataToJson(List data) =>
+ json.encode(List.from(data.map((x) => x.toJson())));
+
class TopicsCloudData {
String? total;
String? topic;
diff --git a/lib/utils/apicall.dart b/lib/utils/apicall.dart
index 96cfdb7..e2cef62 100644
--- a/lib/utils/apicall.dart
+++ b/lib/utils/apicall.dart
@@ -5,13 +5,18 @@ import 'package:dio/dio.dart';
import 'package:dio/io.dart';
import 'package:flutter/services.dart';
import 'package:konectar_events/model/affiliationsmodel.dart';
+import 'package:konectar_events/model/events_details.dart';
+import 'package:konectar_events/model/events_list_resp_2.dart';
+import 'package:konectar_events/model/events_speakers_k1.dart';
import 'package:konectar_events/model/eventsdetailmodel.dart';
import 'package:konectar_events/model/eventsmodel.dart';
import 'package:konectar_events/model/eventsoverview.dart';
+import 'package:konectar_events/model/eventspeakers.dart';
import 'package:konectar_events/model/keywords_model.dart';
import 'package:konectar_events/model/neweventsmodel.dart';
import 'package:konectar_events/model/scope_model.dart';
import 'package:konectar_events/model/sessionnotesmodel.dart';
+import 'package:konectar_events/model/sessionstopics_model.dart';
import 'package:konectar_events/model/specialtymodel.dart';
import 'package:konectar_events/model/topics_cloud_model.dart';
import 'package:konectar_events/utils/constants.dart';
@@ -19,6 +24,7 @@ import 'package:konectar_events/utils/constants.dart';
class ApiCall {
final dio = Dio();
+ //K1 API CALLS
Future parseInfo() async {
Dio dio = Dio();
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
@@ -42,30 +48,6 @@ class ApiCall {
return response.data;
}
- //https://cardio-staging.konectar.io/notifications/list_all_notifications
- Future listnotifications() 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(
- 'https://cardio-staging.konectar.io/requested_kols/list_my_pending_approvals/',
- options: Options(
- followRedirects: false,
- validateStatus: (status) {
- return status! < 500;
- },
- headers: {'Content-type': 'application/json; charset=UTF-8'}),
- data: {"rows": "10", "page": "1", "sidx": "name", "sord": "desc"});
- print("response user settings here ");
- print(response.data.toString());
- return response.data;
- }
-
Future> getscopes() async {
Dio dio = Dio();
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
@@ -122,7 +104,7 @@ class ApiCall {
return keywordList;
}
- Future?> getStagingEvents() async {
+ Future> getEventsFromK1({String? type}) async {
Dio dio = Dio();
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
(HttpClient client) {
@@ -134,29 +116,132 @@ class ApiCall {
var formData = FormData.fromMap({
"user_email": "vinodh@aissel.com",
"project_id": "",
- "start": "",
- "end": "",
- "order_by": "7",
- "type": "1"
+ "start": DateTime(2024, 10, 14).toIso8601String(),
+ "end": DateTime(2024, 12, 14).toIso8601String(),
+ "order_by": 7,
+ "type": type ?? 1
});
response = await dio.post(
- '${EventsConstants.stagingUrl}${EventsConstants.eventslistapi}',
+ '${EventsConstants.devUrl}${EventsConstants.eventslistapi}',
options: Options(),
- queryParameters: {
- "user_email": "vinodh@aissel.com",
- },
+ // queryParameters: {
+ // "user_email": "vinodh@aissel.com",
+ // "project_id": "",
+ // "start": 2024 - 11 - 22,
+ // "end": "",
+ // "order_by": 7,
+ // "type": 1,
+ // },
data: formData);
print("response user eventssssss here!!!!!!!!!!!!!!!!!!!!! ");
print(response.data.toString());
Map jsondata = json.decode(response.data);
- EventsDataStaging? eventdata = EventsDataStaging.fromJson(jsondata);
- List? eventList = eventdata.events;
- return eventList;
+ EventsData eventresponse = EventsData.fromJson(jsondata);
+ List? eventdata = eventresponse.events;
+ return eventdata!;
}
- Future verifyEmail(
- String email, String deviceid, String platform) async {
+ Future followUnfollowEvent(String flag, 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 response;
+ var formData = FormData.fromMap(
+ {"user_email": "vinodh@aissel.com", "eid": eventid, "flag": flag});
+ response = await dio.post(
+ '${EventsConstants.devUrl}${EventsConstants.followUnfollowEvent}',
+ options: Options(),
+ queryParameters: {
+ "user_email": "vinodh@aissel.com",
+ "eid": eventid,
+ "flag": flag,
+ },
+ data: formData);
+ print("response user FOLLOW UNFOLLOW here!!!!!!!!!!!!!!!!!!!!! ");
+ print(response.data.toString());
+
+ return response.data.toString();
+ }
+
+ Future attendNotAttendEvent(String flag, 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 response;
+ var formData = FormData.fromMap(
+ {"user_email": "vinodh@aissel.com", "eid": eventid, "flag": flag});
+ response = await dio.post(
+ '${EventsConstants.devUrl}${EventsConstants.attendNotAttendEvent}',
+ options: Options(),
+ queryParameters: {
+ "user_email": "vinodh@aissel.com",
+ "eid": eventid,
+ "flag": flag,
+ },
+ data: formData);
+ print("response user FOLLOW UNFOLLOW here!!!!!!!!!!!!!!!!!!!!! ");
+ print(response.data.toString());
+
+ return response.data.toString();
+ }
+
+ Future> specialtyOfSpeakers({
+ required String eventid,
+ required String startDate,
+ required String endDate,
+ }) async {
+ print("CHECK_DATE $startDate $endDate $eventid");
+ Dio dio = Dio();
+ (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
+ (HttpClient client) {
+ client.badCertificateCallback =
+ (X509Certificate cert, String host, int port) => true;
+ return client;
+ };
+ Response response;
+ //ventId=4937&type='1'&sd=2024-07-30&ed=2024-08-03&user_email=vinodh@aissel.com
+ var formData = FormData.fromMap({
+ "user_email": "vinodh@aissel.com",
+ "eventId": eventid,
+ "sd": startDate,
+ "ed": endDate,
+ "type": 1,
+ });
+ print("FORMDATA:${formData.toString()},$startDate,$endDate");
+ response = await dio.post(
+ '${EventsConstants.devUrl}${EventsConstants.specialtyOfSpeakers}',
+ options: Options(),
+ queryParameters: {
+ "user_email": "vinodh@aissel.com",
+ "eventId": eventid,
+ "sd": "\"$startDate\"",
+ "ed": "\"$endDate\"",
+ "type": "\"1\"",
+ },
+ data: formData);
+ print("response SPECIALTY SPEAKERS here!!!!!!!!!!!!!!!!!!!!! ");
+ print(response.data.toString());
+ // Map jsondata = json.decode(response.data);
+
+ // Specialtyresp resp = Specialtyresp.fromJson(jsondata);
+ List data = specialtyFromJson(response.data);
+ return data;
+ }
+
+ Future> insightsTopicsCloud({
+ required String eventid,
+ required String startDate,
+ required String endDate,
+ }) async {
Dio dio = Dio();
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
(HttpClient client) {
@@ -166,26 +251,389 @@ class ApiCall {
};
Response response;
var formData = FormData.fromMap({
- "email": email,
+ "user_email": "vinodh@aissel.com",
+ "eventId": eventid,
+ "sd": "\"$startDate\"",
+ "ed": "\"$endDate\"",
+ "type": "\"1\"",
});
- response = await dio.post('${EventsConstants.getTokenApi}',
+ print("FORMDATA:${formData.toString()},$startDate,$endDate");
+ response = await dio.post(
+ '${EventsConstants.devUrl}${EventsConstants.insightsTopicsCloud}',
options: Options(),
queryParameters: {
- "email": email,
- "device_id": deviceid,
- "platform": platform,
+ "user_email": "vinodh@aissel.com",
+ "eventId": eventid,
+ "sd": "\"$startDate\"",
+ "ed": "\"$endDate\"",
+ "type": "\"1\"",
},
data: formData);
- if (response.statusCode == 200) {
- print("response user login!!!!!!!!!!!!!!!!!!!!! ");
- print(response.data.toString());
- return response.data;
+ print("response SPECIALTY SPEAKERS here!!!!!!!!!!!!!!!!!!!!! ");
+ print(response.data.toString());
+ // Map jsondata = json.decode(response.data);
+
+ // Specialtyresp resp = Specialtyresp.fromJson(jsondata);
+ List data = topicsCloudDataFromJson(response.data);
+ return data;
+ }
+
+ Future> insightsBarChart({
+ required String eventid,
+ required String startDate,
+ required 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",
+ "eventId": eventid,
+ "sd": "\"$startDate\"",
+ "ed": "\"$endDate\"",
+ "type": "\"1\"",
+ });
+ print("FORMDATA:${formData.toString()},$startDate,$endDate");
+ response = await dio.post(
+ '${EventsConstants.devUrl}${EventsConstants.insightsBarChart}',
+ options: Options(),
+ queryParameters: {
+ "user_email": "vinodh@aissel.com",
+ "eventId": eventid,
+ "sd": "\"$startDate\"",
+ "ed": "\"$endDate\"",
+ "type": "\"1\"",
+ },
+ data: formData);
+ print("response SPECIALTY SPEAKERS here!!!!!!!!!!!!!!!!!!!!! ");
+ print(response.data.toString());
+ // Map jsondata = json.decode(response.data);
+
+ // Specialtyresp resp = Specialtyresp.fromJson(jsondata);
+ List data = affiliationsFromJson(response.data);
+ return data;
+ }
+
+ Future 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",
+ "event_id": eventid,
+ });
+ response = await dio.post(
+ '${EventsConstants.devUrl}${EventsConstants.eventdetailsapi}',
+ options: Options(),
+ queryParameters: {
+ "user_email": "vinodh@aissel.com",
+ "event_id": eventid,
+ },
+ data: formData);
+ print("response user eventssssss here!!!!!!!!!!!!!!!!!!!!! ");
+ print(response.data.toString());
+ Map jsondata = json.decode(response.data);
+ EventsOverviewDetails? eventdata = EventsOverviewDetails.fromJson(jsondata);
+ EventsOverviewData overviewData = eventdata.data!;
+
+ return overviewData;
+ }
+
+ Future> getEventsSpeakersFromK1(
+ 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 response;
+ var formData = FormData.fromMap({
+ "user_email": "vinodh@aissel.com",
+ "event_id": eventid,
+ "sd": "2024-07-30",
+ "ed": "2024-08-03",
+ });
+ response = await dio.post(
+ '${EventsConstants.devUrl}${EventsConstants.speakerslistapi}',
+ options: Options(),
+ queryParameters: {
+ "user_email": "vinodh@aissel.com",
+ "event_id": eventid,
+ },
+ data: formData);
+ print("response user eventssssss here!!!!!!!!!!!!!!!!!!!!! ");
+ print(response.data.toString());
+ Map jsondata = json.decode(response.data);
+ EventSpeakersResponse? eventdata = EventSpeakersResponse.fromJson(jsondata);
+ List data = eventdata.data!;
+
+ return data;
+ }
+
+ Future> getSessionsTopics(
+ String eventid, String kolid, String kid) async {
+ Dio dio = Dio();
+ (dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
+ (HttpClient client) {
+ client.badCertificateCallback =
+ (X509Certificate cert, String host, int port) => true;
+ return client;
+ };
+ Response response;
+ print("formdata : eventid:$eventid kolid:$kolid kid:$kid");
+ var formData = FormData.fromMap({
+ "user_email": "vinodh@aissel.com",
+ "event_id": "eventid",
+ "kol_id": kolid,
+ "k_id": kid,
+ "proj_kol_id": 0,
+ });
+ response = await dio.post(
+ '${EventsConstants.devUrl}${EventsConstants.showEventsTopicsAndSession}',
+ options: Options(),
+ queryParameters: {
+ "user_email": "vinodh@aissel.com",
+ "event_id": eventid,
+ },
+ data: formData);
+ print("response user SESSIONTOPICS here!!!!!!!!!!!!!!!!!!!!! ");
+ print(response.data.toString());
+ Map jsondata = json.decode(response.data);
+ SessionTopicsResponse sessionTopicsResponse =
+ SessionTopicsResponse.fromJson(jsondata);
+ List data = sessionTopicsResponse.data!;
+
+ return data;
+ }
+
+ Future addSessionNotes(String eventid, String kolid,
+ String event_attendees_id, String kid, String notes) 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",
+ "kol_events_id": eventid,
+ "kol_id": kolid,
+ "event_attendees_id": event_attendees_id,
+ "notes": notes,
+ });
+ response = await dio.post(
+ '${EventsConstants.devUrl}${EventsConstants.showEventsTopicsAndSession}',
+ options: Options(),
+ data: formData);
+ print("response user ADDSESSION here!!!!!!!!!!!!!!!!!!!!! ");
+ print(response.data.toString());
+ Map jsondata = json.decode(response.data);
+ // SessionTopicsResponse sessionTopicsResponse =
+ // SessionTopicsResponse.fromJson(jsondata);
+ // List data = sessionTopicsResponse.data!;
+
+ return jsondata;
+ }
+
+ //************ K2 API CALLS ***********************************************************************************************************************************
+
+ Future> getEventsFromK2(int page, String search,
+ {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;
+ if (startdate != "") {
+ formData = {
+ "page": page,
+ "limit": 20,
+ "start_date": startdate,
+ "end_date": enddate,
+ };
} else {
- print("isEmplty");
- return null;
+ formData = {
+ "page": page,
+ "limit": 20,
+ "conditions": [
+ {"field": "event_name", "type": "like", "value": search}
+ ]
+ };
+ }
+
+ response = await dio.post('${EventsConstants.eventslistapifromk2}',
+ options: Options(headers: {
+ "Authorization":
+ "Bearer 242|f4s7EfBjD01z1tuGeJfgKm7v2WzZk22uDOehqFyla72c481a",
+ HttpHeaders.contentTypeHeader: "application/json",
+ }),
+ // queryParameters: {
+ // "page": page,
+ // "limit": 20,
+ // // "id": "11c39192480587d2d6213bfef6744571",
+ // "conditions": jsonEncode([
+ // {"field": eventfield, "type": "like", "value": searchkey}
+ // ])
+ // },
+ data: formData);
+ if (response.statusCode == 200) {
+ print("response EVENTS!!!!!!!!!!!!!!!!!!!! ");
+ print(response.data.toString());
+ Map jsondata = response.data;
+ EventsListRespK2 eventresponse = EventsListRespK2.fromJson(jsondata);
+ List? eventdata = eventresponse.data;
+
+ return eventdata!;
+ } else {
+ print("isEmpty");
+ return [];
}
}
+ Future> getMyEventsFromK2(int page, String search,
+ {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;
+ if (startdate != "") {
+ formData = {
+ "page": page,
+ "limit": 20,
+ "id": "11c39192480587d2d6213bfef6744571",
+ "start_date": startdate,
+ "end_date": enddate,
+ };
+ } else {
+ formData = {
+ "page": page,
+ "limit": 20,
+ "id": "11c39192480587d2d6213bfef6744571",
+ "conditions": [
+ {"field": "event_name", "type": "like", "value": search}
+ ]
+ };
+ }
+
+ response = await dio.post('${EventsConstants.eventslistapifromk2}',
+ options: Options(headers: {
+ "Authorization":
+ "Bearer 242|f4s7EfBjD01z1tuGeJfgKm7v2WzZk22uDOehqFyla72c481a",
+ HttpHeaders.contentTypeHeader: "application/json",
+ }),
+ // queryParameters: {
+ // "page": page,
+ // "limit": 20,
+ // // "id": "11c39192480587d2d6213bfef6744571",
+ // "conditions": jsonEncode([
+ // {"field": eventfield, "type": "like", "value": searchkey}
+ // ])
+ // },
+ data: formData);
+
+ if (response.statusCode == 200) {
+ print("response MY EVENTS!!!!!!!!!!!!!!!!!!!! ");
+ print(response.data.toString());
+ Map jsondata = response.data;
+ EventsListRespK2 eventresponse = EventsListRespK2.fromJson(jsondata);
+ List? eventdata = eventresponse.data;
+
+ return eventdata!;
+ } else {
+ print("isEmpty");
+ return [];
+ }
+ }
+
+//ADD TO FAVS
+ Future addEventsToFav(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 response;
+
+ response = await dio.post(
+ '${EventsConstants.addToMyEventsApi}',
+ options: Options(headers: {
+ "Authorization":
+ "Bearer 242|f4s7EfBjD01z1tuGeJfgKm7v2WzZk22uDOehqFyla72c481a"
+ }),
+ queryParameters: {
+ "event_id": eventid,
+ "user_id": "11c39192480587d2d6213bfef6744571",
+ },
+ );
+ print("response user keywords here########## ");
+ print(response.data.toString());
+ Map jsondata = json.decode(response.toString());
+ String message = jsondata["message"];
+ print("***$message");
+
+ return message;
+ }
+
+//REMOVE FROM FAVS
+
+ Future removeEventsFromFav(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 response;
+
+ response = await dio.post(
+ '${EventsConstants.removeFromMyEventsApi}',
+ options: Options(headers: {
+ "Authorization":
+ "Bearer 242|f4s7EfBjD01z1tuGeJfgKm7v2WzZk22uDOehqFyla72c481a",
+ }),
+ queryParameters: {
+ "event_id": eventid,
+ "user_id": "11c39192480587d2d6213bfef6744571",
+ },
+ );
+ print("response user keywords here########## ");
+ print(response.data.toString());
+ Map jsondata = json.decode(response.toString());
+ String message = jsondata["message"];
+ print("***$message");
+
+ return message;
+ }
+
+ //GET MY EVENTS
+
Future verifyCode(String email, String code) async {
Dio dio = Dio();
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
@@ -238,8 +686,151 @@ class ApiCall {
return response.data;
}
- Future getEventsOverview(
- String eventid, String startDate, String endDate) async {
+ //SEARCH EVENTS API FROM K2
+
+ Future> getSearchedEventsFromK2(
+ int page, String eventfield, String searchkey) 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 = {
+ "page": page,
+ "limit": 20,
+ "conditions": [
+ {"field": eventfield, "type": "like", "value": searchkey}
+ ]
+ };
+ response = await dio.post('${EventsConstants.eventslistapifromk2}',
+ options: Options(headers: {
+ "Authorization":
+ "Bearer 242|f4s7EfBjD01z1tuGeJfgKm7v2WzZk22uDOehqFyla72c481a",
+ HttpHeaders.contentTypeHeader: "application/json",
+ }),
+ // queryParameters: {
+ // "page": page,
+ // "limit": 20,
+ // // "id": "11c39192480587d2d6213bfef6744571",
+ // "conditions": jsonEncode([
+ // {"field": eventfield, "type": "like", "value": searchkey}
+ // ])
+ // },
+ data: formData);
+ if (response.statusCode == 200) {
+ print("response SEARCH EVENTS!!!!!!!!!!!!!!!!!!!! ");
+ print(response.data.toString());
+ Map jsondata = response.data;
+ EventsListRespK2 eventresponse = EventsListRespK2.fromJson(jsondata);
+ List? eventdata = eventresponse.data;
+
+ return eventdata!;
+ } else {
+ print("isEmpty");
+ return [];
+ }
+ }
+
+//SPEAKERS LIST FROM K2
+ Future