api implementation and other changes
After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 411 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 68 KiB |
|
@ -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": "1",
|
||||||
|
"name": "Acute Neurology1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "2",
|
||||||
|
"name": "Cystic Fibrosis"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Product",
|
||||||
|
"id": "product",
|
||||||
|
"depid": "therapeutic",
|
||||||
|
"widget": "dropdown",
|
||||||
|
"input": "dropdown",
|
||||||
|
"inputList": [
|
||||||
|
{
|
||||||
|
"id": "11",
|
||||||
|
"pid": "1",
|
||||||
|
"name": "Prometra Pump"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "12",
|
||||||
|
"pid": "2",
|
||||||
|
"name": "Prometra Pump"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "13",
|
||||||
|
"pid": "2",
|
||||||
|
"name": "Prometra Catheter"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Source Type",
|
||||||
|
"id": "sourcetype",
|
||||||
|
"depid": "",
|
||||||
|
"widget": "dropdown",
|
||||||
|
"input": "dropdown",
|
||||||
|
"inputList": [
|
||||||
|
{
|
||||||
|
"id": "21",
|
||||||
|
"name": "Advisory Board/Expert Committee"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "22",
|
||||||
|
"name": "Congress"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "23",
|
||||||
|
"name": "Industry professional direct knowledge "
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"validation": {
|
||||||
|
"isRequired": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Congress Source",
|
||||||
|
"id": "congresssource",
|
||||||
|
"depid": "sourcetype",
|
||||||
|
"widget": "dropdown",
|
||||||
|
"input": "dropdown",
|
||||||
|
"inputList": [
|
||||||
|
{
|
||||||
|
"id": "31",
|
||||||
|
"pid": "22",
|
||||||
|
"name": "Industry professional"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "32",
|
||||||
|
"pid": "22",
|
||||||
|
"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": "41",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -3,9 +3,7 @@ PODS:
|
||||||
- Flutter
|
- Flutter
|
||||||
- connectivity_plus (0.0.1):
|
- connectivity_plus (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- ReachabilitySwift
|
- FlutterMacOS
|
||||||
- device_info_plus (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- DKImagePickerController/Core (4.3.4):
|
- DKImagePickerController/Core (4.3.4):
|
||||||
- DKImagePickerController/ImageDataManager
|
- DKImagePickerController/ImageDataManager
|
||||||
- DKImagePickerController/Resource
|
- DKImagePickerController/Resource
|
||||||
|
@ -94,7 +92,7 @@ PODS:
|
||||||
- mobile_device_identifier (0.0.1):
|
- mobile_device_identifier (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- JNKeychain
|
- JNKeychain
|
||||||
- package_info_plus (0.4.5):
|
- open_file (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- path_provider_foundation (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
@ -102,31 +100,33 @@ PODS:
|
||||||
- permission_handler_apple (9.3.0):
|
- permission_handler_apple (9.3.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
- PromisesObjC (2.4.0)
|
- PromisesObjC (2.4.0)
|
||||||
- ReachabilitySwift (5.0.0)
|
|
||||||
- SDWebImage (5.18.10):
|
- SDWebImage (5.18.10):
|
||||||
- SDWebImage/Core (= 5.18.10)
|
- SDWebImage/Core (= 5.18.10)
|
||||||
- SDWebImage/Core (5.18.10)
|
- SDWebImage/Core (5.18.10)
|
||||||
- shared_preferences_foundation (0.0.1):
|
- shared_preferences_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- sqflite (0.0.3):
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
- SwiftyGif (5.4.4)
|
- SwiftyGif (5.4.4)
|
||||||
- url_launcher_ios (0.0.1):
|
- url_launcher_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- add_2_calendar (from `.symlinks/plugins/add_2_calendar/ios`)
|
- add_2_calendar (from `.symlinks/plugins/add_2_calendar/ios`)
|
||||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
|
||||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
|
||||||
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
||||||
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
||||||
- firebase_remote_config (from `.symlinks/plugins/firebase_remote_config/ios`)
|
- firebase_remote_config (from `.symlinks/plugins/firebase_remote_config/ios`)
|
||||||
- Flutter (from `Flutter`)
|
- Flutter (from `Flutter`)
|
||||||
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
||||||
- mobile_device_identifier (from `.symlinks/plugins/mobile_device_identifier/ios`)
|
- 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`)
|
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
- 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`)
|
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
|
@ -144,7 +144,6 @@ SPEC REPOS:
|
||||||
- GoogleUtilities
|
- GoogleUtilities
|
||||||
- JNKeychain
|
- JNKeychain
|
||||||
- PromisesObjC
|
- PromisesObjC
|
||||||
- ReachabilitySwift
|
|
||||||
- SDWebImage
|
- SDWebImage
|
||||||
- SwiftyGif
|
- SwiftyGif
|
||||||
|
|
||||||
|
@ -152,9 +151,7 @@ EXTERNAL SOURCES:
|
||||||
add_2_calendar:
|
add_2_calendar:
|
||||||
:path: ".symlinks/plugins/add_2_calendar/ios"
|
:path: ".symlinks/plugins/add_2_calendar/ios"
|
||||||
connectivity_plus:
|
connectivity_plus:
|
||||||
:path: ".symlinks/plugins/connectivity_plus/ios"
|
:path: ".symlinks/plugins/connectivity_plus/darwin"
|
||||||
device_info_plus:
|
|
||||||
:path: ".symlinks/plugins/device_info_plus/ios"
|
|
||||||
file_picker:
|
file_picker:
|
||||||
:path: ".symlinks/plugins/file_picker/ios"
|
:path: ".symlinks/plugins/file_picker/ios"
|
||||||
firebase_core:
|
firebase_core:
|
||||||
|
@ -167,24 +164,25 @@ EXTERNAL SOURCES:
|
||||||
:path: ".symlinks/plugins/image_picker_ios/ios"
|
:path: ".symlinks/plugins/image_picker_ios/ios"
|
||||||
mobile_device_identifier:
|
mobile_device_identifier:
|
||||||
:path: ".symlinks/plugins/mobile_device_identifier/ios"
|
:path: ".symlinks/plugins/mobile_device_identifier/ios"
|
||||||
package_info_plus:
|
open_file:
|
||||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
:path: ".symlinks/plugins/open_file/ios"
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||||
permission_handler_apple:
|
permission_handler_apple:
|
||||||
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
||||||
shared_preferences_foundation:
|
shared_preferences_foundation:
|
||||||
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
||||||
|
sqflite:
|
||||||
|
:path: ".symlinks/plugins/sqflite/darwin"
|
||||||
url_launcher_ios:
|
url_launcher_ios:
|
||||||
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
add_2_calendar: 5eee66d5a3b99cd5e1487a7e03abd4e3ac4aff11
|
add_2_calendar: 5eee66d5a3b99cd5e1487a7e03abd4e3ac4aff11
|
||||||
connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e
|
connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
|
||||||
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
|
|
||||||
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
|
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
|
||||||
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
|
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
|
||||||
file_picker: 15fd9539e4eb735dc54bae8c0534a7a9511a03de
|
file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
|
||||||
Firebase: 0312a2352584f782ea56f66d91606891d4607f06
|
Firebase: 0312a2352584f782ea56f66d91606891d4607f06
|
||||||
firebase_core: 0b39f4f424e02eecabb2356ddf331fa07b772af8
|
firebase_core: 0b39f4f424e02eecabb2356ddf331fa07b772af8
|
||||||
firebase_remote_config: f57c28ff78d1d933bbe1b2cc11659cc82f9978e8
|
firebase_remote_config: f57c28ff78d1d933bbe1b2cc11659cc82f9978e8
|
||||||
|
@ -200,13 +198,13 @@ SPEC CHECKSUMS:
|
||||||
image_picker_ios: b545a5f16c0fa88e3ecbbce3ed4de45567a8ec18
|
image_picker_ios: b545a5f16c0fa88e3ecbbce3ed4de45567a8ec18
|
||||||
JNKeychain: fb6cc9ec95959ba46cd95d0ee6f7a05e41da9f42
|
JNKeychain: fb6cc9ec95959ba46cd95d0ee6f7a05e41da9f42
|
||||||
mobile_device_identifier: 34f80c8985bb1506880c2ae10cb24cfb9918f1a7
|
mobile_device_identifier: 34f80c8985bb1506880c2ae10cb24cfb9918f1a7
|
||||||
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
|
open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d
|
||||||
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
|
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
|
||||||
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
||||||
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||||
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
|
|
||||||
SDWebImage: fc8f2d48bbfd72ef39d70e981bd24a3f3be53fec
|
SDWebImage: fc8f2d48bbfd72ef39d70e981bd24a3f3be53fec
|
||||||
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
|
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
|
||||||
|
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
||||||
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
|
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
|
||||||
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586
|
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586
|
||||||
|
|
||||||
|
|
|
@ -490,7 +490,7 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = 69ERN967NS;
|
DEVELOPMENT_TEAM = 44SNAJ6T8L;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
@ -668,8 +668,10 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
DEVELOPMENT_TEAM = 69ERN967NS;
|
DEVELOPMENT_TEAM = 44SNAJ6T8L;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
@ -678,6 +680,7 @@
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.konectarEvents;
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.konectarEvents;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
|
|
@ -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_config_data.dart';
|
||||||
// import 'package:konectar_events/ui_screen/interactionform/model/interaction_data.dart';
|
// import 'package:konectar_events/ui_screen/interactionform/model/interaction_data.dart';
|
||||||
// import 'package:konectar_events/ui_screen/interactionform/util.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/NewtworkConnectivity.dart';
|
||||||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/mockapi.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';
|
import 'package:konectar_events/contacts_module/ui_screen/interactionform/model/interaction_config_data.dart';
|
||||||
|
@ -151,6 +154,39 @@ class ConfigDataProvider extends ChangeNotifier {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> initConfigUIDataMediccalInsight() async {
|
||||||
|
List<InteractionConfigData> 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<InteractionConfigData>('InteractionConfigDataBox');
|
||||||
|
|
||||||
|
if (!box.isOpen) {
|
||||||
|
box = await Hive.openBox<InteractionConfigData>(
|
||||||
|
'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<List<InteractionConfigData>>
|
Future<List<InteractionConfigData>>
|
||||||
fetchLocalInteactionConfigDataMedical() async {
|
fetchLocalInteactionConfigDataMedical() async {
|
||||||
// dynamic jsonResult = jsonDecode(
|
// dynamic jsonResult = jsonDecode(
|
||||||
|
@ -171,6 +207,25 @@ class ConfigDataProvider extends ChangeNotifier {
|
||||||
return interactionConfigData;
|
return interactionConfigData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<List<InteractionConfigData>> fetchLocalMedicalInsight() async {
|
||||||
|
dynamic jsonResult = jsonDecode(
|
||||||
|
await rootBundle.loadString("assets/medicalinsightform.json"));
|
||||||
|
//dynamic jsonResult = await MockApiCall().getConfigDataMedical();
|
||||||
|
|
||||||
|
List<InteractionConfigData> 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<void> initConfigUIDataEng() async {
|
Future<void> initConfigUIDataEng() async {
|
||||||
List<InteractionConfigData> interactionConfigData = [];
|
List<InteractionConfigData> interactionConfigData = [];
|
||||||
// interactionConfigData = await fetchInteactionConfigData();
|
// interactionConfigData = await fetchInteactionConfigData();
|
||||||
|
|
|
@ -560,11 +560,12 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
case InteractionWidget.DROPDOWN:
|
|
||||||
// return customdropdown(sectionItem, provider, list, multiple);
|
|
||||||
|
|
||||||
return customAutoCompletedropdown(
|
case InteractionWidget.DROPDOWN:
|
||||||
sectionItem, provider, list, multiple);
|
return customdropdown(sectionItem, provider, list, multiple);
|
||||||
|
|
||||||
|
// return customAutoCompletedropdown(
|
||||||
|
// sectionItem, provider, list, multiple);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -671,7 +672,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
||||||
backgroundColor: Colors.green.shade500,
|
backgroundColor: Colors.green.shade500,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
String record =
|
String record =
|
||||||
await provider.saveJsonObject(context, widget.form);
|
await provider.saveJsonObject(context, widget.form, "hc");
|
||||||
|
|
||||||
print("Validation_isss: ${provider.isLoading}");
|
print("Validation_isss: ${provider.isLoading}");
|
||||||
|
|
||||||
|
|
|
@ -1496,7 +1496,8 @@ class InteractionProvider extends ChangeNotifier {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> saveJsonObject(BuildContext context, String form,
|
Future<String> saveJsonObject(
|
||||||
|
BuildContext context, String form, String? title,
|
||||||
{bool isEdit = false}) async {
|
{bool isEdit = false}) async {
|
||||||
print("form_data: $form");
|
print("form_data: $form");
|
||||||
// for (var ob in interactionReponseList) {
|
// for (var ob in interactionReponseList) {
|
||||||
|
@ -1562,6 +1563,7 @@ class InteractionProvider extends ChangeNotifier {
|
||||||
id: generateId,
|
id: generateId,
|
||||||
updatedTime: DateTime.now().toString(),
|
updatedTime: DateTime.now().toString(),
|
||||||
form: form,
|
form: form,
|
||||||
|
hcp: title,
|
||||||
intId: intId ?? "id",
|
intId: intId ?? "id",
|
||||||
intName: intName ?? "name");
|
intName: intName ?? "name");
|
||||||
var box = Hive.box<SaveInteraction>('InteractionDataBox');
|
var box = Hive.box<SaveInteraction>('InteractionDataBox');
|
||||||
|
|
|
@ -38,6 +38,8 @@ class SaveInteraction {
|
||||||
String intId;
|
String intId;
|
||||||
@HiveField(5)
|
@HiveField(5)
|
||||||
String intName;
|
String intName;
|
||||||
|
@HiveField(6)
|
||||||
|
String? hcp;
|
||||||
|
|
||||||
SaveInteraction(
|
SaveInteraction(
|
||||||
{required this.save,
|
{required this.save,
|
||||||
|
@ -45,6 +47,7 @@ class SaveInteraction {
|
||||||
this.form,
|
this.form,
|
||||||
this.updatedTime,
|
this.updatedTime,
|
||||||
required this.intId,
|
required this.intId,
|
||||||
|
this.hcp,
|
||||||
required this.intName});
|
required this.intName});
|
||||||
|
|
||||||
factory SaveInteraction.fromJson(Map<String, dynamic> json) =>
|
factory SaveInteraction.fromJson(Map<String, dynamic> json) =>
|
||||||
|
@ -53,6 +56,7 @@ class SaveInteraction {
|
||||||
json["save"].map((x) => SaveData.fromJson(x))),
|
json["save"].map((x) => SaveData.fromJson(x))),
|
||||||
intId: 'intId',
|
intId: 'intId',
|
||||||
intName: 'intName',
|
intName: 'intName',
|
||||||
|
hcp: 'hcp',
|
||||||
id: 'id');
|
id: 'id');
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
Map<String, dynamic> toJson() => {
|
||||||
|
@ -62,6 +66,7 @@ class SaveInteraction {
|
||||||
Map<String, dynamic> savetoJson() => {
|
Map<String, dynamic> savetoJson() => {
|
||||||
"form": form,
|
"form": form,
|
||||||
"intId": intId,
|
"intId": intId,
|
||||||
|
"hcp": hcp,
|
||||||
};
|
};
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -22,6 +22,7 @@ class SaveInteractionAdapter extends TypeAdapter<SaveInteraction> {
|
||||||
form: fields[2] as String?,
|
form: fields[2] as String?,
|
||||||
updatedTime: fields[3] as String?,
|
updatedTime: fields[3] as String?,
|
||||||
intId: fields[4] as String,
|
intId: fields[4] as String,
|
||||||
|
hcp: fields[6] as String?,
|
||||||
intName: fields[5] as String,
|
intName: fields[5] as String,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +30,7 @@ class SaveInteractionAdapter extends TypeAdapter<SaveInteraction> {
|
||||||
@override
|
@override
|
||||||
void write(BinaryWriter writer, SaveInteraction obj) {
|
void write(BinaryWriter writer, SaveInteraction obj) {
|
||||||
writer
|
writer
|
||||||
..writeByte(6)
|
..writeByte(7)
|
||||||
..writeByte(0)
|
..writeByte(0)
|
||||||
..write(obj.id)
|
..write(obj.id)
|
||||||
..writeByte(1)
|
..writeByte(1)
|
||||||
|
@ -41,7 +42,9 @@ class SaveInteractionAdapter extends TypeAdapter<SaveInteraction> {
|
||||||
..writeByte(4)
|
..writeByte(4)
|
||||||
..write(obj.intId)
|
..write(obj.intId)
|
||||||
..writeByte(5)
|
..writeByte(5)
|
||||||
..write(obj.intName);
|
..write(obj.intName)
|
||||||
|
..writeByte(6)
|
||||||
|
..write(obj.hcp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -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/interactionprovider.dart';
|
||||||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/model/interaction_data.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/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/custombutton.dart';
|
||||||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/customrangeslider.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';
|
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 {
|
class InteractionScreen1 extends StatefulWidget {
|
||||||
int index;
|
int index;
|
||||||
String form;
|
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
|
@override
|
||||||
State<InteractionScreen1> createState() => _InteractionScreen1State();
|
State<InteractionScreen1> createState() => _InteractionScreen1State();
|
||||||
|
@ -119,10 +122,11 @@ class _InteractionScreen1State extends State<InteractionScreen1> {
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const FittedBox(
|
backgroundColor: Constants.k2color,
|
||||||
|
title: FittedBox(
|
||||||
fit: BoxFit.scaleDown,
|
fit: BoxFit.scaleDown,
|
||||||
child: Text(
|
child: Text(
|
||||||
'Record New Interaction',
|
widget.title ?? 'Record New Interaction',
|
||||||
style: TextStyle(color: Colors.white, fontSize: 18.0),
|
style: TextStyle(color: Colors.white, fontSize: 18.0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -316,7 +320,7 @@ class _InteractionScreen1State extends State<InteractionScreen1> {
|
||||||
: 4.8
|
: 4.8
|
||||||
: isTablet
|
: isTablet
|
||||||
? 2.8
|
? 2.8
|
||||||
: 4.5,
|
: 5.5,
|
||||||
|
|
||||||
children: List.generate(
|
children: List.generate(
|
||||||
sectionList.length,
|
sectionList.length,
|
||||||
|
@ -484,7 +488,9 @@ class _InteractionScreen1State extends State<InteractionScreen1> {
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
String record =
|
String record =
|
||||||
await provider.saveJsonObject(
|
await provider.saveJsonObject(
|
||||||
context, widget.form);
|
context,
|
||||||
|
widget.form,
|
||||||
|
widget.title);
|
||||||
|
|
||||||
print(
|
print(
|
||||||
"Validation_isss: ${provider.isLoading}");
|
"Validation_isss: ${provider.isLoading}");
|
||||||
|
@ -618,7 +624,14 @@ class _InteractionScreen1State extends State<InteractionScreen1> {
|
||||||
: buildRadio(sectionItem, provider);
|
: buildRadio(sectionItem, provider);
|
||||||
|
|
||||||
case InteractionWidget.LABEL:
|
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:
|
case InteractionWidget.RANGESLIDER:
|
||||||
return CustomRangeSlider(
|
return CustomRangeSlider(
|
||||||
|
@ -687,8 +700,8 @@ class _InteractionScreen1State extends State<InteractionScreen1> {
|
||||||
// maxchars: int.parse(sectionItem.validation!.chars ?? "0"),
|
// maxchars: int.parse(sectionItem.validation!.chars ?? "0"),
|
||||||
controller: sectionItem.controller!,
|
controller: sectionItem.controller!,
|
||||||
labelText: sectionItem.name,
|
labelText: sectionItem.name,
|
||||||
// maxlines: 8,
|
maxlines: 8,
|
||||||
//minlines: 4,
|
minlines: 8,
|
||||||
onChanged: (val) {
|
onChanged: (val) {
|
||||||
sectionItem.selectedValue = [];
|
sectionItem.selectedValue = [];
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
@ -997,10 +1010,10 @@ class _InteractionScreen1State extends State<InteractionScreen1> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
case InteractionWidget.DROPDOWN:
|
case InteractionWidget.DROPDOWN:
|
||||||
// return customdropdown(sectionItem, provider, list, multiple);
|
return customdropdown(sectionItem, provider, list, multiple);
|
||||||
|
|
||||||
return customAutoCompletedropdown(
|
// return customAutoCompletedropdown(
|
||||||
sectionItem, provider, list, multiple);
|
// sectionItem, provider, list, multiple);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1015,11 +1028,13 @@ class _InteractionScreen1State extends State<InteractionScreen1> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget buildDateWidget(SectionList sectionItem) {
|
Widget buildDateWidget(SectionList sectionItem) {
|
||||||
|
// sectionItem.controller!.text =
|
||||||
|
// DateFormat('yyyy-MM-dd').format(DateTime.now());
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
|
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
// width: isTablet ? 200 : MediaQuery.of(context).size.width,
|
// width: isTablet ? 200 : MediaQuery.of(context).size.width,
|
||||||
// height: isTablet ? 50 : 40,
|
height: isTablet ? 50 : 40,
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller:
|
controller:
|
||||||
|
@ -1106,8 +1121,8 @@ class _InteractionScreen1State extends State<InteractionScreen1> {
|
||||||
child: CustomButton(
|
child: CustomButton(
|
||||||
backgroundColor: Colors.green.shade500,
|
backgroundColor: Colors.green.shade500,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
String record =
|
String record = await provider.saveJsonObject(
|
||||||
await provider.saveJsonObject(context, widget.form);
|
context, widget.form, widget.title);
|
||||||
|
|
||||||
print("Validation_isss: ${provider.isLoading}");
|
print("Validation_isss: ${provider.isLoading}");
|
||||||
|
|
||||||
|
@ -1843,6 +1858,8 @@ class _InteractionScreen1State extends State<InteractionScreen1> {
|
||||||
Widget cancelButton = TextButton(
|
Widget cancelButton = TextButton(
|
||||||
child: const Text("Ok"),
|
child: const Text("Ok"),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
await Provider.of<ViewInteractionProvider>(context, listen: false)
|
||||||
|
.getRecords(widget.form, hcp: widget.title ?? "");
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
|
|
|
@ -300,7 +300,7 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen> {
|
||||||
sectionItem.id, sectionItem.selectedValue!.last));
|
sectionItem.id, sectionItem.selectedValue!.last));
|
||||||
|
|
||||||
case InteractionWidget.LABEL:
|
case InteractionWidget.LABEL:
|
||||||
return Text(sectionItem.input!);
|
return Text(sectionItem.selectedValue!.last.toString());
|
||||||
|
|
||||||
case InteractionWidget.RANGESLIDER:
|
case InteractionWidget.RANGESLIDER:
|
||||||
return Text(sectionItem.selectedValue!.isNotEmpty
|
return Text(sectionItem.selectedValue!.isNotEmpty
|
||||||
|
|
|
@ -61,13 +61,13 @@ class ViewInteractionProvider extends ChangeNotifier {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> getRecords(String formname) async {
|
Future<void> getRecords(String formname, {String? hcp}) async {
|
||||||
var box = await Hive.openBox<SaveInteraction>('InteractionDataBox');
|
var box = await Hive.openBox<SaveInteraction>('InteractionDataBox');
|
||||||
savedList = box.values.toList();
|
savedList = box.values.toList();
|
||||||
savedList = savedList
|
savedList = savedList
|
||||||
.where(
|
.where((element) => element.form == formname && element.hcp != null
|
||||||
(element) => element.form == formname,
|
? element.hcp == hcp
|
||||||
)
|
: element.form == formname)
|
||||||
.toList();
|
.toList();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,6 +122,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
backgroundColor: Constants.k2color,
|
||||||
title: Text(
|
title: Text(
|
||||||
widget.saveInteraction.id,
|
widget.saveInteraction.id,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
@ -258,7 +259,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
: 4.8
|
: 4.8
|
||||||
: isTablet
|
: isTablet
|
||||||
? 2.8
|
? 2.8
|
||||||
: 3.5,
|
: 4.5,
|
||||||
children: List.generate(
|
children: List.generate(
|
||||||
sectionList.length,
|
sectionList.length,
|
||||||
(i) {
|
(i) {
|
||||||
|
@ -474,7 +475,13 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
: buildRadio(sectionItem, provider);
|
: buildRadio(sectionItem, provider);
|
||||||
|
|
||||||
case InteractionWidget.LABEL:
|
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:
|
case InteractionWidget.RANGESLIDER:
|
||||||
return CustomRangeSlider(
|
return CustomRangeSlider(
|
||||||
|
@ -579,10 +586,10 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
case InteractionWidget.DROPDOWN:
|
case InteractionWidget.DROPDOWN:
|
||||||
// return customdropdown(sectionItem, provider, list, multiple);
|
return customdropdown(sectionItem, provider, list, multiple);
|
||||||
|
|
||||||
return customAutoCompletedropdown(
|
// return customAutoCompletedropdown(
|
||||||
sectionItem, provider, list, multiple);
|
// sectionItem, provider, list, multiple);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -593,7 +600,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
// width: isTablet ? 200 : MediaQuery.of(context).size.width,
|
// width: isTablet ? 200 : MediaQuery.of(context).size.width,
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
|
|
||||||
// height: isTablet ? 50 : 40,
|
height: isTablet ? 50 : 40,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller:
|
controller:
|
||||||
sectionItem.controller, //editing controller of this TextField
|
sectionItem.controller, //editing controller of this TextField
|
||||||
|
@ -764,13 +771,17 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
// sectionItem.value = '';
|
// sectionItem.value = '';
|
||||||
// print("%%%%${sectionItem.selectedValue!.last}");
|
// print("%%%%${sectionItem.selectedValue!.last}");
|
||||||
print("ItemList_is: $list");
|
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) {
|
if (list.isEmpty) {
|
||||||
print("###list empty###");
|
list = sectionItem.inputList!;
|
||||||
list = [];
|
|
||||||
InputClass inputClass =
|
|
||||||
InputClass(id: "no value", name: "Select ${sectionItem.name}");
|
|
||||||
list.add(inputClass);
|
|
||||||
sectionItem.selectedObject = list[0];
|
|
||||||
}
|
}
|
||||||
// InputClass selectedObj = list[0];
|
// InputClass selectedObj = list[0];
|
||||||
return Padding(
|
return Padding(
|
||||||
|
|
|
@ -63,6 +63,7 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen1> {
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
//resizeToAvoidBottomInset: false,
|
//resizeToAvoidBottomInset: false,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
backgroundColor: Constants.k2color,
|
||||||
title: Text(
|
title: Text(
|
||||||
widget.saveInteraction.id,
|
widget.saveInteraction.id,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
@ -320,7 +321,7 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen1> {
|
||||||
|
|
||||||
case InteractionWidget.LABEL:
|
case InteractionWidget.LABEL:
|
||||||
return Text(
|
return Text(
|
||||||
sectionItem.input!,
|
sectionItem.selectedValue!.last.toString(),
|
||||||
style: TextStyle(fontSize: 18.0),
|
style: TextStyle(fontSize: 18.0),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
157
lib/main.dart
|
@ -2,6 +2,7 @@ import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:firebase_core/firebase_core.dart';
|
import 'package:firebase_core/firebase_core.dart';
|
||||||
import 'package:firebase_remote_config/firebase_remote_config.dart';
|
import 'package:firebase_remote_config/firebase_remote_config.dart';
|
||||||
|
@ -70,10 +71,12 @@ import 'package:konectar_events/model/userdata_model.dart';
|
||||||
import 'package:konectar_events/utils/sessionmanager.dart';
|
import 'package:konectar_events/utils/sessionmanager.dart';
|
||||||
import 'package:konectar_events/view/home.dart';
|
import 'package:konectar_events/view/home.dart';
|
||||||
import 'package:konectar_events/view/login.dart';
|
import 'package:konectar_events/view/login.dart';
|
||||||
|
import 'package:konectar_events/view/login_components/intropaging.dart';
|
||||||
import 'package:konectar_events/view/navigation_home_screen.dart';
|
import 'package:konectar_events/view/navigation_home_screen.dart';
|
||||||
import 'package:konectar_events/viewmodel/eventsprovider.dart';
|
import 'package:konectar_events/viewmodel/eventsprovider.dart';
|
||||||
import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
|
import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
|
||||||
import 'package:konectar_events/viewmodel/loginprovider.dart';
|
import 'package:konectar_events/viewmodel/loginprovider.dart';
|
||||||
|
import 'package:overlay_support/overlay_support.dart';
|
||||||
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
@ -190,11 +193,25 @@ Future main() async {
|
||||||
// userInfo = await credential!.getUserInfo();
|
// userInfo = await credential!.getUserInfo();
|
||||||
//runApp(const MyApp());
|
//runApp(const MyApp());
|
||||||
// activateTimer();
|
// activateTimer();
|
||||||
SharedPreferences.getInstance().then((instance) async {
|
SharedPreferences.getInstance().then((instance) {
|
||||||
//StorageService().sharedPreferencesInstance = instance;
|
//StorageService().sharedPreferencesInstance = instance;
|
||||||
bool isloggedIn = instance.getBool('isloggedin') ?? false;
|
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(
|
runApp(
|
||||||
MultiProvider(
|
MultiProvider(
|
||||||
providers: [
|
providers: [
|
||||||
|
@ -242,32 +259,38 @@ Future main() async {
|
||||||
],
|
],
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
top: true,
|
top: true,
|
||||||
child: MaterialApp(
|
child: new OverlaySupport.global(
|
||||||
theme: ThemeData(
|
toastTheme: ToastThemeData(background: Colors.green),
|
||||||
fontFamily: "OpenSans",
|
child: MaterialApp(
|
||||||
|
theme: ThemeData(
|
||||||
|
//fontFamily: "SourceSerif",
|
||||||
|
),
|
||||||
|
debugShowCheckedModeBanner: false,
|
||||||
|
title: 'Dynamic Links Example',
|
||||||
|
initialRoute: '/',
|
||||||
|
routes: <String, WidgetBuilder>{
|
||||||
|
'/': (BuildContext context) => FutureBuilder<bool>(
|
||||||
|
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: <String, WidgetBuilder>{
|
|
||||||
'/': (BuildContext context) => FutureBuilder<bool>(
|
|
||||||
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<MyApp> {
|
||||||
|
@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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||||||
|
@ -287,15 +330,55 @@ class MyApp extends StatelessWidget {
|
||||||
systemNavigationBarDividerColor: Colors.transparent,
|
systemNavigationBarDividerColor: Colors.transparent,
|
||||||
systemNavigationBarIconBrightness: Brightness.dark,
|
systemNavigationBarIconBrightness: Brightness.dark,
|
||||||
));
|
));
|
||||||
return MaterialApp(
|
return OverlaySupport(
|
||||||
title: 'Flutter UI',
|
child: MaterialApp(
|
||||||
debugShowCheckedModeBanner: false,
|
title: 'Flutter UI',
|
||||||
// theme: ThemeData(
|
debugShowCheckedModeBanner: false,
|
||||||
// primarySwatch: Colors.blue,
|
// theme: ThemeData(
|
||||||
// textTheme: AppTheme.textTheme,
|
// primarySwatch: Colors.blue,
|
||||||
// platform: TargetPlatform.iOS,
|
// textTheme: AppTheme.textTheme,
|
||||||
// ),
|
// platform: TargetPlatform.iOS,
|
||||||
home: NavigationHomeScreen(),
|
// ),
|
||||||
|
home: NavigationHomeScreen(),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<StatefulWidget> createState() {
|
||||||
|
// TODO: implement createState
|
||||||
|
throw UnimplementedError();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// class App extends StatefulWidget {
|
||||||
|
// @override
|
||||||
|
// _AppState createState() => _AppState();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// class _AppState extends State<App> {
|
||||||
|
// @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(),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
|
@ -47,24 +47,54 @@ class AffiliationsResp {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<Affiliations> affiliationsFromJson(String str) => List<Affiliations>.from(
|
||||||
|
json.decode(str).map((x) => Affiliations.fromJson(x)));
|
||||||
|
|
||||||
|
String affiliationsToJson(List<Affiliations> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
class Affiliations {
|
class Affiliations {
|
||||||
List<String> affiliationNames;
|
String? id;
|
||||||
List<String> affiliationCount;
|
String? orgCount;
|
||||||
|
String? orgName;
|
||||||
|
|
||||||
Affiliations({
|
Affiliations({
|
||||||
required this.affiliationNames,
|
this.id,
|
||||||
required this.affiliationCount,
|
this.orgCount,
|
||||||
|
this.orgName,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory Affiliations.fromJson(Map<String, dynamic> json) => Affiliations(
|
factory Affiliations.fromJson(Map<String, dynamic> json) => Affiliations(
|
||||||
affiliationNames:
|
id: json["id"],
|
||||||
List<String>.from(json["affiliationNames"].map((x) => x)),
|
orgCount: json["org_count"],
|
||||||
affiliationCount:
|
orgName: json["org_name"],
|
||||||
List<String>.from(json["affiliationCount"].map((x) => x)),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => {
|
Map<String, dynamic> toJson() => {
|
||||||
"affiliationNames": List<dynamic>.from(affiliationNames.map((x) => x)),
|
"id": id,
|
||||||
"affiliationCount": List<dynamic>.from(affiliationCount.map((x) => x)),
|
"org_count": orgCount,
|
||||||
|
"org_name": orgName,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// class Affiliations {
|
||||||
|
// List<String> affiliationNames;
|
||||||
|
// List<String> affiliationCount;
|
||||||
|
|
||||||
|
// Affiliations({
|
||||||
|
// required this.affiliationNames,
|
||||||
|
// required this.affiliationCount,
|
||||||
|
// });
|
||||||
|
|
||||||
|
// factory Affiliations.fromJson(Map<String, dynamic> json) => Affiliations(
|
||||||
|
// affiliationNames:
|
||||||
|
// List<String>.from(json["affiliationNames"].map((x) => x)),
|
||||||
|
// affiliationCount:
|
||||||
|
// List<String>.from(json["affiliationCount"].map((x) => x)),
|
||||||
|
// );
|
||||||
|
|
||||||
|
// Map<String, dynamic> toJson() => {
|
||||||
|
// "affiliationNames": List<dynamic>.from(affiliationNames.map((x) => x)),
|
||||||
|
// "affiliationCount": List<dynamic>.from(affiliationCount.map((x) => x)),
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
|
|
@ -0,0 +1,347 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final eventsOverviewDetails = eventsOverviewDetailsFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
EventsOverviewDetails eventsOverviewDetailsFromJson(String str) =>
|
||||||
|
EventsOverviewDetails.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String eventsOverviewDetailsToJson(EventsOverviewDetails data) =>
|
||||||
|
json.encode(data.toJson());
|
||||||
|
|
||||||
|
class EventsOverviewDetails {
|
||||||
|
OverviewData? data;
|
||||||
|
|
||||||
|
EventsOverviewDetails({
|
||||||
|
this.data,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory EventsOverviewDetails.fromJson(Map<String, dynamic> json) =>
|
||||||
|
EventsOverviewDetails(
|
||||||
|
data: json["data"] == null ? null : OverviewData.fromJson(json["data"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"data": data?.toJson(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class OverviewData {
|
||||||
|
int? projectKolAttendee;
|
||||||
|
bool? cal;
|
||||||
|
int? grid;
|
||||||
|
String? eventFor;
|
||||||
|
String? eventId;
|
||||||
|
List<TopSpeakers>? eventData;
|
||||||
|
dynamic eventTopics;
|
||||||
|
List<EventSponser>? eventSponsers;
|
||||||
|
bool? eventUserAttendee;
|
||||||
|
bool? eventUserInterest;
|
||||||
|
List<ArrEvent>? arrEvents;
|
||||||
|
int? attendeeCount;
|
||||||
|
|
||||||
|
OverviewData({
|
||||||
|
this.projectKolAttendee,
|
||||||
|
this.cal,
|
||||||
|
this.grid,
|
||||||
|
this.eventFor,
|
||||||
|
this.eventId,
|
||||||
|
this.eventData,
|
||||||
|
this.eventTopics,
|
||||||
|
this.eventSponsers,
|
||||||
|
this.eventUserAttendee,
|
||||||
|
this.eventUserInterest,
|
||||||
|
this.arrEvents,
|
||||||
|
this.attendeeCount,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory OverviewData.fromJson(Map<String, dynamic> json) => OverviewData(
|
||||||
|
projectKolAttendee: json["project_kol_attendee"],
|
||||||
|
cal: json["cal"],
|
||||||
|
grid: json["grid"],
|
||||||
|
eventFor: json["eventFor"],
|
||||||
|
eventId: json["eventId"],
|
||||||
|
eventData: json["eventData"] == null
|
||||||
|
? []
|
||||||
|
: List<TopSpeakers>.from(
|
||||||
|
json["eventData"]!.map((x) => TopSpeakers.fromJson(x))),
|
||||||
|
eventTopics: json["eventTopics"],
|
||||||
|
eventSponsers: json["eventSponsers"] == null
|
||||||
|
? []
|
||||||
|
: List<EventSponser>.from(
|
||||||
|
json["eventSponsers"]!.map((x) => EventSponser.fromJson(x))),
|
||||||
|
eventUserAttendee: json["event_user_attendee"],
|
||||||
|
eventUserInterest: json["event_user_interest"],
|
||||||
|
arrEvents: json["arrEvents"] == null
|
||||||
|
? []
|
||||||
|
: List<ArrEvent>.from(
|
||||||
|
json["arrEvents"]!.map((x) => ArrEvent.fromJson(x))),
|
||||||
|
attendeeCount: json["attendeeCount"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"project_kol_attendee": projectKolAttendee,
|
||||||
|
"cal": cal,
|
||||||
|
"grid": grid,
|
||||||
|
"eventFor": eventFor,
|
||||||
|
"eventId": eventId,
|
||||||
|
"eventData": eventData == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.from(eventData!.map((x) => x.toJson())),
|
||||||
|
"eventTopics": eventTopics,
|
||||||
|
"eventSponsers": eventSponsers == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.from(eventSponsers!.map((x) => x.toJson())),
|
||||||
|
"event_user_attendee": eventUserAttendee,
|
||||||
|
"event_user_interest": eventUserInterest,
|
||||||
|
"arrEvents": arrEvents == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.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<String, dynamic> json) => ArrEvent(
|
||||||
|
sponsorType: json["sponsor_type"],
|
||||||
|
sponsorTypeName: json["sponsor_type_name"],
|
||||||
|
id: json["id"],
|
||||||
|
kolId: json["kol_id"],
|
||||||
|
type: json["type"],
|
||||||
|
eventType: json["event_type"],
|
||||||
|
eventId: json["event_id"],
|
||||||
|
sessionType: json["session_type"],
|
||||||
|
sessionName: json["session_name"],
|
||||||
|
role: json["role"],
|
||||||
|
topic: json["topic"],
|
||||||
|
start: json["start"],
|
||||||
|
end: json["end"],
|
||||||
|
organizer: json["organizer"],
|
||||||
|
sessionSponsor: json["session_sponsor"],
|
||||||
|
organizerType: json["organizer_type"],
|
||||||
|
location: json["location"],
|
||||||
|
address: json["address"],
|
||||||
|
cityId: json["city_id"],
|
||||||
|
stateId: json["state_id"],
|
||||||
|
countryId: json["country_id"],
|
||||||
|
postalCode: json["postal_code"],
|
||||||
|
subject: json["subject"],
|
||||||
|
url1: json["url1"],
|
||||||
|
url2: json["url2"],
|
||||||
|
notes: json["notes"],
|
||||||
|
createdBy: json["created_by"],
|
||||||
|
createdOn: 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<String, dynamic> toJson() => {
|
||||||
|
"sponsor_type": sponsorType,
|
||||||
|
"sponsor_type_name": sponsorTypeName,
|
||||||
|
"id": id,
|
||||||
|
"kol_id": kolId,
|
||||||
|
"type": type,
|
||||||
|
"event_type": eventType,
|
||||||
|
"event_id": eventId,
|
||||||
|
"session_type": sessionType,
|
||||||
|
"session_name": sessionName,
|
||||||
|
"role": role,
|
||||||
|
"topic": topic,
|
||||||
|
"start": start,
|
||||||
|
"end": end,
|
||||||
|
"organizer": organizer,
|
||||||
|
"session_sponsor": sessionSponsor,
|
||||||
|
"organizer_type": organizerType,
|
||||||
|
"location": location,
|
||||||
|
"address": address,
|
||||||
|
"city_id": cityId,
|
||||||
|
"state_id": stateId,
|
||||||
|
"country_id": countryId,
|
||||||
|
"postal_code": postalCode,
|
||||||
|
"subject": subject,
|
||||||
|
"url1": url1,
|
||||||
|
"url2": url2,
|
||||||
|
"notes": notes,
|
||||||
|
"created_by": createdBy,
|
||||||
|
"created_on": createdOn?.toIso8601String(),
|
||||||
|
"modified_by": modifiedBy,
|
||||||
|
"modified_on": modifiedOn?.toIso8601String(),
|
||||||
|
"client_id": clientId,
|
||||||
|
"project_id": projectId,
|
||||||
|
"activity_type": activityType,
|
||||||
|
"profile_type": profileType,
|
||||||
|
"global_event_id": globalEventId,
|
||||||
|
"event_unique_id": eventUniqueId,
|
||||||
|
"name": name,
|
||||||
|
"conf_event_type": confEventType,
|
||||||
|
"country": country,
|
||||||
|
"event_topic": eventTopic,
|
||||||
|
"conf_session_type": confSessionType,
|
||||||
|
"region": region,
|
||||||
|
"city": city,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class TopSpeakers {
|
||||||
|
String? firstName;
|
||||||
|
dynamic middleName;
|
||||||
|
dynamic lastName;
|
||||||
|
String? numSess;
|
||||||
|
|
||||||
|
TopSpeakers({
|
||||||
|
this.firstName,
|
||||||
|
this.middleName,
|
||||||
|
this.lastName,
|
||||||
|
this.numSess,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory TopSpeakers.fromJson(Map<String, dynamic> json) => TopSpeakers(
|
||||||
|
firstName: json["first_name"],
|
||||||
|
middleName: json["middle_name"],
|
||||||
|
lastName: json["last_name"],
|
||||||
|
numSess: json["num_sess"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"first_name": firstName,
|
||||||
|
"middle_name": middleName,
|
||||||
|
"last_name": lastName,
|
||||||
|
"num_sess": numSess,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class EventSponser {
|
||||||
|
String? numSess;
|
||||||
|
String? sessionSponsor;
|
||||||
|
String? type;
|
||||||
|
String? sponsorsType;
|
||||||
|
|
||||||
|
EventSponser({
|
||||||
|
this.numSess,
|
||||||
|
this.sessionSponsor,
|
||||||
|
this.type,
|
||||||
|
this.sponsorsType,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory EventSponser.fromJson(Map<String, dynamic> json) => EventSponser(
|
||||||
|
numSess: json["num_sess"],
|
||||||
|
sessionSponsor: json["session_sponsor"],
|
||||||
|
type: json["type"],
|
||||||
|
sponsorsType: json["sponsors_type"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"num_sess": numSess,
|
||||||
|
"session_sponsor": sessionSponsor,
|
||||||
|
"type": type,
|
||||||
|
"sponsors_type": sponsorsType,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,219 @@
|
||||||
|
class EventsListResp2 {
|
||||||
|
int? code;
|
||||||
|
String? message;
|
||||||
|
List<EventsListingData>? data;
|
||||||
|
int? lastPage;
|
||||||
|
int? lastRow;
|
||||||
|
int? count;
|
||||||
|
|
||||||
|
EventsListResp2(
|
||||||
|
{this.code,
|
||||||
|
this.message,
|
||||||
|
this.data,
|
||||||
|
this.lastPage,
|
||||||
|
this.lastRow,
|
||||||
|
this.count});
|
||||||
|
|
||||||
|
EventsListResp2.fromJson(Map<String, dynamic> 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<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> _data = <String, dynamic>{};
|
||||||
|
_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<String, dynamic> 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<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> _data = <String, dynamic>{};
|
||||||
|
_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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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<SpeakersList>? data;
|
||||||
|
int? lastPage;
|
||||||
|
int? lastRow;
|
||||||
|
int? count;
|
||||||
|
|
||||||
|
SpeakersResponse({
|
||||||
|
this.code,
|
||||||
|
this.message,
|
||||||
|
this.data,
|
||||||
|
this.lastPage,
|
||||||
|
this.lastRow,
|
||||||
|
this.count,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory SpeakersResponse.fromJson(Map<String, dynamic> json) =>
|
||||||
|
SpeakersResponse(
|
||||||
|
code: json["code"],
|
||||||
|
message: json["message"],
|
||||||
|
data: json["data"] == null
|
||||||
|
? []
|
||||||
|
: List<SpeakersList>.from(
|
||||||
|
json["data"]!.map((x) => SpeakersList.fromJson(x))),
|
||||||
|
lastPage: json["last_page"],
|
||||||
|
lastRow: json["last_row"],
|
||||||
|
count: json["count"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"code": code,
|
||||||
|
"message": message,
|
||||||
|
"data": data == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.from(data!.map((x) => x.toJson())),
|
||||||
|
"last_page": lastPage,
|
||||||
|
"last_row": lastRow,
|
||||||
|
"count": count,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class SpeakersResponse1 {
|
||||||
|
Data1? data;
|
||||||
|
|
||||||
|
SpeakersResponse1({
|
||||||
|
this.data,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory SpeakersResponse1.fromJson(Map<String, dynamic> json) =>
|
||||||
|
SpeakersResponse1(
|
||||||
|
data: json["data"] == null ? null : Data1.fromJson(json["data"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"data": data?.toJson(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class Data1 {
|
||||||
|
List<SpeakersList>? data;
|
||||||
|
|
||||||
|
Data1({
|
||||||
|
this.data,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Data1.fromJson(Map<String, dynamic> json) => Data1(
|
||||||
|
data: json["data"] == null
|
||||||
|
? []
|
||||||
|
: List<SpeakersList>.from(
|
||||||
|
json["data"]!.map((x) => SpeakersList.fromJson(x))),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"data": data == null
|
||||||
|
? []
|
||||||
|
: List<dynamic>.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<String>? sessionNames;
|
||||||
|
@HiveField(19)
|
||||||
|
List<String>? 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<String, dynamic> 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<String, dynamic> 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<String>.from(json["session_names"]!.map((x) => x)),
|
||||||
|
topics: json["topics"] == null
|
||||||
|
? []
|
||||||
|
: List<String>.from(json["topics"]!.map((x) => x)),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> 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<dynamic>.from(sessionNames!.map((x) => x)),
|
||||||
|
"topics":
|
||||||
|
topics == null ? [] : List<dynamic>.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<T> {
|
||||||
|
Map<String, T> map;
|
||||||
|
late Map<T, String> reverseMap;
|
||||||
|
|
||||||
|
EnumValues(this.map);
|
||||||
|
|
||||||
|
Map<T, String> get reverse {
|
||||||
|
reverseMap = map.map((k, v) => MapEntry(v, k));
|
||||||
|
return reverseMap;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,98 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'eventspeakers.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// TypeAdapterGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class SpeakersListAdapter extends TypeAdapter<SpeakersList> {
|
||||||
|
@override
|
||||||
|
final int typeId = 25;
|
||||||
|
|
||||||
|
@override
|
||||||
|
SpeakersList read(BinaryReader reader) {
|
||||||
|
final numOfFields = reader.readByte();
|
||||||
|
final fields = <int, dynamic>{
|
||||||
|
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<String>(),
|
||||||
|
topics: (fields[19] as List?)?.cast<String>(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@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;
|
||||||
|
}
|
|
@ -0,0 +1,486 @@
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
|
||||||
|
class MyEventsListModel {
|
||||||
|
int? code;
|
||||||
|
String? message;
|
||||||
|
List<MyEventsData>? data;
|
||||||
|
int? lastPage;
|
||||||
|
int? lastRow;
|
||||||
|
int? count;
|
||||||
|
|
||||||
|
MyEventsListModel(
|
||||||
|
{this.code,
|
||||||
|
this.message,
|
||||||
|
this.data,
|
||||||
|
this.lastPage,
|
||||||
|
this.lastRow,
|
||||||
|
this.count});
|
||||||
|
|
||||||
|
MyEventsListModel.fromJson(Map<String, dynamic> 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<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> _data = <String, dynamic>{};
|
||||||
|
_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<MyEventsList>? events;
|
||||||
|
|
||||||
|
MyEventsData(
|
||||||
|
{this.uniqueId,
|
||||||
|
this.switchedId,
|
||||||
|
this.createdByUser,
|
||||||
|
this.updatedByUser,
|
||||||
|
this.deletedByUser,
|
||||||
|
this.formattedCreatedAt,
|
||||||
|
this.formattedUpdatedAt,
|
||||||
|
this.formattedDeletedAt,
|
||||||
|
this.events});
|
||||||
|
|
||||||
|
MyEventsData.fromJson(Map<String, dynamic> 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<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> _data = <String, dynamic>{};
|
||||||
|
_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>? 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<String, dynamic> 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<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> _data = <String, dynamic>{};
|
||||||
|
_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<String, dynamic> 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<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> _data = <String, dynamic>{};
|
||||||
|
_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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:hive_flutter/hive_flutter.dart';
|
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';
|
part 'neweventsmodel.g.dart';
|
||||||
|
|
||||||
class EventsResp {
|
class EventsResp {
|
||||||
|
@ -27,12 +28,10 @@ class EventsData {
|
||||||
EventsData({this.events});
|
EventsData({this.events});
|
||||||
|
|
||||||
EventsData.fromJson(Map<String, dynamic> json) {
|
EventsData.fromJson(Map<String, dynamic> json) {
|
||||||
if (json["events"] is List) {
|
if (json["data"] is List) {
|
||||||
events = json["events"] == null
|
events = json["data"] == null
|
||||||
? null
|
? null
|
||||||
: (json["events"] as List)
|
: (json["data"] as List).map((e) => EventsList.fromJson(e)).toList();
|
||||||
.map((e) => EventsList.fromJson(e))
|
|
||||||
.toList();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +66,61 @@ class EventsDataStaging {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RESPONSE FROM K2
|
||||||
|
|
||||||
|
class EventsListRespK2 {
|
||||||
|
int? code;
|
||||||
|
String? message;
|
||||||
|
List<EventsList>? data;
|
||||||
|
int? lastPage;
|
||||||
|
int? lastRow;
|
||||||
|
int? count;
|
||||||
|
|
||||||
|
EventsListRespK2(
|
||||||
|
{this.code,
|
||||||
|
this.message,
|
||||||
|
this.data,
|
||||||
|
this.lastPage,
|
||||||
|
this.lastRow,
|
||||||
|
this.count});
|
||||||
|
|
||||||
|
EventsListRespK2.fromJson(Map<String, dynamic> 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<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> _data = <String, dynamic>{};
|
||||||
|
_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)
|
@HiveType(typeId: 2)
|
||||||
class EventsList {
|
class EventsList {
|
||||||
@HiveField(0)
|
@HiveField(0)
|
||||||
|
@ -195,319 +249,449 @@ class EventsList {
|
||||||
String? topSpeakers;
|
String? topSpeakers;
|
||||||
@HiveField(62)
|
@HiveField(62)
|
||||||
String? sponsors;
|
String? sponsors;
|
||||||
|
@HiveField(63)
|
||||||
|
bool? eventUserInterest = false;
|
||||||
|
|
||||||
EventsList(
|
EventsList({
|
||||||
{this.city,
|
this.city,
|
||||||
this.sponsors,
|
this.sponsors,
|
||||||
this.speakerscount,
|
this.speakerscount,
|
||||||
this.topSpeakers,
|
this.topSpeakers,
|
||||||
this.topTopics,
|
this.topTopics,
|
||||||
this.isfav = false,
|
this.isfav = false,
|
||||||
this.isAttending = false,
|
this.isAttending = false,
|
||||||
this.country,
|
this.country,
|
||||||
this.region,
|
this.region,
|
||||||
this.activityType,
|
this.activityType,
|
||||||
this.address,
|
this.address,
|
||||||
this.cityId,
|
this.cityId,
|
||||||
this.clientId,
|
this.clientId,
|
||||||
this.cnt,
|
this.cnt,
|
||||||
this.countryId,
|
this.countryId,
|
||||||
this.createdBy,
|
this.createdBy,
|
||||||
this.createdOn,
|
this.createdOn,
|
||||||
this.dAllowed,
|
this.dAllowed,
|
||||||
this.eAllowed,
|
this.eAllowed,
|
||||||
this.end,
|
this.end,
|
||||||
this.eventLat,
|
this.eventLat,
|
||||||
this.eventLong,
|
this.eventLong,
|
||||||
this.eventId,
|
this.eventId,
|
||||||
this.eventType,
|
this.eventType,
|
||||||
this.eventUniqueId,
|
this.eventUniqueId,
|
||||||
this.eventUserAttendee,
|
this.eventUserAttendee,
|
||||||
this.globalEventId,
|
this.globalEventId,
|
||||||
this.hcpPin,
|
this.hcpPin,
|
||||||
this.id,
|
this.id,
|
||||||
this.kolId,
|
this.kolId,
|
||||||
this.location,
|
this.location,
|
||||||
this.modifiedBy,
|
this.modifiedBy,
|
||||||
this.modifiedOn,
|
this.modifiedOn,
|
||||||
this.name1,
|
this.name1,
|
||||||
this.notes,
|
this.notes,
|
||||||
this.organizer,
|
this.organizer,
|
||||||
this.organizerAlias,
|
this.organizerAlias,
|
||||||
this.organizerType,
|
this.organizerType,
|
||||||
this.otype,
|
this.otype,
|
||||||
this.partialcount,
|
this.partialcount,
|
||||||
this.partiallyReleasedEvent,
|
this.partiallyReleasedEvent,
|
||||||
this.postalCode,
|
this.postalCode,
|
||||||
this.profileType,
|
this.profileType,
|
||||||
this.projectId,
|
this.projectId,
|
||||||
this.role,
|
this.role,
|
||||||
this.sessionName,
|
this.sessionName,
|
||||||
this.sessionNote,
|
this.sessionNote,
|
||||||
this.sessionNote1,
|
this.sessionNote1,
|
||||||
this.sessionSponsor,
|
this.sessionSponsor,
|
||||||
this.sessionType,
|
this.sessionType,
|
||||||
this.sponsorType,
|
this.sponsorType,
|
||||||
this.start,
|
this.start,
|
||||||
this.stateId,
|
this.stateId,
|
||||||
this.stype,
|
this.stype,
|
||||||
this.subject,
|
this.subject,
|
||||||
this.therapeuticArea,
|
this.therapeuticArea,
|
||||||
this.topic,
|
this.topic,
|
||||||
this.topicName,
|
this.topicName,
|
||||||
this.type,
|
this.type,
|
||||||
this.updated,
|
this.updated,
|
||||||
this.url1,
|
this.url1,
|
||||||
this.url2,
|
this.url2,
|
||||||
this.userCount});
|
this.userCount,
|
||||||
|
this.eventUserInterest,
|
||||||
|
});
|
||||||
|
|
||||||
EventsList.fromJson(Map<String, dynamic> json) {
|
factory EventsList.fromJson(Map<String, dynamic> json) => EventsList(
|
||||||
isfav = false;
|
therapeuticArea: json["therapeutic_area"],
|
||||||
if (json["City"] is String) {
|
hcpPin: json["hcp_pin"],
|
||||||
city = json["City"] ?? null;
|
cnt: json["cnt"],
|
||||||
}
|
id: json["id"],
|
||||||
if (json["Country"] is String) {
|
kolId: json["kol_id"],
|
||||||
country = json["Country"] ?? null;
|
type: json["type"],
|
||||||
}
|
eventType: json["event_type"],
|
||||||
if (json["Region"] is String) {
|
eventId: json["event_id"],
|
||||||
region = json["Region"] ?? null;
|
sessionType: json["session_type"],
|
||||||
}
|
sessionName: json["session_name"],
|
||||||
if (json["activity_type"] is String) {
|
role: json["role"],
|
||||||
activityType = json["activity_type"];
|
topic: json["topic"],
|
||||||
}
|
start: json["start"],
|
||||||
if (json["address"] is String) {
|
end: json["end"],
|
||||||
address = json["address"];
|
organizer: json["organizer"],
|
||||||
}
|
sponsorType: json["sponsor_type"],
|
||||||
if (json["city_id"] is String) {
|
sessionSponsor: json["session_sponsor"],
|
||||||
cityId = json["city_id"];
|
organizerType: json["organizer_type"],
|
||||||
}
|
location: json["location"],
|
||||||
if (json["client_id"] is String) {
|
address: json["address"],
|
||||||
clientId = json["client_id"];
|
cityId: json["city_id"],
|
||||||
}
|
stateId: json["state_id"],
|
||||||
if (json["cnt"] is String) {
|
countryId: json["country_id"],
|
||||||
cnt = json["cnt"];
|
postalCode: json["postal_code"],
|
||||||
}
|
subject: json["subject"],
|
||||||
if (json["country_id"] is String) {
|
url1: json["url1"],
|
||||||
countryId = json["country_id"];
|
url2: json["url2"],
|
||||||
}
|
notes: json["notes"],
|
||||||
if (json["created_by"] is String) {
|
createdBy: json["created_by"],
|
||||||
createdBy = json["created_by"];
|
createdOn: json["created_on"],
|
||||||
}
|
modifiedBy: json["modified_by"],
|
||||||
if (json["created_on"] is String) {
|
modifiedOn: json[
|
||||||
createdOn = json["created_on"];
|
"modified_on"], // == null ? null : DateTime.parse(json["modified_on"]),
|
||||||
}
|
clientId: json["client_id"],
|
||||||
if (json["dAllowed"] is bool) {
|
projectId: json["project_id"],
|
||||||
dAllowed = json["dAllowed"];
|
activityType: json["activity_type"],
|
||||||
}
|
profileType: json["profile_type"],
|
||||||
if (json["eAllowed"] is bool) {
|
globalEventId: json["global_event_id"],
|
||||||
eAllowed = json["eAllowed"];
|
eventUniqueId: json["event_unique_id"],
|
||||||
}
|
stype: json["stype"],
|
||||||
if (json["end"] is String) {
|
otype: json["otype"],
|
||||||
end = json["end"];
|
// name: json["name"],
|
||||||
}
|
partiallyReleasedEvent: json["partially_released_event"],
|
||||||
if (json["eventLat"] is String) {
|
country: json["Country"],
|
||||||
eventLat = json["eventLat"];
|
region: json["Region"],
|
||||||
}
|
city: json["City"],
|
||||||
if (json["eventLong"] is String) {
|
topicName: json["topic_name"],
|
||||||
eventLong = json["eventLong"];
|
eventLat: json["eventLat"],
|
||||||
}
|
eventLong: json["eventLong"],
|
||||||
if (json["event_id"] is String) {
|
userCount: json["user_count"],
|
||||||
eventId = json["event_id"];
|
partialcount: json["partialcount"],
|
||||||
}
|
sessionNote1: json["session_note1"],
|
||||||
if (json["event_type"] is String) {
|
sessionNote: json["session_note"],
|
||||||
eventType = json["event_type"];
|
organizerAlias: json["organizerAlias"],
|
||||||
}
|
eAllowed: json["eAllowed"],
|
||||||
if (json["event_unique_id"] is String) {
|
dAllowed: json["dAllowed"],
|
||||||
eventUniqueId = json["event_unique_id"];
|
updated: json["updated"],
|
||||||
}
|
eventUserAttendee: json["event_user_attendee"],
|
||||||
if (json["event_user_attendee"] is bool) {
|
eventUserInterest: json["event_user_interest"],
|
||||||
eventUserAttendee = json["event_user_attendee"];
|
name1: json["name1"],
|
||||||
}
|
);
|
||||||
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"];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (json["speakerscount"] is String) {
|
Map<String, dynamic> toJson() => {
|
||||||
speakerscount = json["speakerscount"];
|
"therapeutic_area": therapeuticArea,
|
||||||
}
|
"hcp_pin": hcpPin,
|
||||||
if (json["topTopics"] is String) {
|
"cnt": cnt,
|
||||||
topTopics = json["topTopics"];
|
"id": id,
|
||||||
}
|
"kol_id": kolId,
|
||||||
if (json["topSpeakers"] is String) {
|
"type": type,
|
||||||
topSpeakers = json["topSpeakers"];
|
"event_type": eventType,
|
||||||
}
|
"event_id": eventId,
|
||||||
if (json["sponsors"] is String) {
|
"session_type": sessionType,
|
||||||
sponsors = json["sponsors"];
|
"session_name": sessionName,
|
||||||
}
|
"role": role,
|
||||||
}
|
"topic": topic,
|
||||||
|
"start": start,
|
||||||
Map<String, dynamic> toJson() {
|
"end": end,
|
||||||
final Map<String, dynamic> _data = <String, dynamic>{};
|
"organizer": organizer,
|
||||||
_data["City"] = city;
|
"sponsor_type": sponsorType,
|
||||||
_data["country"] = country;
|
"session_sponsor": sessionSponsor,
|
||||||
_data["region"] = region;
|
"organizer_type": organizerType,
|
||||||
_data["activity_type"] = activityType;
|
"location": location,
|
||||||
_data["address"] = address;
|
"address": address,
|
||||||
_data["city_id"] = cityId;
|
"city_id": cityId,
|
||||||
_data["client_id"] = clientId;
|
"state_id": stateId,
|
||||||
_data["cnt"] = cnt;
|
"country_id": countryId,
|
||||||
_data["country_id"] = countryId;
|
"postal_code": postalCode,
|
||||||
_data["created_by"] = createdBy;
|
"subject": subject,
|
||||||
_data["created_on"] = createdOn;
|
"url1": url1,
|
||||||
_data["dAllowed"] = dAllowed;
|
"url2": url2,
|
||||||
_data["eAllowed"] = eAllowed;
|
"notes": notes,
|
||||||
_data["end"] = end;
|
"created_by": createdBy,
|
||||||
_data["eventLat"] = eventLat;
|
"created_on": createdOn,
|
||||||
_data["eventLong"] = eventLong;
|
"modified_by": modifiedBy,
|
||||||
_data["event_id"] = eventId;
|
"modified_on": modifiedOn,
|
||||||
_data["event_type"] = eventType;
|
"client_id": clientId,
|
||||||
_data["event_unique_id"] = eventUniqueId;
|
"project_id": projectId,
|
||||||
_data["event_user_attendee"] = eventUserAttendee;
|
"activity_type": activityType,
|
||||||
_data["global_event_id"] = globalEventId;
|
"profile_type": profileType,
|
||||||
_data["hcp_pin"] = hcpPin;
|
"global_event_id": globalEventId,
|
||||||
_data["id"] = id;
|
"event_unique_id": eventUniqueId,
|
||||||
_data["kol_id"] = kolId;
|
"stype": stype,
|
||||||
_data["location"] = location;
|
"otype": otype,
|
||||||
_data["modified_by"] = modifiedBy;
|
// "name": name,
|
||||||
_data["modified_on"] = modifiedOn;
|
"partially_released_event": partiallyReleasedEvent,
|
||||||
_data["name1"] = name1;
|
"Country": country,
|
||||||
_data["notes"] = notes;
|
"Region": region,
|
||||||
_data["organizer"] = organizer;
|
"City": city,
|
||||||
_data["organizerAlias"] = organizerAlias;
|
"topic_name": topicName,
|
||||||
_data["organizer_type"] = organizerType;
|
"eventLat": eventLat,
|
||||||
_data["otype"] = otype;
|
"eventLong": eventLong,
|
||||||
_data["partialcount"] = partialcount;
|
"user_count": userCount,
|
||||||
_data["partially_released_event"] = partiallyReleasedEvent;
|
"partialcount": partialcount,
|
||||||
_data["postal_code"] = postalCode;
|
"session_note1": sessionNote1,
|
||||||
_data["profile_type"] = profileType;
|
"session_note": sessionNote,
|
||||||
_data["project_id"] = projectId;
|
"organizerAlias": organizerAlias,
|
||||||
_data["role"] = role;
|
"eAllowed": eAllowed,
|
||||||
_data["session_name"] = sessionName;
|
"dAllowed": dAllowed,
|
||||||
_data["session_note"] = sessionNote;
|
"updated": updated,
|
||||||
_data["session_note1"] = sessionNote1;
|
"event_user_attendee": eventUserAttendee,
|
||||||
_data["session_sponsor"] = sessionSponsor;
|
"event_user_interest": eventUserInterest,
|
||||||
_data["session_type"] = sessionType;
|
"name1": name1,
|
||||||
_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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// EventsList.fromJson(Map<String, dynamic> 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<String, dynamic> toJson() {
|
||||||
|
// final Map<String, dynamic> _data = <String, dynamic>{};
|
||||||
|
// _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;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
|
@ -46,13 +46,19 @@ class Specialtyresp {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<Specialty> specialtyFromJson(String str) =>
|
||||||
|
List<Specialty>.from(json.decode(str).map((x) => Specialty.fromJson(x)));
|
||||||
|
|
||||||
|
String specialtyToJson(List<Specialty> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
class Specialty {
|
class Specialty {
|
||||||
String specialtyCount;
|
String? specialtyCount;
|
||||||
String specialtyName;
|
String? specialtyName;
|
||||||
|
|
||||||
Specialty({
|
Specialty({
|
||||||
required this.specialtyCount,
|
this.specialtyCount,
|
||||||
required this.specialtyName,
|
this.specialtyName,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory Specialty.fromJson(Map<String, dynamic> json) => Specialty(
|
factory Specialty.fromJson(Map<String, dynamic> json) => Specialty(
|
||||||
|
|
|
@ -54,6 +54,13 @@ class Topicsresp {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<TopicsCloudData> topicsCloudDataFromJson(String str) =>
|
||||||
|
List<TopicsCloudData>.from(
|
||||||
|
json.decode(str).map((x) => TopicsCloudData.fromJson(x)));
|
||||||
|
|
||||||
|
String topicsCloudDataToJson(List<TopicsCloudData> data) =>
|
||||||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||||
|
|
||||||
class TopicsCloudData {
|
class TopicsCloudData {
|
||||||
String? total;
|
String? total;
|
||||||
String? topic;
|
String? topic;
|
||||||
|
|
|
@ -5,9 +5,11 @@ import 'package:dio/dio.dart';
|
||||||
import 'package:dio/io.dart';
|
import 'package:dio/io.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:konectar_events/model/affiliationsmodel.dart';
|
import 'package:konectar_events/model/affiliationsmodel.dart';
|
||||||
|
import 'package:konectar_events/model/events_list_resp_2.dart';
|
||||||
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
||||||
import 'package:konectar_events/model/eventsmodel.dart';
|
import 'package:konectar_events/model/eventsmodel.dart';
|
||||||
import 'package:konectar_events/model/eventsoverview.dart';
|
import 'package:konectar_events/model/eventsoverview.dart';
|
||||||
|
import 'package:konectar_events/model/eventspeakers.dart';
|
||||||
import 'package:konectar_events/model/keywords_model.dart';
|
import 'package:konectar_events/model/keywords_model.dart';
|
||||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||||
import 'package:konectar_events/model/scope_model.dart';
|
import 'package:konectar_events/model/scope_model.dart';
|
||||||
|
@ -19,6 +21,7 @@ import 'package:konectar_events/utils/constants.dart';
|
||||||
class ApiCall {
|
class ApiCall {
|
||||||
final dio = Dio();
|
final dio = Dio();
|
||||||
|
|
||||||
|
//K1 API CALLS
|
||||||
Future<dynamic> parseInfo() async {
|
Future<dynamic> parseInfo() async {
|
||||||
Dio dio = Dio();
|
Dio dio = Dio();
|
||||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||||
|
@ -42,30 +45,6 @@ class ApiCall {
|
||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
//https://cardio-staging.konectar.io/notifications/list_all_notifications
|
|
||||||
Future<dynamic> 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<List<Therapeutic>> getscopes() async {
|
Future<List<Therapeutic>> getscopes() async {
|
||||||
Dio dio = Dio();
|
Dio dio = Dio();
|
||||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||||
|
@ -122,7 +101,7 @@ class ApiCall {
|
||||||
return keywordList;
|
return keywordList;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<EventsList>?> getStagingEvents() async {
|
Future<List<EventsList>> getEventsFromK1({String? type}) async {
|
||||||
Dio dio = Dio();
|
Dio dio = Dio();
|
||||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||||
(HttpClient client) {
|
(HttpClient client) {
|
||||||
|
@ -134,10 +113,222 @@ class ApiCall {
|
||||||
var formData = FormData.fromMap({
|
var formData = FormData.fromMap({
|
||||||
"user_email": "vinodh@aissel.com",
|
"user_email": "vinodh@aissel.com",
|
||||||
"project_id": "",
|
"project_id": "",
|
||||||
"start": "",
|
"start": DateTime.now().toString,
|
||||||
"end": "",
|
"end": "",
|
||||||
"order_by": "7",
|
"order_by": "7",
|
||||||
"type": "1"
|
"type": type ?? "1"
|
||||||
|
});
|
||||||
|
response = await dio.post(
|
||||||
|
'${EventsConstants.devUrl}${EventsConstants.eventslistapi}',
|
||||||
|
options: Options(),
|
||||||
|
queryParameters: {
|
||||||
|
"user_email": "vinodh@aissel.com",
|
||||||
|
"project_id": "",
|
||||||
|
"start": DateTime.now().toString,
|
||||||
|
"end": "",
|
||||||
|
"order_by": "7",
|
||||||
|
"type": type ?? "1"
|
||||||
|
},
|
||||||
|
data: formData);
|
||||||
|
print("response user eventssssss here!!!!!!!!!!!!!!!!!!!!! ");
|
||||||
|
print(response.data.toString());
|
||||||
|
Map<String, dynamic> jsondata = json.decode(response.data);
|
||||||
|
|
||||||
|
EventsData eventresponse = EventsData.fromJson(jsondata);
|
||||||
|
List<EventsList>? eventdata = eventresponse.events;
|
||||||
|
return eventdata!;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<dynamic> 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<dynamic> 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<List<Specialty>> specialtyOfSpeakers({
|
||||||
|
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.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<String, dynamic> jsondata = json.decode(response.data);
|
||||||
|
|
||||||
|
// Specialtyresp resp = Specialtyresp.fromJson(jsondata);
|
||||||
|
List<Specialty> data = specialtyFromJson(response.data);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<TopicsCloudData>> insightsTopicsCloud({
|
||||||
|
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.insightsTopicsCloud}',
|
||||||
|
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<String, dynamic> jsondata = json.decode(response.data);
|
||||||
|
|
||||||
|
// Specialtyresp resp = Specialtyresp.fromJson(jsondata);
|
||||||
|
List<TopicsCloudData> data = topicsCloudDataFromJson(response.data);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<Affiliations>> 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<String, dynamic> jsondata = json.decode(response.data);
|
||||||
|
|
||||||
|
// Specialtyresp resp = Specialtyresp.fromJson(jsondata);
|
||||||
|
List<Affiliations> data = affiliationsFromJson(response.data);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<OverviewData> getEventsOverview(
|
||||||
|
String eventid, String startDate, String endDate) async {
|
||||||
|
Dio dio = Dio();
|
||||||
|
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||||
|
(HttpClient client) {
|
||||||
|
client.badCertificateCallback =
|
||||||
|
(X509Certificate cert, String host, int port) => true;
|
||||||
|
return client;
|
||||||
|
};
|
||||||
|
Response response;
|
||||||
|
var formData = FormData.fromMap({
|
||||||
|
"user_email": "vinodh@aissel.com",
|
||||||
|
"start": startDate,
|
||||||
|
"end": endDate,
|
||||||
|
"event_id": eventid,
|
||||||
});
|
});
|
||||||
response = await dio.post(
|
response = await dio.post(
|
||||||
'${EventsConstants.stagingUrl}${EventsConstants.eventslistapi}',
|
'${EventsConstants.stagingUrl}${EventsConstants.eventslistapi}',
|
||||||
|
@ -149,14 +340,16 @@ class ApiCall {
|
||||||
print("response user eventssssss here!!!!!!!!!!!!!!!!!!!!! ");
|
print("response user eventssssss here!!!!!!!!!!!!!!!!!!!!! ");
|
||||||
print(response.data.toString());
|
print(response.data.toString());
|
||||||
Map<String, dynamic> jsondata = json.decode(response.data);
|
Map<String, dynamic> jsondata = json.decode(response.data);
|
||||||
EventsDataStaging? eventdata = EventsDataStaging.fromJson(jsondata);
|
EventsDetailsResp? eventdata = EventsDetailsResp.fromJson(jsondata);
|
||||||
List<EventsList>? eventList = eventdata.events;
|
OverviewData overviewData = eventdata.data;
|
||||||
|
|
||||||
return eventList;
|
return overviewData;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> verifyEmail(
|
//************ K2 API CALLS ***********************************************************************************************************************************
|
||||||
String email, String deviceid, String platform) async {
|
|
||||||
|
Future<List<EventsList>> getEventsFromK2(int page, String search,
|
||||||
|
{String? startdate, String? enddate}) async {
|
||||||
Dio dio = Dio();
|
Dio dio = Dio();
|
||||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||||
(HttpClient client) {
|
(HttpClient client) {
|
||||||
|
@ -165,27 +358,178 @@ class ApiCall {
|
||||||
return client;
|
return client;
|
||||||
};
|
};
|
||||||
Response response;
|
Response response;
|
||||||
var formData = FormData.fromMap({
|
var formData;
|
||||||
"email": email,
|
if (startdate != "") {
|
||||||
});
|
formData = {
|
||||||
response = await dio.post('${EventsConstants.getTokenApi}',
|
"page": page,
|
||||||
options: Options(),
|
"limit": 20,
|
||||||
queryParameters: {
|
"start_date": startdate,
|
||||||
"email": email,
|
"end_date": enddate,
|
||||||
"device_id": deviceid,
|
};
|
||||||
"platform": platform,
|
} else {
|
||||||
},
|
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);
|
data: formData);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
print("response user login!!!!!!!!!!!!!!!!!!!!! ");
|
print("response EVENTS!!!!!!!!!!!!!!!!!!!! ");
|
||||||
print(response.data.toString());
|
print(response.data.toString());
|
||||||
return response.data;
|
Map<String, dynamic> jsondata = response.data;
|
||||||
|
EventsListRespK2 eventresponse = EventsListRespK2.fromJson(jsondata);
|
||||||
|
List<EventsList>? eventdata = eventresponse.data;
|
||||||
|
|
||||||
|
return eventdata!;
|
||||||
} else {
|
} else {
|
||||||
print("isEmplty");
|
print("isEmpty");
|
||||||
return null;
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<List<EventsList>> 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<String, dynamic> jsondata = response.data;
|
||||||
|
EventsListRespK2 eventresponse = EventsListRespK2.fromJson(jsondata);
|
||||||
|
List<EventsList>? eventdata = eventresponse.data;
|
||||||
|
|
||||||
|
return eventdata!;
|
||||||
|
} else {
|
||||||
|
print("isEmpty");
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//ADD TO FAVS
|
||||||
|
Future<String> 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<String, dynamic> jsondata = json.decode(response.toString());
|
||||||
|
String message = jsondata["message"];
|
||||||
|
print("***$message");
|
||||||
|
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
//REMOVE FROM FAVS
|
||||||
|
|
||||||
|
Future<String> 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<String, dynamic> jsondata = json.decode(response.toString());
|
||||||
|
String message = jsondata["message"];
|
||||||
|
print("***$message");
|
||||||
|
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
//GET MY EVENTS
|
||||||
|
|
||||||
Future<dynamic> verifyCode(String email, String code) async {
|
Future<dynamic> verifyCode(String email, String code) async {
|
||||||
Dio dio = Dio();
|
Dio dio = Dio();
|
||||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||||
|
@ -238,8 +582,151 @@ class ApiCall {
|
||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<OverviewData> getEventsOverview(
|
//SEARCH EVENTS API FROM K2
|
||||||
String eventid, String startDate, String endDate) async {
|
|
||||||
|
Future<List<EventsList>> 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<String, dynamic> jsondata = response.data;
|
||||||
|
EventsListRespK2 eventresponse = EventsListRespK2.fromJson(jsondata);
|
||||||
|
List<EventsList>? eventdata = eventresponse.data;
|
||||||
|
|
||||||
|
return eventdata!;
|
||||||
|
} else {
|
||||||
|
print("isEmpty");
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//SPEAKERS LIST FROM K2
|
||||||
|
Future<Map<String, Object?>> getSpeakersFromK2(
|
||||||
|
int page, String eventid, String event_unique_id,
|
||||||
|
{String? searchkey}) async {
|
||||||
|
Dio dio = Dio();
|
||||||
|
print("see pages^^^^^^^ : $page");
|
||||||
|
(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": 40,
|
||||||
|
"id": eventid,
|
||||||
|
"event_id": event_unique_id,
|
||||||
|
"hcp_full_name": searchkey
|
||||||
|
// "conditions": [
|
||||||
|
// {"field": eventfield, "type": "like", "value": searchkey}
|
||||||
|
// ]
|
||||||
|
};
|
||||||
|
response = await dio.post('${EventsConstants.speakerslistapifromk2}',
|
||||||
|
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("respons Speakers !!!!!!!!!!!!!!!!!!!! ");
|
||||||
|
print(response.data.toString());
|
||||||
|
Map<String, dynamic> jsondata = response.data;
|
||||||
|
SpeakersResponse resp = SpeakersResponse.fromJson(jsondata);
|
||||||
|
List<SpeakersList>? data = resp.data;
|
||||||
|
var respdata = {"count": resp.count, "list": data ?? []};
|
||||||
|
|
||||||
|
return respdata;
|
||||||
|
} else {
|
||||||
|
print("isEmpty");
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//************ OTHER API CALLS ***********************************************************************************************************************************
|
||||||
|
|
||||||
|
Future<dynamic> dummyapi() 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.get('http://203.129.219.14:3043/weather?city=London',
|
||||||
|
options: Options());
|
||||||
|
print("response PLATFORMATIC here ");
|
||||||
|
print(response.data.toString());
|
||||||
|
return response.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
//https://cardio-staging.konectar.io/notifications/list_all_notifications
|
||||||
|
Future<dynamic> 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<dynamic> verifyEmail(
|
||||||
|
String email, String deviceid, String platform) async {
|
||||||
Dio dio = Dio();
|
Dio dio = Dio();
|
||||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||||
(HttpClient client) {
|
(HttpClient client) {
|
||||||
|
@ -249,25 +736,24 @@ class ApiCall {
|
||||||
};
|
};
|
||||||
Response response;
|
Response response;
|
||||||
var formData = FormData.fromMap({
|
var formData = FormData.fromMap({
|
||||||
"user_email": "vinodh@aissel.com",
|
"email": email,
|
||||||
"start": startDate,
|
|
||||||
"end": endDate,
|
|
||||||
"event_id": eventid,
|
|
||||||
});
|
});
|
||||||
response = await dio.post(
|
response = await dio.post('${EventsConstants.getTokenApi}',
|
||||||
'${EventsConstants.stagingUrl}${EventsConstants.eventslistapi}',
|
|
||||||
options: Options(),
|
options: Options(),
|
||||||
queryParameters: {
|
queryParameters: {
|
||||||
"user_email": "vinodh@aissel.com",
|
"email": email,
|
||||||
|
"device_id": deviceid,
|
||||||
|
"platform": platform,
|
||||||
},
|
},
|
||||||
data: formData);
|
data: formData);
|
||||||
print("response user eventssssss here!!!!!!!!!!!!!!!!!!!!! ");
|
if (response.statusCode == 200) {
|
||||||
print(response.data.toString());
|
print("response user login!!!!!!!!!!!!!!!!!!!!! ");
|
||||||
Map<String, dynamic> jsondata = json.decode(response.data);
|
print(response.data.toString());
|
||||||
EventsDetailsResp? eventdata = EventsDetailsResp.fromJson(jsondata);
|
return response.data;
|
||||||
OverviewData overviewData = eventdata.data;
|
} else {
|
||||||
|
print("isEmplty");
|
||||||
return overviewData;
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<EventsList>?> getEvents() async {
|
Future<List<EventsList>?> getEvents() async {
|
||||||
|
@ -324,29 +810,6 @@ class ApiCall {
|
||||||
return eventsdetailList;
|
return eventsdetailList;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> 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.domainUrl}eventsapi.api.addEventsToFav?eventid=$eventid',
|
|
||||||
options: Options(),
|
|
||||||
);
|
|
||||||
print("response user keywords here########## ");
|
|
||||||
print(response.data.toString());
|
|
||||||
Map<String, dynamic> jsondata = json.decode(response.toString());
|
|
||||||
String message = jsondata["message"];
|
|
||||||
print("***$message");
|
|
||||||
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<String> attendEvents(String eventid) async {
|
Future<String> attendEvents(String eventid) async {
|
||||||
Dio dio = Dio();
|
Dio dio = Dio();
|
||||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||||
|
@ -619,4 +1082,58 @@ class ApiCall {
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<Map<String, Object?>> getSpeakersFromLocal(
|
||||||
|
int page, String eventid, String event_unique_id,
|
||||||
|
{String? searchkey}) async {
|
||||||
|
Dio dio = Dio();
|
||||||
|
print("see pages^^^^^^^ : $page");
|
||||||
|
(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": 40,
|
||||||
|
"id": eventid,
|
||||||
|
"event_id": event_unique_id,
|
||||||
|
"hcp_full_name": searchkey
|
||||||
|
// "conditions": [
|
||||||
|
// {"field": eventfield, "type": "like", "value": searchkey}
|
||||||
|
// ]
|
||||||
|
};
|
||||||
|
response = await dio.post(
|
||||||
|
'${EventsConstants.speakerslistapifromLocal}',
|
||||||
|
// 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("respons Speakers !!!!!!!!!!!!!!!!!!!! ");
|
||||||
|
print(response.data.toString());
|
||||||
|
Map<String, dynamic> jsondata = response.data;
|
||||||
|
SpeakersResponse1 resp = SpeakersResponse1.fromJson(jsondata);
|
||||||
|
List<SpeakersList>? data = resp.data!.data;
|
||||||
|
var respdata = {"count": 92, "list": data ?? []};
|
||||||
|
|
||||||
|
return respdata;
|
||||||
|
} else {
|
||||||
|
print("isEmpty");
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,14 +14,38 @@ class EventsConstants {
|
||||||
static const Color btnBlueColor = Color.fromARGB(255, 0, 102, 204);
|
static const Color btnBlueColor = Color.fromARGB(255, 0, 102, 204);
|
||||||
// static const String domainUrl = "http://192.0.0.2:8007/api/method/";
|
// static const String domainUrl = "http://192.0.0.2:8007/api/method/";
|
||||||
static const String domainUrl = "http://192.168.2.109:8007/api/method/";
|
static const String domainUrl = "http://192.168.2.109:8007/api/method/";
|
||||||
|
|
||||||
//192.0.0.2:8007 - iphone
|
//192.0.0.2:8007 - iphone
|
||||||
// 192.168.2.109:8007 - office
|
// 192.168.2.109:8007 - office
|
||||||
|
|
||||||
static const String stagingUrl =
|
static const String stagingUrl =
|
||||||
"https://cardio-staging.konectar.io/reports/";
|
"https://cardio-staging.konectar.io/reports/";
|
||||||
|
static const String devUrl = "http://192.168.2.130/konectar-sandbox/reports/";
|
||||||
static const String eventslistapi = "load_future_events";
|
static const String eventslistapi = "load_future_events";
|
||||||
|
static const String followUnfollowEvent = "save_user_interested_event/";
|
||||||
|
static const String attendNotAttendEvent = "save_user_attending_event/";
|
||||||
|
static const String specialtyOfSpeakers = "get_top_specialities_donut_chart";
|
||||||
|
static const String insightsTopicsCloud = "get_topic_clouds_chart/";
|
||||||
|
static const String insightsBarChart = "get_top_affiliation_bar_chart/";
|
||||||
static const String speakerslistapi = "view_micro_event_data";
|
static const String speakerslistapi = "view_micro_event_data";
|
||||||
static const String eventdetailsapi = "view_micro_event";
|
static const String eventdetailsapi = "view_micro_event";
|
||||||
|
static const String eventslistapifromk2 =
|
||||||
|
"http://192.168.2.130:8888/api/kolevents/v1/en/fetch";
|
||||||
|
|
||||||
|
static const String speakerslistapifromk2 =
|
||||||
|
"http://192.168.2.130:8888/api/kolevents/v1/en/event_speakers";
|
||||||
|
static const String speakerslistapifromLocal =
|
||||||
|
"http://events.localhost:8007/api/method/speakerslist";
|
||||||
|
static const String addToMyEventsApi =
|
||||||
|
"http://192.168.2.130:8888/api/kolevents/v1/en/add_to_my_event";
|
||||||
|
|
||||||
|
static const String removeFromMyEventsApi =
|
||||||
|
"http://192.168.2.130:8888/api/kolevents/v1/en/delete_my_event";
|
||||||
|
|
||||||
|
static const String fetchMyEventsApi =
|
||||||
|
"http://192.168.2.130:8888/api/kolevents/v1/en/list_my_events";
|
||||||
|
static const String unfollowMyEventsApi =
|
||||||
|
"http://192.168.2.130:8888/api/kolevents/v1/en/delete_my_event";
|
||||||
static const String getTokenApi =
|
static const String getTokenApi =
|
||||||
"http://192.168.2.155:8002/api/auth/mobile/get_token";
|
"http://192.168.2.155:8002/api/auth/mobile/get_token";
|
||||||
static const String validateTokenApi =
|
static const String validateTokenApi =
|
||||||
|
|
|
@ -3,13 +3,29 @@ import 'package:intl/intl.dart';
|
||||||
class CustomDateFormatter {
|
class CustomDateFormatter {
|
||||||
DateTime convertStringToDate(String datestring) {
|
DateTime convertStringToDate(String datestring) {
|
||||||
print("Date string : $datestring");
|
print("Date string : $datestring");
|
||||||
List<String> datearray = datestring.split('/');
|
String char = "/";
|
||||||
|
if (datestring.contains("-")) {
|
||||||
|
char = "-";
|
||||||
|
}
|
||||||
|
List<String> datearray = datestring.split(char);
|
||||||
DateTime outputDate = DateTime(int.parse(datearray[2]),
|
DateTime outputDate = DateTime(int.parse(datearray[2]),
|
||||||
int.parse(datearray[0]), int.parse(datearray[1]));
|
int.parse(datearray[0]), int.parse(datearray[1]));
|
||||||
print("Output date : $outputDate");
|
print("Output date : $outputDate");
|
||||||
return outputDate;
|
return outputDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String convertDateTimeToDate(String datestring) {
|
||||||
|
print("Date string : $datestring");
|
||||||
|
List<String> datearray1 = datestring.split(' ');
|
||||||
|
print("Date string22 : $datearray1[0]");
|
||||||
|
List<String> datearray = datearray1[0].split('-');
|
||||||
|
DateTime outputDate = DateTime(int.parse(datearray[0]),
|
||||||
|
int.parse(datearray[1]), int.parse(datearray[2]));
|
||||||
|
final DateFormat formatter = DateFormat('dd-MM-yyyy');
|
||||||
|
print("Output date : $outputDate");
|
||||||
|
return formatter.format(outputDate);
|
||||||
|
}
|
||||||
|
|
||||||
String formatDate() {
|
String formatDate() {
|
||||||
final DateFormat formatter = DateFormat('yyyy-MM-dd hh:mm');
|
final DateFormat formatter = DateFormat('yyyy-MM-dd hh:mm');
|
||||||
final String formatted = formatter.format(DateTime.now());
|
final String formatted = formatter.format(DateTime.now());
|
||||||
|
|
|
@ -2,22 +2,19 @@ import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart';
|
||||||
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
||||||
import 'package:konectar_events/model/eventsmodel.dart';
|
import 'package:konectar_events/model/eventspeakers.dart';
|
||||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
import 'package:konectar_events/utils/dateformater.dart';
|
import 'package:konectar_events/utils/dateformater.dart';
|
||||||
import 'package:konectar_events/utils/util.dart';
|
import 'package:konectar_events/utils/util.dart';
|
||||||
import 'package:konectar_events/view/hcplist.dart';
|
|
||||||
import 'package:konectar_events/view/home.dart';
|
import 'package:konectar_events/view/home.dart';
|
||||||
import 'package:konectar_events/view/insights.dart';
|
import 'package:konectar_events/view/insights.dart';
|
||||||
|
import 'package:konectar_events/view/login_components/intropaging.dart';
|
||||||
import 'package:konectar_events/view/profileview.dart';
|
import 'package:konectar_events/view/profileview.dart';
|
||||||
import 'package:konectar_events/view/socialmedia.dart';
|
import 'package:konectar_events/view/socialmedia.dart';
|
||||||
import 'package:konectar_events/viewmodel/eventsprovider.dart';
|
import 'package:konectar_events/viewmodel/eventsprovider.dart';
|
||||||
import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
|
|
||||||
import 'package:konectar_events/widgets/customappbar.dart';
|
|
||||||
import 'package:konectar_events/widgets/gridview.dart';
|
|
||||||
import 'package:konectar_events/widgets/snackbar.dart';
|
import 'package:konectar_events/widgets/snackbar.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
@ -39,7 +36,10 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
bool isExtended = false;
|
bool isExtended = false;
|
||||||
bool isExtendedInterested = false;
|
bool isExtendedInterested = false;
|
||||||
final ScrollController _scrollController = ScrollController();
|
final ScrollController _scrollController = ScrollController();
|
||||||
|
final PagingController<int, SpeakersList> pagingController =
|
||||||
|
PagingController(firstPageKey: 1);
|
||||||
|
static const _pageSize = 20;
|
||||||
|
String searchSpeaker = "";
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
@ -47,6 +47,45 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
||||||
init();
|
init();
|
||||||
});
|
});
|
||||||
|
pagingController.addPageRequestListener((pageKey) {
|
||||||
|
_fetchPage(pageKey);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _fetchPage(int pageKey) async {
|
||||||
|
//await initConnectivity();
|
||||||
|
// if (connectionStatus.toString().contains("ConnectivityResult.none")) {
|
||||||
|
// try {
|
||||||
|
// final newItems =
|
||||||
|
// await Provider.of<EventsProvider>(context, listen: false)
|
||||||
|
// .getOfflineMyEvents();
|
||||||
|
// final isLastPage = newItems.length < _pageSize;
|
||||||
|
// if (isLastPage) {
|
||||||
|
// _pagingController.appendLastPage(newItems);
|
||||||
|
// } else {
|
||||||
|
// final nextPageKey = pageKey + newItems.length;
|
||||||
|
// _pagingController.appendPage(newItems, nextPageKey);
|
||||||
|
// }
|
||||||
|
// } catch (error) {
|
||||||
|
// _pagingController.error = error;
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
try {
|
||||||
|
final newItems = await Provider.of<EventsProvider>(context, listen: false)
|
||||||
|
.getSpeakersDetails(pageKey, widget.event.eventId!,
|
||||||
|
widget.event.eventUniqueId!, searchSpeaker);
|
||||||
|
final isLastPage = newItems.isEmpty;
|
||||||
|
if (isLastPage) {
|
||||||
|
pagingController.appendLastPage(newItems);
|
||||||
|
} else {
|
||||||
|
final nextPageKey = pageKey + 1;
|
||||||
|
|
||||||
|
pagingController.appendPage(newItems, nextPageKey);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
pagingController.error = error;
|
||||||
|
}
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
init() async {
|
init() async {
|
||||||
|
@ -54,15 +93,22 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
CustomDateFormatter().convertStringToDate(widget.event.start!));
|
CustomDateFormatter().convertStringToDate(widget.event.start!));
|
||||||
String end = CustomDateFormatter().formatYearDate(
|
String end = CustomDateFormatter().formatYearDate(
|
||||||
CustomDateFormatter().convertStringToDate(widget.event.end!));
|
CustomDateFormatter().convertStringToDate(widget.event.end!));
|
||||||
|
// await Provider.of<EventsProvider>(context, listen: false)
|
||||||
|
// .getSessionCount(widget.event.eventId!, widget.event.eventUniqueId!);
|
||||||
|
final provider = Provider.of<EventsProvider>(context, listen: false);
|
||||||
|
|
||||||
|
// pagingController.addPageRequestListener((pageKey) {
|
||||||
|
// _fetchPage(pageKey);
|
||||||
|
// });
|
||||||
|
// await Provider.of<EventsProvider>(context, listen: false)
|
||||||
|
// .getEventsDetails(widget.event.eventId!);
|
||||||
|
// await Provider.of<EventsProvider>(context, listen: false).getSessionCount();
|
||||||
await Provider.of<EventsProvider>(context, listen: false)
|
await Provider.of<EventsProvider>(context, listen: false)
|
||||||
.getEventsDetails(widget.event.eventId!);
|
.getTopicsCloud(widget.event);
|
||||||
await Provider.of<EventsProvider>(context, listen: false).getSessionCount();
|
|
||||||
await Provider.of<EventsProvider>(context, listen: false)
|
await Provider.of<EventsProvider>(context, listen: false)
|
||||||
.getTopicsCloud(widget.event.eventId!);
|
.getSpecialtyData(widget.event);
|
||||||
await Provider.of<EventsProvider>(context, listen: false)
|
await Provider.of<EventsProvider>(context, listen: false)
|
||||||
.getSpecialtyData(widget.event.eventId!);
|
.getAffiliations(widget.event);
|
||||||
await Provider.of<EventsProvider>(context, listen: false)
|
|
||||||
.getAffiliations(widget.event.eventId!);
|
|
||||||
// await Provider.of<EventsProvider>(context, listen: false)
|
// await Provider.of<EventsProvider>(context, listen: false)
|
||||||
// .getOverviewData(widget.event.eventId!, start, end);
|
// .getOverviewData(widget.event.eventId!, start, end);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
@ -71,6 +117,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_tabController.dispose();
|
_tabController.dispose();
|
||||||
|
pagingController.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +125,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
return Consumer<EventsProvider>(
|
return Consumer<EventsProvider>(
|
||||||
builder: (BuildContext context, provider, Widget? child) {
|
builder: (BuildContext context, provider, Widget? child) {
|
||||||
return DefaultTabController(
|
return DefaultTabController(
|
||||||
length: 4,
|
length: 3,
|
||||||
//child: SafeArea(
|
//child: SafeArea(
|
||||||
// appBar: CustomAppBar(title: "", backgroundcolor: Constants.bgcolor),
|
// appBar: CustomAppBar(title: "", backgroundcolor: Constants.bgcolor),
|
||||||
//body:
|
//body:
|
||||||
|
@ -214,7 +261,18 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// const Spacer(),
|
const Spacer(),
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(
|
||||||
|
provider.ifOfflineExists(widget.event.eventId!)
|
||||||
|
? Icons.bookmark
|
||||||
|
: Icons.bookmark_add_outlined,
|
||||||
|
color: Colors.white,
|
||||||
|
size: isTablet ? 14 : 18),
|
||||||
|
onPressed: () async {
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
)
|
||||||
// widget.event.isfav
|
// widget.event.isfav
|
||||||
// ? RichText(
|
// ? RichText(
|
||||||
// text: TextSpan(
|
// text: TextSpan(
|
||||||
|
@ -271,6 +329,17 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
tooltip: 'Actions',
|
tooltip: 'Actions',
|
||||||
// heroTag: "floatbtn232342",
|
// heroTag: "floatbtn232342",
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
if (provider.offlineEvents.isNotEmpty) {
|
||||||
|
provider.offlineEvents.forEach(
|
||||||
|
(element) {
|
||||||
|
if (element.eventId == widget.event.eventId) {
|
||||||
|
provider.offlineExists = true;
|
||||||
|
} else {
|
||||||
|
provider.offlineExists = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
showModalBottomSheet<void>(
|
showModalBottomSheet<void>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
|
@ -292,6 +361,25 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
// 'Actions',
|
// 'Actions',
|
||||||
// style: TextStyle(fontSize: 18),
|
// style: TextStyle(fontSize: 18),
|
||||||
// )),
|
// )),
|
||||||
|
// ),IntroductionAnimationScreen
|
||||||
|
// InkWell(
|
||||||
|
// onTap: () {
|
||||||
|
// Navigator.push<dynamic>(
|
||||||
|
// context,
|
||||||
|
// MaterialPageRoute<dynamic>(
|
||||||
|
// builder: (BuildContext context) =>
|
||||||
|
// IntroductionAnimationScreen(),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// // Navigator.pop(context);
|
||||||
|
// },
|
||||||
|
// child: ListTile(
|
||||||
|
// title: Text("GOTO"),
|
||||||
|
// leading: Icon(
|
||||||
|
// Icons.calendar_month,
|
||||||
|
// color: Colors.green,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
// ),
|
// ),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
@ -309,11 +397,30 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () async {
|
||||||
|
if (provider.offlineEvents.isEmpty) {
|
||||||
|
await provider.saveEventsData(widget.event);
|
||||||
|
SnackBarWidget.displaySnackBar(
|
||||||
|
"Event Saved Offline", context);
|
||||||
|
} else {
|
||||||
|
if (!provider.offlineExists) {
|
||||||
|
await provider.saveEventsData(widget.event);
|
||||||
|
SnackBarWidget.displaySnackBar(
|
||||||
|
"Event Saved Offline", context);
|
||||||
|
} else {
|
||||||
|
await provider.delateOfflineEvent(widget.event);
|
||||||
|
provider.offlineExists = false;
|
||||||
|
SnackBarWidget.displaySnackBar(
|
||||||
|
"Removed from Offline", context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
title: Text("Download Pdf"),
|
title: Text(provider.offlineExists
|
||||||
|
? "Remove the event from offline"
|
||||||
|
: "Save the event offline"),
|
||||||
leading: Icon(
|
leading: Icon(
|
||||||
Icons.download,
|
Icons.download,
|
||||||
color: Colors.blue,
|
color: Colors.blue,
|
||||||
|
@ -322,8 +429,8 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (widget.event.isAttending) {
|
if (widget.event.eventUserAttendee!) {
|
||||||
widget.event.isAttending = false;
|
widget.event.eventUserAttendee = false;
|
||||||
|
|
||||||
// if (event.isAttending) {
|
// if (event.isAttending) {
|
||||||
// SnackBarWidget.displaySnackBar(
|
// SnackBarWidget.displaySnackBar(
|
||||||
|
@ -428,10 +535,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
ProfileInfoItem(
|
ProfileInfoItem(
|
||||||
"Session(s)", provider.eventSessionCount),
|
"Session(s)", provider.eventSessionCount),
|
||||||
ProfileInfoItem(
|
ProfileInfoItem(
|
||||||
"Speakers(s)",
|
"Speaker(s)", provider.speakercount),
|
||||||
// int.parse(
|
|
||||||
// provider.overviewData!.attendeeCount
|
|
||||||
0),
|
|
||||||
//ProfileInfoItem("Note(s)", 1),
|
//ProfileInfoItem("Note(s)", 1),
|
||||||
], widget.event, provider),
|
], widget.event, provider),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
@ -465,14 +569,14 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
//controller: _tabController,
|
//controller: _tabController,
|
||||||
children: [
|
children: [
|
||||||
expandableDetails(),
|
expandableDetails(),
|
||||||
speakersList(provider),
|
speakersList(context, provider),
|
||||||
EventsInsights(
|
EventsInsights(
|
||||||
eventid: widget.event.eventId!,
|
eventid: widget.event.eventId!,
|
||||||
kFlutterHashtags: provider.kFlutterHashtags,
|
kFlutterHashtags: provider.kFlutterHashtags,
|
||||||
specialtyList: provider.specialtyList,
|
specialtyList: provider.specialtyList,
|
||||||
affiliations: provider.affiliations,
|
affiliations: provider.affiliations,
|
||||||
),
|
),
|
||||||
SocialMedia(),
|
//SocialMedia(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -861,7 +965,8 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await _launchUrl(provider.eventdetailList[0].url1!);
|
print("URL:${event.url1!}");
|
||||||
|
await _launchUrl(event.url1!);
|
||||||
},
|
},
|
||||||
child: RichText(
|
child: RichText(
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
|
@ -967,7 +1072,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget favbtn(EventsList event, EventsProvider provider) {
|
Widget favbtn(EventsList event, EventsProvider provider) {
|
||||||
return event.isfav
|
return event.eventUserInterest!
|
||||||
? SizedBox(
|
? SizedBox(
|
||||||
height: 40,
|
height: 40,
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
|
@ -977,18 +1082,19 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
// String msg = await provider
|
// String msg = await provider
|
||||||
// .addEventsToFavs(event.eventId!);
|
// .addEventsToFavs(event.eventId!);
|
||||||
setState(() {
|
|
||||||
event.isfav = !event.isfav;
|
|
||||||
|
|
||||||
if (event.isfav) {
|
event.eventUserInterest = !event.eventUserInterest!;
|
||||||
provider.favsEventsData(event);
|
|
||||||
SnackBarWidget.displaySnackBar(
|
if (event.eventUserInterest!) {
|
||||||
"You are following the event!", context);
|
await provider.addEventsToFavs(event.eventId!);
|
||||||
} else {
|
SnackBarWidget.displaySnackBar(
|
||||||
provider.delateEventsData(event);
|
"You are following the event!", context);
|
||||||
SnackBarWidget.displaySnackBar("Not Following", context);
|
} else {
|
||||||
}
|
// provider.delateOfflineEvent(event);
|
||||||
});
|
await provider.removeEventsToFavs(event.eventId!);
|
||||||
|
SnackBarWidget.displaySnackBar("Not Following", context);
|
||||||
|
}
|
||||||
|
setState(() {});
|
||||||
},
|
},
|
||||||
child: AnimatedSwitcher(
|
child: AnimatedSwitcher(
|
||||||
duration: Duration(seconds: 1),
|
duration: Duration(seconds: 1),
|
||||||
|
@ -1025,18 +1131,19 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
// String msg = await provider
|
// String msg = await provider
|
||||||
// .addEventsToFavs(event.eventId!);
|
// .addEventsToFavs(event.eventId!);
|
||||||
|
|
||||||
setState(() {
|
event.eventUserInterest = !event.eventUserInterest!;
|
||||||
event.isfav = !event.isfav;
|
|
||||||
|
|
||||||
if (event.isfav) {
|
if (event.eventUserInterest!) {
|
||||||
provider.favsEventsData(event);
|
await provider.addEventsToFavs(event.eventId!);
|
||||||
SnackBarWidget.displaySnackBar(
|
SnackBarWidget.displaySnackBar(
|
||||||
"You are following the event!", context);
|
"You are following the event!", context);
|
||||||
} else {
|
} else {
|
||||||
provider.delateEventsData(event);
|
// provider.delateOfflineEvent(event);
|
||||||
SnackBarWidget.displaySnackBar("Not Following", context);
|
await provider.removeEventsToFavs(event.eventId!);
|
||||||
}
|
SnackBarWidget.displaySnackBar("Not Following", context);
|
||||||
});
|
}
|
||||||
|
|
||||||
|
setState(() {});
|
||||||
},
|
},
|
||||||
label: AnimatedSwitcher(
|
label: AnimatedSwitcher(
|
||||||
duration: Duration(seconds: 1),
|
duration: Duration(seconds: 1),
|
||||||
|
@ -1058,14 +1165,16 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
// ),
|
// ),
|
||||||
Icon(
|
Icon(
|
||||||
Icons.favorite,
|
Icons.favorite,
|
||||||
color: event.isfav ? Colors.red : Colors.grey,
|
color: event.eventUserInterest!
|
||||||
|
? Colors.white
|
||||||
|
: Colors.grey,
|
||||||
size: 14,
|
size: 14,
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
width: 10,
|
width: 10,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
event.isfav ? "Following" : "Follow",
|
event.eventUserInterest! ? "Following" : "Follow",
|
||||||
style: TextStyle(color: Colors.black),
|
style: TextStyle(color: Colors.black),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
@ -1074,7 +1183,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget attendingbtn(EventsList event, EventsProvider provider) {
|
Widget attendingbtn(EventsList event, EventsProvider provider) {
|
||||||
return event.isAttending
|
return event.eventUserAttendee!
|
||||||
? SizedBox(
|
? SizedBox(
|
||||||
height: 40,
|
height: 40,
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
|
@ -1082,22 +1191,18 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
// : Colors.transparent,
|
// : Colors.transparent,
|
||||||
|
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (!event.isfav) {
|
event.eventUserAttendee = !event.eventUserAttendee!;
|
||||||
event.isfav = !event.isfav;
|
|
||||||
// String msg1 = await provider
|
|
||||||
// .addEventsToFavs(event.eventId!);
|
|
||||||
}
|
|
||||||
|
|
||||||
// String msg = await provider
|
// String msg = await provider
|
||||||
// .markAttending(event.eventId!);
|
// .markAttending(event.eventId!);
|
||||||
|
if (event.eventUserAttendee!) {
|
||||||
|
await provider.attendNotAttendEvent(event.eventId!, "1");
|
||||||
|
SnackBarWidget.displaySnackBar("Attending", context);
|
||||||
|
} else {
|
||||||
|
await provider.attendNotAttendEvent(event.eventId!, "0");
|
||||||
|
SnackBarWidget.displaySnackBar("Not Attending", context);
|
||||||
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
event.isAttending = !event.isAttending;
|
//
|
||||||
|
|
||||||
if (event.isAttending) {
|
|
||||||
SnackBarWidget.displaySnackBar("Attending", context);
|
|
||||||
} else {
|
|
||||||
SnackBarWidget.displaySnackBar("Not Attending", context);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: AnimatedSwitcher(
|
child: AnimatedSwitcher(
|
||||||
|
@ -1131,23 +1236,26 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
backgroundColor: EventsConstants.bgcolor,
|
backgroundColor: EventsConstants.bgcolor,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (!event.isfav) {
|
if (!event.eventUserInterest!) {
|
||||||
event.isfav = !event.isfav;
|
await provider.addEventsToFavs(event.eventId!);
|
||||||
|
event.eventUserInterest = !event.eventUserInterest!;
|
||||||
// String msg1 = await provider
|
// String msg1 = await provider
|
||||||
// .addEventsToFavs(event.eventId!);
|
// .addEventsToFavs(event.eventId!);
|
||||||
}
|
}
|
||||||
|
|
||||||
// String msg = await provider
|
// String msg = await provider
|
||||||
// .markAttending(event.eventId!);
|
// .markAttending(event.eventId!);
|
||||||
setState(() {
|
event.eventUserAttendee = !event.eventUserAttendee!;
|
||||||
event.isAttending = !event.isAttending;
|
// String msg = await provider
|
||||||
|
// .markAttending(event.eventId!);
|
||||||
if (event.isAttending) {
|
if (event.eventUserAttendee!) {
|
||||||
SnackBarWidget.displaySnackBar("Attending", context);
|
await provider.attendNotAttendEvent(event.eventId!, "1");
|
||||||
} else {
|
SnackBarWidget.displaySnackBar("Attending", context);
|
||||||
SnackBarWidget.displaySnackBar("Not Attending", context);
|
} else {
|
||||||
}
|
await provider.attendNotAttendEvent(event.eventId!, "0");
|
||||||
});
|
SnackBarWidget.displaySnackBar("Not Attending", context);
|
||||||
|
}
|
||||||
|
setState(() {});
|
||||||
},
|
},
|
||||||
//heroTag: "attending545",
|
//heroTag: "attending545",
|
||||||
label: AnimatedSwitcher(
|
label: AnimatedSwitcher(
|
||||||
|
@ -1162,7 +1270,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
axis: Axis.horizontal,
|
axis: Axis.horizontal,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: event.isAttending
|
child: event.eventUserAttendee!
|
||||||
? Row(
|
? Row(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
|
@ -1228,12 +1336,12 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 3,
|
height: 3,
|
||||||
),
|
),
|
||||||
listViewTopicCard(
|
listViewTopicCard("Speakers with most sessions",
|
||||||
"Speakers with most sessions", widget.event.topSpeakers!, true),
|
widget.event.topSpeakers ?? "", true),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 3,
|
height: 3,
|
||||||
),
|
),
|
||||||
listViewTopicCard("Sponsors", widget.event.sponsors!, true)
|
listViewTopicCard("Sponsors", widget.event.sponsors ?? "", true)
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -1314,8 +1422,14 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget speakersList(EventsProvider provider) {
|
void _updateSearchTerm(String searchTerm) {
|
||||||
|
setState(() => searchSpeaker = searchTerm);
|
||||||
|
pagingController.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget speakersList(BuildContext context, EventsProvider provider) {
|
||||||
var searchtextEditingController;
|
var searchtextEditingController;
|
||||||
|
// pagingController.refresh();
|
||||||
return Container(
|
return Container(
|
||||||
width: double.maxFinite,
|
width: double.maxFinite,
|
||||||
padding: EdgeInsets.only(left: 8),
|
padding: EdgeInsets.only(left: 8),
|
||||||
|
@ -1332,15 +1446,15 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
// decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
// // color: Colors.white,
|
// // color: Colors.white,
|
||||||
// borderRadius: BorderRadius.circular(5.0)),
|
// borderRadius: BorderRadius.circular(5.0)),
|
||||||
|
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: searchtextEditingController,
|
controller: searchtextEditingController,
|
||||||
onChanged: (String txt) async {
|
onChanged: (String txt) async {
|
||||||
if (txt.length >= 2) {
|
if (txt.length >= 1) {
|
||||||
provider.OnSearchSpeakers(txt);
|
_updateSearchTerm(txt);
|
||||||
}
|
}
|
||||||
if (txt.length < 2) {
|
if (txt.length == 0) {
|
||||||
await provider
|
_updateSearchTerm("");
|
||||||
.onSearchSpeakersReset(widget.event.eventId!);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
@ -1374,155 +1488,166 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ListView.separated(
|
child: PagedListView<int, SpeakersList>.separated(
|
||||||
padding: const EdgeInsets.all(8),
|
pagingController: pagingController,
|
||||||
itemCount: provider.isSearchSpeakers
|
builderDelegate: PagedChildBuilderDelegate<SpeakersList>(
|
||||||
? provider.srcheventdetailList.length
|
//padding: const EdgeInsets.all(8),
|
||||||
: provider.eventdetailList.length,
|
// itemCount: provider.isSearchSpeakers
|
||||||
itemBuilder: (BuildContext context, int index) {
|
// ? provider.srcheventdetailList.length
|
||||||
Eventsdetail detail = provider.isSearchSpeakers
|
// : provider.eventdetailList.length,
|
||||||
? provider.srcheventdetailList[index]
|
itemBuilder: (BuildContext context, detail, int index) {
|
||||||
: provider.eventdetailList[index];
|
// Eventsdetail detail = provider.isSearchSpeakers
|
||||||
return GestureDetector(
|
// ? provider.srcheventdetailList[index]
|
||||||
onTap: () {
|
// : provider.eventdetailList[index];
|
||||||
Navigator.of(context).push(
|
|
||||||
MaterialPageRoute(
|
return GestureDetector(
|
||||||
builder: (context) => HCPProfileScreen(
|
onTap: () {
|
||||||
eventsdetail: detail,
|
Navigator.of(context).push(
|
||||||
eventid: widget.event.eventId!,
|
MaterialPageRoute(
|
||||||
title: widget.event.name1!,
|
builder: (context) => HCPProfileScreen(
|
||||||
|
eventsdetail: detail,
|
||||||
|
eventid: widget.event.eventId!,
|
||||||
|
title: widget.event.name1!,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
},
|
||||||
},
|
child: Container(
|
||||||
child: Container(
|
// height: double.infinity,
|
||||||
// height: double.infinity,
|
child: Column(
|
||||||
child: Column(
|
children: [
|
||||||
children: [
|
Row(
|
||||||
Row(
|
children: [
|
||||||
children: [
|
Center(
|
||||||
Center(
|
child: CircleAvatar(
|
||||||
child: CircleAvatar(
|
radius: 24,
|
||||||
radius: 24,
|
backgroundColor: Colors.grey,
|
||||||
backgroundColor: Colors.grey,
|
// child: Icon(
|
||||||
// child: Icon(
|
// Icons.person,
|
||||||
// Icons.person,
|
// size: 18,
|
||||||
// size: 18,
|
// color: Colors.white,
|
||||||
// color: Colors.white,
|
// ),
|
||||||
// ),
|
child: Text(
|
||||||
child: Text(
|
detail.hcpFullName![0],
|
||||||
detail.kolFullName![0],
|
style: TextStyle(
|
||||||
style: TextStyle(
|
fontWeight: FontWeight.bold,
|
||||||
fontWeight: FontWeight.bold,
|
color: Colors.white),
|
||||||
color: Colors.white),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
// Container(
|
||||||
// Container(
|
// width: 45,
|
||||||
// width: 45,
|
// height: 45,
|
||||||
// height: 45,
|
// decoration: const BoxDecoration(
|
||||||
// decoration: const BoxDecoration(
|
// color: Colors.black,
|
||||||
// color: Colors.black,
|
// shape: BoxShape.circle,
|
||||||
// shape: BoxShape.circle,
|
// image: DecorationImage(
|
||||||
// image: DecorationImage(
|
// fit: BoxFit.cover,
|
||||||
// fit: BoxFit.cover,
|
// image: NetworkImage(
|
||||||
// image: NetworkImage(
|
// 'https://cardio-staging.konectar.io/images/kol_images/resized/1093755944.jpeg')),
|
||||||
// 'https://cardio-staging.konectar.io/images/kol_images/resized/1093755944.jpeg')),
|
// // 'https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80')),
|
||||||
// // 'https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80')),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
SizedBox(
|
||||||
SizedBox(
|
width: 20,
|
||||||
width: 20,
|
),
|
||||||
),
|
Padding(
|
||||||
Column(
|
padding: const EdgeInsets.all(8.0),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Text(
|
children: [
|
||||||
detail.kolFullName!,
|
Text(
|
||||||
style: TextStyle(
|
"$index : ${detail.hcpFullName!}",
|
||||||
fontWeight: FontWeight.bold,
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
fontSize: 14,
|
||||||
maxLines: 2,
|
),
|
||||||
softWrap: true,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
softWrap: true,
|
||||||
),
|
overflow: TextOverflow.ellipsis,
|
||||||
SizedBox(
|
),
|
||||||
width: isTablet
|
SizedBox(
|
||||||
? MediaQuery.of(context).size.width * 0.25
|
width: isTablet
|
||||||
: MediaQuery.of(context).size.width * 0.5,
|
? MediaQuery.of(context).size.width *
|
||||||
child: Text(
|
0.25
|
||||||
detail.eventTopics ??
|
: MediaQuery.of(context).size.width *
|
||||||
'Programmed Cell Death 1 Receptor | Human Epidermal Growth Factor Receptor 2 +6more',
|
0.5,
|
||||||
maxLines: 3,
|
child: Text(
|
||||||
style: TextStyle(
|
detail.topics!.join(" | "),
|
||||||
// decoration: TextDecoration.underline,
|
maxLines: 3,
|
||||||
// decorationColor: Colors.blue,
|
style: TextStyle(
|
||||||
|
// decoration: TextDecoration.underline,
|
||||||
|
// decorationColor: Colors.blue,
|
||||||
|
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
|
|
||||||
//fontStyle: FontStyle.italic,
|
//fontStyle: FontStyle.italic,
|
||||||
fontSize: 14),
|
fontSize: 14),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
// const Spacer(),
|
||||||
// const Spacer(),
|
// SizedBox(
|
||||||
// SizedBox(
|
// height: 30,
|
||||||
// height: 30,
|
// child: OutlinedButton(
|
||||||
// child: OutlinedButton(
|
// onPressed: () {},
|
||||||
// onPressed: () {},
|
// child: Icon(
|
||||||
// child: Icon(
|
// Icons.add,
|
||||||
// Icons.add,
|
// size: 24,
|
||||||
// size: 24,
|
// color: Colors.white,
|
||||||
// color: Colors.white,
|
// ),
|
||||||
// ),
|
// style: OutlinedButton.styleFrom(
|
||||||
// style: OutlinedButton.styleFrom(
|
// shape: CircleBorder(),
|
||||||
// shape: CircleBorder(),
|
// backgroundColor: Constants.bgcolor,
|
||||||
// backgroundColor: Constants.bgcolor,
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
],
|
||||||
],
|
),
|
||||||
),
|
// SEE ALL BUTTON CODE..
|
||||||
// SEE ALL BUTTON CODE..
|
// index == provider.eventdetailList.length - 1
|
||||||
// index == provider.eventdetailList.length - 1
|
// ? Padding(
|
||||||
// ? Padding(
|
// padding: const EdgeInsets.all(8.0),
|
||||||
// padding: const EdgeInsets.all(8.0),
|
// child: Container(
|
||||||
// child: Container(
|
// height: 30,
|
||||||
// height: 30,
|
// child: OutlinedButton(
|
||||||
// child: OutlinedButton(
|
// onPressed: () {
|
||||||
// onPressed: () {
|
// setState(() {
|
||||||
// setState(() {
|
// itemcount = 15;
|
||||||
// itemcount = 15;
|
// });
|
||||||
// });
|
// // Navigator.of(context).push(
|
||||||
// // Navigator.of(context).push(
|
// // MaterialPageRoute(
|
||||||
// // MaterialPageRoute(
|
// // builder: (context) => HcpListScreen(),
|
||||||
// // builder: (context) => HcpListScreen(),
|
// // ),
|
||||||
// // ),
|
// // );
|
||||||
// // );
|
// },
|
||||||
// },
|
// child: Text(
|
||||||
// child: Text(
|
// 'See All',
|
||||||
// 'See All',
|
// style: TextStyle(
|
||||||
// style: TextStyle(
|
// // fontFamily: "SourceSerif",
|
||||||
// // fontFamily: "SourceSerif",
|
// fontSize: 14,
|
||||||
// fontSize: 14,
|
// color: Colors.black,
|
||||||
// color: Colors.black,
|
// fontWeight: FontWeight.normal),
|
||||||
// fontWeight: FontWeight.normal),
|
// ),
|
||||||
// ),
|
// style: OutlinedButton.styleFrom(
|
||||||
// style: OutlinedButton.styleFrom(
|
// shape: StadiumBorder(),
|
||||||
// shape: StadiumBorder(),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// )
|
||||||
// )
|
// : SizedBox.shrink()
|
||||||
// : SizedBox.shrink()
|
],
|
||||||
],
|
)),
|
||||||
)),
|
);
|
||||||
);
|
},
|
||||||
},
|
),
|
||||||
separatorBuilder: (BuildContext context, int index) {
|
separatorBuilder: (BuildContext context, int index) {
|
||||||
return Divider();
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 14.0),
|
||||||
|
child: Divider(),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1562,7 +1687,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
item.value.toString(),
|
item.value.toString() == 0 ? "..." : item.value.toString(),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
@ -1642,7 +1767,7 @@ const _tabs = [
|
||||||
Tab(text: "Details"),
|
Tab(text: "Details"),
|
||||||
Tab(text: "Speakers"),
|
Tab(text: "Speakers"),
|
||||||
Tab(text: "Insights"),
|
Tab(text: "Insights"),
|
||||||
Tab(text: "Social Media"),
|
//Tab(text: "Social Media"),
|
||||||
];
|
];
|
||||||
|
|
||||||
class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
|
class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
|
||||||
|
@ -1666,3 +1791,27 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ContestTabHeader extends SliverPersistentHeaderDelegate {
|
||||||
|
ContestTabHeader(
|
||||||
|
this.searchUI,
|
||||||
|
);
|
||||||
|
final TabBar searchUI;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(
|
||||||
|
BuildContext context, double shrinkOffset, bool overlapsContent) {
|
||||||
|
return Container(color: Colors.white, child: searchUI);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
double get maxExtent => 52.0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
double get minExtent => 52.0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,26 +1,12 @@
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:konectar_events/model/eventsmodel.dart';
|
|
||||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
import 'package:konectar_events/view/eventdetailstab.dart';
|
|
||||||
import 'package:konectar_events/view/eventsdetails.dart';
|
|
||||||
import 'package:konectar_events/view/eventslist.dart';
|
import 'package:konectar_events/view/eventslist.dart';
|
||||||
import 'package:konectar_events/view/insights.dart';
|
|
||||||
import 'package:konectar_events/view/socialmedia.dart';
|
|
||||||
import 'package:konectar_events/widgets/autocompletetags_widget.dart';
|
|
||||||
import 'package:konectar_events/widgets/customactionsheet.dart';
|
|
||||||
import 'package:konectar_events/widgets/gridview.dart';
|
|
||||||
import 'package:konectar_events/widgets/word_cloud.dart';
|
|
||||||
import 'package:word_cloud/word_cloud_data.dart';
|
import 'package:word_cloud/word_cloud_data.dart';
|
||||||
import 'package:word_cloud/word_cloud_shape.dart';
|
|
||||||
import 'package:word_cloud/word_cloud_tap.dart';
|
import 'package:word_cloud/word_cloud_tap.dart';
|
||||||
import 'package:word_cloud/word_cloud_tap_view.dart';
|
|
||||||
import 'package:word_cloud/word_cloud_view.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:add_2_calendar/add_2_calendar.dart';
|
import 'package:add_2_calendar/add_2_calendar.dart';
|
||||||
|
|
||||||
class EventsTab extends StatefulWidget {
|
class EventsTab extends StatefulWidget {
|
||||||
|
|
|
@ -2,7 +2,6 @@ import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:konectar_events/utils/util.dart';
|
import 'package:konectar_events/utils/util.dart';
|
||||||
import 'package:konectar_events/widgets/customappbar.dart';
|
import 'package:konectar_events/widgets/customappbar.dart';
|
||||||
import 'package:konectar_events/widgets/customeventsappbar.dart';
|
|
||||||
|
|
||||||
class HcpListScreen extends StatefulWidget {
|
class HcpListScreen extends StatefulWidget {
|
||||||
const HcpListScreen({super.key});
|
const HcpListScreen({super.key});
|
||||||
|
|
|
@ -0,0 +1,226 @@
|
||||||
|
import 'dart:convert';
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:file_picker/file_picker.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/custombutton.dart';
|
||||||
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
|
import 'package:konectar_events/widgets/customappbar.dart';
|
||||||
|
import 'package:konectar_events/widgets/customtextfield.dart';
|
||||||
|
import 'package:path_provider/path_provider.dart';
|
||||||
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
|
import 'package:path/path.dart' as p;
|
||||||
|
|
||||||
|
class HelpDeskScreen extends StatefulWidget {
|
||||||
|
const HelpDeskScreen({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<HelpDeskScreen> createState() => _HelpDeskScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _HelpDeskScreenState extends State<HelpDeskScreen> {
|
||||||
|
TextEditingController subjectTextController = TextEditingController(text: "");
|
||||||
|
TextEditingController TextController = TextEditingController(text: "");
|
||||||
|
String? _selectedValue;
|
||||||
|
|
||||||
|
final List<String> type = [
|
||||||
|
"Question",
|
||||||
|
"Software Issue",
|
||||||
|
"Content Issue",
|
||||||
|
"Training Request",
|
||||||
|
"Callback Request",
|
||||||
|
"Feature Request",
|
||||||
|
];
|
||||||
|
|
||||||
|
Widget dropDown({
|
||||||
|
Widget? underline,
|
||||||
|
Widget? icon,
|
||||||
|
TextStyle? style,
|
||||||
|
TextStyle? hintStyle,
|
||||||
|
Color? dropdownColor,
|
||||||
|
}) =>
|
||||||
|
DropdownButton<String>(
|
||||||
|
value: _selectedValue,
|
||||||
|
underline: underline,
|
||||||
|
icon: Align(alignment: Alignment.centerRight, child: icon),
|
||||||
|
dropdownColor: dropdownColor,
|
||||||
|
isExpanded: true,
|
||||||
|
style: TextStyle(
|
||||||
|
//fontFamily: "SourceSerif",
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 14.0,
|
||||||
|
),
|
||||||
|
// iconEnabledColor: iconEnabledColor,
|
||||||
|
onChanged: (String? newValue) {
|
||||||
|
setState(() {
|
||||||
|
_selectedValue = newValue;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
hint: Text("Select Type", style: hintStyle),
|
||||||
|
items: type
|
||||||
|
.map((session) => DropdownMenuItem<String>(
|
||||||
|
value: session, child: Text(session)))
|
||||||
|
.toList());
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: Text(
|
||||||
|
"Help Desk",
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
backgroundColor: EventsConstants.blueColor,
|
||||||
|
centerTitle: true,
|
||||||
|
),
|
||||||
|
body: Container(
|
||||||
|
height: MediaQuery.of(context).size.height / 2,
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
CustomTextField(
|
||||||
|
labelText: "Subject*", controller: subjectTextController),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(color: Colors.grey),
|
||||||
|
borderRadius: BorderRadius.circular(8.0)),
|
||||||
|
child: dropDown(underline: Container())),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
TextFormField(
|
||||||
|
validator: (value) {
|
||||||
|
// add email validation
|
||||||
|
if (value == null || value.isEmpty) {
|
||||||
|
return 'Please enter some text';
|
||||||
|
}
|
||||||
|
|
||||||
|
// bool emailValid = RegExp(
|
||||||
|
// r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+")
|
||||||
|
// .hasMatch(value);
|
||||||
|
// if (!emailValid) {
|
||||||
|
// return 'Please enter a valid email';
|
||||||
|
// }
|
||||||
|
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
maxLines: 3,
|
||||||
|
decoration: const InputDecoration(
|
||||||
|
labelText: 'Description',
|
||||||
|
hintText: 'Description',
|
||||||
|
border: OutlineInputBorder(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text("Attach a file :"),
|
||||||
|
SizedBox(
|
||||||
|
width: 10,
|
||||||
|
),
|
||||||
|
CustomButton(
|
||||||
|
backgroundColor: const Color.fromARGB(255, 233, 229, 229),
|
||||||
|
onPressed: () async {
|
||||||
|
// sectionItem.selectedValue = [];
|
||||||
|
// sectionItem.extension = [];
|
||||||
|
// sectionItem.fileName = [];
|
||||||
|
await getEncodedFile();
|
||||||
|
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
width: 120,
|
||||||
|
height: 40,
|
||||||
|
fontsize: 12,
|
||||||
|
textColor: Colors.black,
|
||||||
|
title: "Choose file"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: CustomButton(
|
||||||
|
backgroundColor: EventsConstants.blueColor,
|
||||||
|
onPressed: () => (),
|
||||||
|
title: "Submit",
|
||||||
|
textColor: Colors.white,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> getEncodedFile() async {
|
||||||
|
String base64Image = '';
|
||||||
|
var status = Platform.isAndroid
|
||||||
|
? await Permission.manageExternalStorage.status
|
||||||
|
: await Permission.storage.status;
|
||||||
|
if (status.isGranted) {
|
||||||
|
FilePickerResult? result =
|
||||||
|
await FilePicker.platform.pickFiles(allowMultiple: true);
|
||||||
|
|
||||||
|
if (result != null) {
|
||||||
|
print(result.files.first.path);
|
||||||
|
print(result.files.last.path);
|
||||||
|
for (var files in result.files) {
|
||||||
|
File file = File(files.path!);
|
||||||
|
print("check file path : ${file.path}");
|
||||||
|
var fileName = file.path.split('/').last;
|
||||||
|
// Get the application folder directory
|
||||||
|
Directory? directory = Platform.isAndroid
|
||||||
|
? await getExternalStorageDirectory() //FOR ANDROID
|
||||||
|
: await getApplicationDocumentsDirectory();
|
||||||
|
String newPath = ""; //FOR ios
|
||||||
|
String convertedDirectoryPath = (directory?.path).toString();
|
||||||
|
|
||||||
|
print("see the converted directory path $convertedDirectoryPath");
|
||||||
|
|
||||||
|
newPath = "$convertedDirectoryPath/konectar/files";
|
||||||
|
print("new path :$newPath");
|
||||||
|
directory = Directory(newPath);
|
||||||
|
if (!await directory.exists()) {
|
||||||
|
await directory.create(recursive: true);
|
||||||
|
}
|
||||||
|
File newFile = await file.copy('${directory.path}/$fileName');
|
||||||
|
print("new path is ${newFile.path}");
|
||||||
|
final extension = p.extension(newFile.path);
|
||||||
|
List<int> imageBytes = await newFile.readAsBytes();
|
||||||
|
Uint8List imageUint8List = Uint8List.fromList(imageBytes);
|
||||||
|
base64Image = base64Encode(imageUint8List);
|
||||||
|
// sectionItem.selectedValue!.add(base64Image);
|
||||||
|
// sectionItem.extension!.add(extension);
|
||||||
|
// sectionItem.fileName!.add(fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print("not permitted");
|
||||||
|
await requestPermission(Platform.isAndroid
|
||||||
|
? Permission.manageExternalStorage
|
||||||
|
: Permission.storage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> requestPermission(Permission permission) async {
|
||||||
|
final status = await permission.request();
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
print(status);
|
||||||
|
// _permissionStatus = status;
|
||||||
|
// print(_permissionStatus);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,11 +1,21 @@
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/painting.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
|
import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/custom_widget/show_alert.dart';
|
||||||
import 'package:konectar_events/model/keywords_model.dart';
|
import 'package:konectar_events/model/keywords_model.dart';
|
||||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||||
|
import 'package:konectar_events/utils/apicall.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
|
import 'package:konectar_events/utils/dateformater.dart';
|
||||||
import 'package:konectar_events/utils/util.dart';
|
import 'package:konectar_events/utils/util.dart';
|
||||||
import 'package:konectar_events/view/eventslist.dart';
|
import 'package:konectar_events/view/eventslist.dart';
|
||||||
import 'package:konectar_events/view/eventstab.dart';
|
import 'package:konectar_events/view/eventstab.dart';
|
||||||
|
@ -43,16 +53,30 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
List<int> selectedIndex = [];
|
List<int> selectedIndex = [];
|
||||||
bool selectedFav = false;
|
bool selectedFav = false;
|
||||||
bool isExtended = false;
|
bool isExtended = false;
|
||||||
|
String search = "";
|
||||||
final ScrollController _scrollController = ScrollController();
|
final ScrollController _scrollController = ScrollController();
|
||||||
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
|
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
|
||||||
|
|
||||||
AnimationController? animationController;
|
AnimationController? animationController;
|
||||||
bool _isSearch = false;
|
bool _isSearch = false;
|
||||||
List<String> therapeuticList = [];
|
List<String> therapeuticList = [];
|
||||||
|
|
||||||
|
static const _pageSize = 20;
|
||||||
|
String filter_startdate = "";
|
||||||
|
String filter_enddate = "";
|
||||||
|
|
||||||
|
final PagingController<int, EventsList> pagingController =
|
||||||
|
PagingController(firstPageKey: 0);
|
||||||
|
|
||||||
|
List<ConnectivityResult> connectionStatus = [ConnectivityResult.none];
|
||||||
|
final Connectivity _connectivity = Connectivity();
|
||||||
|
get developer => null;
|
||||||
|
late StreamSubscription<List<ConnectivityResult>> _connectivitySubscription;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
animationController?.dispose();
|
animationController?.dispose();
|
||||||
|
pagingController.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,18 +85,95 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
animationController = AnimationController(
|
animationController = AnimationController(
|
||||||
duration: const Duration(milliseconds: 1000), vsync: this);
|
duration: const Duration(milliseconds: 1000), vsync: this);
|
||||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
||||||
|
initConnectivity();
|
||||||
|
|
||||||
|
_connectivitySubscription =
|
||||||
|
_connectivity.onConnectivityChanged.listen(_updateConnectionStatus);
|
||||||
init();
|
init();
|
||||||
});
|
});
|
||||||
|
pagingController.addPageRequestListener((pageKey) {
|
||||||
|
_fetchPage(pageKey);
|
||||||
|
});
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> initConnectivity() async {
|
||||||
|
late List<ConnectivityResult> result;
|
||||||
|
// Platform messages may fail, so we use a try/catch PlatformException.
|
||||||
|
try {
|
||||||
|
result = await _connectivity.checkConnectivity();
|
||||||
|
} on PlatformException catch (e) {
|
||||||
|
developer.log('Couldn\'t check connectivity status', error: e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the widget was removed from the tree while the asynchronous platform
|
||||||
|
// message was in flight, we want to discard the reply rather than calling
|
||||||
|
// setState to update our non-existent appearance.
|
||||||
|
if (!mounted) {
|
||||||
|
return Future.value(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
return _updateConnectionStatus(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _updateConnectionStatus(List<ConnectivityResult> result) async {
|
||||||
|
setState(() {
|
||||||
|
connectionStatus = result;
|
||||||
|
});
|
||||||
|
|
||||||
|
// ignore: avoid_print
|
||||||
|
print('Connectivity changed: $connectionStatus');
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _fetchPage(int pageKey) async {
|
||||||
|
print("DATE SELECTED :$filter_enddate,$filter_startdate");
|
||||||
|
await initConnectivity();
|
||||||
|
if (connectionStatus.toString().contains("ConnectivityResult.none")) {
|
||||||
|
try {
|
||||||
|
final newItems =
|
||||||
|
await Provider.of<EventsProvider>(context, listen: false)
|
||||||
|
.getOfflineMyEvents();
|
||||||
|
final isLastPage = newItems.length < _pageSize;
|
||||||
|
if (isLastPage) {
|
||||||
|
pagingController.appendLastPage(newItems);
|
||||||
|
} else {
|
||||||
|
final nextPageKey = pageKey + newItems.length;
|
||||||
|
pagingController.appendPage(newItems, nextPageKey);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
pagingController.error = error;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
final newItems =
|
||||||
|
await Provider.of<EventsProvider>(context, listen: false).getEvents(
|
||||||
|
pageKey,
|
||||||
|
searchtxt: search,
|
||||||
|
startdate: filter_startdate,
|
||||||
|
enddate: filter_enddate);
|
||||||
|
// final newItems =
|
||||||
|
// await Provider.of<EventsProvider>(context, listen: false)
|
||||||
|
// .getOfflineMyEvents();
|
||||||
|
final isLastPage = newItems.length < _pageSize;
|
||||||
|
if (isLastPage) {
|
||||||
|
pagingController.appendLastPage(newItems);
|
||||||
|
} else {
|
||||||
|
final nextPageKey = pageKey + newItems.length;
|
||||||
|
pagingController.appendPage(newItems, nextPageKey);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
pagingController.error = error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
init() async {
|
init() async {
|
||||||
await Provider.of<EventsProvider>(context, listen: false).initFiltersData();
|
await Provider.of<EventsProvider>(context, listen: false).initFiltersData();
|
||||||
await Provider.of<EventsProvider>(context, listen: false).getEvents();
|
// await Provider.of<EventsProvider>(context, listen: false).getMyEvents(0);
|
||||||
await Provider.of<EventsProvider>(context, listen: false)
|
await Provider.of<EventsProvider>(context, listen: false)
|
||||||
.getAddedSessionNotes();
|
.getAddedSessionNotes();
|
||||||
|
//await ApiCall().dummyapi();
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,12 +329,31 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
borderRadius: BorderRadius.circular(5.0)),
|
borderRadius: BorderRadius.circular(5.0)),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: searchtextEditingController,
|
controller: searchtextEditingController,
|
||||||
|
onEditingComplete: () {
|
||||||
|
String txt = searchtextEditingController.text;
|
||||||
|
if (txt.length >= 2) {
|
||||||
|
search = txt;
|
||||||
|
provider.isSearch = true;
|
||||||
|
pagingController.refresh();
|
||||||
|
// await provider.OnSearch(txt);
|
||||||
|
}
|
||||||
|
if (txt.length == 0) {
|
||||||
|
provider.isSearch = false;
|
||||||
|
|
||||||
|
pagingController.refresh();
|
||||||
|
}
|
||||||
|
},
|
||||||
onChanged: (String txt) async {
|
onChanged: (String txt) async {
|
||||||
if (txt.length >= 2) {
|
if (txt.length >= 2) {
|
||||||
provider.OnSearch(txt);
|
search = txt;
|
||||||
|
provider.isSearch = true;
|
||||||
|
pagingController.refresh();
|
||||||
|
// await provider.OnSearch(txt);
|
||||||
}
|
}
|
||||||
if (txt.length < 2) {
|
if (txt.length == 0) {
|
||||||
await provider.onSearchReset();
|
provider.isSearch = false;
|
||||||
|
search = txt;
|
||||||
|
pagingController.refresh();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
@ -268,6 +388,8 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
_isSearch = !_isSearch;
|
_isSearch = !_isSearch;
|
||||||
if (!_isSearch) {
|
if (!_isSearch) {
|
||||||
searchtextEditingController.clear();
|
searchtextEditingController.clear();
|
||||||
|
search = "";
|
||||||
|
pagingController.refresh();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -277,58 +399,58 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: Stack(
|
body: Stack(children: <Widget>[
|
||||||
children: <Widget>[
|
InkWell(
|
||||||
InkWell(
|
splashColor: Colors.transparent,
|
||||||
splashColor: Colors.transparent,
|
focusColor: Colors.transparent,
|
||||||
focusColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
hoverColor: Colors.transparent,
|
onTap: () {
|
||||||
onTap: () {
|
FocusScope.of(context).requestFocus(FocusNode());
|
||||||
FocusScope.of(context).requestFocus(FocusNode());
|
},
|
||||||
},
|
child: NestedScrollView(
|
||||||
child: NestedScrollView(
|
controller: _scrollController,
|
||||||
controller: _scrollController,
|
headerSliverBuilder:
|
||||||
headerSliverBuilder:
|
(BuildContext context, bool innerBoxIsScrolled) {
|
||||||
(BuildContext context, bool innerBoxIsScrolled) {
|
return <Widget>[
|
||||||
return <Widget>[
|
// SliverList(
|
||||||
// SliverList(
|
// delegate: SliverChildBuilderDelegate(
|
||||||
// delegate: SliverChildBuilderDelegate(
|
// (BuildContext context, int index) {
|
||||||
// (BuildContext context, int index) {
|
// return Container(
|
||||||
// return Container(
|
// color: Constants.blueColor,
|
||||||
// color: Constants.blueColor,
|
// child: Column(
|
||||||
// child: Column(
|
// children: [
|
||||||
// children: [
|
// // CustomAppBar(
|
||||||
// // CustomAppBar(
|
// // title: "Events",
|
||||||
// // title: "Events",
|
// // backgroundcolor:
|
||||||
// // backgroundcolor:
|
// // Color.fromARGB(255, 0, 71, 132),
|
||||||
// // Color.fromARGB(255, 0, 71, 132),
|
// // ),
|
||||||
// // ),
|
// // getSearchBarUI(provider),
|
||||||
// // getSearchBarUI(provider),
|
// ],
|
||||||
// ],
|
// ),
|
||||||
// ),
|
// );
|
||||||
// );
|
// }, childCount: 1),
|
||||||
// }, childCount: 1),
|
// ),
|
||||||
// ),
|
SliverPersistentHeader(
|
||||||
SliverPersistentHeader(
|
pinned: true,
|
||||||
pinned: true,
|
floating: true,
|
||||||
floating: true,
|
delegate: ContestTabHeader(
|
||||||
delegate: ContestTabHeader(
|
getFilterBarUI(provider),
|
||||||
getFilterBarUI(provider),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
];
|
),
|
||||||
},
|
];
|
||||||
body: Container(
|
},
|
||||||
color: EventsConstants.bgcolor,
|
body: Container(
|
||||||
child: buildListView(context, provider)),
|
color: EventsConstants.bgcolor,
|
||||||
),
|
child: buildPaginationListView(context, provider)),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
]),
|
||||||
),
|
),
|
||||||
// ),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget getFilterBarUI(EventsProvider provider) {
|
Widget getFilterBarUI(EventsProvider provider) {
|
||||||
|
@ -422,12 +544,24 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
child: CupertinoSwitch(
|
child: CupertinoSwitch(
|
||||||
activeColor: Color.fromARGB(255, 0, 71, 132),
|
activeColor: Color.fromARGB(255, 0, 71, 132),
|
||||||
value: provider.isFavSeleted,
|
value: provider.isFavSeleted,
|
||||||
onChanged: (value) async {
|
onChanged: (value) {
|
||||||
provider.isFavSeleted = value;
|
provider.isFavSeleted = value;
|
||||||
if (provider.isFavSeleted) {
|
if (provider.isFavSeleted) {
|
||||||
await provider.onSelectMy();
|
pagingController.refresh();
|
||||||
|
|
||||||
|
//_pagingController.
|
||||||
|
// _pagingController
|
||||||
|
// .addPageRequestListener((pageKey) {
|
||||||
|
// await _fetchPage(0);
|
||||||
|
// });
|
||||||
} else {
|
} else {
|
||||||
await provider.onSelectAll();
|
provider.isFavSeleted = false;
|
||||||
|
provider.isAllSelected = !provider.isAllSelected;
|
||||||
|
pagingController.refresh();
|
||||||
|
// _pagingController
|
||||||
|
// .addPageRequestListener((pageKey) {
|
||||||
|
// await _fetchPage(0);
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
|
@ -551,10 +685,15 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
child: TextField(
|
child: TextField(
|
||||||
onChanged: (String txt) async {
|
onChanged: (String txt) async {
|
||||||
if (txt.length >= 3) {
|
if (txt.length >= 3) {
|
||||||
provider.OnSearch(txt);
|
search = txt;
|
||||||
|
provider.isSearch = true;
|
||||||
|
pagingController.refresh();
|
||||||
|
// await provider.OnSearch(txt);
|
||||||
}
|
}
|
||||||
if (txt.length <= 3) {
|
if (txt.length <= 3) {
|
||||||
await provider.onSearchReset();
|
provider.isSearch = false;
|
||||||
|
pagingController.refresh();
|
||||||
|
//await provider.onSearchReset();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
@ -591,10 +730,17 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
),
|
),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
FocusScope.of(context).requestFocus(FocusNode());
|
FocusScope.of(context).requestFocus(FocusNode());
|
||||||
if (searchtextEditingController.text.length >= 3)
|
if (searchtextEditingController.text.length >= 3) {
|
||||||
provider.OnSearch(searchtextEditingController.text);
|
search = searchtextEditingController.text;
|
||||||
else
|
provider.isSearch = true;
|
||||||
await provider.onSearchReset();
|
pagingController.refresh();
|
||||||
|
// await provider.OnSearch(searchtextEditingController.text);
|
||||||
|
} else {
|
||||||
|
//search = searchtextEditingController.text;
|
||||||
|
provider.isSearch = false;
|
||||||
|
pagingController.refresh();
|
||||||
|
}
|
||||||
|
// await provider.onSearchReset();
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(16.0),
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
@ -769,7 +915,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
// DrawerHeader(
|
// DrawerHeader(
|
||||||
// child: Center(
|
// child: Center(
|
||||||
|
@ -779,7 +925,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
Container(
|
Container(
|
||||||
//color: Colors.transparent,
|
color: EventsConstants.bgcolor,
|
||||||
padding: EdgeInsets.only(top: 20, left: 5.0),
|
padding: EdgeInsets.only(top: 20, left: 5.0),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -805,37 +951,29 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
style: TextStyle(fontSize: 20),
|
style: TextStyle(fontSize: 20),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Align(
|
// Align(
|
||||||
alignment: Alignment.topRight,
|
// alignment: Alignment.topRight,
|
||||||
child: Container(
|
// child: Container(
|
||||||
height: 30,
|
// height: 30,
|
||||||
child: OutlinedButton(
|
// child: OutlinedButton(
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
print("&&&");
|
|
||||||
print(provider.selectedTherapeutic);
|
|
||||||
if (provider.selectedTherapeutic.isNotEmpty) {
|
|
||||||
provider.OnFilters();
|
|
||||||
}
|
|
||||||
|
|
||||||
setState(() {
|
// },
|
||||||
Navigator.pop(context);
|
// child: Text(
|
||||||
});
|
// 'Apply',
|
||||||
},
|
// style: TextStyle(
|
||||||
child: Text(
|
// // fontFamily: "SourceSerif",
|
||||||
'Apply',
|
// fontSize: 14,
|
||||||
style: TextStyle(
|
// color: Colors.white,
|
||||||
// fontFamily: "SourceSerif",
|
// fontWeight: FontWeight.normal),
|
||||||
fontSize: 14,
|
// ),
|
||||||
color: Colors.white,
|
// style: OutlinedButton.styleFrom(
|
||||||
fontWeight: FontWeight.normal),
|
// shape: StadiumBorder(),
|
||||||
),
|
// backgroundColor: Colors.green,
|
||||||
style: OutlinedButton.styleFrom(
|
// ),
|
||||||
shape: StadiumBorder(),
|
// ),
|
||||||
backgroundColor: Colors.green,
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 8.0,
|
width: 8.0,
|
||||||
),
|
),
|
||||||
|
@ -994,22 +1132,6 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
// Center(
|
|
||||||
// child: SizedBox(
|
|
||||||
// width: 200,
|
|
||||||
// height: 40,
|
|
||||||
// child: ListTile(
|
|
||||||
// title: Container(
|
|
||||||
// color: Colors.blue,
|
|
||||||
// child: Center(
|
|
||||||
// child: Text(
|
|
||||||
// 'Apply',
|
|
||||||
// style: TextStyle(color: Colors.white),
|
|
||||||
// ))),
|
|
||||||
// onTap: () {},
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
Divider(
|
Divider(
|
||||||
height: 1,
|
height: 1,
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
|
@ -1044,72 +1166,68 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
// Row(
|
],
|
||||||
// children: [
|
),
|
||||||
// SizedBox(
|
SizedBox(
|
||||||
// width: (MediaQuery.of(context).size.width * 0.99) / 2,
|
height: 20,
|
||||||
// child: ListTile(
|
),
|
||||||
// title: Text('City'),
|
Column(
|
||||||
// subtitle: customAutoCompletedropdown(
|
children: [
|
||||||
// ["Chicago", "Seattle", "San Deigo"]),
|
Align(
|
||||||
// onTap: () {},
|
alignment: Alignment.bottomCenter,
|
||||||
// ),
|
child: SizedBox(
|
||||||
// ),
|
width: 200,
|
||||||
// SizedBox(
|
height: 50,
|
||||||
// width: (MediaQuery.of(context).size.width * 0.99) / 2,
|
child: FloatingActionButton.extended(
|
||||||
// child: ListTile(
|
backgroundColor: Colors.green,
|
||||||
// title: Text('State'),
|
onPressed: () {
|
||||||
// subtitle: customAutoCompletedropdown(
|
print("&&&");
|
||||||
// ["California", "Illinois", "New York"]),
|
print(provider.selectedTherapeutic);
|
||||||
// onTap: () {},
|
if (provider.selectedTherapeutic.isNotEmpty) {
|
||||||
// ),
|
provider.OnFilters();
|
||||||
// ),
|
}
|
||||||
// ],
|
pagingController.refresh();
|
||||||
// ),
|
|
||||||
// Row(
|
setState(() {
|
||||||
// children: [
|
Navigator.pop(context);
|
||||||
// SizedBox(
|
});
|
||||||
// width: (MediaQuery.of(context).size.width * 0.99) / 2,
|
},
|
||||||
// child: ListTile(
|
elevation: 0,
|
||||||
// title: Text('Country'),
|
label: const Text("Apply Filters",
|
||||||
// subtitle: customAutoCompletedropdown([
|
style: TextStyle(
|
||||||
// "Netherlands",
|
color: Colors.white,
|
||||||
// "Switzerland",
|
)),
|
||||||
// "United States"
|
),
|
||||||
// ]),
|
),
|
||||||
// onTap: () {},
|
),
|
||||||
// ),
|
SizedBox(
|
||||||
// ),
|
height: 10,
|
||||||
// SizedBox(
|
),
|
||||||
// width: (MediaQuery.of(context).size.width * 0.99) / 2,
|
Align(
|
||||||
// child: ListTile(
|
alignment: Alignment.bottomCenter,
|
||||||
// title: Text('Number of Attendees'),
|
child: SizedBox(
|
||||||
// subtitle: buildTextFieldWidget(),
|
width: 200,
|
||||||
// onTap: () {},
|
height: 50,
|
||||||
// ),
|
child: FloatingActionButton.extended(
|
||||||
// ),
|
backgroundColor: Colors.blue,
|
||||||
// ],
|
onPressed: () {
|
||||||
// ),
|
startDatetextEditingController.clear();
|
||||||
// Row(
|
endDatetextEditingController.clear();
|
||||||
// children: [
|
filter_enddate = "";
|
||||||
// SizedBox(
|
filter_startdate = "";
|
||||||
// width: (MediaQuery.of(context).size.width * 0.99) / 2,
|
setState(() {});
|
||||||
// child: ListTile(
|
|
||||||
// title: Text('Client Attendees'),
|
pagingController.refresh();
|
||||||
// subtitle: buildTextFieldWidget(),
|
Navigator.pop(context);
|
||||||
// onTap: () {},
|
},
|
||||||
// ),
|
elevation: 0,
|
||||||
// ),
|
label: const Text("Clear Filters",
|
||||||
// SizedBox(
|
style: TextStyle(
|
||||||
// width: (MediaQuery.of(context).size.width * 0.99) / 2,
|
color: Colors.white,
|
||||||
// child: ListTile(
|
)),
|
||||||
// title: Text('New Attendees'),
|
),
|
||||||
// subtitle: buildTextFieldWidget(),
|
),
|
||||||
// onTap: () {},
|
),
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -1122,21 +1240,24 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
|
|
||||||
Widget buildDateWidget(TextEditingController controller, String hint) {
|
Widget buildDateWidget(TextEditingController controller, String hint) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: isTablet ? 200 : MediaQuery.of(context).size.width,
|
//width: isTablet ? 200 : MediaQuery.of(context).size.width,
|
||||||
height: isTablet ? 50 : 40,
|
height: isTablet ? 50 : 40,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
|
|
||||||
//editing controller of this TextField
|
//editing controller of this TextField
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
// border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
// border: OutlineInputBorder(
|
// border: OutlineInputBorder(
|
||||||
// borderRadius: BorderRadius.circular(10.0),
|
// borderRadius: BorderRadius.circular(10.0),
|
||||||
// ),
|
// ),
|
||||||
// labelStyle: const TextStyle(fontSize: 16),
|
// labelStyle: const TextStyle(fontSize: 16),
|
||||||
suffixIcon: const Icon(Icons.calendar_today), //icon of text field
|
suffixIcon: const Icon(
|
||||||
|
Icons.calendar_today,
|
||||||
|
size: 16,
|
||||||
|
), //icon of text field
|
||||||
// labelText: "Enter Date" //label text of field
|
// labelText: "Enter Date" //label text of field
|
||||||
hintText: hint,
|
// hintText: hint,
|
||||||
),
|
),
|
||||||
readOnly: true, //set it true, so that user will not able to edit text
|
readOnly: true, //set it true, so that user will not able to edit text
|
||||||
|
|
||||||
|
@ -1145,8 +1266,8 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
context: context,
|
context: context,
|
||||||
anchorPoint: Offset(20.0, 30.0),
|
anchorPoint: Offset(20.0, 30.0),
|
||||||
initialDate: DateTime.now(),
|
initialDate: DateTime.now(),
|
||||||
firstDate: DateTime(
|
firstDate: DateTime
|
||||||
2000), //DateTime.now() - not to allow to choose before today.
|
.now(), //DateTime.now() - not to allow to choose before today.
|
||||||
lastDate: DateTime(2101));
|
lastDate: DateTime(2101));
|
||||||
|
|
||||||
if (pickedDate != null) {
|
if (pickedDate != null) {
|
||||||
|
@ -1156,9 +1277,14 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
print(
|
print(
|
||||||
formattedDate); //formatted date output using intl package => 2021-03-16
|
formattedDate); //formatted date output using intl package => 2021-03-16
|
||||||
//you can implement different kind of Date Format here according to your requirement
|
//you can implement different kind of Date Format here according to your requirement
|
||||||
|
if (hint == "Start Date") {
|
||||||
|
filter_startdate = formattedDate;
|
||||||
|
} else {
|
||||||
|
filter_enddate = formattedDate;
|
||||||
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
// output date to TextField value.
|
// output date to TextField value.
|
||||||
|
|
||||||
controller.text = formattedDate;
|
controller.text = formattedDate;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -1316,6 +1442,35 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Set<int> selectedIndexes = {};
|
||||||
|
Widget buildPaginationListView(
|
||||||
|
BuildContext context, EventsProvider provider) {
|
||||||
|
return RefreshIndicator(
|
||||||
|
onRefresh: () async => pagingController.refresh(),
|
||||||
|
child: PagedListView<int, EventsList>(
|
||||||
|
pagingController: pagingController,
|
||||||
|
builderDelegate: PagedChildBuilderDelegate<EventsList>(
|
||||||
|
itemBuilder: (BuildContext context, item, int index) {
|
||||||
|
final int count = provider.eventList.length > 10
|
||||||
|
? 10
|
||||||
|
: provider.eventList.length;
|
||||||
|
final Animation<double> animation =
|
||||||
|
Tween<double>(begin: 0.0, end: 1.0).animate(CurvedAnimation(
|
||||||
|
parent: animationController!,
|
||||||
|
curve: Interval((1 / count) * index, 1.0,
|
||||||
|
curve: Curves.fastOutSlowIn)));
|
||||||
|
animationController?.forward();
|
||||||
|
return _buildlistCard(
|
||||||
|
animation: animation,
|
||||||
|
animationController: animationController!,
|
||||||
|
provider: provider,
|
||||||
|
eventsList: provider.isSearch ? item : item,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Widget _buildlistCard(
|
Widget _buildlistCard(
|
||||||
{required Animation<double>? animation,
|
{required Animation<double>? animation,
|
||||||
required AnimationController? animationController,
|
required AnimationController? animationController,
|
||||||
|
@ -1421,8 +1576,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
buildCardView(
|
buildCardView(BuildContext context, dynamic event, EventsProvider provider) {
|
||||||
BuildContext context, EventsList event, EventsProvider provider) {
|
|
||||||
double height = isTablet
|
double height = isTablet
|
||||||
? MediaQuery.of(context).size.height * 0.35
|
? MediaQuery.of(context).size.height * 0.35
|
||||||
: MediaQuery.of(context).size.height * 0.65;
|
: MediaQuery.of(context).size.height * 0.65;
|
||||||
|
@ -1458,20 +1612,34 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Align(
|
||||||
alignment: FractionalOffset.topLeft,
|
alignment: FractionalOffset.topLeft,
|
||||||
child: Text(
|
child: RichText(
|
||||||
event.name1 ?? "",
|
text: TextSpan(children: [
|
||||||
style: TextStyle(
|
// WidgetSpan(
|
||||||
// decoration: TextDecoration.underline,
|
// child: Icon(Icons.bookmark,
|
||||||
// decorationColor: Colors.blue,
|
// color: EventsConstants.blueColor,
|
||||||
color: Colors.black,
|
// size: isTablet ? 14 : 18)
|
||||||
fontWeight: FontWeight.bold,
|
// // provider.ifOfflineExists(event.eventId!)
|
||||||
fontSize: isTablet ? 22 : 16,
|
// // ? Icon(Icons.bookmark,
|
||||||
// fontFamily: "SourceSerif",
|
// // color: EventsConstants.blueColor,
|
||||||
|
// // size: isTablet ? 14 : 18)
|
||||||
|
// // : SizedBox.shrink(),
|
||||||
|
// ),
|
||||||
|
TextSpan(
|
||||||
|
text: event.name1 ?? "",
|
||||||
|
style: TextStyle(
|
||||||
|
// decoration: TextDecoration.underline,
|
||||||
|
// decorationColor: Colors.blue,
|
||||||
|
color: Colors.black,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: isTablet ? 22 : 16,
|
||||||
|
|
||||||
|
// fontFamily: "SourceSerif",
|
||||||
|
),
|
||||||
|
// maxLines: isTablet ? 4 : 4,
|
||||||
|
// softWrap: true,
|
||||||
|
// overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
maxLines: isTablet ? 4 : 4,
|
])),
|
||||||
softWrap: true,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
@ -1496,11 +1664,12 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
child: Icon(Icons.calendar_month, size: 16),
|
child: Icon(Icons.calendar_month, size: 16),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: ' ${event.start} to ${event.end}',
|
text:
|
||||||
|
' ${CustomDateFormatter().formatYearDate(CustomDateFormatter().convertStringToDate(event.start))} to ${CustomDateFormatter().formatYearDate(CustomDateFormatter().convertStringToDate(event.end))}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
//fontStyle: FontStyle.italic,
|
//fontStyle: FontStyle.italic,
|
||||||
fontSize: isTablet ? 20 : 14),
|
fontSize: isTablet ? 20 : 12),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -1521,7 +1690,8 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
//fontStyle: FontStyle.italic,
|
//fontStyle: FontStyle.italic,
|
||||||
fontSize: isTablet ? 20 : 14),
|
|
||||||
|
fontSize: isTablet ? 20 : 12),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -1531,101 +1701,115 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
|
|
||||||
Align(
|
Align(
|
||||||
alignment: FractionalOffset.bottomRight,
|
alignment: FractionalOffset.bottomRight,
|
||||||
child: Column(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
Column(
|
||||||
width: 40,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
height: 30,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
child: FloatingActionButton.extended(
|
children: [
|
||||||
elevation: 1,
|
provider.ifOfflineExists(event.eventId!)
|
||||||
shape: CircleBorder(),
|
? Padding(
|
||||||
backgroundColor: EventsConstants.bgcolor,
|
padding: EdgeInsets.only(right: 10),
|
||||||
onPressed: () async {
|
child: Icon(Icons.bookmark,
|
||||||
// String msg = await provider
|
color: EventsConstants.blueColor,
|
||||||
// .addEventsToFavs(event.eventId!);
|
size: isTablet ? 14 : 18),
|
||||||
|
)
|
||||||
|
: SizedBox.shrink(),
|
||||||
|
SizedBox(
|
||||||
|
width: 40,
|
||||||
|
height: 30,
|
||||||
|
child: FloatingActionButton.extended(
|
||||||
|
elevation: 1,
|
||||||
|
shape: CircleBorder(),
|
||||||
|
backgroundColor: EventsConstants.bgcolor,
|
||||||
|
onPressed: () async {
|
||||||
|
// event.isfav = !event.isfav;
|
||||||
|
|
||||||
setState(() {
|
if (event.isfav) {
|
||||||
event.isfav = !event.isfav;
|
//If event is added to fav then unfollow
|
||||||
|
String msg = await provider
|
||||||
if (event.isfav) {
|
.removeEventsToFavs(event.eventId!);
|
||||||
SnackBarWidget.displaySnackBar(
|
SnackBarWidget.displaySnackBar(
|
||||||
"Added to favorites!", context);
|
"Removed from My Events!", context);
|
||||||
} else {
|
} else {
|
||||||
SnackBarWidget.displaySnackBar(
|
String msg = await provider
|
||||||
"Removed from favorites!", context);
|
.addEventsToFavs(event.eventId!);
|
||||||
}
|
SnackBarWidget.displaySnackBar(
|
||||||
});
|
"Added to My Events", context);
|
||||||
if (event.isfav) {
|
}
|
||||||
await provider.favsEventsData(event);
|
pagingController.refresh();
|
||||||
} else {
|
setState(() {});
|
||||||
await provider.delateEventsData(event);
|
// if (event.isfav) {
|
||||||
}
|
// // await provider.favsEventsData(event);
|
||||||
},
|
// } else {
|
||||||
label: AnimatedSwitcher(
|
// // await provider.delateEventsData(event);
|
||||||
duration: Duration(seconds: 1),
|
// }
|
||||||
transitionBuilder: (Widget child,
|
},
|
||||||
Animation<double> animation) =>
|
label: AnimatedSwitcher(
|
||||||
FadeTransition(
|
duration: Duration(seconds: 1),
|
||||||
opacity: animation,
|
transitionBuilder: (Widget child,
|
||||||
child: SizeTransition(
|
Animation<double> animation) =>
|
||||||
child: child,
|
FadeTransition(
|
||||||
sizeFactor: animation,
|
opacity: animation,
|
||||||
axis: Axis.horizontal,
|
child: SizeTransition(
|
||||||
),
|
child: child,
|
||||||
),
|
sizeFactor: animation,
|
||||||
child: event.isfav
|
axis: Axis.horizontal,
|
||||||
? Column(
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.favorite,
|
|
||||||
color: Colors.red,
|
|
||||||
size: 14,
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
)
|
child: event.eventUserInterest!
|
||||||
: Icon(
|
? Column(
|
||||||
Icons.favorite,
|
children: [
|
||||||
color: Colors.grey,
|
Icon(
|
||||||
size: 14,
|
Icons.favorite,
|
||||||
))),
|
color: Colors.red,
|
||||||
),
|
size: 14,
|
||||||
SizedBox(
|
),
|
||||||
height: 2,
|
],
|
||||||
),
|
)
|
||||||
event.isfav
|
: Icon(
|
||||||
? RichText(
|
Icons.favorite,
|
||||||
text: TextSpan(
|
color: Colors.grey,
|
||||||
children: [
|
size: 14,
|
||||||
WidgetSpan(
|
))),
|
||||||
child: Icon(Icons.check,
|
),
|
||||||
color: Colors.grey[600],
|
SizedBox(
|
||||||
size: isTablet ? 14 : 12),
|
height: 2,
|
||||||
|
),
|
||||||
|
event.eventUserInterest
|
||||||
|
? RichText(
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
WidgetSpan(
|
||||||
|
child: Icon(Icons.check,
|
||||||
|
color: Colors.grey[600],
|
||||||
|
size: isTablet ? 14 : 10),
|
||||||
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: ' Following',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.grey[600],
|
||||||
|
fontSize: isTablet ? 14 : 10),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
TextSpan(
|
)
|
||||||
text: ' following',
|
: Center(
|
||||||
style: TextStyle(
|
child: RichText(
|
||||||
color: Colors.grey[600],
|
text: TextSpan(
|
||||||
fontSize: isTablet ? 14 : 12),
|
children: [
|
||||||
),
|
TextSpan(
|
||||||
],
|
text: 'Follow ',
|
||||||
),
|
style: TextStyle(
|
||||||
)
|
color: Colors.grey[600],
|
||||||
: Center(
|
fontSize: isTablet ? 14 : 10),
|
||||||
child: RichText(
|
),
|
||||||
text: TextSpan(
|
],
|
||||||
children: [
|
|
||||||
TextSpan(
|
|
||||||
text: 'follow ',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.grey[600],
|
|
||||||
fontSize: isTablet ? 14 : 12),
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,34 +1,23 @@
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:fl_chart/fl_chart.dart';
|
import 'package:fl_chart/fl_chart.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
|
||||||
import 'package:flutter_scatter/flutter_scatter.dart';
|
import 'package:flutter_scatter/flutter_scatter.dart';
|
||||||
import 'package:konectar_events/model/affiliationsmodel.dart';
|
import 'package:konectar_events/model/affiliationsmodel.dart';
|
||||||
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
|
||||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
|
||||||
import 'package:konectar_events/model/specialtymodel.dart';
|
import 'package:konectar_events/model/specialtymodel.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
import 'package:konectar_events/utils/util.dart';
|
|
||||||
import 'package:konectar_events/viewmodel/eventsprovider.dart';
|
|
||||||
import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
|
import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
|
||||||
import 'package:konectar_events/widgets/chartline.dart';
|
import 'package:konectar_events/widgets/chartline.dart';
|
||||||
import 'package:konectar_events/widgets/customappbar.dart';
|
|
||||||
import 'package:konectar_events/widgets/customeventsappbar.dart';
|
|
||||||
import 'package:konectar_events/widgets/flutter_hashtags.dart';
|
|
||||||
import 'package:konectar_events/widgets/piechart.dart';
|
import 'package:konectar_events/widgets/piechart.dart';
|
||||||
import 'package:konectar_events/widgets/word_cloud.dart';
|
import 'package:konectar_events/widgets/word_cloud.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:word_cloud/word_cloud_data.dart';
|
|
||||||
import 'package:word_cloud/word_cloud_view.dart';
|
|
||||||
|
|
||||||
class EventsInsights extends StatefulWidget {
|
class EventsInsights extends StatefulWidget {
|
||||||
//EventsList eventsdetail;
|
//EventsList eventsdetail;
|
||||||
String eventid;
|
String eventid;
|
||||||
List<FlutterHashtag> kFlutterHashtags = [];
|
List<FlutterHashtag> kFlutterHashtags = [];
|
||||||
List<Specialty> specialtyList = [];
|
List<Specialty> specialtyList = [];
|
||||||
Affiliations affiliations;
|
List<Affiliations> affiliations;
|
||||||
EventsInsights(
|
EventsInsights(
|
||||||
{super.key,
|
{super.key,
|
||||||
required this.eventid,
|
required this.eventid,
|
||||||
|
@ -67,10 +56,14 @@ class _EventsInsightsState extends State<EventsInsights> {
|
||||||
final screenSize = MediaQuery.of(context).size;
|
final screenSize = MediaQuery.of(context).size;
|
||||||
final ratio = screenSize.width / (screenSize.height / 2);
|
final ratio = screenSize.width / (screenSize.height / 2);
|
||||||
List<int> affCountList = [];
|
List<int> affCountList = [];
|
||||||
for (var obj in widget.affiliations.affiliationCount) {
|
int maximum = 0;
|
||||||
affCountList.add(int.parse(obj));
|
if (widget.affiliations.isNotEmpty) {
|
||||||
|
for (var obj in widget.affiliations) {
|
||||||
|
affCountList.add(int.parse(obj.orgCount!));
|
||||||
|
}
|
||||||
|
maximum = affCountList.reduce(max);
|
||||||
}
|
}
|
||||||
int maximum = affCountList.reduce(max);
|
|
||||||
return Consumer<HcpProfileProvider>(
|
return Consumer<HcpProfileProvider>(
|
||||||
builder: (BuildContext context, provider, Widget? child) {
|
builder: (BuildContext context, provider, Widget? child) {
|
||||||
List<Widget> widgets = <Widget>[];
|
List<Widget> widgets = <Widget>[];
|
||||||
|
@ -121,28 +114,31 @@ class _EventsInsightsState extends State<EventsInsights> {
|
||||||
// height: 20,
|
// height: 20,
|
||||||
// ),
|
// ),
|
||||||
labelWidget("Topics Discussed"),
|
labelWidget("Topics Discussed"),
|
||||||
Card(
|
widgets.isNotEmpty
|
||||||
surfaceTintColor: Colors.white,
|
? Card(
|
||||||
child: Container(
|
surfaceTintColor: Colors.white,
|
||||||
padding: EdgeInsets.all(2.0),
|
child: Container(
|
||||||
margin: EdgeInsets.all(2.0),
|
padding: EdgeInsets.all(2.0),
|
||||||
height: screenSize.height / 2,
|
margin: EdgeInsets.all(2.0),
|
||||||
width: screenSize.width,
|
height: screenSize.height / 2,
|
||||||
decoration: BoxDecoration(
|
width: screenSize.width,
|
||||||
color: Colors.white,
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20))),
|
color: Colors.white,
|
||||||
child: Center(
|
borderRadius:
|
||||||
child: FittedBox(
|
BorderRadius.all(Radius.circular(20))),
|
||||||
child: Scatter(
|
child: Center(
|
||||||
fillGaps: true,
|
child: FittedBox(
|
||||||
delegate:
|
child: Scatter(
|
||||||
ArchimedeanSpiralScatterDelegate(ratio: ratio),
|
fillGaps: true,
|
||||||
children: widgets,
|
delegate: ArchimedeanSpiralScatterDelegate(
|
||||||
|
ratio: ratio),
|
||||||
|
children: widgets,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
)
|
||||||
),
|
: SizedBox.shrink(),
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 20,
|
height: 20,
|
||||||
),
|
),
|
||||||
|
@ -177,37 +173,38 @@ class _EventsInsightsState extends State<EventsInsights> {
|
||||||
height: 20,
|
height: 20,
|
||||||
),
|
),
|
||||||
labelWidget("Speaker counts by providers"),
|
labelWidget("Speaker counts by providers"),
|
||||||
Card(
|
widget.affiliations.isNotEmpty
|
||||||
surfaceTintColor: Colors.white,
|
? Card(
|
||||||
child: Container(
|
surfaceTintColor: Colors.white,
|
||||||
padding: EdgeInsets.all(12.0),
|
child: Container(
|
||||||
// margin: EdgeInsets.all(10.0),
|
padding: EdgeInsets.all(12.0),
|
||||||
// height: screenSize.height / 3,
|
// margin: EdgeInsets.all(10.0),
|
||||||
width: screenSize.width,
|
// height: screenSize.height / 3,
|
||||||
decoration: BoxDecoration(
|
width: screenSize.width,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
borderRadius:
|
||||||
),
|
BorderRadius.all(Radius.circular(20)),
|
||||||
child: Column(
|
color: Colors.white,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
),
|
||||||
children: List.generate(
|
child: Column(
|
||||||
widget.affiliations.affiliationCount.length,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
(index) {
|
children: List.generate(
|
||||||
return ChartLine(
|
widget.affiliations.length, (index) {
|
||||||
title:
|
return ChartLine(
|
||||||
widget.affiliations.affiliationNames[index],
|
title: widget.affiliations[index].orgName!,
|
||||||
number: int.parse(
|
number: int.parse(
|
||||||
widget.affiliations.affiliationCount[index]),
|
widget.affiliations[index].orgCount!),
|
||||||
rate: int.parse(widget.affiliations
|
rate: int.parse(widget.affiliations[index]
|
||||||
.affiliationCount[index]) ==
|
.orgCount!) ==
|
||||||
maximum
|
maximum
|
||||||
? 1
|
? 1
|
||||||
: int.parse(widget.affiliations
|
: int.parse(widget.affiliations[index]
|
||||||
.affiliationCount[index]) /
|
.orgCount!) /
|
||||||
maximum);
|
maximum);
|
||||||
}),
|
}),
|
||||||
)),
|
)),
|
||||||
),
|
)
|
||||||
|
: SizedBox.shrink(),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 20,
|
height: 20,
|
||||||
),
|
),
|
||||||
|
|
|
@ -381,7 +381,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||||
return isloggedout;
|
return isloggedout;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
await SessionManager().setLoggedIn(isloggedin);
|
// await SessionManager().setLoggedIn(isloggedin);
|
||||||
// UserData userData =
|
// UserData userData =
|
||||||
// UserData(email: email, name: token, domainUrl: domain, secretkey: key);
|
// UserData(email: email, name: token, domainUrl: domain, secretkey: key);
|
||||||
// await provider.saveUserData(userData);
|
// await provider.saveUserData(userData);
|
||||||
|
|
|
@ -0,0 +1,120 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class CareView extends StatelessWidget {
|
||||||
|
final AnimationController animationController;
|
||||||
|
|
||||||
|
const CareView({Key? key, required this.animationController})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final _firstHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(1, 0), end: Offset(0, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.2,
|
||||||
|
0.4,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
final _secondHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(0, 0), end: Offset(-1, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.4,
|
||||||
|
0.6,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
final _relaxFirstHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(2, 0), end: Offset(0, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.2,
|
||||||
|
0.4,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
final _relaxSecondHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(0, 0), end: Offset(-2, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.4,
|
||||||
|
0.6,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
|
||||||
|
final _imageFirstHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(4, 0), end: Offset(0, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.2,
|
||||||
|
0.4,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
final _imageSecondHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(0, 0), end: Offset(-4, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.4,
|
||||||
|
0.6,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
|
||||||
|
return SlideTransition(
|
||||||
|
position: _firstHalfAnimation,
|
||||||
|
child: SlideTransition(
|
||||||
|
position: _secondHalfAnimation,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 100),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
SlideTransition(
|
||||||
|
position: _relaxFirstHalfAnimation,
|
||||||
|
child: SlideTransition(
|
||||||
|
position: _relaxSecondHalfAnimation,
|
||||||
|
child: Text(
|
||||||
|
"Track Events Everywhere",
|
||||||
|
style:
|
||||||
|
TextStyle(fontSize: 26.0, fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding:
|
||||||
|
EdgeInsets.only(left: 64, right: 64, bottom: 16, top: 16),
|
||||||
|
child: Text(
|
||||||
|
"Available on your phone,tablet and laptop",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SlideTransition(
|
||||||
|
position: _imageFirstHalfAnimation,
|
||||||
|
child: SlideTransition(
|
||||||
|
position: _imageSecondHalfAnimation,
|
||||||
|
child: Container(
|
||||||
|
constraints: BoxConstraints(maxWidth: 350, maxHeight: 250),
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/introduction_animation/events3.jpg',
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,202 @@
|
||||||
|
import 'package:animations/animations.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class CenterNextButton extends StatelessWidget {
|
||||||
|
final AnimationController animationController;
|
||||||
|
final VoidCallback onNextClick;
|
||||||
|
const CenterNextButton(
|
||||||
|
{Key? key, required this.animationController, required this.onNextClick})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final _topMoveAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(0, 5), end: Offset(0, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.0,
|
||||||
|
0.2,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
final _signUpMoveAnimation =
|
||||||
|
Tween<double>(begin: 0, end: 1.0).animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.6,
|
||||||
|
0.8,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
final _loginTextMoveAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(0, 5), end: Offset(0, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.6,
|
||||||
|
0.8,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
|
||||||
|
return Padding(
|
||||||
|
padding:
|
||||||
|
EdgeInsets.only(bottom: 16 + MediaQuery.of(context).padding.bottom),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
SlideTransition(
|
||||||
|
position: _topMoveAnimation,
|
||||||
|
child: AnimatedBuilder(
|
||||||
|
animation: animationController,
|
||||||
|
builder: (context, child) => AnimatedOpacity(
|
||||||
|
opacity: animationController.value >= 0.2 &&
|
||||||
|
animationController.value <= 0.6
|
||||||
|
? 1
|
||||||
|
: 0,
|
||||||
|
duration: Duration(milliseconds: 480),
|
||||||
|
child: _pageView(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SlideTransition(
|
||||||
|
position: _topMoveAnimation,
|
||||||
|
child: AnimatedBuilder(
|
||||||
|
animation: animationController,
|
||||||
|
builder: (context, child) => Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
bottom: 38 - (38 * _signUpMoveAnimation.value)),
|
||||||
|
child: Container(
|
||||||
|
height: 58,
|
||||||
|
width: 58 + (200 * _signUpMoveAnimation.value),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(
|
||||||
|
8 + 32 * (1 - _signUpMoveAnimation.value)),
|
||||||
|
color: Color(0xff132137),
|
||||||
|
),
|
||||||
|
child: PageTransitionSwitcher(
|
||||||
|
duration: Duration(milliseconds: 480),
|
||||||
|
reverse: _signUpMoveAnimation.value < 0.7,
|
||||||
|
transitionBuilder: (
|
||||||
|
Widget child,
|
||||||
|
Animation<double> animation,
|
||||||
|
Animation<double> secondaryAnimation,
|
||||||
|
) {
|
||||||
|
return SharedAxisTransition(
|
||||||
|
fillColor: Colors.transparent,
|
||||||
|
child: child,
|
||||||
|
animation: animation,
|
||||||
|
secondaryAnimation: secondaryAnimation,
|
||||||
|
transitionType: SharedAxisTransitionType.vertical,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: _signUpMoveAnimation.value > 0.7
|
||||||
|
? InkWell(
|
||||||
|
key: ValueKey('Sign Up button'),
|
||||||
|
onTap: onNextClick,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(left: 16.0, right: 16.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'Sign In',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Icon(Icons.arrow_forward_rounded,
|
||||||
|
color: Colors.white),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: InkWell(
|
||||||
|
key: ValueKey('next button'),
|
||||||
|
onTap: onNextClick,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.all(16.0),
|
||||||
|
child: Icon(Icons.arrow_forward_ios_rounded,
|
||||||
|
color: Colors.white),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 8),
|
||||||
|
child: SlideTransition(
|
||||||
|
position: _loginTextMoveAnimation,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'Already have an account? ',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.grey,
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'Login',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xff132137),
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _pageView() {
|
||||||
|
int _selectedIndex = 0;
|
||||||
|
|
||||||
|
if (animationController.value >= 0.7) {
|
||||||
|
_selectedIndex = 3;
|
||||||
|
} else if (animationController.value >= 0.5) {
|
||||||
|
_selectedIndex = 2;
|
||||||
|
} else if (animationController.value >= 0.3) {
|
||||||
|
_selectedIndex = 1;
|
||||||
|
} else if (animationController.value >= 0.1) {
|
||||||
|
_selectedIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 16),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
for (var i = 0; i < 4; i++)
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(4),
|
||||||
|
child: AnimatedContainer(
|
||||||
|
duration: Duration(milliseconds: 480),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(32),
|
||||||
|
color: _selectedIndex == i
|
||||||
|
? Color(0xff132137)
|
||||||
|
: Color(0xffE3E4E4),
|
||||||
|
),
|
||||||
|
width: 10,
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1,137 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
|
import 'package:konectar_events/view/login.dart';
|
||||||
|
import 'package:konectar_events/view/login_components/care_view.dart';
|
||||||
|
import 'package:konectar_events/view/login_components/center_next_button.dart';
|
||||||
|
import 'package:konectar_events/view/login_components/mood_diary_vew.dart';
|
||||||
|
import 'package:konectar_events/view/login_components/relax_view.dart';
|
||||||
|
import 'package:konectar_events/view/login_components/splash_view.dart';
|
||||||
|
import 'package:konectar_events/view/login_components/top_back_skip_view.dart';
|
||||||
|
import 'package:konectar_events/view/login_components/welcome_view.dart';
|
||||||
|
import 'package:konectar_events/view/navigation_home_screen.dart';
|
||||||
|
|
||||||
|
class IntroductionAnimationScreen extends StatefulWidget {
|
||||||
|
const IntroductionAnimationScreen({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_IntroductionAnimationScreenState createState() =>
|
||||||
|
_IntroductionAnimationScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _IntroductionAnimationScreenState
|
||||||
|
extends State<IntroductionAnimationScreen> with TickerProviderStateMixin {
|
||||||
|
AnimationController? _animationController;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_animationController =
|
||||||
|
AnimationController(vsync: this, duration: Duration(seconds: 8));
|
||||||
|
_animationController?.animateTo(0.2);
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_animationController?.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
print(_animationController?.value);
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
backgroundColor: EventsConstants.bgcolor,
|
||||||
|
title: Container(
|
||||||
|
// constraints: BoxConstraints(maxWidth: 350, maxHeight: 350),
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/introduction_animation/introduction_image1.png',
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
centerTitle: true,
|
||||||
|
),
|
||||||
|
backgroundColor: EventsConstants.bgcolor,
|
||||||
|
body: ClipRect(
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
// SplashView(
|
||||||
|
// animationController: _animationController!,
|
||||||
|
// ),
|
||||||
|
CareView(
|
||||||
|
animationController: _animationController!,
|
||||||
|
),
|
||||||
|
RelaxView(
|
||||||
|
animationController: _animationController!,
|
||||||
|
),
|
||||||
|
CareView(
|
||||||
|
animationController: _animationController!,
|
||||||
|
),
|
||||||
|
// MoodDiaryVew(
|
||||||
|
// animationController: _animationController!,
|
||||||
|
// ),
|
||||||
|
WelcomeView(
|
||||||
|
animationController: _animationController!,
|
||||||
|
),
|
||||||
|
TopBackSkipView(
|
||||||
|
onBackClick: _onBackClick,
|
||||||
|
onSkipClick: _onSkipClick,
|
||||||
|
animationController: _animationController!,
|
||||||
|
),
|
||||||
|
CenterNextButton(
|
||||||
|
animationController: _animationController!,
|
||||||
|
onNextClick: _onNextClick,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onSkipClick() {
|
||||||
|
_animationController?.animateTo(0.8,
|
||||||
|
duration: Duration(milliseconds: 1200));
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onBackClick() {
|
||||||
|
// if (_animationController!.value >= 0 &&
|
||||||
|
// _animationController!.value <= 0.2) {
|
||||||
|
// _animationController?.animateTo(0.0);
|
||||||
|
// } else
|
||||||
|
if (_animationController!.value > 0.2 &&
|
||||||
|
_animationController!.value <= 0.4) {
|
||||||
|
_animationController?.animateTo(0.2);
|
||||||
|
} else if (_animationController!.value > 0.4 &&
|
||||||
|
_animationController!.value <= 0.6) {
|
||||||
|
_animationController?.animateTo(0.4);
|
||||||
|
} else if (_animationController!.value > 0.6 &&
|
||||||
|
_animationController!.value <= 0.8) {
|
||||||
|
_animationController?.animateTo(0.6);
|
||||||
|
} else if (_animationController!.value > 0.8 &&
|
||||||
|
_animationController!.value <= 1.0) {
|
||||||
|
_animationController?.animateTo(0.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _onNextClick() {
|
||||||
|
if (_animationController!.value >= 0 &&
|
||||||
|
_animationController!.value <= 0.2) {
|
||||||
|
_animationController?.animateTo(0.4);
|
||||||
|
} else if (_animationController!.value > 0.2 &&
|
||||||
|
_animationController!.value <= 0.4) {
|
||||||
|
_animationController?.animateTo(0.6);
|
||||||
|
} else if (_animationController!.value > 0.4 &&
|
||||||
|
_animationController!.value <= 0.6) {
|
||||||
|
_animationController?.animateTo(0.8);
|
||||||
|
} else if (_animationController!.value > 0.6 &&
|
||||||
|
_animationController!.value <= 0.8) {
|
||||||
|
_signUpClick();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _signUpClick() {
|
||||||
|
Navigator.of(context).pushReplacement(
|
||||||
|
MaterialPageRoute(builder: (context) => NavigationHomeScreen()),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,119 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class MoodDiaryVew extends StatelessWidget {
|
||||||
|
final AnimationController animationController;
|
||||||
|
|
||||||
|
const MoodDiaryVew({Key? key, required this.animationController})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final _firstHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(1, 0), end: Offset(0, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.4,
|
||||||
|
0.6,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
final _secondHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(0, 0), end: Offset(-1, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.6,
|
||||||
|
0.8,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
|
||||||
|
final _moodFirstHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(2, 0), end: Offset(0, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.4,
|
||||||
|
0.6,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
final _moodSecondHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(0, 0), end: Offset(-2, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.6,
|
||||||
|
0.8,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
final _imageFirstHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(4, 0), end: Offset(0, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.4,
|
||||||
|
0.6,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
final _imageSecondHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(0, 0), end: Offset(-4, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.6,
|
||||||
|
0.8,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
|
||||||
|
return SlideTransition(
|
||||||
|
position: _firstHalfAnimation,
|
||||||
|
child: SlideTransition(
|
||||||
|
position: _secondHalfAnimation,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 100),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Mood Dairy",
|
||||||
|
style: TextStyle(fontSize: 26.0, fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
SlideTransition(
|
||||||
|
position: _moodFirstHalfAnimation,
|
||||||
|
child: SlideTransition(
|
||||||
|
position: _moodSecondHalfAnimation,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 64, right: 64, top: 16, bottom: 16),
|
||||||
|
child: Text(
|
||||||
|
"Lorem ipsum dolor sit amet,consectetur adipiscing elit,sed do eiusmod tempor incididunt ut labore",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SlideTransition(
|
||||||
|
position: _imageFirstHalfAnimation,
|
||||||
|
child: SlideTransition(
|
||||||
|
position: _imageSecondHalfAnimation,
|
||||||
|
child: Container(
|
||||||
|
constraints: BoxConstraints(maxWidth: 350, maxHeight: 250),
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/introduction_animation/mood_dairy_image.png',
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,120 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class RelaxView extends StatelessWidget {
|
||||||
|
final AnimationController animationController;
|
||||||
|
|
||||||
|
const RelaxView({Key? key, required this.animationController})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final _firstHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(0, 1), end: Offset(0, 0)).animate(
|
||||||
|
CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.0,
|
||||||
|
0.2,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
final _secondHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(0, 0), end: Offset(-1, 0)).animate(
|
||||||
|
CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.2,
|
||||||
|
0.4,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
final _textAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(0, 0), end: Offset(-2, 0)).animate(
|
||||||
|
CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.2,
|
||||||
|
0.4,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
final _imageAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(0, 0), end: Offset(-4, 0)).animate(
|
||||||
|
CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.2,
|
||||||
|
0.4,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
final _relaxAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(0, -2), end: Offset(0, 0)).animate(
|
||||||
|
CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.0,
|
||||||
|
0.2,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return SlideTransition(
|
||||||
|
position: _firstHalfAnimation,
|
||||||
|
child: SlideTransition(
|
||||||
|
position: _secondHalfAnimation,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 100),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
// SlideTransition(
|
||||||
|
// position: _relaxAnimation,
|
||||||
|
// child: Container(
|
||||||
|
// constraints: BoxConstraints(maxWidth: 350, maxHeight: 350),
|
||||||
|
// child: Image.asset(
|
||||||
|
// 'assets/introduction_animation/introduction_image1.png',
|
||||||
|
// fit: BoxFit.contain,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
SlideTransition(
|
||||||
|
position: _relaxAnimation,
|
||||||
|
child: Text(
|
||||||
|
"There's a plan for every event ",
|
||||||
|
style: TextStyle(fontSize: 26.0, fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SlideTransition(
|
||||||
|
position: _textAnimation,
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
EdgeInsets.only(left: 64, right: 64, top: 16, bottom: 16),
|
||||||
|
child: Text(
|
||||||
|
"Single solution for more impactful event experience",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SlideTransition(
|
||||||
|
position: _imageAnimation,
|
||||||
|
child: Container(
|
||||||
|
constraints: BoxConstraints(maxWidth: 350, maxHeight: 250),
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/introduction_animation/events3.jpg',
|
||||||
|
fit: BoxFit.contain,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -0,0 +1,105 @@
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class SplashView extends StatefulWidget {
|
||||||
|
final AnimationController animationController;
|
||||||
|
|
||||||
|
const SplashView({Key? key, required this.animationController})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_SplashViewState createState() => _SplashViewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SplashViewState extends State<SplashView> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final _introductionanimation =
|
||||||
|
Tween<Offset>(begin: Offset(0, 0), end: Offset(0.0, -1.0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: widget.animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.0,
|
||||||
|
0.2,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
return SlideTransition(
|
||||||
|
position: _introductionanimation,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 100.0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 40,
|
||||||
|
),
|
||||||
|
// Padding(
|
||||||
|
// padding: EdgeInsets.all(8.0),
|
||||||
|
// child: SizedBox(
|
||||||
|
// //width: MediaQuery.of(context).size.width,
|
||||||
|
// child: Image.asset(
|
||||||
|
// 'assets/introduction_animation/introduction_image1.png',
|
||||||
|
// fit: BoxFit.cover,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
SizedBox(
|
||||||
|
height: 80,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(top: 8.0, bottom: 8.0),
|
||||||
|
child: Text(
|
||||||
|
"Track Events Everywhere",
|
||||||
|
style: TextStyle(fontSize: 25.0, fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(left: 64, right: 64),
|
||||||
|
child: Text(
|
||||||
|
"Available on your phone,tablet and laptop",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 100,
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
bottom: MediaQuery.of(context).padding.bottom),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
widget.animationController.animateTo(0.2);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 58,
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 56.0,
|
||||||
|
right: 56.0,
|
||||||
|
top: 16,
|
||||||
|
bottom: 16,
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(38.0),
|
||||||
|
color: Color(0xff132137),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
"Let's begin",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,81 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class TopBackSkipView extends StatelessWidget {
|
||||||
|
final AnimationController animationController;
|
||||||
|
final VoidCallback onBackClick;
|
||||||
|
final VoidCallback onSkipClick;
|
||||||
|
|
||||||
|
const TopBackSkipView({
|
||||||
|
Key? key,
|
||||||
|
required this.onBackClick,
|
||||||
|
required this.onSkipClick,
|
||||||
|
required this.animationController,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final _animation =
|
||||||
|
Tween<Offset>(begin: Offset(0, -1), end: Offset(0.0, 0.0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.0,
|
||||||
|
0.2,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
|
||||||
|
// final _backAnimation =
|
||||||
|
// Tween<Offset>(begin: Offset(0, 0), end: Offset(-2, 0))
|
||||||
|
// .animate(CurvedAnimation(
|
||||||
|
// parent: animationController,
|
||||||
|
// curve: Interval(
|
||||||
|
// 0.6,
|
||||||
|
// 0.8,
|
||||||
|
// curve: Curves.fastOutSlowIn,
|
||||||
|
// ),
|
||||||
|
// ));
|
||||||
|
final _skipAnimation = Tween<Offset>(begin: Offset(0, 0), end: Offset(2, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.6,
|
||||||
|
0.8,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
|
||||||
|
return SlideTransition(
|
||||||
|
position: _animation,
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
|
||||||
|
child: Container(
|
||||||
|
height: 58,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 8, right: 16),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
// SlideTransition(
|
||||||
|
// position: _backAnimation,
|
||||||
|
// child:
|
||||||
|
IconButton(
|
||||||
|
onPressed: onBackClick,
|
||||||
|
icon: Icon(Icons.arrow_back_ios_new_rounded),
|
||||||
|
// ),
|
||||||
|
),
|
||||||
|
SlideTransition(
|
||||||
|
position: _skipAnimation,
|
||||||
|
child: IconButton(
|
||||||
|
onPressed: onSkipClick,
|
||||||
|
icon: Text('Skip'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,97 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class WelcomeView extends StatelessWidget {
|
||||||
|
final AnimationController animationController;
|
||||||
|
const WelcomeView({Key? key, required this.animationController})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final _firstHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(1, 0), end: Offset(0, 0)).animate(
|
||||||
|
CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.6,
|
||||||
|
0.8,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
final _secondHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(0, 0), end: Offset(-1, 0)).animate(
|
||||||
|
CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.8,
|
||||||
|
1.0,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
final _welcomeFirstHalfAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(2, 0), end: Offset(0, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.6,
|
||||||
|
0.8,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
|
||||||
|
final _welcomeImageAnimation =
|
||||||
|
Tween<Offset>(begin: Offset(4, 0), end: Offset(0, 0))
|
||||||
|
.animate(CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Interval(
|
||||||
|
0.6,
|
||||||
|
0.8,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
),
|
||||||
|
));
|
||||||
|
return SlideTransition(
|
||||||
|
position: _firstHalfAnimation,
|
||||||
|
child: SlideTransition(
|
||||||
|
position: _secondHalfAnimation,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 100),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
// SlideTransition(
|
||||||
|
// position: _welcomeFirstHalfAnimation,
|
||||||
|
// child: Container(
|
||||||
|
// constraints: BoxConstraints(maxWidth: 350, maxHeight: 350),
|
||||||
|
// child: Image.asset(
|
||||||
|
// 'assets/introduction_animation/introduction_image1.png',
|
||||||
|
// fit: BoxFit.contain,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
SizedBox(
|
||||||
|
height: 50,
|
||||||
|
),
|
||||||
|
SlideTransition(
|
||||||
|
position: _welcomeFirstHalfAnimation,
|
||||||
|
child: Text(
|
||||||
|
"Welcome",
|
||||||
|
style: TextStyle(fontSize: 25.0, fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding:
|
||||||
|
EdgeInsets.only(left: 64, right: 64, top: 16, bottom: 16),
|
||||||
|
child: Text(
|
||||||
|
"HCP Management Platform Aissel's Cutting-Edge Product Solutions",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:konectar_events/contacts_module/ui_screen/new_contacts.dart';
|
import 'package:konectar_events/contacts_module/ui_screen/new_contacts.dart';
|
||||||
import 'package:konectar_events/utils/app_theme.dart';
|
import 'package:konectar_events/utils/app_theme.dart';
|
||||||
|
import 'package:konectar_events/view/helpdesk.dart';
|
||||||
import 'package:konectar_events/view/home.dart';
|
import 'package:konectar_events/view/home.dart';
|
||||||
import 'package:konectar_events/widgets/drawerusercontroller.dart';
|
import 'package:konectar_events/widgets/drawerusercontroller.dart';
|
||||||
import 'package:konectar_events/widgets/home_drawer.dart';
|
import 'package:konectar_events/widgets/home_drawer.dart';
|
||||||
|
@ -61,7 +62,7 @@ class _NavigationHomeScreenState extends State<NavigationHomeScreen> {
|
||||||
break;
|
break;
|
||||||
case DrawerIndex.FeedBack:
|
case DrawerIndex.FeedBack:
|
||||||
setState(() {
|
setState(() {
|
||||||
screenView = HomeScreen();
|
screenView = HelpDeskScreen();
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case DrawerIndex.Invite:
|
case DrawerIndex.Invite:
|
||||||
|
|
|
@ -6,7 +6,16 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/speaker.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/ui_screen/interactionform/configprovider.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/ui_screen/interactionform/interactionlistscreen.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/ui_screen/interactionform/interactionprovider.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/ui_screen/interactionform/new_dynamicform.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/ui_screen/interactionform/viewinteractionprovider.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/ui_screen/new_editinteraction.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/ui_screen/new_viewinteraction.dart';
|
||||||
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
||||||
|
import 'package:konectar_events/model/eventspeakers.dart';
|
||||||
import 'package:konectar_events/model/sessionnotesmodel.dart';
|
import 'package:konectar_events/model/sessionnotesmodel.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
import 'package:konectar_events/utils/dateformater.dart';
|
import 'package:konectar_events/utils/dateformater.dart';
|
||||||
|
@ -16,7 +25,7 @@ import 'package:konectar_events/widgets/customdropdown.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class HCPProfileScreen extends StatefulWidget {
|
class HCPProfileScreen extends StatefulWidget {
|
||||||
Eventsdetail eventsdetail;
|
SpeakersList eventsdetail;
|
||||||
String eventid;
|
String eventid;
|
||||||
String title;
|
String title;
|
||||||
HCPProfileScreen(
|
HCPProfileScreen(
|
||||||
|
@ -151,8 +160,19 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
init() async {
|
init() async {
|
||||||
await Provider.of<HcpProfileProvider>(context, listen: false)
|
await Provider.of<HcpProfileProvider>(context, listen: false)
|
||||||
.getSessionData();
|
.getSessionData();
|
||||||
await Provider.of<HcpProfileProvider>(context, listen: false)
|
// await Provider.of<HcpProfileProvider>(context, listen: false)
|
||||||
.getCounts(widget.eventsdetail);
|
// .getCounts(widget.eventsdetail);
|
||||||
|
|
||||||
|
await Provider.of<InteractionProvider>(context, listen: false)
|
||||||
|
.initConfigData();
|
||||||
|
|
||||||
|
await Provider.of<InteractionProvider>(context, listen: false).getRecords();
|
||||||
|
String formname = Provider.of<InteractionProvider>(context, listen: false)
|
||||||
|
.intConfigDataList[0]
|
||||||
|
.name;
|
||||||
|
|
||||||
|
await Provider.of<ViewInteractionProvider>(context, listen: false)
|
||||||
|
.getRecords(formname, hcp: widget.eventsdetail.hcpFullName);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -290,7 +310,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
buildprofile(BuildContext context, Eventsdetail eventsdetail, String title) {
|
buildprofile(BuildContext context, SpeakersList eventsdetail, String title) {
|
||||||
MediaQuery.of(context).size.height * 0.35;
|
MediaQuery.of(context).size.height * 0.35;
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
|
@ -323,7 +343,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 15,
|
height: 15,
|
||||||
),
|
),
|
||||||
Text(eventsdetail.kolFullName!,
|
Text(eventsdetail.hcpFullName!,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
// fontFamily: "SourceSerif",
|
// fontFamily: "SourceSerif",
|
||||||
|
@ -335,7 +355,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
// // fontFamily: "SourceSerif",
|
// // fontFamily: "SourceSerif",
|
||||||
// )),
|
// )),
|
||||||
Text(
|
Text(
|
||||||
"${eventsdetail.orgName ?? ""} ${eventsdetail.country ?? ""} ${eventsdetail.city ?? ""}",
|
"${eventsdetail.organization ?? ""} ${eventsdetail.countryName ?? ""} ${eventsdetail.cityName ?? ""}",
|
||||||
softWrap: true,
|
softWrap: true,
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
|
@ -409,7 +429,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget buildCardView(BuildContext context, Eventsdetail eventsdetail,
|
Widget buildCardView(BuildContext context, SpeakersList eventsdetail,
|
||||||
HcpProfileProvider provider) {
|
HcpProfileProvider provider) {
|
||||||
return Container(
|
return Container(
|
||||||
// color: Constants.bgcolor,
|
// color: Constants.bgcolor,
|
||||||
|
@ -419,7 +439,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
// title: eventsdetail.kolFullName!,
|
// title: eventsdetail.kolFullName!,
|
||||||
// eventsdetail: eventsdetail,
|
// eventsdetail: eventsdetail,
|
||||||
// ),
|
// ),
|
||||||
buildprofile(context, eventsdetail, eventsdetail.kolFullName!),
|
buildprofile(context, eventsdetail, eventsdetail.hcpFullName!),
|
||||||
// Padding(
|
// Padding(
|
||||||
// padding: const EdgeInsets.all(8.0),
|
// padding: const EdgeInsets.all(8.0),
|
||||||
// child: Column(
|
// child: Column(
|
||||||
|
@ -519,8 +539,9 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
// const Spacer(),
|
// const Spacer(),
|
||||||
Center(
|
Center(
|
||||||
child: _ProfileInfoRow(items: [
|
child: _ProfileInfoRow(items: [
|
||||||
ProfileInfoItem("Topic(s)", provider.totalTopics),
|
ProfileInfoItem("Topic(s)", widget.eventsdetail.topics!.length),
|
||||||
ProfileInfoItem("Session(s)", provider.totalSessions),
|
ProfileInfoItem(
|
||||||
|
"Session(s)", widget.eventsdetail.sessionNames!.length),
|
||||||
ProfileInfoItem("Note(s)", provider.totalNotes),
|
ProfileInfoItem("Note(s)", provider.totalNotes),
|
||||||
])),
|
])),
|
||||||
// SizedBox(
|
// SizedBox(
|
||||||
|
@ -531,9 +552,9 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget sessionNotes(BuildContext context, Eventsdetail eventsdetail,
|
Widget sessionNotes(BuildContext context, SpeakersList eventsdetail,
|
||||||
HcpProfileProvider provider) {
|
HcpProfileProvider provider) {
|
||||||
sessionList = eventsdetail.sessionName!.split(",");
|
sessionList = eventsdetail.sessionNames!;
|
||||||
return Container(
|
return Container(
|
||||||
color: EventsConstants.bgcolor,
|
color: EventsConstants.bgcolor,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
@ -604,13 +625,13 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
.add("${_selectedFruit} \n\n ${notesController.text}");
|
.add("${_selectedFruit} \n\n ${notesController.text}");
|
||||||
// });
|
// });
|
||||||
print(
|
print(
|
||||||
" eventid:${widget.eventid},hcp:${widget.eventsdetail.kolId}");
|
" eventid:${widget.eventid},hcp:${widget.eventsdetail.uniqueId}");
|
||||||
SessionNotesModel notesModel = SessionNotesModel(
|
SessionNotesModel notesModel = SessionNotesModel(
|
||||||
notes: notesController.text,
|
notes: notesController.text,
|
||||||
addedBy: "user",
|
addedBy: "user",
|
||||||
addedDate: CustomDateFormatter().formatDate(),
|
addedDate: CustomDateFormatter().formatDate(),
|
||||||
eventid: widget.eventid,
|
eventid: widget.eventid,
|
||||||
hcpid: widget.eventsdetail.kolId,
|
hcpid: widget.eventsdetail.uniqueId,
|
||||||
selectedSession: _selectedFruit);
|
selectedSession: _selectedFruit);
|
||||||
print(
|
print(
|
||||||
"${notesModel.addedBy},${notesModel.notes},${notesModel.addedDate},${notesModel.eventid},${notesModel.hcpid},${notesModel.selectedSession}");
|
"${notesModel.addedBy},${notesModel.notes},${notesModel.addedDate},${notesModel.eventid},${notesModel.hcpid},${notesModel.selectedSession}");
|
||||||
|
@ -723,9 +744,9 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget topicsTab(Eventsdetail eventsdetail) {
|
Widget topicsTab(SpeakersList eventsdetail) {
|
||||||
print("${eventsdetail.sessionName!.split(",").length} @@@lengtg");
|
print("${eventsdetail.sessionNames!.join(",").length} @@@lengtg");
|
||||||
List<String> sessions = eventsdetail.sessionName!.split(",");
|
List<String> sessions = eventsdetail.sessionNames!;
|
||||||
return Container(
|
return Container(
|
||||||
width: double.maxFinite,
|
width: double.maxFinite,
|
||||||
padding: EdgeInsets.only(left: 8),
|
padding: EdgeInsets.only(left: 8),
|
||||||
|
@ -737,7 +758,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
padding: EdgeInsets.only(top: 10.0, left: 4.0),
|
padding: EdgeInsets.only(top: 10.0, left: 4.0),
|
||||||
itemCount: sessions.length,
|
itemCount: sessions.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
List<String> topics = eventsdetail.eventTopics!.split("|");
|
List<String> topics = eventsdetail.topics!;
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
@ -856,25 +877,156 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget medicalInsights() {
|
Widget medicalInsights() {
|
||||||
return Container(
|
return Consumer<ViewInteractionProvider>(
|
||||||
color: EventsConstants.bgcolor,
|
builder: (BuildContext context, provider, Widget? child) {
|
||||||
child: Center(
|
return Container(
|
||||||
child: FloatingActionButton.extended(
|
color: EventsConstants.bgcolor,
|
||||||
backgroundColor: Colors.green,
|
child: Column(
|
||||||
onPressed: () {},
|
children: [
|
||||||
heroTag: 'medicalinsights',
|
SizedBox(
|
||||||
elevation: 0,
|
height: 20,
|
||||||
label: const Text("Add Medical Insights",
|
),
|
||||||
style: TextStyle(
|
Center(
|
||||||
color: Colors.white,
|
child: FloatingActionButton.extended(
|
||||||
)),
|
backgroundColor: Colors.green,
|
||||||
icon: const Icon(
|
onPressed: () async {
|
||||||
Icons.add,
|
final ConfigDataProvider configDataProvider =
|
||||||
color: Colors.white,
|
ConfigDataProvider();
|
||||||
),
|
|
||||||
|
await configDataProvider.initConfigUIDataMediccalInsight();
|
||||||
|
await Provider.of<InteractionProvider>(context, listen: false)
|
||||||
|
.initConfigData();
|
||||||
|
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (BuildContext context) => InteractionScreen1(
|
||||||
|
index: 0,
|
||||||
|
form: Provider.of<InteractionProvider>(context,
|
||||||
|
listen: false)
|
||||||
|
.intConfigDataList[0]
|
||||||
|
.name,
|
||||||
|
title: "${widget.eventsdetail.hcpFullName}",
|
||||||
|
)));
|
||||||
|
// Navigator.push(
|
||||||
|
// context,
|
||||||
|
// MaterialPageRoute(
|
||||||
|
// builder: (context) => const InteractionListScreen()));
|
||||||
|
},
|
||||||
|
heroTag: 'medicalinsights',
|
||||||
|
elevation: 0,
|
||||||
|
label: const Text("Add Medical Insights",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
)),
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.add,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,
|
||||||
|
),
|
||||||
|
provider.savedList.isEmpty
|
||||||
|
? SizedBox.shrink()
|
||||||
|
: ListView.builder(
|
||||||
|
itemCount: provider.savedList.length,
|
||||||
|
shrinkWrap: true,
|
||||||
|
cacheExtent:
|
||||||
|
double.parse(provider.savedList.length.toString()),
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
ListTile(
|
||||||
|
subtitle: Text(
|
||||||
|
'Updated on ${CustomDateFormatter().convertDateTimeToDate(provider.savedList[index].updatedTime!)}',
|
||||||
|
//style: TextStyle(fontStyle: FontStyle.italic),
|
||||||
|
),
|
||||||
|
title: Text(
|
||||||
|
provider.savedList[index].id,
|
||||||
|
),
|
||||||
|
trailing: SizedBox(
|
||||||
|
width: 100,
|
||||||
|
child: Row(children: [
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (BuildContext context) =>
|
||||||
|
ViewInteractionScreen1(
|
||||||
|
saveInteraction:
|
||||||
|
provider.savedList[index],
|
||||||
|
)));
|
||||||
|
},
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.info_outline,
|
||||||
|
size: 24,
|
||||||
|
color: Color.fromARGB(255, 8, 39, 92),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
IconButton(
|
||||||
|
onPressed: () async {
|
||||||
|
await provider.initConfigData().then({
|
||||||
|
// Navigator.push(
|
||||||
|
// context,
|
||||||
|
// MaterialPageRoute(
|
||||||
|
// builder: (BuildContext context) =>
|
||||||
|
// EditInteractionScreen(
|
||||||
|
// saveInteraction: provider
|
||||||
|
// .savedList[index],
|
||||||
|
// )))
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (BuildContext context) =>
|
||||||
|
EditInteractionScreen1(
|
||||||
|
saveInteraction: provider
|
||||||
|
.savedList[index],
|
||||||
|
)))
|
||||||
|
});
|
||||||
|
},
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.edit,
|
||||||
|
size: 24,
|
||||||
|
color: Color.fromARGB(255, 8, 39, 92),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// IconButton(
|
||||||
|
// onPressed: () {
|
||||||
|
// showDeleteRecordAlertDialog(
|
||||||
|
// context,
|
||||||
|
// provider.savedList[index].id,
|
||||||
|
// provider.savedList[index]);
|
||||||
|
// },
|
||||||
|
// icon: const Icon(
|
||||||
|
// Icons.delete,
|
||||||
|
// size: 24,
|
||||||
|
// color: Color.fromARGB(255, 8, 39, 92),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (BuildContext context) =>
|
||||||
|
ViewInteractionScreen1(
|
||||||
|
saveInteraction:
|
||||||
|
provider.savedList[index],
|
||||||
|
)));
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const Divider(),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,19 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:hive_flutter/hive_flutter.dart';
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_event_k2.dart';
|
||||||
import 'package:konectar_events/model/affiliationsmodel.dart';
|
import 'package:konectar_events/model/affiliationsmodel.dart';
|
||||||
|
import 'package:konectar_events/model/events_list_resp_2.dart';
|
||||||
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
||||||
import 'package:konectar_events/model/eventsmodel.dart';
|
import 'package:konectar_events/model/eventsmodel.dart';
|
||||||
import 'package:konectar_events/model/eventsoverview.dart';
|
import 'package:konectar_events/model/eventsoverview.dart';
|
||||||
|
import 'package:konectar_events/model/eventspeakers.dart';
|
||||||
import 'package:konectar_events/model/keywords_model.dart';
|
import 'package:konectar_events/model/keywords_model.dart';
|
||||||
|
import 'package:konectar_events/model/my_events_list_model.dart';
|
||||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||||
import 'package:konectar_events/model/scope_model.dart';
|
import 'package:konectar_events/model/scope_model.dart';
|
||||||
import 'package:konectar_events/model/sessionnotesmodel.dart';
|
import 'package:konectar_events/model/sessionnotesmodel.dart';
|
||||||
|
@ -21,43 +27,54 @@ class EventsProvider extends ChangeNotifier {
|
||||||
List<Keyword> keywordList = [];
|
List<Keyword> keywordList = [];
|
||||||
List<Therapeutic> therapeuticList = [];
|
List<Therapeutic> therapeuticList = [];
|
||||||
List<EventsList> eventList = [];
|
List<EventsList> eventList = [];
|
||||||
|
List<EventsListingData> neweventList = [];
|
||||||
List<EventsList> searchList = [];
|
List<EventsList> searchList = [];
|
||||||
List<EventsList> myEvents = [];
|
List<EventsList> myEvents = [];
|
||||||
|
List<EventsList> offlineEvents = [];
|
||||||
List<Eventsdetail> eventdetailList = [];
|
List<Eventsdetail> eventdetailList = [];
|
||||||
List<Eventsdetail> srcheventdetailList = [];
|
List<Eventsdetail> srcheventdetailList = [];
|
||||||
List<String> selectedTherapeutic = [];
|
List<String> selectedTherapeutic = [];
|
||||||
List<SessionNotesModel> addedSessionNotes = [];
|
List<SessionNotesModel> addedSessionNotes = [];
|
||||||
|
List<SpeakersList> speakersList = [];
|
||||||
|
List<String> myEventids = [];
|
||||||
|
bool showCheckbox = false;
|
||||||
|
bool offlineExists = false;
|
||||||
int eventSessionCount = 0;
|
int eventSessionCount = 0;
|
||||||
String message = "";
|
String message = "";
|
||||||
|
int speakercount = 0;
|
||||||
late Box<EventsList> box;
|
late Box<EventsList> box;
|
||||||
|
// late Box<MyEventsList> myeventsbox;
|
||||||
late Box<SessionNotesModel> sessionBox;
|
late Box<SessionNotesModel> sessionBox;
|
||||||
bool isAllSelected = true;
|
bool isAllSelected = true;
|
||||||
bool isFavSeleted = false;
|
bool isFavSeleted = true;
|
||||||
bool isSearch = false;
|
bool isSearch = false;
|
||||||
bool isSearchSpeakers = false;
|
bool isSearchSpeakers = false;
|
||||||
List<FlutterHashtag> kFlutterHashtags = [];
|
List<FlutterHashtag> kFlutterHashtags = [];
|
||||||
List<TopicsCloudData> topics = [];
|
List<TopicsCloudData> topics = [];
|
||||||
List<Specialty> specialtyList = [];
|
List<Specialty> specialtyList = [];
|
||||||
OverviewData? overviewData;
|
OverviewData? overviewData;
|
||||||
Affiliations affiliations =
|
List<Affiliations> affiliations = [];
|
||||||
Affiliations(affiliationCount: [], affiliationNames: []);
|
|
||||||
|
|
||||||
onSelectAll() async {
|
late StreamSubscription<List<ConnectivityResult>> connectivitySubscription;
|
||||||
// isFavSeleted = false;
|
|
||||||
// isAllSelected = !isAllSelected;
|
Future<void> onSelectAll(int page) async {
|
||||||
eventList = await getEvents();
|
isFavSeleted = false;
|
||||||
|
isAllSelected = !isAllSelected;
|
||||||
|
eventList = await getEvents(page);
|
||||||
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
onSelectMy() async {
|
Future<void> onSelectMy() async {
|
||||||
// isFavSeleted = !isFavSeleted;
|
isFavSeleted = !isFavSeleted;
|
||||||
eventList = await getMyEventsData();
|
eventList = [];
|
||||||
|
eventList = await getMyEvents(1);
|
||||||
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
OnSearch(String searchtxt) {
|
OnSearch(String searchtxt) async {
|
||||||
|
print("Searching.......");
|
||||||
// searchtxt = searchtxt.toLowerCase();
|
// searchtxt = searchtxt.toLowerCase();
|
||||||
isSearch = true;
|
isSearch = true;
|
||||||
if (isFavSeleted) {
|
if (isFavSeleted) {
|
||||||
|
@ -71,25 +88,45 @@ class EventsProvider extends ChangeNotifier {
|
||||||
// element.country!.toLowerCase().contains(searchtxt)))
|
// element.country!.toLowerCase().contains(searchtxt)))
|
||||||
.toList();
|
.toList();
|
||||||
} else {
|
} else {
|
||||||
searchList = eventList
|
eventList =
|
||||||
.where((element) => element.name1!.toLowerCase().contains(searchtxt))
|
await ApiCall().getSearchedEventsFromK2(1, "event_name", searchtxt);
|
||||||
// element.city!.toLowerCase().contains(searchtxt) ||
|
// searchList = eventList
|
||||||
// element.region!.toLowerCase().contains(searchtxt) ||
|
// .where((element) => element.name1!.toLowerCase().contains(searchtxt))
|
||||||
// element.country!.toLowerCase().contains(searchtxt))
|
// // element.city!.toLowerCase().contains(searchtxt) ||
|
||||||
.toList();
|
// // element.region!.toLowerCase().contains(searchtxt) ||
|
||||||
|
// // element.country!.toLowerCase().contains(searchtxt))
|
||||||
|
// .toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
print("###$searchList@@@");
|
print("###$searchList@@@");
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
getSessionCount() {
|
bool ifOfflineExists(String eventid) {
|
||||||
|
if (offlineEvents.isNotEmpty) {
|
||||||
|
offlineEvents.forEach(
|
||||||
|
(element) {
|
||||||
|
if (element.eventId == eventid) {
|
||||||
|
offlineExists = true;
|
||||||
|
} else {
|
||||||
|
offlineExists = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return offlineExists;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> getSessionCount(String eventid, String event_unique_id) async {
|
||||||
List<String> sessions = [];
|
List<String> sessions = [];
|
||||||
eventSessionCount = 0;
|
eventSessionCount = 0;
|
||||||
for (var obj in eventdetailList) {
|
Map<String, dynamic> data =
|
||||||
sessions.addAll(obj.sessionName!.split(','));
|
(await ApiCall().getSpeakersFromK2(0, eventid, event_unique_id));
|
||||||
|
speakercount = data["count"];
|
||||||
eventSessionCount += int.parse(obj.numSess ?? "0");
|
List<SpeakersList> speakersList = data["list"];
|
||||||
|
for (var obj in speakersList) {
|
||||||
|
sessions.addAll(obj.sessionNames!);
|
||||||
}
|
}
|
||||||
print("Count ${sessions.toSet().toList().length}");
|
print("Count ${sessions.toSet().toList().length}");
|
||||||
print("Count2 ${sessions.toList().length}");
|
print("Count2 ${sessions.toList().length}");
|
||||||
|
@ -118,9 +155,9 @@ class EventsProvider extends ChangeNotifier {
|
||||||
|
|
||||||
onFilterReset() async {
|
onFilterReset() async {
|
||||||
if (isFavSeleted) {
|
if (isFavSeleted) {
|
||||||
eventList = await getMyEventsData();
|
myEvents = await getMyEvents(1);
|
||||||
} else {
|
} else {
|
||||||
eventList = await getEvents();
|
eventList = await getEvents(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
isSearch = false;
|
isSearch = false;
|
||||||
|
@ -131,9 +168,9 @@ class EventsProvider extends ChangeNotifier {
|
||||||
|
|
||||||
onSearchReset() async {
|
onSearchReset() async {
|
||||||
if (isFavSeleted) {
|
if (isFavSeleted) {
|
||||||
eventList = await getMyEventsData();
|
myEvents = await getMyEvents(1);
|
||||||
} else {
|
} else {
|
||||||
eventList = await getEvents();
|
eventList = await getEvents(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
isSearch = false;
|
isSearch = false;
|
||||||
|
@ -176,16 +213,53 @@ class EventsProvider extends ChangeNotifier {
|
||||||
//notifyListeners();
|
//notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<EventsList>> getEvents() async {
|
Future<List<EventsList>> getEvents(int page,
|
||||||
eventList = await getAllEventsData();
|
{String? searchtxt, String? startdate, String? enddate}) async {
|
||||||
|
// eventList = await getAllEventsData();
|
||||||
|
|
||||||
|
eventList.clear();
|
||||||
|
eventList = [];
|
||||||
|
|
||||||
|
offlineEvents = await getOfflineMyEvents();
|
||||||
|
eventList = isFavSeleted
|
||||||
|
? await ApiCall().getEventsFromK1(type: "2")
|
||||||
|
: await ApiCall().getEventsFromK1();
|
||||||
|
print("see the list : $neweventList");
|
||||||
if (eventList.isEmpty) {
|
if (eventList.isEmpty) {
|
||||||
eventList = (await ApiCall().getEvents())!;
|
// eventList = (await ApiCall().getEvents())!;
|
||||||
|
eventList = isFavSeleted
|
||||||
|
? await ApiCall().getEventsFromK1(type: "2")
|
||||||
|
: await ApiCall().getEventsFromK1();
|
||||||
//eventList = (await ApiCall().getStagingEvents())!;
|
//eventList = (await ApiCall().getStagingEvents())!;
|
||||||
for (var events in eventList) {
|
for (var events in eventList) {
|
||||||
await saveEventsData(events);
|
await saveEventsData(events);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (myEventids.isNotEmpty) {
|
||||||
|
for (var events in eventList) {
|
||||||
|
if (myEventids.contains(events.eventId)) {
|
||||||
|
events.isfav = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return eventList;
|
return eventList;
|
||||||
|
|
||||||
|
//notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<EventsList>> getMyEvents(int page) async {
|
||||||
|
// eventList = await getAllEventsData();
|
||||||
|
myEvents = await ApiCall().getEventsFromK1(type: "2");
|
||||||
|
print("see the list : $myEvents");
|
||||||
|
if (myEvents.isEmpty) {
|
||||||
|
// eventList = (await ApiCall().getEvents())!;
|
||||||
|
myEvents = await ApiCall().getEventsFromK1(type: "2");
|
||||||
|
//eventList = (await ApiCall().getStagingEvents())!;
|
||||||
|
}
|
||||||
|
for (var events in myEvents) {
|
||||||
|
myEventids.add(events.eventId!);
|
||||||
|
}
|
||||||
|
return myEvents;
|
||||||
//notifyListeners();
|
//notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,14 +283,50 @@ class EventsProvider extends ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<Eventsdetail>> getEventsDetails(String eventid) async {
|
Future<List<Eventsdetail>> getEventsDetails(String eventid) async {
|
||||||
eventdetailList = (await ApiCall().getLocalEventsDetail(eventid))!;
|
eventdetailList = (await ApiCall().getLocalEventsDetail("142682"))!;
|
||||||
return eventdetailList;
|
return eventdetailList;
|
||||||
//notifyListeners();
|
//notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> addEventsToFavs(String eventid) async {
|
Future<List<SpeakersList>> getSpeakersDetails(int page, String eventid,
|
||||||
message = await ApiCall().addEventsToFav(eventid);
|
String event_unique_id, String searchkey) async {
|
||||||
|
Map<String, dynamic> data = (await ApiCall().getSpeakersFromK2(
|
||||||
|
page, eventid, event_unique_id,
|
||||||
|
searchkey: searchkey));
|
||||||
|
// speakercount = data["count"];
|
||||||
|
speakersList = data["list"];
|
||||||
|
// getSessionCount();
|
||||||
|
return speakersList;
|
||||||
|
//notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<String> addEventsToFavs(String eventid) async {
|
||||||
|
message = await ApiCall().followUnfollowEvent("1", eventid);
|
||||||
|
if (myEventids.isNotEmpty) {
|
||||||
|
if (!myEventids.contains(eventid)) {
|
||||||
|
myEventids.add(eventid);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
myEventids.add(eventid);
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
//notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<String> attendNotAttendEvent(String eventid, String flag) async {
|
||||||
|
message = await ApiCall().attendNotAttendEvent(flag, eventid);
|
||||||
|
|
||||||
|
return message;
|
||||||
|
//notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<String> removeEventsToFavs(String eventid) async {
|
||||||
|
message = await ApiCall().followUnfollowEvent("0", eventid);
|
||||||
|
if (myEventids.isNotEmpty) {
|
||||||
|
if (myEventids.contains(eventid)) {
|
||||||
|
myEventids.remove(eventid);
|
||||||
|
}
|
||||||
|
}
|
||||||
return message;
|
return message;
|
||||||
//notifyListeners();
|
//notifyListeners();
|
||||||
}
|
}
|
||||||
|
@ -231,7 +341,9 @@ class EventsProvider extends ChangeNotifier {
|
||||||
box = await Hive.openBox<EventsList>('EventsListBox');
|
box = await Hive.openBox<EventsList>('EventsListBox');
|
||||||
|
|
||||||
box.add(eventsData);
|
box.add(eventsData);
|
||||||
List<EventsList> eventsData2 = await getMyEventsData();
|
offlineEvents.clear();
|
||||||
|
offlineEvents = await getOfflineMyEvents();
|
||||||
|
print("OFFLINE TOTAL :${offlineEvents.length}");
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,26 +354,11 @@ class EventsProvider extends ChangeNotifier {
|
||||||
(element) => element.eventId == eventsData.eventId,
|
(element) => element.eventId == eventsData.eventId,
|
||||||
);
|
);
|
||||||
box.putAt(index, eventsData);
|
box.putAt(index, eventsData);
|
||||||
List<EventsList> eventsData2 = await getMyEventsData();
|
// List<EventsList> eventsData2 = await getMyEventsData();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<EventsList>> getMyEventsData() async {
|
Future<List<EventsList>> getOfflineMyEvents() async {
|
||||||
box = await Hive.openBox<EventsList>('EventsListBox');
|
|
||||||
Iterable<EventsList> data = box.values;
|
|
||||||
myEvents = data
|
|
||||||
.where(
|
|
||||||
(element) => element.isfav == true,
|
|
||||||
)
|
|
||||||
.toList();
|
|
||||||
// EventsList eventsdata = EventsList();
|
|
||||||
// for (var obj in data) {
|
|
||||||
// eventsdata = new EventsList.fromJson(obj.toJson());
|
|
||||||
// }
|
|
||||||
return myEvents;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<List<EventsList>> getAllEventsData() async {
|
|
||||||
box = await Hive.openBox<EventsList>('EventsListBox');
|
box = await Hive.openBox<EventsList>('EventsListBox');
|
||||||
Iterable<EventsList> data = box.values;
|
Iterable<EventsList> data = box.values;
|
||||||
myEvents = data.toList();
|
myEvents = data.toList();
|
||||||
|
@ -288,7 +385,7 @@ class EventsProvider extends ChangeNotifier {
|
||||||
box.clear();
|
box.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
FutureOr delateEventsData(EventsList event) async {
|
FutureOr delateOfflineEvent(EventsList event) async {
|
||||||
//DELETE
|
//DELETE
|
||||||
// box = await Hive.openBox<EventsList>('EventsListBox');
|
// box = await Hive.openBox<EventsList>('EventsListBox');
|
||||||
// List<EventsList> data = box.values.toList();
|
// List<EventsList> data = box.values.toList();
|
||||||
|
@ -303,8 +400,11 @@ class EventsProvider extends ChangeNotifier {
|
||||||
(element) => element.eventId == event.eventId,
|
(element) => element.eventId == event.eventId,
|
||||||
);
|
);
|
||||||
event.isfav = false;
|
event.isfav = false;
|
||||||
box.putAt(index, event);
|
// box.putAt(index, event);
|
||||||
eventList = await getMyEventsData();
|
box.deleteAt(index);
|
||||||
|
//eventList = await getMyEventsData();
|
||||||
|
offlineEvents.clear();
|
||||||
|
offlineEvents = await getOfflineMyEvents();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,9 +416,9 @@ class EventsProvider extends ChangeNotifier {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
FutureOr getTopicsCloud(String eventid) async {
|
FutureOr getTopicsCloud(EventsList event) async {
|
||||||
List<TopicsCloudData> topics =
|
List<TopicsCloudData> topics = (await ApiCall().insightsTopicsCloud(
|
||||||
(await ApiCall().getTopicsCloudData(eventid))!;
|
eventid: event.eventId!, startDate: event.start!, endDate: event.end!));
|
||||||
// for (var events in eventList) {
|
// for (var events in eventList) {
|
||||||
// await saveEventsData(events);
|
// await saveEventsData(events);
|
||||||
// }
|
// }
|
||||||
|
@ -332,14 +432,16 @@ class EventsProvider extends ChangeNotifier {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
FutureOr getSpecialtyData(String eventid) async {
|
FutureOr getSpecialtyData(EventsList event) async {
|
||||||
specialtyList = (await ApiCall().getSpecialty(eventid))!;
|
specialtyList = (await ApiCall().specialtyOfSpeakers(
|
||||||
|
eventid: event.eventId!, startDate: event.start!, endDate: event.end!));
|
||||||
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
FutureOr getAffiliations(String eventid) async {
|
FutureOr getAffiliations(EventsList event) async {
|
||||||
affiliations = (await ApiCall().getSpeakerCounts(eventid))!;
|
affiliations = (await ApiCall().insightsBarChart(
|
||||||
|
eventid: event.eventId!, startDate: event.start!, endDate: event.end!));
|
||||||
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
@ -351,4 +453,6 @@ class EventsProvider extends ChangeNotifier {
|
||||||
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//INTERNET CONNECTIVITY
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import 'dart:math';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:hive_flutter/hive_flutter.dart';
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
||||||
|
import 'package:konectar_events/model/eventspeakers.dart';
|
||||||
import 'package:konectar_events/model/sessionnotesmodel.dart';
|
import 'package:konectar_events/model/sessionnotesmodel.dart';
|
||||||
import 'package:konectar_events/model/topics_cloud_model.dart';
|
import 'package:konectar_events/model/topics_cloud_model.dart';
|
||||||
import 'package:konectar_events/utils/apicall.dart';
|
import 'package:konectar_events/utils/apicall.dart';
|
||||||
|
@ -33,9 +34,9 @@ class HcpProfileProvider extends ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
List<SessionNotesModel> getSessionNotesList(
|
List<SessionNotesModel> getSessionNotesList(
|
||||||
String eid, Eventsdetail eventsdetail) {
|
String eid, SpeakersList eventsdetail) {
|
||||||
print("Check hcp id");
|
print("Check hcp id");
|
||||||
print("$eid,${eventsdetail.kolId}");
|
print("$eid,${eventsdetail.uniqueId}");
|
||||||
sessionNotesList = sessionNotesList
|
sessionNotesList = sessionNotesList
|
||||||
.where(
|
.where(
|
||||||
(element) => element.eventid == eid,
|
(element) => element.eventid == eid,
|
||||||
|
@ -50,10 +51,10 @@ class HcpProfileProvider extends ChangeNotifier {
|
||||||
String fname = element.hcpname!.split(" ")[0];
|
String fname = element.hcpname!.split(" ")[0];
|
||||||
String lname = element.hcpname!.split(" ").last;
|
String lname = element.hcpname!.split(" ").last;
|
||||||
print("${element.hcpname}");
|
print("${element.hcpname}");
|
||||||
return fname.toLowerCase() == eventsdetail.firstName!.toLowerCase() &&
|
return fname.toLowerCase() == eventsdetail.hcpFullName!.toLowerCase() &&
|
||||||
lname.toLowerCase() == eventsdetail.lastName!.toLowerCase();
|
lname.toLowerCase() == eventsdetail.hcpFullName!.toLowerCase();
|
||||||
} else {
|
} else {
|
||||||
return element.hcpid == eventsdetail.kolId;
|
return element.hcpid == eventsdetail.uniqueId;
|
||||||
}
|
}
|
||||||
}).toList();
|
}).toList();
|
||||||
totalNotes = sessionNotesList.length;
|
totalNotes = sessionNotesList.length;
|
||||||
|
|
|
@ -0,0 +1,325 @@
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hive_flutter/hive_flutter.dart';
|
||||||
|
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
||||||
|
import 'package:konectar_events/model/eventsmodel.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/topics_cloud_model.dart';
|
||||||
|
import 'package:konectar_events/utils/apicall.dart';
|
||||||
|
import 'package:konectar_events/utils/dateformater.dart';
|
||||||
|
import 'package:konectar_events/widgets/word_cloud.dart';
|
||||||
|
|
||||||
|
class EventsOfflineProvider extends ChangeNotifier {
|
||||||
|
List<Keyword> keywordList = [];
|
||||||
|
List<Therapeutic> therapeuticList = [];
|
||||||
|
List<EventsList> eventList = [];
|
||||||
|
List<EventsList> searchList = [];
|
||||||
|
List<EventsList> myEvents = [];
|
||||||
|
List<Eventsdetail> eventdetailList = [];
|
||||||
|
List<Eventsdetail> srcheventdetailList = [];
|
||||||
|
List<String> selectedTherapeutic = [];
|
||||||
|
List<SessionNotesModel> addedSessionNotes = [];
|
||||||
|
int eventSessionCount = 0;
|
||||||
|
String message = "";
|
||||||
|
late Box<EventsList> box;
|
||||||
|
late Box<SessionNotesModel> sessionBox;
|
||||||
|
bool isAllSelected = true;
|
||||||
|
bool isFavSeleted = false;
|
||||||
|
bool isSearch = false;
|
||||||
|
bool isSearchSpeakers = false;
|
||||||
|
List<FlutterHashtag> kFlutterHashtags = [];
|
||||||
|
List<TopicsCloudData> topics = [];
|
||||||
|
|
||||||
|
onSelectAll() async {
|
||||||
|
// isFavSeleted = false;
|
||||||
|
// isAllSelected = !isAllSelected;
|
||||||
|
eventList = await getEvents();
|
||||||
|
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
onSelectMy() async {
|
||||||
|
// isFavSeleted = !isFavSeleted;
|
||||||
|
eventList = await getMyEventsData();
|
||||||
|
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
OnSearch(String searchtxt) {
|
||||||
|
// searchtxt = searchtxt.toLowerCase();
|
||||||
|
isSearch = true;
|
||||||
|
if (isFavSeleted) {
|
||||||
|
searchList = eventList
|
||||||
|
.where((element) => element.name1!.toLowerCase().contains(searchtxt))
|
||||||
|
// (element.city != "" &&
|
||||||
|
// element.city!.toLowerCase().contains(searchtxt)) ||
|
||||||
|
// (element.region != "" &&
|
||||||
|
// element.region!.toLowerCase().contains(searchtxt)) ||
|
||||||
|
// (element.country != "" &&
|
||||||
|
// element.country!.toLowerCase().contains(searchtxt)))
|
||||||
|
.toList();
|
||||||
|
} else {
|
||||||
|
searchList = eventList
|
||||||
|
.where((element) => element.name1!.toLowerCase().contains(searchtxt))
|
||||||
|
// element.city!.toLowerCase().contains(searchtxt) ||
|
||||||
|
// element.region!.toLowerCase().contains(searchtxt) ||
|
||||||
|
// element.country!.toLowerCase().contains(searchtxt))
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
print("###$searchList@@@");
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
getSessionCount() {
|
||||||
|
List<String> sessions = [];
|
||||||
|
eventSessionCount = 0;
|
||||||
|
for (var obj in eventdetailList) {
|
||||||
|
sessions.addAll(obj.sessionName!.split(','));
|
||||||
|
|
||||||
|
eventSessionCount += int.parse(obj.numSess ?? "0");
|
||||||
|
}
|
||||||
|
print("Count ${sessions.toSet().toList().length}");
|
||||||
|
print("Count2 ${sessions.toList().length}");
|
||||||
|
print("SEE SESSIONS ${sessions.toSet().toList()}");
|
||||||
|
eventSessionCount = sessions.toSet().toList().length;
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
OnFilters() {
|
||||||
|
isSearch = true;
|
||||||
|
if (isFavSeleted) {
|
||||||
|
searchList = myEvents
|
||||||
|
.where((element) =>
|
||||||
|
selectedTherapeutic.contains(element.therapeuticArea))
|
||||||
|
.toList();
|
||||||
|
} else {
|
||||||
|
searchList = myEvents
|
||||||
|
.where((element) =>
|
||||||
|
selectedTherapeutic.contains(element.therapeuticArea))
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
print("###$searchList@@@");
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
onFilterReset() async {
|
||||||
|
if (isFavSeleted) {
|
||||||
|
eventList = await getMyEventsData();
|
||||||
|
} else {
|
||||||
|
eventList = await getEvents();
|
||||||
|
}
|
||||||
|
|
||||||
|
isSearch = false;
|
||||||
|
|
||||||
|
searchList.clear();
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
onSearchReset() async {
|
||||||
|
if (isFavSeleted) {
|
||||||
|
eventList = await getMyEventsData();
|
||||||
|
} else {
|
||||||
|
eventList = await getEvents();
|
||||||
|
}
|
||||||
|
|
||||||
|
isSearch = false;
|
||||||
|
|
||||||
|
searchList.clear();
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
OnSearchSpeakers(String searchtxt) {
|
||||||
|
searchtxt = searchtxt.toLowerCase();
|
||||||
|
isSearchSpeakers = true;
|
||||||
|
|
||||||
|
srcheventdetailList = eventdetailList
|
||||||
|
.where((element) =>
|
||||||
|
element.kolFullName!.toLowerCase().contains(searchtxt) ||
|
||||||
|
element.eventTopics!.toLowerCase().contains(searchtxt))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
onSearchSpeakersReset(String eventid) async {
|
||||||
|
eventdetailList = await getEventsDetails(eventid);
|
||||||
|
|
||||||
|
isSearchSpeakers = false;
|
||||||
|
|
||||||
|
srcheventdetailList.clear();
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
initFiltersData() async {
|
||||||
|
// keywordList = await ApiCall().getkeywords('');
|
||||||
|
therapeuticList = await ApiCall().getscopes();
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<Keyword>> getKeywordList(String keyword) async {
|
||||||
|
keywordList = await ApiCall().getkeywords(keyword);
|
||||||
|
return keywordList;
|
||||||
|
//notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<EventsList>> getEvents() async {
|
||||||
|
eventList = await getAllEventsData();
|
||||||
|
if (eventList.isEmpty) {
|
||||||
|
eventList = (await ApiCall().getEvents())!;
|
||||||
|
for (var events in eventList) {
|
||||||
|
await saveEventsData(events);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return eventList;
|
||||||
|
//notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<SessionNotesModel>> getAddedSessionNotes() async {
|
||||||
|
addedSessionNotes = await getAllSessionNotesList();
|
||||||
|
if (addedSessionNotes.isEmpty && eventList.isNotEmpty) {
|
||||||
|
addedSessionNotes = (await ApiCall().getSessionNotes())!;
|
||||||
|
for (SessionNotesModel notes in addedSessionNotes) {
|
||||||
|
int i =
|
||||||
|
eventList.indexWhere((element) => element.name1 == notes.eventname);
|
||||||
|
if (i != -1) {
|
||||||
|
notes.eventid = eventList[i].eventId;
|
||||||
|
}
|
||||||
|
notes.addedBy = "user";
|
||||||
|
notes.addedDate = CustomDateFormatter().formatDate();
|
||||||
|
await saveSessionDataFromResp(notes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return addedSessionNotes;
|
||||||
|
//notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<Eventsdetail>> getEventsDetails(String eventid) async {
|
||||||
|
eventdetailList = (await ApiCall().getLocalEventsDetail(eventid))!;
|
||||||
|
return eventdetailList;
|
||||||
|
//notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<String> addEventsToFavs(String eventid) async {
|
||||||
|
message = await ApiCall().addEventsToFav(eventid);
|
||||||
|
|
||||||
|
return message;
|
||||||
|
//notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<String> markAttending(String eventid) async {
|
||||||
|
message = await ApiCall().attendEvents(eventid);
|
||||||
|
return message;
|
||||||
|
//notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
FutureOr saveEventsData(EventsList eventsData) async {
|
||||||
|
box = await Hive.openBox<EventsList>('EventsListBox');
|
||||||
|
|
||||||
|
box.add(eventsData);
|
||||||
|
List<EventsList> eventsData2 = await getMyEventsData();
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
FutureOr favsEventsData(EventsList eventsData) async {
|
||||||
|
box = await Hive.openBox<EventsList>('EventsListBox');
|
||||||
|
List<EventsList> data = box.values.toList();
|
||||||
|
int index = data.indexWhere(
|
||||||
|
(element) => element.eventId == eventsData.eventId,
|
||||||
|
);
|
||||||
|
box.putAt(index, eventsData);
|
||||||
|
List<EventsList> eventsData2 = await getMyEventsData();
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<EventsList>> getMyEventsData() async {
|
||||||
|
box = await Hive.openBox<EventsList>('EventsListBox');
|
||||||
|
Iterable<EventsList> data = box.values;
|
||||||
|
myEvents = data
|
||||||
|
.where(
|
||||||
|
(element) => element.isfav == true,
|
||||||
|
)
|
||||||
|
.toList();
|
||||||
|
// EventsList eventsdata = EventsList();
|
||||||
|
// for (var obj in data) {
|
||||||
|
// eventsdata = new EventsList.fromJson(obj.toJson());
|
||||||
|
// }
|
||||||
|
return myEvents;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<EventsList>> getAllEventsData() async {
|
||||||
|
box = await Hive.openBox<EventsList>('EventsListBox');
|
||||||
|
Iterable<EventsList> data = box.values;
|
||||||
|
myEvents = data.toList();
|
||||||
|
// EventsList eventsdata = EventsList();
|
||||||
|
// for (var obj in data) {
|
||||||
|
// eventsdata = new EventsList.fromJson(obj.toJson());
|
||||||
|
// }
|
||||||
|
return myEvents;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<List<SessionNotesModel>> getAllSessionNotesList() async {
|
||||||
|
sessionBox = await Hive.openBox<SessionNotesModel>('SessionNotesModelBox');
|
||||||
|
Iterable<SessionNotesModel> data = sessionBox.values;
|
||||||
|
addedSessionNotes = data.toList();
|
||||||
|
// EventsList eventsdata = EventsList();
|
||||||
|
// for (var obj in data) {
|
||||||
|
// eventsdata = new EventsList.fromJson(obj.toJson());
|
||||||
|
// }
|
||||||
|
return addedSessionNotes;
|
||||||
|
}
|
||||||
|
|
||||||
|
FutureOr deleteAllEventsData() async {
|
||||||
|
box = await Hive.openBox<EventsList>('EventsListBox');
|
||||||
|
box.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
FutureOr delateEventsData(EventsList event) async {
|
||||||
|
//DELETE
|
||||||
|
// box = await Hive.openBox<EventsList>('EventsListBox');
|
||||||
|
// List<EventsList> data = box.values.toList();
|
||||||
|
// int index = data.indexWhere(
|
||||||
|
// (element) => element.eventId == eventid,
|
||||||
|
// );
|
||||||
|
// await box.deleteAt(index);
|
||||||
|
//REMOVE FROM FAVS
|
||||||
|
box = await Hive.openBox<EventsList>('EventsListBox');
|
||||||
|
List<EventsList> data = box.values.toList();
|
||||||
|
int index = data.indexWhere(
|
||||||
|
(element) => element.eventId == event.eventId,
|
||||||
|
);
|
||||||
|
event.isfav = false;
|
||||||
|
box.putAt(index, event);
|
||||||
|
eventList = await getMyEventsData();
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
FutureOr saveSessionDataFromResp(SessionNotesModel notesModel) async {
|
||||||
|
sessionBox = await Hive.openBox<SessionNotesModel>('SessionNotesModelBox');
|
||||||
|
|
||||||
|
sessionBox.add(notesModel);
|
||||||
|
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
FutureOr getTopicsCloud(String eventid) async {
|
||||||
|
List<TopicsCloudData> topics =
|
||||||
|
(await ApiCall().getTopicsCloudData(eventid))!;
|
||||||
|
// for (var events in eventList) {
|
||||||
|
// await saveEventsData(events);
|
||||||
|
// }
|
||||||
|
//notifyListeners();
|
||||||
|
kFlutterHashtags = [];
|
||||||
|
for (var topic in topics) {
|
||||||
|
kFlutterHashtags
|
||||||
|
.add(FlutterHashtag(topic.topic!, int.parse(topic.total!), false));
|
||||||
|
}
|
||||||
|
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
|
@ -196,6 +196,7 @@ class _StringAutoCompleteTagsState extends State<StringAutoCompleteTags> {
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
//helperText: 'Enter language...',
|
//helperText: 'Enter language...',
|
||||||
helperStyle: const TextStyle(
|
helperStyle: const TextStyle(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
|
|
|
@ -42,22 +42,24 @@ class _HomeDrawerState extends State<HomeDrawer> {
|
||||||
|
|
||||||
void setDrawerListArray() {
|
void setDrawerListArray() {
|
||||||
drawerList = <DrawerList>[
|
drawerList = <DrawerList>[
|
||||||
DrawerList(
|
|
||||||
index: DrawerIndex.HOME,
|
|
||||||
labelName: 'Events',
|
|
||||||
//icon: Icon(Icons.home),
|
|
||||||
),
|
|
||||||
DrawerList(
|
DrawerList(
|
||||||
index: DrawerIndex.Help,
|
index: DrawerIndex.Help,
|
||||||
labelName: 'Contacts',
|
labelName: 'Contacts',
|
||||||
|
icon: Icon(Icons.account_circle),
|
||||||
// isAssetsImage: true,
|
// isAssetsImage: true,
|
||||||
// imageName: 'assets/images/supportIcon.png',
|
// imageName: 'assets/images/supportIcon.png',
|
||||||
),
|
),
|
||||||
// DrawerList(
|
DrawerList(
|
||||||
// index: DrawerIndex.FeedBack,
|
index: DrawerIndex.HOME,
|
||||||
// labelName: 'FeedBack',
|
labelName: 'Events',
|
||||||
// icon: Icon(Icons.help),
|
icon: Icon(Icons.event),
|
||||||
// ),
|
),
|
||||||
|
|
||||||
|
DrawerList(
|
||||||
|
index: DrawerIndex.FeedBack,
|
||||||
|
labelName: 'HelpDesk',
|
||||||
|
icon: Icon(Icons.help),
|
||||||
|
),
|
||||||
// DrawerList(
|
// DrawerList(
|
||||||
// index: DrawerIndex.Invite,
|
// index: DrawerIndex.Invite,
|
||||||
// labelName: 'Invite Friend',
|
// labelName: 'Invite Friend',
|
||||||
|
@ -95,68 +97,64 @@ class _HomeDrawerState extends State<HomeDrawer> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
AnimatedBuilder(
|
SizedBox(
|
||||||
animation: widget.iconAnimationController!,
|
height: 30,
|
||||||
builder: (BuildContext context, Widget? child) {
|
child: Image.asset(
|
||||||
return ScaleTransition(
|
"assets/images/konector_image_logo.png",
|
||||||
scale: AlwaysStoppedAnimation<double>(1.0 -
|
fit: BoxFit.cover,
|
||||||
(widget.iconAnimationController!.value) * 0.2),
|
|
||||||
child: RotationTransition(
|
|
||||||
turns: AlwaysStoppedAnimation<double>(Tween<double>(
|
|
||||||
begin: 0.0, end: 24.0)
|
|
||||||
.animate(CurvedAnimation(
|
|
||||||
parent: widget.iconAnimationController!,
|
|
||||||
curve: Curves.fastOutSlowIn))
|
|
||||||
.value /
|
|
||||||
360),
|
|
||||||
child: Container(
|
|
||||||
height: 100,
|
|
||||||
width: 100,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
shape: BoxShape.circle,
|
|
||||||
boxShadow: <BoxShadow>[
|
|
||||||
BoxShadow(
|
|
||||||
color: AppTheme.grey.withOpacity(0.6),
|
|
||||||
offset: const Offset(2.0, 4.0),
|
|
||||||
blurRadius: 8),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: ClipRRect(
|
|
||||||
borderRadius:
|
|
||||||
const BorderRadius.all(Radius.circular(60.0)),
|
|
||||||
child: CircleAvatar(
|
|
||||||
radius: 24,
|
|
||||||
backgroundColor: EventsConstants.blueColor,
|
|
||||||
// child: Icon(
|
|
||||||
// Icons.person,
|
|
||||||
// size: 18,
|
|
||||||
// color: Colors.white,
|
|
||||||
// ),
|
|
||||||
child: Text(
|
|
||||||
"S",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 24,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: Colors.white),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 8, left: 4),
|
|
||||||
child: Text(
|
|
||||||
'Snehalatha Desai',
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: isLightMode ? AppTheme.grey : AppTheme.white,
|
|
||||||
fontSize: 18,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
// AnimatedBuilder(
|
||||||
|
// animation: widget.iconAnimationController!,
|
||||||
|
// builder: (BuildContext context, Widget? child) {
|
||||||
|
// return ScaleTransition(
|
||||||
|
// scale: AlwaysStoppedAnimation<double>(1.0 -
|
||||||
|
// (widget.iconAnimationController!.value) * 0.2),
|
||||||
|
// child: RotationTransition(
|
||||||
|
// turns: AlwaysStoppedAnimation<double>(Tween<double>(
|
||||||
|
// begin: 0.0, end: 24.0)
|
||||||
|
// .animate(CurvedAnimation(
|
||||||
|
// parent: widget.iconAnimationController!,
|
||||||
|
// curve: Curves.fastOutSlowIn))
|
||||||
|
// .value /
|
||||||
|
// 360),
|
||||||
|
// child: Container(
|
||||||
|
// height: 100,
|
||||||
|
// width: 100,
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// shape: BoxShape.circle,
|
||||||
|
// boxShadow: <BoxShadow>[
|
||||||
|
// BoxShadow(
|
||||||
|
// color: AppTheme.grey.withOpacity(0.6),
|
||||||
|
// offset: const Offset(2.0, 4.0),
|
||||||
|
// blurRadius: 8),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// child: ClipRRect(
|
||||||
|
// borderRadius:
|
||||||
|
// const BorderRadius.all(Radius.circular(60.0)),
|
||||||
|
// child: CircleAvatar(
|
||||||
|
// radius: 24,
|
||||||
|
// backgroundColor: EventsConstants.blueColor,
|
||||||
|
// // child: Icon(
|
||||||
|
// // Icons.person,
|
||||||
|
// // size: 18,
|
||||||
|
// // color: Colors.white,
|
||||||
|
// // ),
|
||||||
|
// child: Text(
|
||||||
|
// "S",
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 24,
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// color: Colors.white),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -178,6 +176,17 @@ class _HomeDrawerState extends State<HomeDrawer> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 8, left: 4),
|
||||||
|
child: Text(
|
||||||
|
'Logged in as Snehalatha Desai',
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
color: isLightMode ? AppTheme.grey : AppTheme.white,
|
||||||
|
fontSize: 18,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
Divider(
|
Divider(
|
||||||
height: 1,
|
height: 1,
|
||||||
color: AppTheme.grey.withOpacity(0.6),
|
color: AppTheme.grey.withOpacity(0.6),
|
||||||
|
|
|
@ -66,7 +66,7 @@ class CustomPieChartState extends State<CustomPieChart> {
|
||||||
return Indicator(
|
return Indicator(
|
||||||
size: 10,
|
size: 10,
|
||||||
color: AppColors().appcolors[i],
|
color: AppColors().appcolors[i],
|
||||||
text: widget.specialtyList[i].specialtyName,
|
text: widget.specialtyList[i].specialtyName!,
|
||||||
isSquare: true,
|
isSquare: true,
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
|
@ -131,7 +131,7 @@ class CustomPieChartState extends State<CustomPieChart> {
|
||||||
List<PieChartSectionData> showingSections(List<Specialty> specialtyList) {
|
List<PieChartSectionData> showingSections(List<Specialty> specialtyList) {
|
||||||
double total = 0.0;
|
double total = 0.0;
|
||||||
for (var obj in specialtyList) {
|
for (var obj in specialtyList) {
|
||||||
total += double.parse(obj.specialtyCount);
|
total += double.parse(obj.specialtyCount!);
|
||||||
}
|
}
|
||||||
|
|
||||||
return List.generate(specialtyList.length, (i) {
|
return List.generate(specialtyList.length, (i) {
|
||||||
|
@ -141,10 +141,10 @@ class CustomPieChartState extends State<CustomPieChart> {
|
||||||
const shadows = [Shadow(color: Colors.black, blurRadius: 2)];
|
const shadows = [Shadow(color: Colors.black, blurRadius: 2)];
|
||||||
return PieChartSectionData(
|
return PieChartSectionData(
|
||||||
color: AppColors().appcolors[i],
|
color: AppColors().appcolors[i],
|
||||||
value: ((double.parse(specialtyList[i].specialtyCount) / total) * 100)
|
value: ((double.parse(specialtyList[i].specialtyCount!) / total) * 100)
|
||||||
.roundToDouble(),
|
.roundToDouble(),
|
||||||
title:
|
title:
|
||||||
'${((double.parse(specialtyList[i].specialtyCount) / total) * 100).roundToDouble()}%',
|
'${((double.parse(specialtyList[i].specialtyCount!) / total) * 100).floorToDouble()}%',
|
||||||
radius: radius,
|
radius: radius,
|
||||||
titleStyle: TextStyle(
|
titleStyle: TextStyle(
|
||||||
fontSize: fontSize,
|
fontSize: fontSize,
|
||||||
|
|
|
@ -1,75 +1,134 @@
|
||||||
PODS:
|
PODS:
|
||||||
- connectivity_plus (0.0.1):
|
- connectivity_plus (0.0.1):
|
||||||
- FlutterMacOS
|
- Flutter
|
||||||
- ReachabilitySwift
|
|
||||||
- device_info_plus (0.0.1):
|
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- file_selector_macos (0.0.1):
|
- file_selector_macos (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- flutter_inappwebview_macos (0.0.1):
|
- Firebase/CoreOnly (10.25.0):
|
||||||
|
- FirebaseCore (= 10.25.0)
|
||||||
|
- Firebase/RemoteConfig (10.25.0):
|
||||||
|
- Firebase/CoreOnly
|
||||||
|
- FirebaseRemoteConfig (~> 10.25.0)
|
||||||
|
- firebase_core (2.31.0):
|
||||||
|
- Firebase/CoreOnly (~> 10.25.0)
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- OrderedSet (~> 5.0)
|
- firebase_remote_config (4.4.5):
|
||||||
|
- Firebase/CoreOnly (~> 10.25.0)
|
||||||
|
- Firebase/RemoteConfig (~> 10.25.0)
|
||||||
|
- firebase_core
|
||||||
|
- FlutterMacOS
|
||||||
|
- FirebaseABTesting (10.28.0):
|
||||||
|
- FirebaseCore (~> 10.0)
|
||||||
|
- FirebaseCore (10.25.0):
|
||||||
|
- FirebaseCoreInternal (~> 10.0)
|
||||||
|
- GoogleUtilities/Environment (~> 7.12)
|
||||||
|
- GoogleUtilities/Logger (~> 7.12)
|
||||||
|
- FirebaseCoreInternal (10.28.0):
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 7.8)"
|
||||||
|
- FirebaseInstallations (10.28.0):
|
||||||
|
- FirebaseCore (~> 10.0)
|
||||||
|
- GoogleUtilities/Environment (~> 7.8)
|
||||||
|
- GoogleUtilities/UserDefaults (~> 7.8)
|
||||||
|
- PromisesObjC (~> 2.1)
|
||||||
|
- FirebaseRemoteConfig (10.25.0):
|
||||||
|
- FirebaseABTesting (~> 10.0)
|
||||||
|
- FirebaseCore (~> 10.0)
|
||||||
|
- FirebaseInstallations (~> 10.0)
|
||||||
|
- FirebaseRemoteConfigInterop (~> 10.23)
|
||||||
|
- FirebaseSharedSwift (~> 10.0)
|
||||||
|
- GoogleUtilities/Environment (~> 7.8)
|
||||||
|
- "GoogleUtilities/NSData+zlib (~> 7.8)"
|
||||||
|
- FirebaseRemoteConfigInterop (10.28.0)
|
||||||
|
- FirebaseSharedSwift (10.28.0)
|
||||||
- FlutterMacOS (1.0.0)
|
- FlutterMacOS (1.0.0)
|
||||||
- OrderedSet (5.0.0)
|
- GoogleUtilities/Environment (7.13.3):
|
||||||
- package_info_plus (0.0.1):
|
- GoogleUtilities/Privacy
|
||||||
- FlutterMacOS
|
- PromisesObjC (< 3.0, >= 1.2)
|
||||||
|
- GoogleUtilities/Logger (7.13.3):
|
||||||
|
- GoogleUtilities/Environment
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- "GoogleUtilities/NSData+zlib (7.13.3)":
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
|
- GoogleUtilities/Privacy (7.13.3)
|
||||||
|
- GoogleUtilities/UserDefaults (7.13.3):
|
||||||
|
- GoogleUtilities/Logger
|
||||||
|
- GoogleUtilities/Privacy
|
||||||
- path_provider_foundation (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- ReachabilitySwift (5.0.0)
|
- PromisesObjC (2.4.0)
|
||||||
- shared_preferences_foundation (0.0.1):
|
- shared_preferences_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- sqflite (0.0.3):
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
- url_launcher_macos (0.0.1):
|
- url_launcher_macos (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- connectivity_plus (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus/macos`)
|
- connectivity_plus (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus/darwin`)
|
||||||
- device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
|
|
||||||
- file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`)
|
- file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`)
|
||||||
- flutter_inappwebview_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_inappwebview_macos/macos`)
|
- firebase_core (from `Flutter/ephemeral/.symlinks/plugins/firebase_core/macos`)
|
||||||
|
- firebase_remote_config (from `Flutter/ephemeral/.symlinks/plugins/firebase_remote_config/macos`)
|
||||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||||
- package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
|
|
||||||
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
|
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||||
|
- sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/darwin`)
|
||||||
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
trunk:
|
trunk:
|
||||||
- OrderedSet
|
- Firebase
|
||||||
- ReachabilitySwift
|
- FirebaseABTesting
|
||||||
|
- FirebaseCore
|
||||||
|
- FirebaseCoreInternal
|
||||||
|
- FirebaseInstallations
|
||||||
|
- FirebaseRemoteConfig
|
||||||
|
- FirebaseRemoteConfigInterop
|
||||||
|
- FirebaseSharedSwift
|
||||||
|
- GoogleUtilities
|
||||||
|
- PromisesObjC
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
connectivity_plus:
|
connectivity_plus:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/connectivity_plus/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/connectivity_plus/darwin
|
||||||
device_info_plus:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos
|
|
||||||
file_selector_macos:
|
file_selector_macos:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos
|
||||||
flutter_inappwebview_macos:
|
firebase_core:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/flutter_inappwebview_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/firebase_core/macos
|
||||||
|
firebase_remote_config:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/firebase_remote_config/macos
|
||||||
FlutterMacOS:
|
FlutterMacOS:
|
||||||
:path: Flutter/ephemeral
|
:path: Flutter/ephemeral
|
||||||
package_info_plus:
|
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
|
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
|
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
|
||||||
shared_preferences_foundation:
|
shared_preferences_foundation:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
|
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
|
||||||
|
sqflite:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/sqflite/darwin
|
||||||
url_launcher_macos:
|
url_launcher_macos:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
connectivity_plus: 18d3c32514c886e046de60e9c13895109866c747
|
connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
|
||||||
device_info_plus: 5401765fde0b8d062a2f8eb65510fb17e77cf07f
|
|
||||||
file_selector_macos: 468fb6b81fac7c0e88d71317f3eec34c3b008ff9
|
file_selector_macos: 468fb6b81fac7c0e88d71317f3eec34c3b008ff9
|
||||||
flutter_inappwebview_macos: 9600c9df9fdb346aaa8933812009f8d94304203d
|
Firebase: 0312a2352584f782ea56f66d91606891d4607f06
|
||||||
|
firebase_core: fdf12e0c4349815c2e832d9dcad59fbff0ff394b
|
||||||
|
firebase_remote_config: 610707ec6f4efbf11225da2c6598e4b092962308
|
||||||
|
FirebaseABTesting: 589bc28c0ab3e5554336895a34aa262e24276665
|
||||||
|
FirebaseCore: 7ec4d0484817f12c3373955bc87762d96842d483
|
||||||
|
FirebaseCoreInternal: 58d07f1362fddeb0feb6a857d1d1d1c5e558e698
|
||||||
|
FirebaseInstallations: 60c1d3bc1beef809fd1ad1189a8057a040c59f2e
|
||||||
|
FirebaseRemoteConfig: 9f3935cefecd85d5b312192117f444957de24a75
|
||||||
|
FirebaseRemoteConfigInterop: 70d200c6956ef3b5c3592a95e824c1210682d785
|
||||||
|
FirebaseSharedSwift: 48de4aec81a6b79bb30404e5e6db43ea74848fed
|
||||||
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||||
OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
|
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
|
||||||
package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce
|
|
||||||
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
|
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
|
||||||
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
|
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
|
||||||
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
|
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
|
||||||
|
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
|
||||||
url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95
|
url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95
|
||||||
|
|
||||||
PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
|
PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
|
||||||
|
|
40
pubspec.lock
|
@ -41,6 +41,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.4.1"
|
version: "6.4.1"
|
||||||
|
animations:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: animations
|
||||||
|
sha256: d3d6dcfb218225bbe68e87ccf6378bbb2e32a94900722c5f81611dad089911cb
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.11"
|
||||||
archive:
|
archive:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -574,6 +582,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.0"
|
version: "0.2.0"
|
||||||
|
flutter_staggered_grid_view:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: flutter_staggered_grid_view
|
||||||
|
sha256: "19e7abb550c96fbfeb546b23f3ff356ee7c59a019a651f8f102a4ba9b7349395"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.7.0"
|
||||||
flutter_svg:
|
flutter_svg:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -768,6 +784,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.1+1"
|
version: "0.2.1+1"
|
||||||
|
infinite_scroll_pagination:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: infinite_scroll_pagination
|
||||||
|
sha256: b68bce20752fcf36c7739e60de4175494f74e99e9a69b4dd2fe3a1dd07a7f16a
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.0.0"
|
||||||
info_popup:
|
info_popup:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -952,6 +976,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.8"
|
version: "0.4.8"
|
||||||
|
overlay_support:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: overlay_support
|
||||||
|
sha256: fc39389bfd94e6985e1e13b2a88a125fc4027608485d2d4e2847afe1b2bb339c
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.0"
|
||||||
package_config:
|
package_config:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1269,6 +1301,14 @@ packages:
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.99"
|
version: "0.0.99"
|
||||||
|
sliver_tools:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: sliver_tools
|
||||||
|
sha256: eae28220badfb9d0559207badcbbc9ad5331aac829a88cb0964d330d2a4636a6
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.12"
|
||||||
source_gen:
|
source_gen:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -90,7 +90,9 @@ dependencies:
|
||||||
|
|
||||||
cached_network_image: ^3.4.0
|
cached_network_image: ^3.4.0
|
||||||
url_launcher: ^6.3.0
|
url_launcher: ^6.3.0
|
||||||
|
infinite_scroll_pagination: ^4.0.0
|
||||||
|
animations: ^2.0.11
|
||||||
|
overlay_support: ^2.1.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
|
||||||
|
@ -141,6 +143,8 @@ flutter:
|
||||||
- assets/contact.json
|
- assets/contact.json
|
||||||
- assets/section.json
|
- assets/section.json
|
||||||
- assets/images/
|
- assets/images/
|
||||||
|
- assets/icon/
|
||||||
|
- assets/introduction_animation/
|
||||||
- assets/response.json
|
- assets/response.json
|
||||||
- shorebird.yaml
|
- shorebird.yaml
|
||||||
- assets/
|
- assets/
|
||||||
|
|