session notes crud,insights client specific ,updates #4
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
"id": "Form1",
|
||||
"name": "Interaction Form",
|
||||
|
||||
"form-fields": [
|
||||
{
|
||||
"sectionName": "Interaction Details",
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
{
|
||||
"id": "MedInsight",
|
||||
"name": "Medical Insights Form",
|
||||
|
||||
"form-fields": [
|
||||
|
||||
{
|
||||
"sectionName": "Medical Insight",
|
||||
"multiple": false,
|
||||
|
|
|
@ -6,6 +6,8 @@ import 'dart:convert';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:konectar_events/widgets/eventdetailscontainer.dart';
|
||||
import 'package:konectar_events/widgets/gridview.dart';
|
||||
part 'interaction_data.g.dart';
|
||||
|
||||
// InteractionResultData welcomeFromJson(String str) =>
|
||||
|
@ -43,6 +45,11 @@ class InteractionResultData {
|
|||
String id;
|
||||
@HiveField(2)
|
||||
String name;
|
||||
|
||||
//For MEd Insight required fields to send for syncing this data
|
||||
//eventid,speakerid,session name,...
|
||||
//For Int required fields to send for syncing this data
|
||||
//hcpid,medin id ,/.....
|
||||
InteractionResultData(
|
||||
{required this.result, required this.id, required this.name});
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ class InteractionScreen1 extends StatefulWidget {
|
|||
int index;
|
||||
String form;
|
||||
String? title;
|
||||
dynamic formdata;
|
||||
InteractionScreen1(
|
||||
{super.key, required this.index, required this.form, this.title});
|
||||
|
||||
|
|
|
@ -853,7 +853,7 @@ class ViewInteractionProvider extends ChangeNotifier {
|
|||
await getRecords(saveInteraction.form!);
|
||||
// box.close();
|
||||
|
||||
// await MockApiCall().postFormData(data);
|
||||
/// await MockApiCall().postFormData(data);
|
||||
}
|
||||
|
||||
Future<void> deleteRecord(SaveInteraction saveInteraction) async {
|
||||
|
|
|
@ -47,54 +47,54 @@ class AffiliationsResp {
|
|||
};
|
||||
}
|
||||
|
||||
List<Affiliations> affiliationsFromJson(String str) => List<Affiliations>.from(
|
||||
json.decode(str).map((x) => Affiliations.fromJson(x)));
|
||||
Affiliations affiliationsResponseFromJson(String str) =>
|
||||
Affiliations.fromJson(json.decode(str));
|
||||
|
||||
String affiliationsToJson(List<Affiliations> data) =>
|
||||
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||
|
||||
class Affiliations {
|
||||
String? id;
|
||||
String? orgCount;
|
||||
String? orgName;
|
||||
|
||||
Affiliations({
|
||||
this.id,
|
||||
this.orgCount,
|
||||
this.orgName,
|
||||
});
|
||||
|
||||
factory Affiliations.fromJson(Map<String, dynamic> json) => Affiliations(
|
||||
id: json["id"],
|
||||
orgCount: json["org_count"],
|
||||
orgName: json["org_name"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"id": id,
|
||||
"org_count": orgCount,
|
||||
"org_name": orgName,
|
||||
};
|
||||
}
|
||||
String affiliationsResponseToJson(Affiliations data) =>
|
||||
json.encode(data.toJson());
|
||||
|
||||
// class Affiliations {
|
||||
// List<String> affiliationNames;
|
||||
// List<String> affiliationCount;
|
||||
// String? id;
|
||||
// String? orgCount;
|
||||
// String? orgName;
|
||||
|
||||
// Affiliations({
|
||||
// required this.affiliationNames,
|
||||
// required this.affiliationCount,
|
||||
// this.id,
|
||||
// this.orgCount,
|
||||
// this.orgName,
|
||||
// });
|
||||
|
||||
// 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)),
|
||||
// id: json["id"],
|
||||
// orgCount: json["org_count"],
|
||||
// orgName: json["org_name"],
|
||||
// );
|
||||
|
||||
// Map<String, dynamic> toJson() => {
|
||||
// "affiliationNames": List<dynamic>.from(affiliationNames.map((x) => x)),
|
||||
// "affiliationCount": List<dynamic>.from(affiliationCount.map((x) => x)),
|
||||
// "id": id,
|
||||
// "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,96 @@
|
|||
// To parse this JSON data, do
|
||||
//
|
||||
// final allSessionNotesResponse = allSessionNotesResponseFromJson(jsonString);
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
String allSessionNotesResponseToJson(List<AllSessionNotesResponse> data) =>
|
||||
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||
|
||||
List<AllSessionNotesResponse> AllSessionNotesResponseFromJson(String str) {
|
||||
final jsonData = json.decode(str);
|
||||
return new List<AllSessionNotesResponse>.from(
|
||||
jsonData.map((x) => AllSessionNotesResponse.fromJson(x)));
|
||||
}
|
||||
|
||||
class AllSessionNotesResponse {
|
||||
List<List<dynamic>>? eventTopicNotesId;
|
||||
String? note;
|
||||
String? sessionName;
|
||||
String? eventTopics;
|
||||
String? userName;
|
||||
String? users;
|
||||
List<String>? notes;
|
||||
List<String>? createdOn;
|
||||
String? firstName;
|
||||
String? middleName;
|
||||
String? lastName;
|
||||
DateTime? notesCreatedOn;
|
||||
List<String>? addedBy;
|
||||
|
||||
AllSessionNotesResponse({
|
||||
this.eventTopicNotesId,
|
||||
this.note,
|
||||
this.sessionName,
|
||||
this.eventTopics,
|
||||
this.userName,
|
||||
this.users,
|
||||
this.notes,
|
||||
this.createdOn,
|
||||
this.firstName,
|
||||
this.middleName,
|
||||
this.lastName,
|
||||
this.notesCreatedOn,
|
||||
this.addedBy,
|
||||
});
|
||||
|
||||
factory AllSessionNotesResponse.fromJson(Map<String, dynamic> json) =>
|
||||
AllSessionNotesResponse(
|
||||
eventTopicNotesId: json["event_topic_notes_id"] == null
|
||||
? []
|
||||
: List<List<dynamic>>.from(json["event_topic_notes_id"]!
|
||||
.map((x) => List<dynamic>.from(x.map((x) => x)))),
|
||||
note: json["note"],
|
||||
sessionName: json["session_name"],
|
||||
eventTopics: json["event_topics"],
|
||||
userName: json["user_name"]!,
|
||||
users: json["users"],
|
||||
notes: json["notes"] == null
|
||||
? []
|
||||
: List<String>.from(json["notes"]!.map((x) => x)),
|
||||
createdOn: json["created_on"] == null
|
||||
? []
|
||||
: List<String>.from(json["created_on"]!.map((x) => x)),
|
||||
firstName: json["first_name"],
|
||||
middleName: json["middle_name"],
|
||||
lastName: json["last_name"],
|
||||
notesCreatedOn: json["notes_created_on"] == null
|
||||
? null
|
||||
: DateTime.parse(json["notes_created_on"]),
|
||||
addedBy: json["added_by"] == null
|
||||
? []
|
||||
: List<String>.from(json["added_by"]!.map((x) => x)),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"event_topic_notes_id": eventTopicNotesId == null
|
||||
? []
|
||||
: List<dynamic>.from(eventTopicNotesId!
|
||||
.map((x) => List<dynamic>.from(x.map((x) => x)))),
|
||||
"note": note,
|
||||
"session_name": sessionName,
|
||||
"event_topics": eventTopics,
|
||||
"user_name": userName,
|
||||
"users": users,
|
||||
"notes": notes == null ? [] : List<dynamic>.from(notes!.map((x) => x)),
|
||||
"created_on": createdOn == null
|
||||
? []
|
||||
: List<dynamic>.from(createdOn!.map((x) => x)),
|
||||
"first_name": firstName,
|
||||
"middle_name": middleName,
|
||||
"last_name": lastName,
|
||||
"notes_created_on": notesCreatedOn?.toIso8601String(),
|
||||
"added_by":
|
||||
addedBy == null ? [] : List<dynamic>.from(addedBy!.map((x) => x)),
|
||||
};
|
||||
}
|
|
@ -40,7 +40,7 @@ class EventsOverviewData {
|
|||
String? eventFor;
|
||||
String? eventId;
|
||||
List<TopSpeakers>? topSpeakers;
|
||||
dynamic eventTopics;
|
||||
List<EventTopic>? eventTopics;
|
||||
List<EventSponser>? eventSponsers;
|
||||
bool? eventUserAttendee;
|
||||
bool? eventUserInterest;
|
||||
|
@ -73,8 +73,11 @@ class EventsOverviewData {
|
|||
? []
|
||||
: List<TopSpeakers>.from(
|
||||
json["eventData"]!.map((x) => TopSpeakers.fromJson(x))),
|
||||
eventTopics: json["eventTopics"],
|
||||
eventSponsers: json["eventSponsers"] == null
|
||||
eventTopics: json["eventTopics"] == null
|
||||
? []
|
||||
: List<EventTopic>.from(
|
||||
json["eventTopics"]!.map((x) => EventTopic.fromJson(x))),
|
||||
eventSponsers: json["eventTopics"] == null
|
||||
? []
|
||||
: List<EventSponser>.from(
|
||||
json["eventSponsers"]!.map((x) => EventSponser.fromJson(x))),
|
||||
|
@ -297,6 +300,26 @@ class ArrEvent {
|
|||
};
|
||||
}
|
||||
|
||||
class EventTopic {
|
||||
String? numTopics;
|
||||
String? eventTopics;
|
||||
|
||||
EventTopic({
|
||||
this.numTopics,
|
||||
this.eventTopics,
|
||||
});
|
||||
|
||||
factory EventTopic.fromJson(Map<String, dynamic> json) => EventTopic(
|
||||
numTopics: json["num_topics"],
|
||||
eventTopics: json["event_topics"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"num_topics": numTopics,
|
||||
"event_topics": eventTopics,
|
||||
};
|
||||
}
|
||||
|
||||
@HiveType(typeId: HiveTypeIdConstants.topspeakersHiveId)
|
||||
class TopSpeakers {
|
||||
@HiveField(0)
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:konectar_events/utils/hivetypeids.dart';
|
||||
|
||||
@HiveType(typeId: HiveTypeIdConstants.hiveApiConstantsId)
|
||||
class HiveApiConstants {
|
||||
@HiveField(0)
|
||||
String? functionName;
|
||||
@HiveField(1)
|
||||
int? interval;
|
||||
|
||||
HiveApiConstants({this.functionName, this.interval});
|
||||
}
|
|
@ -10,6 +10,19 @@ SessionTopicsResponse sessionTopicsResponseFromJson(String str) =>
|
|||
String sessionTopicsResponseToJson(SessionTopicsResponse data) =>
|
||||
json.encode(data.toJson());
|
||||
|
||||
List<SessionsTopicsData> showSessionNotesResponseFromJson(String str) =>
|
||||
List<SessionsTopicsData>.from(
|
||||
json.decode(str).map((x) => SessionsTopicsData.fromJson(x)));
|
||||
|
||||
String showSessionNotesResponseToJson(List<SessionsTopicsData> data) =>
|
||||
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||
|
||||
List<SessionsTopicsData> SessionsTopicsDataFromJson(String str) {
|
||||
final jsonData = json.decode(str);
|
||||
return new List<SessionsTopicsData>.from(
|
||||
jsonData.map((x) => SessionsTopicsData.fromJson(x)));
|
||||
}
|
||||
|
||||
class SessionTopicsResponse {
|
||||
List<SessionsTopicsData>? data;
|
||||
|
||||
|
@ -44,7 +57,7 @@ class SessionsTopicsData {
|
|||
bool? canEditNotes;
|
||||
bool? canAddNotes;
|
||||
String? noteCount;
|
||||
String? projKolId;
|
||||
dynamic projKolId;
|
||||
bool? canAddInsights;
|
||||
bool? canEditInsights;
|
||||
|
||||
|
|
|
@ -46,12 +46,18 @@ class Specialtyresp {
|
|||
};
|
||||
}
|
||||
|
||||
List<Specialty> specialtyFromJson(String str) =>
|
||||
List<Specialty>.from(json.decode(str).map((x) => Specialty.fromJson(x)));
|
||||
// List<Specialty> specialtyFromJson(String str) =>
|
||||
// List<Specialty>.from(json.decode(str).map((x) => Specialty.fromJson(x)));
|
||||
// List<AllSessionNotesResponse>.from(json.decode(str).map((x) => AllSessionNotesResponse.fromJson(x)));
|
||||
|
||||
String specialtyToJson(List<Specialty> data) =>
|
||||
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||
|
||||
List<Specialty> specialtyFromJson(String str) {
|
||||
final jsonData = json.decode(str);
|
||||
return new List<Specialty>.from(jsonData.map((x) => Specialty.fromJson(x)));
|
||||
}
|
||||
|
||||
class Specialty {
|
||||
String? specialtyCount;
|
||||
String? specialtyName;
|
||||
|
|
|
@ -61,6 +61,34 @@ List<TopicsCloudData> topicsCloudDataFromJson(String str) =>
|
|||
String topicsCloudDataToJson(List<TopicsCloudData> data) =>
|
||||
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||||
|
||||
TopicCloudResponse topicCloudResponseFromJson(String str) =>
|
||||
TopicCloudResponse.fromJson(json.decode(str));
|
||||
|
||||
String topicCloudResponseToJson(TopicCloudResponse data) =>
|
||||
json.encode(data.toJson());
|
||||
|
||||
class TopicCloudResponse {
|
||||
List<TopicsCloudData>? resultData;
|
||||
|
||||
TopicCloudResponse({
|
||||
this.resultData,
|
||||
});
|
||||
|
||||
factory TopicCloudResponse.fromJson(Map<String, dynamic> json) =>
|
||||
TopicCloudResponse(
|
||||
resultData: json["resultData"] == null
|
||||
? []
|
||||
: List<TopicsCloudData>.from(
|
||||
json["resultData"]!.map((x) => TopicsCloudData.fromJson(x))),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"resultData": resultData == null
|
||||
? []
|
||||
: List<dynamic>.from(resultData!.map((x) => x.toJson())),
|
||||
};
|
||||
}
|
||||
|
||||
class TopicsCloudData {
|
||||
String? total;
|
||||
String? topic;
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:ffi';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:dio/io.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:konectar_events/model/affiliationsmodel.dart';
|
||||
import 'package:konectar_events/model/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';
|
||||
|
@ -104,7 +106,7 @@ class ApiCall {
|
|||
return keywordList;
|
||||
}
|
||||
|
||||
Future<List<EventsList>> getEventsFromK1({String? type}) async {
|
||||
Future<List<EventsList>> getEventsFromK1({int? type}) async {
|
||||
Dio dio = Dio();
|
||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||
(HttpClient client) {
|
||||
|
@ -115,24 +117,24 @@ class ApiCall {
|
|||
Response response;
|
||||
var formData = FormData.fromMap({
|
||||
"user_email": "vinodh@aissel.com",
|
||||
"project_id": "",
|
||||
"start": DateTime(2024, 10, 14).toIso8601String(),
|
||||
"end": DateTime(2024, 12, 14).toIso8601String(),
|
||||
"order_by": 7,
|
||||
"type": type ?? 1
|
||||
"start": "2024-12-05",
|
||||
"end": "2024-12-31",
|
||||
"order_by": 8,
|
||||
'type': type ?? 1
|
||||
});
|
||||
response = await dio.post(
|
||||
'${EventsConstants.devUrl}${EventsConstants.eventslistapi}',
|
||||
options: Options(),
|
||||
// queryParameters: {
|
||||
// "user_email": "vinodh@aissel.com",
|
||||
// "project_id": "",
|
||||
// "start": 2024 - 11 - 22,
|
||||
// "end": "",
|
||||
// "order_by": 7,
|
||||
// "type": 1,
|
||||
// },
|
||||
data: formData);
|
||||
// "end": DateTime(2024, 12, 14).toIso8601String(),
|
||||
response =
|
||||
await dio.post('${EventsConstants.url}${EventsConstants.eventslistapi}',
|
||||
options: Options(),
|
||||
// queryParameters: {
|
||||
// "user_email": "vinodh@aissel.com",
|
||||
// "project_id": "",
|
||||
// "start": 2024 - 11 - 22,
|
||||
// "end": "",
|
||||
// "order_by": 7,
|
||||
// "type": 1,
|
||||
// },
|
||||
data: formData);
|
||||
print("response user eventssssss here!!!!!!!!!!!!!!!!!!!!! ");
|
||||
print(response.data.toString());
|
||||
Map<String, dynamic> jsondata = json.decode(response.data);
|
||||
|
@ -154,7 +156,7 @@ class ApiCall {
|
|||
var formData = FormData.fromMap(
|
||||
{"user_email": "vinodh@aissel.com", "eid": eventid, "flag": flag});
|
||||
response = await dio.post(
|
||||
'${EventsConstants.devUrl}${EventsConstants.followUnfollowEvent}',
|
||||
'${EventsConstants.url}${EventsConstants.followUnfollowEvent}',
|
||||
options: Options(),
|
||||
queryParameters: {
|
||||
"user_email": "vinodh@aissel.com",
|
||||
|
@ -180,7 +182,7 @@ class ApiCall {
|
|||
var formData = FormData.fromMap(
|
||||
{"user_email": "vinodh@aissel.com", "eid": eventid, "flag": flag});
|
||||
response = await dio.post(
|
||||
'${EventsConstants.devUrl}${EventsConstants.attendNotAttendEvent}',
|
||||
'${EventsConstants.url}${EventsConstants.attendNotAttendEvent}',
|
||||
options: Options(),
|
||||
queryParameters: {
|
||||
"user_email": "vinodh@aissel.com",
|
||||
|
@ -198,8 +200,10 @@ class ApiCall {
|
|||
required String eventid,
|
||||
required String startDate,
|
||||
required String endDate,
|
||||
required bool client,
|
||||
}) async {
|
||||
print("CHECK_DATE $startDate $endDate $eventid");
|
||||
print(
|
||||
"FORMAT_CHECK_DATE $startDate $endDate $eventid ${DateTime(2024, 12, 03).toIso8601String()}");
|
||||
Dio dio = Dio();
|
||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||
(HttpClient client) {
|
||||
|
@ -209,39 +213,48 @@ class ApiCall {
|
|||
};
|
||||
Response response;
|
||||
//ventId=4937&type='1'&sd=2024-07-30&ed=2024-08-03&user_email=vinodh@aissel.com
|
||||
var formData = FormData.fromMap({
|
||||
"user_email": "vinodh@aissel.com",
|
||||
"eventId": eventid,
|
||||
"sd": startDate,
|
||||
"ed": endDate,
|
||||
"type": 1,
|
||||
});
|
||||
var formData;
|
||||
if (client) {
|
||||
formData = FormData.fromMap({
|
||||
"user_email": "vinodh@aissel.com",
|
||||
"eventId": eventid,
|
||||
"sd": startDate,
|
||||
"ed": endDate,
|
||||
"type": 1,
|
||||
"chart_type": "client"
|
||||
});
|
||||
} else {
|
||||
formData = FormData.fromMap({
|
||||
"user_email": "vinodh@aissel.com",
|
||||
"eventId": eventid,
|
||||
"sd": startDate,
|
||||
"ed": endDate,
|
||||
});
|
||||
}
|
||||
|
||||
print("FORMDATA:${formData.toString()},$startDate,$endDate");
|
||||
response = await dio.post(
|
||||
'${EventsConstants.devUrl}${EventsConstants.specialtyOfSpeakers}',
|
||||
'${EventsConstants.url}${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;
|
||||
List<Specialty> sdata = [];
|
||||
if (response.data != "null") {
|
||||
print(response.data.toString());
|
||||
sdata = specialtyFromJson(response.data.toString());
|
||||
}
|
||||
return sdata;
|
||||
}
|
||||
|
||||
Future<List<TopicsCloudData>> insightsTopicsCloud({
|
||||
required String eventid,
|
||||
required String startDate,
|
||||
required String endDate,
|
||||
}) async {
|
||||
Future<List<TopicsCloudData>> insightsTopicsCloud(
|
||||
{required String eventid,
|
||||
required String startDate,
|
||||
required String endDate,
|
||||
required bool client}) async {
|
||||
Dio dio = Dio();
|
||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||
(HttpClient client) {
|
||||
|
@ -250,39 +263,50 @@ class ApiCall {
|
|||
return client;
|
||||
};
|
||||
Response response;
|
||||
var formData = FormData.fromMap({
|
||||
"user_email": "vinodh@aissel.com",
|
||||
"eventId": eventid,
|
||||
"sd": "\"$startDate\"",
|
||||
"ed": "\"$endDate\"",
|
||||
"type": "\"1\"",
|
||||
});
|
||||
var formData;
|
||||
if (client) {
|
||||
formData = FormData.fromMap({
|
||||
"user_email": "vinodh@aissel.com",
|
||||
"eventId": eventid,
|
||||
"sd": startDate,
|
||||
"ed": endDate,
|
||||
"type": 1,
|
||||
"chart_type": "client"
|
||||
});
|
||||
} else {
|
||||
formData = FormData.fromMap({
|
||||
"user_email": "vinodh@aissel.com",
|
||||
"eventId": eventid,
|
||||
"sd": startDate,
|
||||
"ed": endDate,
|
||||
});
|
||||
}
|
||||
|
||||
print("FORMDATA:${formData.toString()},$startDate,$endDate");
|
||||
response = await dio.post(
|
||||
'${EventsConstants.devUrl}${EventsConstants.insightsTopicsCloud}',
|
||||
'${EventsConstants.url}${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);
|
||||
List<TopicsCloudData> data = [];
|
||||
if (response.data != "null") {
|
||||
print(response.data.toString());
|
||||
TopicCloudResponse topicCloudResponse =
|
||||
topicCloudResponseFromJson(response.data);
|
||||
data = topicCloudResponse.resultData!;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
Future<List<Affiliations>> insightsBarChart({
|
||||
required String eventid,
|
||||
required String startDate,
|
||||
required String endDate,
|
||||
}) async {
|
||||
Future<Affiliations> insightsBarChart(
|
||||
{required String eventid,
|
||||
required String startDate,
|
||||
required String endDate,
|
||||
required bool client}) async {
|
||||
Dio dio = Dio();
|
||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||
(HttpClient client) {
|
||||
|
@ -291,31 +315,41 @@ class ApiCall {
|
|||
return client;
|
||||
};
|
||||
Response response;
|
||||
var formData = FormData.fromMap({
|
||||
"user_email": "vinodh@aissel.com",
|
||||
"eventId": eventid,
|
||||
"sd": "\"$startDate\"",
|
||||
"ed": "\"$endDate\"",
|
||||
"type": "\"1\"",
|
||||
});
|
||||
var formData;
|
||||
if (client) {
|
||||
formData = FormData.fromMap({
|
||||
"user_email": "vinodh@aissel.com",
|
||||
"eventId": eventid,
|
||||
"sd": startDate,
|
||||
"ed": endDate,
|
||||
"type": 1,
|
||||
"chart_type": "client"
|
||||
});
|
||||
} else {
|
||||
formData = FormData.fromMap({
|
||||
"user_email": "vinodh@aissel.com",
|
||||
"eventId": eventid,
|
||||
"sd": startDate,
|
||||
"ed": endDate,
|
||||
});
|
||||
}
|
||||
|
||||
print("FORMDATA:${formData.toString()},$startDate,$endDate");
|
||||
response = await dio.post(
|
||||
'${EventsConstants.devUrl}${EventsConstants.insightsBarChart}',
|
||||
'${EventsConstants.url}${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);
|
||||
Affiliations data =
|
||||
Affiliations(affiliationCount: [], affiliationNames: []);
|
||||
if (response.data != "null") {
|
||||
print(response.data.toString());
|
||||
data = affiliationsResponseFromJson(response.data);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
@ -334,7 +368,7 @@ class ApiCall {
|
|||
"event_id": eventid,
|
||||
});
|
||||
response = await dio.post(
|
||||
'${EventsConstants.devUrl}${EventsConstants.eventdetailsapi}',
|
||||
'${EventsConstants.url}${EventsConstants.eventdetailsapi}',
|
||||
options: Options(),
|
||||
queryParameters: {
|
||||
"user_email": "vinodh@aissel.com",
|
||||
|
@ -363,11 +397,12 @@ class ApiCall {
|
|||
var formData = FormData.fromMap({
|
||||
"user_email": "vinodh@aissel.com",
|
||||
"event_id": eventid,
|
||||
"sd": "2024-07-30",
|
||||
"ed": "2024-08-03",
|
||||
"project_id": 1,
|
||||
});
|
||||
// "sd": "2024-07-30",
|
||||
// "ed": "2024-08-03",
|
||||
response = await dio.post(
|
||||
'${EventsConstants.devUrl}${EventsConstants.speakerslistapi}',
|
||||
'${EventsConstants.url}${EventsConstants.speakerslistapi}',
|
||||
options: Options(),
|
||||
queryParameters: {
|
||||
"user_email": "vinodh@aissel.com",
|
||||
|
@ -396,13 +431,13 @@ class ApiCall {
|
|||
print("formdata : eventid:$eventid kolid:$kolid kid:$kid");
|
||||
var formData = FormData.fromMap({
|
||||
"user_email": "vinodh@aissel.com",
|
||||
"event_id": "eventid",
|
||||
"event_id": eventid,
|
||||
"kol_id": kolid,
|
||||
"k_id": kid,
|
||||
"proj_kol_id": 0,
|
||||
});
|
||||
// "proj_kol_id": 0,
|
||||
response = await dio.post(
|
||||
'${EventsConstants.devUrl}${EventsConstants.showEventsTopicsAndSession}',
|
||||
'${EventsConstants.url}${EventsConstants.showEventsTopicsAndSession}',
|
||||
options: Options(),
|
||||
queryParameters: {
|
||||
"user_email": "vinodh@aissel.com",
|
||||
|
@ -411,16 +446,24 @@ class ApiCall {
|
|||
data: formData);
|
||||
print("response user SESSIONTOPICS here!!!!!!!!!!!!!!!!!!!!! ");
|
||||
print(response.data.toString());
|
||||
Map<String, dynamic> jsondata = json.decode(response.data);
|
||||
SessionTopicsResponse sessionTopicsResponse =
|
||||
SessionTopicsResponse.fromJson(jsondata);
|
||||
List<SessionsTopicsData> data = sessionTopicsResponse.data!;
|
||||
// Map<String, dynamic> jsondata = json.decode(response.data)[0];
|
||||
// SessionTopicsResponse sessionTopicsResponse =
|
||||
// SessionTopicsResponse.fromJson(jsondata);
|
||||
List<SessionsTopicsData> data =
|
||||
SessionsTopicsDataFromJson(response.data.toString());
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
Future<dynamic> addSessionNotes(String eventid, String kolid,
|
||||
String event_attendees_id, String kid, String notes) async {
|
||||
Future<dynamic> addSessionNotes(
|
||||
String eventid,
|
||||
String kolid,
|
||||
String event_attendees_id,
|
||||
String kid,
|
||||
String notes,
|
||||
String? filepath,
|
||||
String? filename,
|
||||
String? noteId) async {
|
||||
Dio dio = Dio();
|
||||
(dio.httpClientAdapter as IOHttpClientAdapter).onHttpClientCreate =
|
||||
(HttpClient client) {
|
||||
|
@ -428,16 +471,32 @@ class ApiCall {
|
|||
(X509Certificate cert, String host, int port) => true;
|
||||
return client;
|
||||
};
|
||||
var formData;
|
||||
Response response;
|
||||
var formData = FormData.fromMap({
|
||||
"user_email": "vinodh@aissel.com",
|
||||
"kol_events_id": eventid,
|
||||
"kol_id": kolid,
|
||||
"event_attendees_id": event_attendees_id,
|
||||
"notes": notes,
|
||||
});
|
||||
if (filename != "") {
|
||||
formData = FormData.fromMap({
|
||||
"user_email": "vinodh@aissel.com",
|
||||
"kol_events_id": eventid,
|
||||
"kol_id": kolid,
|
||||
"event_attendees_id": event_attendees_id,
|
||||
"note": notes,
|
||||
"file": MultipartFile.fromFileSync(filepath!, filename: filename),
|
||||
"id": noteId ?? "",
|
||||
});
|
||||
} else {
|
||||
formData = FormData.fromMap({
|
||||
"user_email": "vinodh@aissel.com",
|
||||
"kol_events_id": eventid,
|
||||
"kol_id": kolid,
|
||||
"event_attendees_id": event_attendees_id,
|
||||
"note": notes,
|
||||
"id": noteId ?? "",
|
||||
});
|
||||
}
|
||||
// "/Users/aissel/Library/Developer/CoreSimulator/Devices/1E435121-7E65-45C6-9E0B-411C8B9915F5/data/Containers/Data/Application/3CBC1CFF-79AD-49FA-A6E0-13D0AA2959D2/tmp/Flutter Questionaire.pdf",
|
||||
|
||||
response = await dio.post(
|
||||
'${EventsConstants.devUrl}${EventsConstants.showEventsTopicsAndSession}',
|
||||
'${EventsConstants.url}${EventsConstants.saveEventsTopicNote}',
|
||||
options: Options(),
|
||||
data: formData);
|
||||
print("response user ADDSESSION here!!!!!!!!!!!!!!!!!!!!! ");
|
||||
|
@ -450,6 +509,37 @@ class ApiCall {
|
|||
return jsondata;
|
||||
}
|
||||
|
||||
Future<List<AllSessionNotesResponse>> getAllSessionNotes(
|
||||
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",
|
||||
"kol_events_id": eventid,
|
||||
});
|
||||
// "proj_kol_id": 0,
|
||||
response = await dio.post(
|
||||
'${EventsConstants.url}${EventsConstants.eventUserAnalytics}',
|
||||
options: Options(),
|
||||
data: formData);
|
||||
print("response user ALLSESSIONNOTES here!!!!!!!!!!!!!!!!!!!!! ");
|
||||
List<AllSessionNotesResponse> data = [];
|
||||
if (response.data != "null") {
|
||||
print(response.data.toString());
|
||||
// Map<String, dynamic> jsondata = json.decode(response.data)[0];
|
||||
// SessionTopicsResponse sessionTopicsResponse =
|
||||
// SessionTopicsResponse.fromJson(jsondata);
|
||||
data = AllSessionNotesResponseFromJson(response.data.toString());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
//************ K2 API CALLS ***********************************************************************************************************************************
|
||||
|
||||
Future<List<EventsList>> getEventsFromK2(int page, String search,
|
||||
|
|
|
@ -22,7 +22,9 @@ class EventsConstants {
|
|||
// 192.168.2.109:8007 - office
|
||||
//K1 API~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
static const String stagingUrl =
|
||||
"https://cardio-staging.konectar.io/reports/";
|
||||
"https://cardio-staging.konectar.io/eventapis/";
|
||||
static const String url = stagingUrl;
|
||||
|
||||
static const String devUrl =
|
||||
"http://192.168.2.130/konectar-sandbox/eventapis/";
|
||||
static const String eventslistapi = "loadFutureEvents/";
|
||||
|
@ -38,6 +40,20 @@ class EventsConstants {
|
|||
static const String saveEventsTopicNote = "saveEventsTopicNote";
|
||||
static const String eventUserAnalytics = "eventUserAnalytics";
|
||||
|
||||
//Hive
|
||||
/*
|
||||
{
|
||||
{
|
||||
name:"loadFutureEvents",
|
||||
interval:5,
|
||||
method:POST,
|
||||
}
|
||||
"saveUserInterestedEvent",
|
||||
"getSpecialitiesDonutChart",
|
||||
|
||||
|
||||
}
|
||||
*/
|
||||
//K1 API END~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
static const String eventslistapifromk2 =
|
||||
"http://192.168.2.130:8888/api/kolevents/v1/en/fetch";
|
||||
|
|
|
@ -2,4 +2,5 @@ class HiveTypeIdConstants {
|
|||
static const int topspeakersHiveId = 103;
|
||||
static const int topSponsorsHiveId = 104;
|
||||
static const int topTopicsHiveId = 105;
|
||||
static const int hiveApiConstantsId = 106;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:expandable/expandable.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
|
@ -39,7 +40,7 @@ class EventsListingScreen extends StatefulWidget {
|
|||
|
||||
class _EventsListingScreenState extends State<EventsListingScreen>
|
||||
with TickerProviderStateMixin {
|
||||
late final TabController _tabController;
|
||||
late final TabController tabController;
|
||||
int itemcount = 3;
|
||||
bool isExtended = false;
|
||||
bool isExtendedInterested = false;
|
||||
|
@ -49,14 +50,17 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
static const _pageSize = 20;
|
||||
int lastIndex = 0;
|
||||
String searchSpeaker = "";
|
||||
bool isClientOverview = false;
|
||||
bool isLoading = true;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_tabController = TabController(length: 2, vsync: this);
|
||||
tabController = TabController(length: 2, vsync: this);
|
||||
final provider = Provider.of<EventsProvider>(context, listen: false);
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
||||
init();
|
||||
isLoading = false;
|
||||
});
|
||||
pagingController.addPageRequestListener((pageKey) {
|
||||
_fetchPages(pageKey, provider);
|
||||
|
@ -108,7 +112,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
|
||||
Future<void> _fetchPages(int pageKey, EventsProvider provider) async {
|
||||
List<EventSpeakersData> list = await provider
|
||||
.getInitialSpeakersDetails("47336", searchkey: searchSpeaker);
|
||||
.getInitialSpeakersDetails(widget.event.id!, searchkey: searchSpeaker);
|
||||
print("CHECK LENGTH ${list.length}");
|
||||
final isLastPage = pageKey + _pageSize >= list.length;
|
||||
final nextItems =
|
||||
|
@ -137,24 +141,32 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
// await Provider.of<EventsProvider>(context, listen: false)
|
||||
// .getTopicsCloud(widget.event);
|
||||
print("FIRST INITIAL");
|
||||
await Provider.of<EventsProvider>(context, listen: false)
|
||||
.getInitialSpeakersDetails(widget.event.id!, searchkey: searchSpeaker);
|
||||
Provider.of<EventsProvider>(context, listen: false).getSessionCount();
|
||||
|
||||
await Provider.of<EventsProvider>(context, listen: false)
|
||||
.getOverviewData(widget.event.id!, start, end);
|
||||
await Provider.of<EventsProvider>(context, listen: false)
|
||||
.getInitialSpeakersDetails(widget.event.id!, searchkey: searchSpeaker);
|
||||
await Provider.of<EventsProvider>(context, listen: false).getSessionCount();
|
||||
await Provider.of<EventsProvider>(context, listen: false)
|
||||
.getTopicsCloud(widget.event);
|
||||
await Provider.of<EventsProvider>(context, listen: false)
|
||||
.getSpecialtyData(widget.event);
|
||||
await Provider.of<EventsProvider>(context, listen: false)
|
||||
.getAffiliations(widget.event);
|
||||
|
||||
await Provider.of<EventsProvider>(context, listen: false)
|
||||
.getAllSessionNotesFromApi(widget.event.id!);
|
||||
Provider.of<EventsProvider>(context, listen: false).isLoadingInsights =
|
||||
false;
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_tabController.dispose();
|
||||
tabController.dispose();
|
||||
pagingController.dispose();
|
||||
Provider.of<EventsProvider>(context, listen: false).allSessionNotes.clear();
|
||||
widget.event = EventsList();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
@ -771,18 +783,31 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
children: [
|
||||
expandableDetails(provider),
|
||||
speakersList(context, provider),
|
||||
|
||||
EventsInsights(
|
||||
eid: widget.event.id!,
|
||||
eventsdetail: widget.event,
|
||||
eventid: widget.event.eventId!,
|
||||
kFlutterHashtags: provider.kFlutterHashtags,
|
||||
specialtyList: provider.specialtyList,
|
||||
affiliations: provider.affiliations,
|
||||
allSessionNotes: provider.allSessionNotes,
|
||||
),
|
||||
|
||||
// medicalInsights(),
|
||||
//SocialMedia(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Visibility(
|
||||
visible: isLoading,
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(
|
||||
backgroundColor: EventsConstants.blueColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -1512,13 +1537,18 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
List<String> topSponsors = [];
|
||||
List<String> topTopics = [];
|
||||
|
||||
if (provider.overviewData!.topSpeakers!.length != 0) {
|
||||
for (var obj in provider.overviewData!.topSpeakers!) {
|
||||
topSpeakers.add(obj.firstName!);
|
||||
if (provider.overviewData.eventTopics!.length != 0) {
|
||||
for (var obj in provider.overviewData.eventTopics!) {
|
||||
topTopics.add(obj.eventTopics ?? "-");
|
||||
}
|
||||
}
|
||||
if (provider.overviewData!.eventSponsers!.length != 0) {
|
||||
for (var obj in provider.overviewData!.eventSponsers!) {
|
||||
if (provider.overviewData.topSpeakers!.length != 0) {
|
||||
for (var obj in provider.overviewData.topSpeakers!) {
|
||||
topSpeakers.add(obj.firstName ?? "-");
|
||||
}
|
||||
}
|
||||
if (provider.overviewData.eventSponsers!.length != 0) {
|
||||
for (var obj in provider.overviewData.eventSponsers!) {
|
||||
topSponsors.add(obj.sessionSponsor!);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1517,10 +1517,10 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
));
|
||||
},
|
||||
child: Card(
|
||||
elevation: 4,
|
||||
//color: EventsConstants.homeCardBackgound,
|
||||
surfaceTintColor: Colors.white,
|
||||
//surfaceTintColor: EventsConstants.homeCardBackgound,
|
||||
//elevation: 4,
|
||||
color: EventsConstants.homeCardBackgound,
|
||||
//surfaceTintColor: Colors.white,
|
||||
surfaceTintColor: EventsConstants.homeCardBackgound,
|
||||
// shadowColor: Constants.bgcolor,
|
||||
child: buildCardView(context, eventsList, provider),
|
||||
),
|
||||
|
@ -1571,12 +1571,20 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
// Build each card in the grid view.
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
Navigator.of(context, rootNavigator: true)
|
||||
.push(MaterialPageRoute(
|
||||
builder: (context) => EventsTab(
|
||||
event: provider.eventList[index],
|
||||
),
|
||||
));
|
||||
if (provider.eventList[index].sessionName != "") {
|
||||
Navigator.of(context, rootNavigator: true)
|
||||
.push(MaterialPageRoute(
|
||||
builder: (context) => EventsTab(
|
||||
event: provider.eventList[index],
|
||||
),
|
||||
));
|
||||
} else {
|
||||
//Alert
|
||||
Alert(
|
||||
data: "Data for the ",
|
||||
onPressed: () {},
|
||||
);
|
||||
}
|
||||
// Navigator.of(context).push(new MaterialPageRoute<Null>(
|
||||
// builder: (BuildContext context) {
|
||||
// return new EventsTab();
|
||||
|
@ -1599,8 +1607,8 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
|
||||
buildCardView(
|
||||
BuildContext context, EventsList event, EventsProvider provider) {
|
||||
print(
|
||||
"CHECK EVENT INTERESTED : ${provider.checkIfUserInterested(event.eventId!)}}");
|
||||
// print(
|
||||
// "CHECK EVENT INTERESTED : ${provider.checkIfUserInterested(event.eventId ?? "")}}");
|
||||
double height = isTablet
|
||||
? MediaQuery.of(context).size.height * 0.35
|
||||
: MediaQuery.of(context).size.height * 0.65;
|
||||
|
@ -1610,14 +1618,14 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
decoration: BoxDecoration(
|
||||
// color: Color.fromARGB(179, 248, 238, 238),
|
||||
|
||||
color: Colors.white,
|
||||
// color: EventsConstants.homeCardBackgound,
|
||||
// color: Colors.white,
|
||||
color: EventsConstants.homeCardBackgound,
|
||||
borderRadius: BorderRadius.all(Radius.circular(20))),
|
||||
// height: MediaQuery.of(context).size.height * 0.2,
|
||||
// height: 136,
|
||||
// height: double.minPositive,
|
||||
padding: isTablet
|
||||
? EdgeInsets.symmetric(horizontal: 8.0, vertical: 2.0)
|
||||
? EdgeInsets.symmetric(horizontal: 12.0, vertical: 12.0)
|
||||
: EdgeInsets.symmetric(horizontal: 10.0, vertical: 10.0),
|
||||
child:
|
||||
// Column(
|
||||
|
@ -1657,7 +1665,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
// decorationColor: Colors.blue,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: isTablet ? 22 : 16,
|
||||
fontSize: isTablet ? 18 : 16,
|
||||
|
||||
// fontFamily: "SourceSerif",
|
||||
),
|
||||
|
@ -1695,7 +1703,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
//fontStyle: FontStyle.italic,
|
||||
fontSize: isTablet ? 20 : 12),
|
||||
fontSize: isTablet ? 16 : 12),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -1717,7 +1725,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
color: Colors.black,
|
||||
//fontStyle: FontStyle.italic,
|
||||
|
||||
fontSize: isTablet ? 20 : 12),
|
||||
fontSize: isTablet ? 16 : 12),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -1733,7 +1741,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
provider.ifOfflineExists(event.eventId!)
|
||||
provider.ifOfflineExists(event.eventId ?? "")
|
||||
? Padding(
|
||||
padding: EdgeInsets.only(right: 10),
|
||||
child: Icon(Icons.bookmark,
|
||||
|
|
|
@ -1,28 +1,39 @@
|
|||
import 'dart:math';
|
||||
|
||||
import 'package:fl_chart/fl_chart.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_scatter/flutter_scatter.dart';
|
||||
import 'package:konectar_events/model/affiliationsmodel.dart';
|
||||
import 'package:konectar_events/model/allsessionnotesmodel.dart';
|
||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||
import 'package:konectar_events/model/specialtymodel.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
import 'package:konectar_events/viewmodel/eventsprovider.dart';
|
||||
import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
|
||||
import 'package:konectar_events/widgets/chartline.dart';
|
||||
import 'package:konectar_events/widgets/piechart.dart';
|
||||
import 'package:konectar_events/widgets/word_cloud.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:zoom_widget/zoom_widget.dart';
|
||||
|
||||
class EventsInsights extends StatefulWidget {
|
||||
//EventsList eventsdetail;
|
||||
EventsList eventsdetail;
|
||||
String eventid;
|
||||
String eid;
|
||||
|
||||
List<FlutterHashtag> kFlutterHashtags = [];
|
||||
List<Specialty> specialtyList = [];
|
||||
List<Affiliations> affiliations;
|
||||
List<AllSessionNotesResponse> allSessionNotes = [];
|
||||
Affiliations affiliations;
|
||||
EventsInsights(
|
||||
{super.key,
|
||||
required this.eventsdetail,
|
||||
required this.eid,
|
||||
required this.eventid,
|
||||
required this.kFlutterHashtags,
|
||||
required this.affiliations,
|
||||
required this.allSessionNotes,
|
||||
required this.specialtyList});
|
||||
|
||||
@override
|
||||
|
@ -34,6 +45,8 @@ class _EventsInsightsState extends State<EventsInsights> {
|
|||
|
||||
int count = 0;
|
||||
String wordstring = '';
|
||||
bool isClientOverview = false;
|
||||
Matrix4 matrix = Matrix4.identity();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -45,26 +58,22 @@ class _EventsInsightsState extends State<EventsInsights> {
|
|||
}
|
||||
|
||||
init() async {
|
||||
await Provider.of<HcpProfileProvider>(context, listen: false)
|
||||
.getAllSessionNotesList(widget.eventid);
|
||||
|
||||
// await Provider.of<EventsProvider>(context, listen: false)
|
||||
// .getAllSessionNotesFromApi(widget.eid);
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
Provider.of<EventsProvider>(context, listen: false).allSessionNotes = [];
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final screenSize = MediaQuery.of(context).size;
|
||||
final ratio = screenSize.width / (screenSize.height / 2);
|
||||
List<int> affCountList = [];
|
||||
int maximum = 0;
|
||||
if (widget.affiliations.isNotEmpty) {
|
||||
for (var obj in widget.affiliations) {
|
||||
affCountList.add(int.parse(obj.orgCount!));
|
||||
}
|
||||
maximum = affCountList.reduce(max);
|
||||
}
|
||||
|
||||
return Consumer<HcpProfileProvider>(
|
||||
return Consumer<EventsProvider>(
|
||||
builder: (BuildContext context, provider, Widget? child) {
|
||||
List<Widget> widgets = <Widget>[];
|
||||
for (var i = 0; i < widget.kFlutterHashtags.length; i++) {
|
||||
|
@ -78,258 +87,210 @@ class _EventsInsightsState extends State<EventsInsights> {
|
|||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Text(
|
||||
// '2024 Hematology/Oncology Pharmacy Association Annual Conference (HOPA)',
|
||||
// style: TextStyle(
|
||||
// color: Colors.blue,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// fontSize: 17,
|
||||
// ),
|
||||
// maxLines: 2,
|
||||
// softWrap: true,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
// ),
|
||||
// Container(
|
||||
// decoration: BoxDecoration(
|
||||
// // color: Colors.white,
|
||||
// border: Border.all(color: Colors.blueAccent)),
|
||||
// width: 180,
|
||||
// child: DropdownButton<String>(
|
||||
// items: ["All Events Insights", "My Events Insights"]
|
||||
// .map((String value) {
|
||||
// return DropdownMenuItem<String>(
|
||||
// value: value,
|
||||
// child: Text(value),
|
||||
// );
|
||||
// }).toList(),
|
||||
// value: _value,
|
||||
// onChanged: (value) {
|
||||
// setState(() {
|
||||
// _value = value!;
|
||||
// });
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(
|
||||
// height: 20,
|
||||
// ),
|
||||
labelWidget("Topics Discussed"),
|
||||
widgets.isNotEmpty
|
||||
? Card(
|
||||
surfaceTintColor: Colors.white,
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(2.0),
|
||||
margin: EdgeInsets.all(2.0),
|
||||
height: screenSize.height / 2,
|
||||
width: screenSize.width,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(20))),
|
||||
child: Center(
|
||||
child: FittedBox(
|
||||
child: Scatter(
|
||||
fillGaps: true,
|
||||
delegate: ArchimedeanSpiralScatterDelegate(
|
||||
ratio: ratio),
|
||||
children: widgets,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: Wrap(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
right: 2.0, bottom: 30, top: 10.0),
|
||||
child: CupertinoSwitch(
|
||||
activeColor: Color.fromARGB(255, 0, 71, 132),
|
||||
value: isClientOverview,
|
||||
onChanged: (value) async {
|
||||
isClientOverview = value;
|
||||
if (isClientOverview) {
|
||||
provider.isLoadingInsights = true;
|
||||
await provider.callInsightsDataForClientSpecific(
|
||||
widget.eventsdetail, true);
|
||||
|
||||
setState(() {});
|
||||
} else {
|
||||
await provider.callInsightsDataForClientSpecific(
|
||||
widget.eventsdetail, false);
|
||||
setState(() {});
|
||||
}
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
right: 8.0, top: 20.0, bottom: 20),
|
||||
child: !isClientOverview
|
||||
? const Text(
|
||||
'Client Overview',
|
||||
style:
|
||||
TextStyle(fontSize: 15, color: Colors.grey),
|
||||
)
|
||||
: const Text(
|
||||
'Client Overview',
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
)
|
||||
: SizedBox.shrink(),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
labelWidget("Specialty of speakers"),
|
||||
Card(
|
||||
surfaceTintColor: Colors.white,
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(2.0),
|
||||
margin: EdgeInsets.all(5.0),
|
||||
height: screenSize.height / 2,
|
||||
width: screenSize.width,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: CustomPieChart(
|
||||
specialtyList: widget.specialtyList,
|
||||
),
|
||||
// child: PieChartWidget([
|
||||
// Sector(
|
||||
// value: 35.0,
|
||||
// color: Colors.purple,
|
||||
// title: "35% Engineering"),
|
||||
// Sector(
|
||||
// value: 40, color: Colors.amber, title: "40% Development"),
|
||||
// Sector(value: 55, color: Colors.green, title: "55% Social"),
|
||||
// Sector(value: 70, color: Colors.orange, title: "70% Live"),
|
||||
// ]),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
labelWidget("Speaker counts by providers"),
|
||||
widget.affiliations.isNotEmpty
|
||||
? Card(
|
||||
provider.isLoadingInsights
|
||||
? Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: EventsConstants.blueColor,
|
||||
),
|
||||
)
|
||||
: _buildCharts(provider, widgets),
|
||||
widget.allSessionNotes.isNotEmpty
|
||||
? labelWidget("Session Notes")
|
||||
: SizedBox.shrink(),
|
||||
widget.allSessionNotes.isEmpty
|
||||
? SizedBox.shrink()
|
||||
: Card(
|
||||
surfaceTintColor: Colors.white,
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(12.0),
|
||||
// margin: EdgeInsets.all(10.0),
|
||||
padding: EdgeInsets.all(4.0),
|
||||
margin: EdgeInsets.all(4.0),
|
||||
// height: screenSize.height / 3,
|
||||
width: screenSize.width,
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: widget.allSessionNotes.length > 3
|
||||
? screenSize.height
|
||||
: 400,
|
||||
minHeight: 400),
|
||||
// height: double.minPositive,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(20)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: List.generate(
|
||||
widget.affiliations.length, (index) {
|
||||
return ChartLine(
|
||||
title: widget.affiliations[index].orgName!,
|
||||
number: int.parse(
|
||||
widget.affiliations[index].orgCount!),
|
||||
rate: int.parse(widget.affiliations[index]
|
||||
.orgCount!) ==
|
||||
maximum
|
||||
? 1
|
||||
: int.parse(widget.affiliations[index]
|
||||
.orgCount!) /
|
||||
maximum);
|
||||
}),
|
||||
)),
|
||||
)
|
||||
: SizedBox.shrink(),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
labelWidget("Session Notes"),
|
||||
Card(
|
||||
surfaceTintColor: Colors.white,
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(4.0),
|
||||
margin: EdgeInsets.all(4.0),
|
||||
// height: screenSize.height / 3,
|
||||
width: screenSize.width,
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: provider.allSessionNotesList.length > 3
|
||||
? screenSize.height
|
||||
: 400,
|
||||
minHeight: 400),
|
||||
// height: double.minPositive,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: provider.allSessionNotesList.isNotEmpty
|
||||
? ListView.separated(
|
||||
padding: EdgeInsets.zero,
|
||||
itemCount: provider.allSessionNotesList.length,
|
||||
itemBuilder: (context, index) {
|
||||
return ExpansionTile(
|
||||
initiallyExpanded: true,
|
||||
shape: Border(),
|
||||
expandedCrossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
expandedAlignment: Alignment.topLeft,
|
||||
childrenPadding: EdgeInsets.all(8.0),
|
||||
title: Text(
|
||||
"\"${provider.allSessionNotesList[index].notes}\"",
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
fontStyle: FontStyle.italic)),
|
||||
subtitle: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Added by: ${provider.allSessionNotesList[index].addedBy}",
|
||||
style: TextStyle(
|
||||
color: Colors.grey[900],
|
||||
fontSize: 12),
|
||||
),
|
||||
Text(
|
||||
"On: ${provider.allSessionNotesList[index].addedDate}",
|
||||
style: TextStyle(
|
||||
color: Colors.grey[900],
|
||||
fontSize: 12),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
// width: isTablet
|
||||
// ? MediaQuery.of(context).size.width * 0.25
|
||||
// : MediaQuery.of(context).size.width * 0.5,
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
child: widget.allSessionNotes.isNotEmpty
|
||||
? ListView.separated(
|
||||
padding: EdgeInsets.zero,
|
||||
itemCount: widget.allSessionNotes.length,
|
||||
itemBuilder: (context, index) {
|
||||
return ExpansionTile(
|
||||
initiallyExpanded: false,
|
||||
shape: Border(),
|
||||
expandedCrossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Session: ${provider.allSessionNotesList[index].selectedSession}",
|
||||
maxLines: 3,
|
||||
expandedAlignment: Alignment.topLeft,
|
||||
childrenPadding: EdgeInsets.all(8.0),
|
||||
title: Text(
|
||||
"Session: ${widget.allSessionNotes[index].sessionName}",
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.bold,
|
||||
)),
|
||||
subtitle: Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(top: 8.0),
|
||||
child: Text(
|
||||
"Speaker: ${widget.allSessionNotes[index].firstName}",
|
||||
// maxLines: 3,
|
||||
style: TextStyle(
|
||||
// decoration: TextDecoration.underline,
|
||||
// decorationColor: Colors.blue,
|
||||
//fontFamily: "SourceSerif",
|
||||
color: Colors.grey[700],
|
||||
// //fontFamily: "SourceSerif",
|
||||
//color: Colors.grey[700],
|
||||
|
||||
//fontStyle: FontStyle.italic,
|
||||
//fontWeight: FontWeight.bold,
|
||||
fontSize: 14),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Text(
|
||||
"Speaker: ${provider.allSessionNotesList[index].hcpname}",
|
||||
maxLines: 3,
|
||||
style: TextStyle(
|
||||
// decoration: TextDecoration.underline,
|
||||
// decorationColor: Colors.blue,
|
||||
//fontFamily: "SourceSerif",
|
||||
color: Colors.grey[700],
|
||||
),
|
||||
children: List.generate(
|
||||
widget.allSessionNotes[index]
|
||||
.addedBy!.length, (i) {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
// width: isTablet
|
||||
// ? MediaQuery.of(context).size.width * 0.25
|
||||
// : MediaQuery.of(context).size.width * 0.5,
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"\"${widget.allSessionNotes[index].notes![i]}\"",
|
||||
maxLines: 3,
|
||||
style: TextStyle(
|
||||
// decoration: TextDecoration.underline,
|
||||
// decorationColor: Colors.blue,
|
||||
//fontFamily: "SourceSerif",
|
||||
color: Colors.grey[900],
|
||||
fontStyle:
|
||||
FontStyle.italic,
|
||||
fontSize: 14),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets
|
||||
.symmetric(vertical: 8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Added by ${widget.allSessionNotes[index].addedBy![i]}",
|
||||
style: TextStyle(
|
||||
color: Colors
|
||||
.grey[900],
|
||||
fontSize: 13),
|
||||
),
|
||||
Text(
|
||||
" On ${widget.allSessionNotes[index].createdOn![i]}",
|
||||
style: TextStyle(
|
||||
color: Colors
|
||||
.grey[900],
|
||||
fontSize: 13),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
widget.allSessionNotes[index]
|
||||
.addedBy!.length >
|
||||
1
|
||||
? (i + 1) !=
|
||||
widget
|
||||
.allSessionNotes[
|
||||
index]
|
||||
.addedBy!
|
||||
.length
|
||||
? Divider(
|
||||
//color: Colors.grey[900],
|
||||
)
|
||||
: SizedBox.shrink()
|
||||
: SizedBox.shrink(),
|
||||
],
|
||||
),
|
||||
);
|
||||
}),
|
||||
//),
|
||||
// Text(
|
||||
// "Notes : ${sessionNotesList[index]}",
|
||||
// maxLines: 3,
|
||||
// style: TextStyle(
|
||||
// // decoration: TextDecoration.underline,
|
||||
// // decorationColor: Colors.blue,
|
||||
// fontFamily: "SourceSerif",
|
||||
// color: Colors.grey[700],
|
||||
|
||||
//fontStyle: FontStyle.italic,
|
||||
fontSize: 14),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
// Text(
|
||||
// "Notes : ${sessionNotesList[index]}",
|
||||
// maxLines: 3,
|
||||
// style: TextStyle(
|
||||
// // decoration: TextDecoration.underline,
|
||||
// // decorationColor: Colors.blue,
|
||||
// fontFamily: "SourceSerif",
|
||||
// color: Colors.grey[700],
|
||||
|
||||
// //fontStyle: FontStyle.italic,
|
||||
// fontSize: 14),
|
||||
// ),
|
||||
],
|
||||
);
|
||||
},
|
||||
separatorBuilder:
|
||||
(BuildContext context, int index) {
|
||||
return Divider();
|
||||
},
|
||||
// separatorBuilder: (context, index) {
|
||||
// return Divider();
|
||||
// },
|
||||
)
|
||||
: Center(child: Text("No added session notes"))),
|
||||
),
|
||||
// //fontStyle: FontStyle.italic,
|
||||
// fontSize: 14),
|
||||
// ),
|
||||
);
|
||||
},
|
||||
separatorBuilder:
|
||||
(BuildContext context, int index) {
|
||||
return Divider();
|
||||
},
|
||||
// separatorBuilder: (context, index) {
|
||||
// return Divider();
|
||||
// },
|
||||
)
|
||||
: Center(
|
||||
child: Text("No added session notes"))),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -338,6 +299,128 @@ class _EventsInsightsState extends State<EventsInsights> {
|
|||
});
|
||||
}
|
||||
|
||||
Widget _buildCharts(EventsProvider provider, List<Widget> widgets) {
|
||||
final screenSize = MediaQuery.of(context).size;
|
||||
final ratio = screenSize.width / (screenSize.height / 2);
|
||||
List<int> affCountList = [];
|
||||
int maximum = 0;
|
||||
if (widget.affiliations.affiliationCount.isNotEmpty) {
|
||||
for (var obj in widget.affiliations.affiliationCount) {
|
||||
affCountList.add(int.parse(obj));
|
||||
}
|
||||
maximum = affCountList.reduce(max);
|
||||
}
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
widgets.isNotEmpty
|
||||
? labelWidget("Topics Discussed")
|
||||
: SizedBox.shrink(),
|
||||
widgets.isNotEmpty
|
||||
? Card(
|
||||
surfaceTintColor: Colors.white,
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(2.0),
|
||||
margin: EdgeInsets.all(2.0),
|
||||
height: screenSize.height / 2,
|
||||
width: screenSize.width,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(Radius.circular(20))),
|
||||
child: Center(
|
||||
// child: Zoom(
|
||||
// backgroundColor: Colors.white,
|
||||
// initTotalZoomOut: true,
|
||||
// centerOnScale: false,
|
||||
// scrollWeight: 5,
|
||||
child: FittedBox(
|
||||
child: Scatter(
|
||||
fillGaps: true,
|
||||
delegate:
|
||||
ArchimedeanSpiralScatterDelegate(ratio: ratio),
|
||||
children: widgets,
|
||||
// ),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: SizedBox.shrink(),
|
||||
provider.specialtyList.isEmpty
|
||||
? SizedBox.shrink()
|
||||
: SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
provider.specialtyList.isNotEmpty
|
||||
? labelWidget("Specialty of speakers")
|
||||
: SizedBox.shrink(),
|
||||
provider.specialtyList.isNotEmpty
|
||||
? Card(
|
||||
surfaceTintColor: Colors.white,
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(2.0),
|
||||
margin: EdgeInsets.all(5.0),
|
||||
height: screenSize.height / 2,
|
||||
width: screenSize.width,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: CustomPieChart(
|
||||
specialtyList: widget.specialtyList,
|
||||
),
|
||||
),
|
||||
)
|
||||
: SizedBox.shrink(),
|
||||
provider.specialtyList.isEmpty
|
||||
? SizedBox.shrink()
|
||||
: SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
provider.affiliations.affiliationCount.isNotEmpty
|
||||
? labelWidget("Speaker counts by providers")
|
||||
: SizedBox.shrink(),
|
||||
provider.affiliations.affiliationCount.isNotEmpty
|
||||
? Card(
|
||||
surfaceTintColor: Colors.white,
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(12.0),
|
||||
// margin: EdgeInsets.all(10.0),
|
||||
// height: screenSize.height / 3,
|
||||
width: screenSize.width,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: List.generate(
|
||||
widget.affiliations.affiliationCount.length, (index) {
|
||||
return ChartLine(
|
||||
title: widget.affiliations.affiliationNames[index],
|
||||
number: int.parse(
|
||||
widget.affiliations.affiliationCount[index]),
|
||||
rate: int.parse(widget.affiliations
|
||||
.affiliationCount[index]) ==
|
||||
maximum
|
||||
? 1
|
||||
: int.parse(widget
|
||||
.affiliations.affiliationCount[index]) /
|
||||
maximum);
|
||||
}),
|
||||
)),
|
||||
)
|
||||
: SizedBox.shrink(),
|
||||
provider.specialtyList.isEmpty
|
||||
? SizedBox.shrink()
|
||||
: SizedBox(
|
||||
height: 20,
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget labelWidget(String title) {
|
||||
return Text(
|
||||
title,
|
||||
|
|
|
@ -285,109 +285,115 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||
Center(
|
||||
child: CustomButton(
|
||||
backgroundColor: EventsConstants.onboardButtonColor,
|
||||
onPressed: () async {
|
||||
setState(() {
|
||||
print("loading");
|
||||
provider.loading = true;
|
||||
});
|
||||
// onPressed: () async {
|
||||
// setState(() {
|
||||
// print("loading");
|
||||
// provider.loading = true;
|
||||
// });
|
||||
|
||||
if (textFieldsValidation(provider).isEmpty) {
|
||||
print("email:${emailTextController.text}");
|
||||
// if (await _logout) {
|
||||
// print("LOGOUT");
|
||||
// provider.code = secretKeyTextConrtroller.text;
|
||||
// Map<String, dynamic> resp = await provider.verifyCode(
|
||||
// emailTextController.text, secretKeyTextConrtroller.text);
|
||||
// if (resp["code"] == "1200") {
|
||||
// provider.loading = false;
|
||||
// provider.showCodeField = false;
|
||||
// provider.showMessage = true;
|
||||
// _displaySnackBar("You have logged in successfully");
|
||||
// _saveprefs(resp["token"], emailTextController.text,
|
||||
// secretKeyTextConrtroller.text, true)
|
||||
// .then((value) {
|
||||
// Navigator.of(context).pushReplacement(
|
||||
// MaterialPageRoute(
|
||||
// builder: (context) => NavigationHomeScreen()),
|
||||
// );
|
||||
// });
|
||||
// } else {
|
||||
// provider.message = resp["message"];
|
||||
// }
|
||||
// } else {
|
||||
print("FIRST LOGIN");
|
||||
if (!provider.showCodeField) {
|
||||
provider.email = emailTextController.text;
|
||||
String encoded =
|
||||
base64.encode(utf8.encode(provider.deviceId));
|
||||
// if (textFieldsValidation(provider).isEmpty) {
|
||||
// print("email:${emailTextController.text}");
|
||||
// // if (await _logout) {
|
||||
// // print("LOGOUT");
|
||||
// // provider.code = secretKeyTextConrtroller.text;
|
||||
// // Map<String, dynamic> resp = await provider.verifyCode(
|
||||
// // emailTextController.text, secretKeyTextConrtroller.text);
|
||||
// // if (resp["code"] == "1200") {
|
||||
// // provider.loading = false;
|
||||
// // provider.showCodeField = false;
|
||||
// // provider.showMessage = true;
|
||||
// // _displaySnackBar("You have logged in successfully");
|
||||
// // _saveprefs(resp["token"], emailTextController.text,
|
||||
// // secretKeyTextConrtroller.text, true)
|
||||
// // .then((value) {
|
||||
// // Navigator.of(context).pushReplacement(
|
||||
// // MaterialPageRoute(
|
||||
// // builder: (context) => NavigationHomeScreen()),
|
||||
// // );
|
||||
// // });
|
||||
// // } else {
|
||||
// // provider.message = resp["message"];
|
||||
// // }
|
||||
// // } else {
|
||||
// print("FIRST LOGIN");
|
||||
// if (!provider.showCodeField) {
|
||||
// provider.email = emailTextController.text;
|
||||
// String encoded =
|
||||
// base64.encode(utf8.encode(provider.deviceId));
|
||||
|
||||
Map<String, dynamic> resp = await provider.verifyEmail(
|
||||
emailTextController.text, encoded, platform);
|
||||
print("resp:${resp["code"]}");
|
||||
if (resp.isEmpty) {
|
||||
print("isEmplty");
|
||||
}
|
||||
// Map<String, dynamic> resp = await provider.verifyEmail(
|
||||
// emailTextController.text, encoded, platform);
|
||||
// print("resp:${resp["code"]}");
|
||||
// if (resp.isEmpty) {
|
||||
// print("isEmplty");
|
||||
// }
|
||||
|
||||
if (resp["code"] == "1200") {
|
||||
provider.loading = false;
|
||||
provider.showCodeField = true;
|
||||
provider.showMessage = true;
|
||||
} else {
|
||||
provider.loading = false;
|
||||
provider.showCodeField = false;
|
||||
provider.showMessage = true;
|
||||
}
|
||||
// if (resp["code"] == "1200") {
|
||||
// provider.loading = false;
|
||||
// provider.showCodeField = true;
|
||||
// provider.showMessage = true;
|
||||
// } else {
|
||||
// provider.loading = false;
|
||||
// provider.showCodeField = false;
|
||||
// provider.showMessage = true;
|
||||
// }
|
||||
|
||||
provider.message = resp["message"];
|
||||
setState(() {
|
||||
emailTextController.text = provider.email!;
|
||||
});
|
||||
} else {
|
||||
provider.code = secretKeyTextConrtroller.text;
|
||||
Map<String, dynamic> resp = await provider.verifyCode(
|
||||
emailTextController.text,
|
||||
secretKeyTextConrtroller.text);
|
||||
if (resp["code"] == "1200") {
|
||||
provider.loading = false;
|
||||
provider.showCodeField = false;
|
||||
provider.showMessage = true;
|
||||
_displaySnackBar("You have logged in successfully");
|
||||
_saveprefs(resp["token"], emailTextController.text,
|
||||
secretKeyTextConrtroller.text, true)
|
||||
.then((value) {
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => NavigationHomeScreen()),
|
||||
);
|
||||
});
|
||||
} else {
|
||||
provider.message = resp["message"];
|
||||
}
|
||||
setState(() {
|
||||
emailTextController.text = provider.email!;
|
||||
secretKeyTextConrtroller.text = provider.code!;
|
||||
});
|
||||
}
|
||||
// }
|
||||
// provider.message = resp["message"];
|
||||
// setState(() {
|
||||
// emailTextController.text = provider.email!;
|
||||
// });
|
||||
// } else {
|
||||
// provider.code = secretKeyTextConrtroller.text;
|
||||
// Map<String, dynamic> resp = await provider.verifyCode(
|
||||
// emailTextController.text,
|
||||
// secretKeyTextConrtroller.text);
|
||||
// if (resp["code"] == "1200") {
|
||||
// provider.loading = false;
|
||||
// provider.showCodeField = false;
|
||||
// provider.showMessage = true;
|
||||
// _displaySnackBar("You have logged in successfully");
|
||||
// _saveprefs(resp["token"], emailTextController.text,
|
||||
// secretKeyTextConrtroller.text, true)
|
||||
// .then((value) {
|
||||
// Navigator.of(context).pushReplacement(
|
||||
// MaterialPageRoute(
|
||||
// builder: (context) => NavigationHomeScreen()),
|
||||
// );
|
||||
// });
|
||||
// } else {
|
||||
// provider.message = resp["message"];
|
||||
// }
|
||||
// setState(() {
|
||||
// emailTextController.text = provider.email!;
|
||||
// secretKeyTextConrtroller.text = provider.code!;
|
||||
// });
|
||||
// }
|
||||
// // }
|
||||
|
||||
//_joinMeeting(roomText.text, "demo meet2");
|
||||
// _saveprefs(
|
||||
// //_joinMeeting(roomText.text, "demo meet2");
|
||||
// // _saveprefs(
|
||||
|
||||
// emailTextController.text,
|
||||
// // emailTextController.text,
|
||||
|
||||
// true)
|
||||
// .then((value) {
|
||||
// Navigator.of(context).pushReplacement(
|
||||
// MaterialPageRoute(
|
||||
// builder: (context) => FirebaseExample(
|
||||
// title: secretKeyTextConrtroller.text,
|
||||
// )),
|
||||
// );
|
||||
// }
|
||||
// );
|
||||
} else {
|
||||
_displaySnackBar(textFieldsValidation(provider));
|
||||
}
|
||||
// // true)
|
||||
// // .then((value) {
|
||||
// // Navigator.of(context).pushReplacement(
|
||||
// // MaterialPageRoute(
|
||||
// // builder: (context) => FirebaseExample(
|
||||
// // title: secretKeyTextConrtroller.text,
|
||||
// // )),
|
||||
// // );
|
||||
// // }
|
||||
// // );
|
||||
// } else {
|
||||
// _displaySnackBar(textFieldsValidation(provider));
|
||||
// }
|
||||
// },
|
||||
onPressed: () {
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => NavigationHomeScreen()),
|
||||
);
|
||||
},
|
||||
textColor: Colors.white,
|
||||
fontsize: isTablet ? 22 : 18,
|
||||
|
|
|
@ -96,7 +96,7 @@ class _IntroductionAnimationScreenState
|
|||
}
|
||||
|
||||
void _onSkipClick() {
|
||||
_animationController?.animateTo(0.8,
|
||||
_animationController?.animateTo(0.6,
|
||||
duration: Duration(milliseconds: 1200));
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ class _IntroductionAnimationScreenState
|
|||
|
||||
void _signUpClick() {
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute(builder: (context) => NavigationHomeScreen()),
|
||||
MaterialPageRoute(builder: (context) => LoginScreen()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import 'package:konectar_events/contacts_module/ui_screen/interactionform/new_dy
|
|||
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/new_editinteraction.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/new_new_profile.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/new_viewinteraction.dart';
|
||||
import 'package:konectar_events/model/events_speakers_k1.dart';
|
||||
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
||||
|
@ -29,6 +30,7 @@ import 'package:konectar_events/utils/dateformater.dart';
|
|||
import 'package:konectar_events/utils/util.dart';
|
||||
import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
|
||||
import 'package:konectar_events/widgets/customdropdown.dart';
|
||||
import 'package:konectar_events/widgets/snackbar.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -61,6 +63,9 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
bool isExtended = false;
|
||||
List<String> sessionList = [];
|
||||
String attachedFileName = '';
|
||||
String attachedFilePath = '';
|
||||
bool isLoading = false;
|
||||
String btnText = "Add Notes";
|
||||
final List<String> _fruits = ['Events', 'Sessions'];
|
||||
final List<String> topics = [
|
||||
" Admin. & Managemente",
|
||||
|
@ -70,6 +75,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
"Program Committee",
|
||||
"Practical Application of CDK 4/6 Inhibitor"
|
||||
];
|
||||
final ValueNotifier<List<int>> valueList = ValueNotifier<List<int>>([]);
|
||||
TextEditingController notesController = TextEditingController(text: "");
|
||||
List<String> sessionNotesList = [];
|
||||
Future<void> dialogBuilder(BuildContext context, Eventsdetail eventsdetail,
|
||||
|
@ -161,9 +167,14 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
setState(() {
|
||||
_selectedFruit = newValue!.sessionName;
|
||||
sessionsTopicsData = newValue;
|
||||
notesController.text = newValue.note ?? "";
|
||||
if (newValue.note != "" && notesController.text.length != 0) {
|
||||
btnText = "Update";
|
||||
}
|
||||
setState(() {});
|
||||
});
|
||||
},
|
||||
hint: Text("Select Session", style: hintStyle),
|
||||
hint: Text("Select Session *", style: hintStyle),
|
||||
items: provider.sessionTopics
|
||||
.map((session) => DropdownMenuItem<SessionsTopicsData>(
|
||||
value: session, child: Text(session.sessionName!)))
|
||||
|
@ -171,6 +182,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
|
||||
@override
|
||||
void initState() {
|
||||
valueList.value = [0, 0, 0];
|
||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
||||
init();
|
||||
});
|
||||
|
@ -183,8 +195,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
.getSessionData();
|
||||
await Provider.of<HcpProfileProvider>(context, listen: false)
|
||||
.getSessionTopics(widget.eventsdetail);
|
||||
// await Provider.of<HcpProfileProvider>(context, listen: false)
|
||||
// .getCounts(widget.eventsdetail);
|
||||
Provider.of<HcpProfileProvider>(context, listen: false).getCounts();
|
||||
|
||||
await Provider.of<InteractionProvider>(context, listen: false)
|
||||
.initConfigData();
|
||||
|
@ -197,6 +208,12 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
await Provider.of<ViewInteractionProvider>(context, listen: false)
|
||||
.getRecords(formname, hcp: widget.kolFullName);
|
||||
|
||||
valueList.value[0] =
|
||||
Provider.of<HcpProfileProvider>(context, listen: false).totalNotes;
|
||||
valueList.value[1] =
|
||||
Provider.of<HcpProfileProvider>(context, listen: false).totalSessions;
|
||||
valueList.value[2] =
|
||||
Provider.of<HcpProfileProvider>(context, listen: false).totalTopics;
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
|
@ -337,6 +354,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
buildprofile(
|
||||
BuildContext context, EventSpeakersData eventsdetail, String title) {
|
||||
MediaQuery.of(context).size.height * 0.35;
|
||||
print("ORG:${eventsdetail.orgName}");
|
||||
|
||||
return Container(
|
||||
//color: Colors.yellowAccent,
|
||||
|
@ -379,16 +397,69 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
// color: Colors.white,
|
||||
// // fontFamily: "SourceSerif",
|
||||
// )),
|
||||
Text(
|
||||
"${eventsdetail.orgName ?? ""} ${eventsdetail.country ?? ""} ${eventsdetail.city ?? ""}",
|
||||
softWrap: true,
|
||||
maxLines: 2,
|
||||
|
||||
RichText(
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
// fontFamily: "SourceSerif",
|
||||
fontSize: 14,
|
||||
)),
|
||||
text: TextSpan(children: [
|
||||
TextSpan(
|
||||
text: eventsdetail.orgName != null ||
|
||||
eventsdetail.orgName!.trim() != ""
|
||||
? '${eventsdetail.orgName}'
|
||||
: "",
|
||||
style: TextStyle(
|
||||
// decoration: TextDecoration.underline,
|
||||
// decorationColor: Colors.blue,
|
||||
color: Colors.white,
|
||||
|
||||
fontSize: 14,
|
||||
|
||||
// fontFamily: "SourceSerif",
|
||||
),
|
||||
|
||||
// maxLines: isTablet ? 4 : 4,
|
||||
// softWrap: true,
|
||||
// overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
TextSpan(
|
||||
text: eventsdetail.country != null
|
||||
? '${eventsdetail.country},'
|
||||
: "",
|
||||
style: TextStyle(
|
||||
// decoration: TextDecoration.underline,
|
||||
// decorationColor: Colors.blue,
|
||||
color: Colors.white,
|
||||
|
||||
fontSize: 14,
|
||||
|
||||
// fontFamily: "SourceSerif",
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: eventsdetail.city != null
|
||||
? '${eventsdetail.city}'
|
||||
: "",
|
||||
style: TextStyle(
|
||||
// decoration: TextDecoration.underline,
|
||||
// decorationColor: Colors.blue,
|
||||
color: Colors.white,
|
||||
|
||||
fontSize: 14,
|
||||
|
||||
// fontFamily: "SourceSerif",
|
||||
),
|
||||
)
|
||||
])),
|
||||
|
||||
// Text(
|
||||
// "${eventsdetail.orgName ?? ""},${eventsdetail.country ?? ""},${eventsdetail.city ?? ""}",
|
||||
// softWrap: true,
|
||||
// maxLines: 2,
|
||||
// textAlign: TextAlign.center,
|
||||
// style: TextStyle(
|
||||
// color: Colors.white,
|
||||
// // fontFamily: "SourceSerif",
|
||||
// fontSize: 14,
|
||||
// )),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -563,11 +634,14 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
),
|
||||
// const Spacer(),
|
||||
Center(
|
||||
child: _ProfileInfoRow(items: [
|
||||
ProfileInfoItem("Topic(s)", widget.topics.length),
|
||||
ProfileInfoItem("Session(s)", widget.sessionNames.length),
|
||||
ProfileInfoItem("Note(s)", provider.totalNotes),
|
||||
])),
|
||||
child: ValueListenableBuilder<List<int>>(
|
||||
valueListenable: valueList,
|
||||
builder: (context, value, child) => _ProfileInfoRow(items: [
|
||||
ProfileInfoItem("Topic(s)", value[2]),
|
||||
ProfileInfoItem("Session(s)", value[1]),
|
||||
ProfileInfoItem("Note(s)", value[0]),
|
||||
]),
|
||||
)),
|
||||
// SizedBox(
|
||||
// height: 20,
|
||||
// ),
|
||||
|
@ -583,9 +657,10 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
return Container(
|
||||
color: EventsConstants.bgcolor,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(15.0),
|
||||
padding: const EdgeInsets.only(left: 15.0, top: 15, right: 15),
|
||||
// decoration: BoxDecoration(
|
||||
// border: Border.all(color: Colors.grey),
|
||||
// borderRadius: BorderRadius.circular(8.0)),
|
||||
|
@ -608,6 +683,9 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
TextFormField(
|
||||
controller: notesController,
|
||||
maxLines: 3,
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(1000),
|
||||
],
|
||||
validator: (value) {
|
||||
// add email validation
|
||||
if (value == null || value.isEmpty) {
|
||||
|
@ -624,13 +702,17 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
return null;
|
||||
},
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Notes',
|
||||
hintText: 'Notes',
|
||||
labelText: 'Notes *',
|
||||
// hintText: 'Notes',
|
||||
// prefixIcon: Icon(Icons.note),
|
||||
border: OutlineInputBorder(),
|
||||
focusedBorder: OutlineInputBorder(),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Maximum Characters: 1000',
|
||||
style: TextStyle(fontSize: 12),
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
|
@ -647,7 +729,13 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
// sectionItem.selectedValue = [];
|
||||
// sectionItem.extension = [];
|
||||
// sectionItem.fileName = [];
|
||||
await getEncodedFile();
|
||||
if (_selectedFruit != null) {
|
||||
await getEncodedFile();
|
||||
} else {
|
||||
SnackBarWidget.displaySnackBar(
|
||||
"Please select a session", context,
|
||||
error: true);
|
||||
}
|
||||
|
||||
setState(() {});
|
||||
},
|
||||
|
@ -655,7 +743,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
height: 40,
|
||||
fontsize: 12,
|
||||
textColor: Colors.black,
|
||||
title: "Upload file"),
|
||||
title: "Attach file"),
|
||||
SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
|
@ -672,53 +760,95 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
)),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: SizedBox(
|
||||
height: 45,
|
||||
child: FloatingActionButton.extended(
|
||||
// backgroundColor: const Color.fromARGB(255, 222, 237, 247),
|
||||
backgroundColor: Colors.green,
|
||||
onPressed: () async {
|
||||
//"Program Committee Admin. & Management"
|
||||
//setState(() {
|
||||
print("ADD : ${_selectedFruit} ${notesController.text}");
|
||||
if (notesController.text.length != 0 ||
|
||||
notesController.text != "") {
|
||||
sessionNotesList
|
||||
.add("${_selectedFruit} \n\n ${notesController.text}");
|
||||
// });
|
||||
print(" eventid:${widget.eventid},hcp:${widget.eventid}");
|
||||
child: Stack(
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: SizedBox(
|
||||
height: 45,
|
||||
child: FloatingActionButton.extended(
|
||||
// backgroundColor: const Color.fromARGB(255, 222, 237, 247),
|
||||
backgroundColor: Colors.green,
|
||||
onPressed: () async {
|
||||
//"Program Committee Admin. & Management"
|
||||
//setState(() {
|
||||
isLoading = true;
|
||||
|
||||
await provider.submitSessionNotes(eventsdetail,
|
||||
sessionsTopicsData!, notesController.text);
|
||||
if (notesController.text.isNotEmpty &&
|
||||
sessionsTopicsData != null) {
|
||||
print("ADD : ${_selectedFruit}");
|
||||
sessionNotesList.add(
|
||||
"${_selectedFruit} \n\n ${notesController.text}");
|
||||
// });
|
||||
print(
|
||||
" eventid:${widget.eventid},hcp:${widget.eventid} session: ${sessionsTopicsData}");
|
||||
|
||||
SessionNotesModel notesModel = SessionNotesModel(
|
||||
notes: notesController.text,
|
||||
addedBy: "user",
|
||||
addedDate: CustomDateFormatter().formatDate(),
|
||||
eventid: widget.eventid,
|
||||
hcpid: widget.eventid,
|
||||
selectedSession: _selectedFruit);
|
||||
print(
|
||||
"${notesModel.addedBy},${notesModel.notes},${notesModel.addedDate},${notesModel.eventid},${notesModel.hcpid},${notesModel.selectedSession}");
|
||||
await provider.addSessionNotes(notesModel);
|
||||
_selectedFruit = null;
|
||||
sessionsTopicsData = null;
|
||||
notesController.clear();
|
||||
} else {
|
||||
print("something went wrong");
|
||||
}
|
||||
},
|
||||
heroTag: 'addnotes',
|
||||
elevation: 0,
|
||||
label: const Text(
|
||||
"Submit",
|
||||
style: TextStyle(color: Colors.white),
|
||||
await provider.submitSessionNotes(
|
||||
eventsdetail,
|
||||
sessionsTopicsData!,
|
||||
notesController.text,
|
||||
attachedFileName != '' ? attachedFilePath : "",
|
||||
attachedFileName != '' ? attachedFileName : "",
|
||||
);
|
||||
//HIVESTORE
|
||||
|
||||
SessionNotesModel notesModel = SessionNotesModel(
|
||||
notes: notesController.text,
|
||||
addedBy: "user",
|
||||
addedDate: CustomDateFormatter().formatDate(),
|
||||
eventid: widget.eventid,
|
||||
hcpid: widget.eventid,
|
||||
selectedSession: _selectedFruit);
|
||||
print(
|
||||
"${notesModel.addedBy},${notesModel.notes},${notesModel.addedDate},${notesModel.eventid},${notesModel.hcpid},${notesModel.selectedSession}");
|
||||
await provider.addSessionNotes(notesModel);
|
||||
_selectedFruit = null;
|
||||
isLoading = false;
|
||||
sessionsTopicsData = null;
|
||||
attachedFileName = "";
|
||||
notesController.clear();
|
||||
isLoading = false;
|
||||
setState(() {});
|
||||
SnackBarWidget.displaySnackBar(
|
||||
"Notes added",
|
||||
context,
|
||||
);
|
||||
} else {
|
||||
isLoading = false;
|
||||
SnackBarWidget.displaySnackBar(
|
||||
"Session/Notes cannot be empty", context,
|
||||
error: true);
|
||||
}
|
||||
},
|
||||
heroTag: 'addnotes',
|
||||
elevation: 0,
|
||||
label: Text(
|
||||
btnText,
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
// icon: const Icon(
|
||||
// Icons.add,
|
||||
// color: Colors.black,
|
||||
// ),
|
||||
),
|
||||
),
|
||||
),
|
||||
// icon: const Icon(
|
||||
// Icons.add,
|
||||
// color: Colors.black,
|
||||
// ),
|
||||
),
|
||||
Visibility(
|
||||
visible: isLoading,
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: EventsConstants.blueColor,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Divider(),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 15.0),
|
||||
child: Text(
|
||||
"My Notes",
|
||||
style: TextStyle(fontSize: 16),
|
||||
),
|
||||
),
|
||||
Divider(),
|
||||
|
@ -726,8 +856,8 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
//height: 200,
|
||||
child: ListView.separated(
|
||||
padding: EdgeInsets.all(2.0),
|
||||
itemCount: provider
|
||||
.getSessionNotesList(widget.eventid, widget.eventsdetail)
|
||||
itemCount: provider.sessionTopics
|
||||
.where((element) => element.canEditNotes == true)
|
||||
.length,
|
||||
itemBuilder: (context, index) {
|
||||
return SizedBox(
|
||||
|
@ -736,7 +866,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
: MediaQuery.of(context).size.width * 0.5,
|
||||
child: ListTile(
|
||||
title: Text(
|
||||
"\"${provider.sessionNotesList[index].notes}\"",
|
||||
"\"${provider.sessionTopics[index].note}\"",
|
||||
// maxLines: 3,
|
||||
style: TextStyle(
|
||||
// decoration: TextDecoration.underline,
|
||||
|
@ -754,7 +884,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
height: 10,
|
||||
),
|
||||
Text(
|
||||
"Session: ${provider.sessionNotesList[index].selectedSession}",
|
||||
"Session: ${provider.sessionTopics[index].sessionName}",
|
||||
// maxLines: 3,
|
||||
style: TextStyle(
|
||||
// decoration: TextDecoration.underline,
|
||||
|
@ -765,38 +895,59 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
//fontStyle: FontStyle.italic,
|
||||
fontSize: 14),
|
||||
),
|
||||
CustomButton(
|
||||
backgroundColor:
|
||||
const Color.fromARGB(255, 233, 229, 229),
|
||||
onPressed: () {
|
||||
sessionsTopicsData =
|
||||
provider.sessionTopics[index];
|
||||
_selectedFruit =
|
||||
provider.sessionTopics[index].sessionName;
|
||||
notesController.text =
|
||||
provider.sessionTopics[index].note ?? "";
|
||||
if (notesController.text.length != 0) {
|
||||
btnText = "Update";
|
||||
}
|
||||
|
||||
setState(() {});
|
||||
},
|
||||
width: 80,
|
||||
height: 30,
|
||||
fontsize: 12,
|
||||
textColor: Colors.black,
|
||||
title: "Edit"),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Added By: ${provider.sessionNotesList[index].addedBy}",
|
||||
// maxLines: 3,
|
||||
style: TextStyle(
|
||||
// decoration: TextDecoration.underline,
|
||||
// decorationColor: Colors.blue,
|
||||
//fontFamily: "SourceSerif",
|
||||
color: const Color.fromARGB(255, 66, 65, 65),
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// Text(
|
||||
// "Added By:me",
|
||||
// // maxLines: 3,
|
||||
// style: TextStyle(
|
||||
// // decoration: TextDecoration.underline,
|
||||
// // decorationColor: Colors.blue,
|
||||
// //fontFamily: "SourceSerif",
|
||||
// color: const Color.fromARGB(255, 66, 65, 65),
|
||||
|
||||
//fontStyle: FontStyle.italic,
|
||||
fontSize: 12),
|
||||
),
|
||||
Text(
|
||||
"On: ${provider.sessionNotesList[index].addedDate}",
|
||||
// maxLines: 3,
|
||||
style: TextStyle(
|
||||
// decoration: TextDecoration.underline,
|
||||
// decorationColor: Colors.blue,
|
||||
//fontFamily: "SourceSerif",
|
||||
color: const Color.fromARGB(255, 66, 65, 65),
|
||||
// //fontStyle: FontStyle.italic,
|
||||
// fontSize: 12),
|
||||
// ),
|
||||
// Text(
|
||||
// "On: ${provider.sessionNotesList[index].addedDate}",
|
||||
// // maxLines: 3,
|
||||
// style: TextStyle(
|
||||
// // decoration: TextDecoration.underline,
|
||||
// // decorationColor: Colors.blue,
|
||||
// //fontFamily: "SourceSerif",
|
||||
// color: const Color.fromARGB(255, 66, 65, 65),
|
||||
|
||||
//fontStyle: FontStyle.italic,
|
||||
fontSize: 12),
|
||||
),
|
||||
],
|
||||
),
|
||||
// //fontStyle: FontStyle.italic,
|
||||
// fontSize: 12),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -819,7 +970,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
: await Permission.storage.status;
|
||||
if (status.isGranted) {
|
||||
FilePickerResult? result =
|
||||
await FilePicker.platform.pickFiles(allowMultiple: true);
|
||||
await FilePicker.platform.pickFiles(allowMultiple: false);
|
||||
|
||||
if (result != null) {
|
||||
print(result.files.first.path);
|
||||
|
@ -850,6 +1001,10 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
Uint8List imageUint8List = Uint8List.fromList(imageBytes);
|
||||
base64Image = base64Encode(imageUint8List);
|
||||
attachedFileName = fileName;
|
||||
attachedFilePath = newFile.path;
|
||||
if (notesController.text == "") {
|
||||
notesController.text = "This attachment is loaded by Vinod Hangal";
|
||||
}
|
||||
// sectionItem.selectedValue!.add(base64Image);
|
||||
// sectionItem.extension!.add(extension);
|
||||
// sectionItem.fileName!.add(fileName);
|
||||
|
@ -1214,6 +1369,10 @@ class _ProfileInfoRow extends StatelessWidget {
|
|||
List<ProfileInfoItem> items;
|
||||
_ProfileInfoRow({Key? key, required this.items}) : super(key: key);
|
||||
|
||||
bool shouldRebuild(_ProfileInfoRow delegate) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
|
|
|
@ -7,6 +7,7 @@ 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';
|
||||
|
@ -54,11 +55,13 @@ class EventsProvider extends ChangeNotifier {
|
|||
List<FlutterHashtag> kFlutterHashtags = [];
|
||||
List<TopicsCloudData> topics = [];
|
||||
List<Specialty> specialtyList = [];
|
||||
EventsOverviewData? overviewData;
|
||||
List<Affiliations> affiliations = [];
|
||||
|
||||
EventsOverviewData overviewData = EventsOverviewData(
|
||||
arrEvents: [], topSpeakers: [], eventSponsers: [], eventTopics: []);
|
||||
Affiliations affiliations =
|
||||
Affiliations(affiliationCount: [], affiliationNames: []);
|
||||
List<AllSessionNotesResponse> allSessionNotes = [];
|
||||
late StreamSubscription<List<ConnectivityResult>> connectivitySubscription;
|
||||
|
||||
bool isLoadingInsights = true;
|
||||
Future<void> onSelectAll(int page) async {
|
||||
isFavSeleted = false;
|
||||
isAllSelected = !isAllSelected;
|
||||
|
@ -236,13 +239,13 @@ class EventsProvider extends ChangeNotifier {
|
|||
|
||||
offlineEvents = await getOfflineMyEvents();
|
||||
eventList = isFavSeleted
|
||||
? await ApiCall().getEventsFromK1(type: "2")
|
||||
? 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(type: 2)
|
||||
: await ApiCall().getEventsFromK1();
|
||||
//eventList = (await ApiCall().getStagingEvents())!;
|
||||
for (var events in eventList) {
|
||||
|
@ -268,11 +271,11 @@ class EventsProvider extends ChangeNotifier {
|
|||
|
||||
Future<List<EventsList>> getMyEvents(int page) async {
|
||||
// eventList = await getAllEventsData();
|
||||
myEvents = await ApiCall().getEventsFromK1(type: "2");
|
||||
myEvents = await ApiCall().getEventsFromK1(type: 2);
|
||||
print("see the list : $myEvents");
|
||||
if (myEvents.isEmpty) {
|
||||
// eventList = (await ApiCall().getEvents())!;
|
||||
myEvents = await ApiCall().getEventsFromK1(type: "2");
|
||||
myEvents = await ApiCall().getEventsFromK1(type: 2);
|
||||
//eventList = (await ApiCall().getStagingEvents())!;
|
||||
}
|
||||
for (var events in myEvents) {
|
||||
|
@ -309,7 +312,7 @@ class EventsProvider extends ChangeNotifier {
|
|||
|
||||
Future<List<EventSpeakersData>> getInitialSpeakersDetails(String eventid,
|
||||
{required String searchkey}) async {
|
||||
speakersList = (await ApiCall().getEventsSpeakersFromK1(eventid));
|
||||
speakersList = await ApiCall().getEventsSpeakersFromK1(eventid);
|
||||
getSessionCount();
|
||||
if (searchkey.length != 0) {
|
||||
List<EventSpeakersData> searchspeakers = speakersList
|
||||
|
@ -481,37 +484,52 @@ class EventsProvider extends ChangeNotifier {
|
|||
notifyListeners();
|
||||
}
|
||||
|
||||
FutureOr getTopicsCloud(EventsList event) async {
|
||||
List<TopicsCloudData> topics = (await ApiCall().insightsTopicsCloud(
|
||||
eventid: event.eventId!, startDate: event.start!, endDate: event.end!));
|
||||
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!), false));
|
||||
kFlutterHashtags.add(
|
||||
FlutterHashtag(topic.topic!, int.parse(topic.total!) + 500, false));
|
||||
}
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
FutureOr getSpecialtyData(EventsList event) async {
|
||||
specialtyList = (await ApiCall().specialtyOfSpeakers(
|
||||
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!))));
|
||||
|
||||
CustomDateFormatter().convertStringToDate(event.end!)),
|
||||
client: client ?? false);
|
||||
//isLoadingInsights = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
FutureOr getAffiliations(EventsList event) async {
|
||||
affiliations = (await ApiCall().insightsBarChart(
|
||||
eventid: event.eventId!, startDate: event.start!, endDate: event.end!));
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -523,5 +541,19 @@ class EventsProvider extends ChangeNotifier {
|
|||
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
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'dart:math';
|
|||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:konectar_events/model/allsessionnotesmodel.dart';
|
||||
import 'package:konectar_events/model/events_speakers_k1.dart';
|
||||
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
||||
import 'package:konectar_events/model/eventspeakers.dart';
|
||||
|
@ -15,37 +16,65 @@ import 'package:konectar_events/widgets/word_cloud.dart';
|
|||
|
||||
class HcpProfileProvider extends ChangeNotifier {
|
||||
List<SessionNotesModel> sessionNotesList = [];
|
||||
List<SessionNotesModel> allSessionNotesList = [];
|
||||
List<SessionNotesModel> allSessionNotesHiveList = [];
|
||||
int totalTopics = 0;
|
||||
int totalSessions = 0;
|
||||
int totalNotes = 0;
|
||||
List<SessionsTopicsData> sessionTopics = [];
|
||||
List<AllSessionNotesResponse> allSessionNotes = [];
|
||||
late Box<SessionNotesModel> box;
|
||||
|
||||
Future<void> getSessionTopics(EventSpeakersData detail) async {
|
||||
sessionTopics = await ApiCall().getSessionsTopics(detail.eid!,
|
||||
detail.kolId == "0" ? detail.hcpPinAlias! : detail.kolId!, detail.kId!);
|
||||
totalSessions = sessionTopics.length;
|
||||
getCounts();
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Future<dynamic> submitSessionNotes(EventSpeakersData detail,
|
||||
SessionsTopicsData sessionsTopicsData, String notes) async {
|
||||
var data = await ApiCall().addSessionNotes(
|
||||
sessionsTopicsData.kolEventsId!,
|
||||
detail.kolId == "0" ? detail.hcpPinAlias! : detail.kolId!,
|
||||
detail.eventAttendeesId!,
|
||||
detail.kId!,
|
||||
notes);
|
||||
Future<dynamic> submitSessionNotes(
|
||||
EventSpeakersData detail,
|
||||
SessionsTopicsData sessionsTopicsData,
|
||||
String notes,
|
||||
String? selectedfilepath,
|
||||
String? selectedfilename) async {
|
||||
var data = await ApiCall()
|
||||
.addSessionNotes(
|
||||
sessionsTopicsData.kolEventsId!,
|
||||
sessionsTopicsData.kolId!,
|
||||
sessionsTopicsData.eventAttendeesId!,
|
||||
detail.kId!,
|
||||
notes,
|
||||
selectedfilepath,
|
||||
selectedfilename,
|
||||
sessionsTopicsData.id ?? "",
|
||||
)
|
||||
.then(
|
||||
(value) {
|
||||
getSessionTopics(detail);
|
||||
},
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
getCounts(Eventsdetail eventsdetail) {
|
||||
List<String> topics = eventsdetail.eventTopics!.split("|");
|
||||
totalTopics = topics.length;
|
||||
getCounts() {
|
||||
// List<String> topics = eventsdetail.eventTopics!.split("|");
|
||||
// totalTopics = topics.length;
|
||||
|
||||
totalSessions = int.parse(eventsdetail.numSess ?? "1");
|
||||
totalNotes = sessionNotesList.length;
|
||||
// totalSessions = int.parse(eventsdetail.numSess ?? "1");
|
||||
// totalNotes = sessionNotesList.length;
|
||||
int total = 0;
|
||||
int totalT = 0;
|
||||
if (sessionTopics.isNotEmpty) {
|
||||
for (var obj in sessionTopics) {
|
||||
print("Notes_count : ${obj.noteCount}");
|
||||
total = total + int.parse(obj.noteCount ?? "0");
|
||||
totalT = totalT + obj.eventTopics!.split("|").length ?? 0;
|
||||
}
|
||||
}
|
||||
totalNotes = total;
|
||||
totalTopics = totalT;
|
||||
totalSessions = sessionTopics.length;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
|
@ -87,7 +116,7 @@ class HcpProfileProvider extends ChangeNotifier {
|
|||
print("Check hcp id");
|
||||
// print("$eid,$hcpid");
|
||||
await getSessionData();
|
||||
allSessionNotesList =
|
||||
allSessionNotesHiveList =
|
||||
sessionNotesList.where((element) => element.eventid == eid).toList();
|
||||
notifyListeners();
|
||||
}
|
||||
|
|
|
@ -27,16 +27,18 @@ class ChartLine extends StatelessWidget {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
//constraints: BoxConstraints(minWidth: lineWidget),
|
||||
child: IntrinsicWidth(
|
||||
constraints: BoxConstraints(
|
||||
minWidth: lineWidget, minHeight: constraints.minHeight),
|
||||
child: Expanded(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
//mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
overflow: TextOverflow.clip,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
@ -2,14 +2,17 @@ import 'package:flutter/material.dart';
|
|||
import 'package:konectar_events/utils/constants.dart';
|
||||
|
||||
class SnackBarWidget {
|
||||
static displaySnackBar(String msg, BuildContext context) {
|
||||
static displaySnackBar(String msg, BuildContext context,
|
||||
{bool error = false}) {
|
||||
final snackBar = SnackBar(
|
||||
content: Text(
|
||||
msg,
|
||||
style: TextStyle(color: Colors.black),
|
||||
),
|
||||
backgroundColor: EventsConstants.oldbgcolor,
|
||||
duration: Durations.long1,
|
||||
backgroundColor: error
|
||||
? Color.fromARGB(255, 235, 110, 76)
|
||||
: EventsConstants.oldbgcolor,
|
||||
duration: error ? Durations.long3 : Durations.long1,
|
||||
);
|
||||
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
||||
//scaffoldKeyLogin.currentState!.showSnackBar(snackBar);
|
||||
|
|
|
@ -1685,6 +1685,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
zoom_widget:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: zoom_widget
|
||||
sha256: "50fbaa460ffc938ca14c0077f8c9e5968c437897242d7f552dacff1bf3270225"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
sdks:
|
||||
dart: ">=3.3.0 <4.0.0"
|
||||
flutter: ">=3.19.0"
|
||||
|
|
|
@ -94,6 +94,7 @@ dependencies:
|
|||
animations: ^2.0.11
|
||||
overlay_support: ^2.1.0
|
||||
flutter_svg_provider: ^1.0.7
|
||||
zoom_widget: ^2.0.1
|
||||
|
||||
dev_dependencies:
|
||||
|
||||
|
|
Loading…
Reference in New Issue