634 lines
20 KiB
Dart
634 lines
20 KiB
Dart
import 'dart:async';
|
|
import 'dart:math';
|
|
|
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.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/allsessionnotesmodel.dart';
|
|
import 'package:konectar_events/model/events_details.dart';
|
|
import 'package:konectar_events/model/events_list_resp_2.dart';
|
|
import 'package:konectar_events/model/events_speakers_k1.dart';
|
|
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
|
import 'package:konectar_events/model/eventsmodel.dart';
|
|
import 'package:konectar_events/model/eventsoverview.dart';
|
|
import 'package:konectar_events/model/eventspeakers.dart';
|
|
import 'package:konectar_events/model/keywords_model.dart';
|
|
import 'package:konectar_events/model/my_events_list_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/specialtymodel.dart';
|
|
import 'package:konectar_events/model/topics_cloud_model.dart';
|
|
import 'package:konectar_events/utils/apicall.dart';
|
|
import 'package:konectar_events/utils/constants.dart';
|
|
import 'package:konectar_events/utils/dateformater.dart';
|
|
import 'package:konectar_events/viewmodel/hive_repository.dart';
|
|
import 'package:konectar_events/widgets/word_cloud.dart';
|
|
|
|
class EventsProvider extends ChangeNotifier {
|
|
List<Keyword> keywordList = [];
|
|
List<Therapeutic> therapeuticList = [];
|
|
List<EventsList> eventList = [];
|
|
List<EventsListingData> neweventList = [];
|
|
List<EventsList> searchList = [];
|
|
List<EventsList> myEvents = [];
|
|
List<EventsList> offlineEvents = [];
|
|
List<Eventsdetail> eventdetailList = [];
|
|
List<Eventsdetail> srcheventdetailList = [];
|
|
List<String> selectedTherapeutic = [];
|
|
List<SessionNotesModel> addedSessionNotes = [];
|
|
List<EventSpeakersData> speakersList = [];
|
|
List<String> myEventids = [];
|
|
bool showCheckbox = false;
|
|
bool offlineExists = false;
|
|
int eventSessionCount = 0;
|
|
String message = "";
|
|
int speakercount = 0;
|
|
late Box<EventsList> box;
|
|
// late Box<MyEventsList> myeventsbox;
|
|
late Box<SessionNotesModel> sessionBox;
|
|
bool isAllSelected = true;
|
|
bool isFavSeleted = true;
|
|
bool isSearch = false;
|
|
bool isSearchSpeakers = false;
|
|
List<FlutterHashtag> kFlutterHashtags = [];
|
|
List<TopicsCloudData> topics = [];
|
|
List<Specialty> specialtyList = [];
|
|
EventsOverviewData overviewData = EventsOverviewData(
|
|
arrEvents: [], topSpeakers: [], eventSponsers: [], eventTopics: []);
|
|
Affiliations affiliations =
|
|
Affiliations(affiliationCount: [], affiliationNames: []);
|
|
List<AllSessionNotesResponse> allSessionNotes = [];
|
|
late StreamSubscription<List<ConnectivityResult>> connectivitySubscription;
|
|
bool isLoadingInsights = true;
|
|
|
|
//ENABLE/DISABLE KEYS
|
|
bool enableFollow = false;
|
|
bool enableAttending = false;
|
|
bool enableDetails = false;
|
|
bool enableSpeakers = false;
|
|
bool enableInsights = false;
|
|
bool addOffline = false;
|
|
bool enableFilters = false;
|
|
var tabs = [
|
|
Tab(text: "Details"),
|
|
Tab(text: "Speakers"),
|
|
Tab(text: "Insights"),
|
|
// Tab(text: "Medical Insights"),
|
|
];
|
|
initConfigModules() async {
|
|
print("CONFIG_CALLED");
|
|
enableFollow = await HiveOperations.checkIfApiExists(
|
|
EventsConstants.followUnfollowEvent, EventsConstants.moduleName);
|
|
enableAttending = await HiveOperations.checkIfApiExists(
|
|
EventsConstants.attendNotAttendEvent, EventsConstants.moduleName);
|
|
enableDetails = await HiveOperations.checkIfApiExists(
|
|
EventsConstants.eventdetailsapi, EventsConstants.moduleName);
|
|
enableSpeakers = await HiveOperations.checkIfApiExists(
|
|
EventsConstants.speakerslistapi, EventsConstants.moduleName);
|
|
|
|
enableInsights = await HiveOperations.checkIfApiExists(
|
|
EventsConstants.insightsTopicsCloud, EventsConstants.moduleName);
|
|
addOffline = await HiveOperations.checkIfApiExists(
|
|
EventsConstants.saveEventOffline, EventsConstants.moduleName);
|
|
enableFilters = await HiveOperations.checkIfApiExists(
|
|
EventsConstants.filtersApi, EventsConstants.moduleName);
|
|
tabs.clear();
|
|
if (enableDetails) {
|
|
tabs.add(Tab(
|
|
text: "Details",
|
|
));
|
|
}
|
|
if (enableSpeakers) {
|
|
tabs.add(Tab(
|
|
text: "Speakers",
|
|
));
|
|
}
|
|
if (enableInsights) {
|
|
tabs.add(Tab(
|
|
text: "Insights",
|
|
));
|
|
}
|
|
notifyListeners();
|
|
}
|
|
|
|
Future<void> onSelectAll(int page) async {
|
|
isFavSeleted = false;
|
|
isAllSelected = !isAllSelected;
|
|
eventList = await getEvents(page);
|
|
|
|
notifyListeners();
|
|
}
|
|
|
|
Future<void> onSelectMy() async {
|
|
isFavSeleted = !isFavSeleted;
|
|
eventList = [];
|
|
eventList = await getMyEvents(1);
|
|
|
|
notifyListeners();
|
|
}
|
|
|
|
String getLocationDetails(EventsList event) {
|
|
List<String> loc = [];
|
|
if (event.city != null && event.city != "") {
|
|
loc.add(event.city!);
|
|
}
|
|
if (event.region != null && event.region != "") {
|
|
loc.add(event.region!);
|
|
}
|
|
if (event.country != null && event.country != "") {
|
|
loc.add(event.country!);
|
|
}
|
|
return loc.join(' , ');
|
|
// return 'hdgkhjagshjdgashjdgkjhsagdkjgasljkdgsajkgdhjksaghdjkasgdkjgaskjdlsak';
|
|
}
|
|
|
|
String getEventDate(EventsList event) {
|
|
String date =
|
|
'${CustomDateFormatter().formatYearDate(CustomDateFormatter().convertStringToDate(event.start!))} to ${CustomDateFormatter().formatYearDate(CustomDateFormatter().convertStringToDate(event.end!))}';
|
|
return date;
|
|
}
|
|
|
|
bool checkIfUserInterested(String eventid) {
|
|
bool user = false;
|
|
if (eventList.isNotEmpty) {
|
|
int index = eventList.indexWhere(
|
|
(element) => element.eventId == eventid,
|
|
);
|
|
print("FOR EVENT ID :$eventid : ${eventList[index].eventUserInterest}");
|
|
user = eventList[index].eventUserInterest ?? false;
|
|
}
|
|
return user;
|
|
}
|
|
|
|
List<EventsList> OnSearch(String searchtxt) {
|
|
print("Searching.......");
|
|
// // 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 {
|
|
// eventList =
|
|
// await ApiCall().getSearchedEventsFromK2(1, "event_name", searchtxt);
|
|
// // 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();
|
|
// }
|
|
|
|
List<EventsList> searchList = eventList
|
|
..where((element) => element.name1!.toLowerCase().contains(searchtxt));
|
|
return searchList;
|
|
// print("###$searchList@@@");
|
|
// notifyListeners();
|
|
}
|
|
|
|
bool ifOfflineExists(String eventid) {
|
|
if (offlineEvents.isNotEmpty) {
|
|
offlineEvents.forEach(
|
|
(element) {
|
|
if (element.eventId == eventid) {
|
|
offlineExists = true;
|
|
} else {
|
|
offlineExists = false;
|
|
}
|
|
},
|
|
);
|
|
}
|
|
|
|
return offlineExists;
|
|
}
|
|
|
|
getSessionCount() {
|
|
List<String> sessions = [];
|
|
eventSessionCount = 0;
|
|
|
|
for (var obj in speakersList) {
|
|
sessions.addAll(obj.sessionName!.split(','));
|
|
}
|
|
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) {
|
|
myEvents = await getMyEvents(1);
|
|
} else {
|
|
eventList = await getEvents(1);
|
|
}
|
|
|
|
isSearch = false;
|
|
|
|
searchList.clear();
|
|
notifyListeners();
|
|
}
|
|
|
|
onSearchReset() async {
|
|
if (isFavSeleted) {
|
|
myEvents = await getMyEvents(1);
|
|
} else {
|
|
eventList = await getEvents(1);
|
|
}
|
|
|
|
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(int page,
|
|
{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) {
|
|
// eventList = (await ApiCall().getEvents())!;
|
|
eventList = isFavSeleted
|
|
? await ApiCall().getEventsFromK1(type: 2)
|
|
: await ApiCall().getEventsFromK1();
|
|
//eventList = (await ApiCall().getStagingEvents())!;
|
|
for (var events in eventList) {
|
|
await saveEventsData(events);
|
|
}
|
|
}
|
|
|
|
if (searchtxt != "") {
|
|
return OnSearch(searchtxt!);
|
|
}
|
|
//add to favs old
|
|
if (myEventids.isNotEmpty) {
|
|
for (var events in eventList) {
|
|
if (myEventids.contains(events.eventId)) {
|
|
events.isfav = true;
|
|
}
|
|
}
|
|
}
|
|
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();
|
|
}
|
|
|
|
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("142682"))!;
|
|
return eventdetailList;
|
|
//notifyListeners();
|
|
}
|
|
|
|
Future<List<EventSpeakersData>> getInitialSpeakersDetails(String eventid,
|
|
{required String searchkey}) async {
|
|
speakersList = await ApiCall().getEventsSpeakersFromK1(eventid);
|
|
getSessionCount();
|
|
if (searchkey.length != 0) {
|
|
List<EventSpeakersData> searchspeakers = speakersList
|
|
.where((element) =>
|
|
element.kolFullName!.toLowerCase().contains(searchkey))
|
|
.toList();
|
|
|
|
if (searchspeakers.isEmpty) {
|
|
searchspeakers = speakersList
|
|
.where((element) =>
|
|
element.eventTopics!.toLowerCase().contains(searchkey))
|
|
.toList();
|
|
}
|
|
|
|
return searchspeakers;
|
|
} else {
|
|
return await ApiCall().getEventsSpeakersFromK1(eventid);
|
|
}
|
|
|
|
//return speakersList = (await ApiCall().getEventsSpeakersFromK1(eventid));
|
|
// notifyListeners();
|
|
}
|
|
|
|
Future<List<EventSpeakersData>> getSpeakersDetails(int page, String eventid,
|
|
String event_unique_id, String searchkey, int lastIndex) async {
|
|
// speakercount = data["count"];
|
|
speakersList = (await ApiCall().getEventsSpeakersFromK1(eventid));
|
|
// getSessionCount();
|
|
// if (speakersList.isEmpty) {
|
|
//
|
|
// }
|
|
if (page == 0) {
|
|
speakersList = speakersList.getRange(0, lastIndex).toList();
|
|
} else if (page > 0) {
|
|
int nextIndex = lastIndex + 40;
|
|
if (nextIndex < speakersList.length) {
|
|
speakersList = speakersList.getRange(lastIndex, nextIndex).toList();
|
|
} else {
|
|
speakersList =
|
|
speakersList.getRange(lastIndex, speakersList.length - 1).toList();
|
|
}
|
|
}
|
|
|
|
// if (searchkey.length != 0) {
|
|
// List<EventSpeakersData> searchspeakers = speakersList
|
|
// .where((element) =>
|
|
// element.kolFullName!.toLowerCase().contains(searchkey))
|
|
// .toList();
|
|
// return searchspeakers;
|
|
// } else {
|
|
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;
|
|
//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');
|
|
//check if already exists
|
|
box.add(eventsData);
|
|
offlineEvents.clear();
|
|
offlineEvents = await getOfflineMyEvents();
|
|
print("OFFLINE TOTAL :${offlineEvents.length}");
|
|
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>> getOfflineMyEvents() 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 delateOfflineEvent(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);
|
|
box.deleteAt(index);
|
|
//eventList = await getMyEventsData();
|
|
offlineEvents.clear();
|
|
offlineEvents = await getOfflineMyEvents();
|
|
notifyListeners();
|
|
}
|
|
|
|
FutureOr saveSessionDataFromResp(SessionNotesModel notesModel) async {
|
|
sessionBox = await Hive.openBox<SessionNotesModel>('SessionNotesModelBox');
|
|
|
|
sessionBox.add(notesModel);
|
|
|
|
notifyListeners();
|
|
}
|
|
|
|
FutureOr getTopicsCloud(EventsList event, {bool? client}) async {
|
|
List<TopicsCloudData> topics = await ApiCall().insightsTopicsCloud(
|
|
eventid: event.eventId!,
|
|
startDate: CustomDateFormatter().formatYearDate(
|
|
CustomDateFormatter().convertStringToDate(event.start!)),
|
|
endDate: CustomDateFormatter().formatYearDate(
|
|
CustomDateFormatter().convertStringToDate(event.end!)),
|
|
client: client ?? false);
|
|
// for (var events in eventList) {
|
|
// await saveEventsData(events);
|
|
// }
|
|
//notifyListeners();
|
|
kFlutterHashtags = [];
|
|
for (var topic in topics) {
|
|
kFlutterHashtags.add(
|
|
FlutterHashtag(topic.topic!, int.parse(topic.total!) + 500, false));
|
|
}
|
|
|
|
notifyListeners();
|
|
}
|
|
|
|
FutureOr getSpecialtyData(EventsList event, {bool? client}) async {
|
|
String date = CustomDateFormatter().formatYearDate(
|
|
CustomDateFormatter().convertStringToDate(event.start!));
|
|
print("Formatted_DATE :$date");
|
|
specialtyList = await ApiCall().specialtyOfSpeakers(
|
|
eventid: event.eventId!,
|
|
startDate: CustomDateFormatter().formatYearDate(
|
|
CustomDateFormatter().convertStringToDate(event.start!)),
|
|
endDate: CustomDateFormatter().formatYearDate(
|
|
CustomDateFormatter().convertStringToDate(event.end!)),
|
|
client: client ?? false);
|
|
//isLoadingInsights = false;
|
|
notifyListeners();
|
|
}
|
|
|
|
FutureOr getAffiliations(EventsList event, {bool? client}) async {
|
|
// isLoadingInsights = true;
|
|
affiliations = await ApiCall().insightsBarChart(
|
|
eventid: event.eventId!,
|
|
startDate: CustomDateFormatter().formatYearDate(
|
|
CustomDateFormatter().convertStringToDate(event.start!)),
|
|
endDate: CustomDateFormatter().formatYearDate(
|
|
CustomDateFormatter().convertStringToDate(event.end!)),
|
|
client: client ?? false);
|
|
//isLoadingInsights = false;
|
|
notifyListeners();
|
|
}
|
|
|
|
FutureOr getOverviewData(
|
|
String eventid, String startDate, String endDate) async {
|
|
overviewData =
|
|
(await ApiCall().getEventsOverview(eventid, startDate, endDate));
|
|
|
|
notifyListeners();
|
|
}
|
|
|
|
FutureOr getAllSessionNotesFromApi(String eid) async {
|
|
print("Check hcp id");
|
|
// print("$eid,$hcpid");
|
|
allSessionNotes = await ApiCall().getAllSessionNotes(eid);
|
|
notifyListeners();
|
|
}
|
|
|
|
FutureOr callInsightsDataForClientSpecific(
|
|
EventsList event, bool client) async {
|
|
await getTopicsCloud(event, client: client);
|
|
await getSpecialtyData(event, client: client);
|
|
await getAffiliations(event, client: client);
|
|
isLoadingInsights = false;
|
|
}
|
|
//INTERNET CONNECTIVITY
|
|
}
|