constants,contact module updated #9
|
@ -1,4 +1,11 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="29" />
|
||||
<application android:label="konectar_events" android:name="${applicationName}" android:icon="@mipmap/launcher_icon">
|
||||
<activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
|
|
|
@ -4,22 +4,29 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter/services.dart';
|
||||
|
||||
class Constants {
|
||||
static Color k2color = Color.fromARGB(255, 0, 71, 132);
|
||||
static Color k2color1 = Color.fromARGB(255, 0, 71, 132);
|
||||
// static Color k2color = Color.fromARGB(255, 0, 71, 132);
|
||||
// static Color k2color1 = Color.fromARGB(255, 0, 71, 132);
|
||||
// static const Color profilecard = Color.fromARGB(255, 4, 104, 198);
|
||||
// static const Color btmcard = Color.fromARGB(2255, 251, 242, 242);
|
||||
|
||||
static Color cardtext = Colors.transparent;
|
||||
static Color cardtextdark = Colors.transparent;
|
||||
// static Color cardtext = Colors.transparent;
|
||||
|
||||
static const Color bgcolor = Color(0xFFF2F3F8);
|
||||
static Color bgcolor2 = const Color.fromARGB(255, 0, 112, 184);
|
||||
// static Color cardtextdark = Colors.transparent;
|
||||
|
||||
static Color k2color11 = Colors.white;
|
||||
// static const Color bgcolor = Color(0xFFF2F3F8);
|
||||
// static const Color bgwhitecolor = Colors.white;
|
||||
|
||||
// static Color bgcolor2 = const Color.fromARGB(255, 0, 112, 184);
|
||||
|
||||
// static Color k2color11 = Colors.white;
|
||||
|
||||
static final Future<String> response =
|
||||
rootBundle.loadString('assets/section.json');
|
||||
static const Color tabbgColor = Color.fromARGB(255, 0, 112, 184);
|
||||
// static const Color tabbgColor = Color.fromARGB(255, 0, 112, 184);
|
||||
|
||||
static const url = "http://192.168.2.143:8000/api";
|
||||
//static const url = "http://192.168.2.143:8000/api";
|
||||
//static const url = "http://192.168.53.50:8000/api";
|
||||
static const url = "http://192.168.2.170:8000/api";
|
||||
|
||||
// static const url = "http://192.168.21.50:8000/api";
|
||||
|
||||
|
@ -27,4 +34,28 @@ class Constants {
|
|||
//static const url = 'http://192.168.153.50:8082/api';192.168.21.50:8000
|
||||
|
||||
static const k2url = "http://192.168.2.130:8888/api";
|
||||
|
||||
static const notes = "http://192.168.2.170:8001/api/all-routes";
|
||||
|
||||
// static const Map<String, int> apiIntervals1 = {
|
||||
// k2url: 1, // Interval in minutes
|
||||
// 'http://192.168.2.170:8001/api/all-routes': 2,
|
||||
// };
|
||||
|
||||
static const Map<String, Map<String, dynamic>> apiIntervals1 = {
|
||||
'api1': {
|
||||
'url': 'http://192.168.2.170:8000/api/receive-data',
|
||||
'intervals': 1,
|
||||
'hivename': 'InteractionDataBox',
|
||||
'hivetype': 'SaveInteraction'
|
||||
},
|
||||
'api2': {
|
||||
'url': 'http://192.168.2.170:8000/api/receive-data',
|
||||
'intervals': 2,
|
||||
'hivename': 'notehive',
|
||||
'hivetype': 'String'
|
||||
},
|
||||
};
|
||||
|
||||
static const get_api_list = "http://192.168.2.170:8002/api/all-routes";
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,42 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/text.dart';
|
||||
|
||||
class ClickRow extends StatefulWidget {
|
||||
final IconData? icon;
|
||||
final String? text;
|
||||
final VoidCallback? onTap;
|
||||
const ClickRow({super.key, this.icon, this.text, this.onTap});
|
||||
|
||||
@override
|
||||
State<ClickRow> createState() => _ClickRowState();
|
||||
}
|
||||
|
||||
class _ClickRowState extends State<ClickRow> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(left: 15.0),
|
||||
child: InkWell(
|
||||
onTap: widget.onTap,
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
size: 16,
|
||||
widget.icon,
|
||||
color: Colors.white,
|
||||
),
|
||||
const SizedBox(width: 3.0),
|
||||
Expanded(
|
||||
child: Text1(
|
||||
title: widget.text!,
|
||||
txtcolor: Colors.white,
|
||||
fontweight: FontWeight.normal,
|
||||
txtfont: 14.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
||||
|
||||
class CustomProfile extends StatelessWidget {
|
||||
final String? imgstring;
|
||||
final double? radius;
|
||||
final double? fontsize;
|
||||
final String? name;
|
||||
const CustomProfile(
|
||||
{super.key, this.imgstring, this.fontsize, this.radius, this.name});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return imgstring == ""
|
||||
? ProfilePicture(
|
||||
name: name ?? "",
|
||||
radius: radius!,
|
||||
fontsize: fontsize!,
|
||||
)
|
||||
: ClipOval(
|
||||
child: SizedBox.fromSize(
|
||||
size: Size.fromRadius(radius!),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: imgstring!,
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: imageProvider,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/constants.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/text.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
|
||||
class CustomAppbar extends StatefulWidget {
|
||||
final String title;
|
||||
const CustomAppbar({super.key, required this.title});
|
||||
|
||||
@override
|
||||
State<CustomAppbar> createState() => _CustomAppbarState();
|
||||
}
|
||||
|
||||
class _CustomAppbarState extends State<CustomAppbar> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppBar(
|
||||
backgroundColor: AppColors.blueColor,
|
||||
leading: IconButton(
|
||||
icon: const Icon(
|
||||
Icons.arrow_back_ios_new,
|
||||
color: AppColors.contentColorWhite,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(false),
|
||||
),
|
||||
title: Text1(
|
||||
title: widget.title,
|
||||
txtcolor: AppColors.contentColorWhite,
|
||||
),
|
||||
actions: <Widget>[],
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,141 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomLongPressContainer extends StatelessWidget {
|
||||
final bool? switchValue;
|
||||
final List<String>? selectedIndices;
|
||||
final List<int>? selectedRemoveIndices;
|
||||
final void Function()? onAddToContacts;
|
||||
final void Function()? onRemoveFromContacts;
|
||||
final void Function()? onDownload;
|
||||
final void Function()? onCancel;
|
||||
final void Function()? onSaveOffline;
|
||||
|
||||
CustomLongPressContainer({
|
||||
this.switchValue,
|
||||
this.selectedIndices,
|
||||
this.selectedRemoveIndices,
|
||||
this.onAddToContacts,
|
||||
this.onRemoveFromContacts,
|
||||
this.onDownload,
|
||||
this.onCancel,
|
||||
this.onSaveOffline,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: Colors.grey[200], // Example color, you can change it
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 220.0,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// Add to Contacts Section
|
||||
switchValue!
|
||||
? GestureDetector(
|
||||
onTap: onRemoveFromContacts,
|
||||
child: Row(
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(15.0),
|
||||
child: Icon(
|
||||
Icons.remove,
|
||||
color: Colors.green,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Remove from My Contacts',
|
||||
style: TextStyle(color: Colors.black),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: GestureDetector(
|
||||
onTap: onAddToContacts,
|
||||
child: Row(
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(15.0),
|
||||
child: Icon(
|
||||
Icons.add,
|
||||
color: Colors.green,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Add to My Contacts',
|
||||
style: TextStyle(color: Colors.black),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// Download Section
|
||||
GestureDetector(
|
||||
onTap: onDownload,
|
||||
child: Row(
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(15.0),
|
||||
child: Icon(
|
||||
Icons.download,
|
||||
color: Colors.blue,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Download',
|
||||
style: TextStyle(color: Colors.black),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// Cancel Section
|
||||
GestureDetector(
|
||||
onTap: onCancel,
|
||||
child: Row(
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(15.0),
|
||||
child: Icon(
|
||||
Icons.close,
|
||||
color: Colors.red,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Cancel',
|
||||
style: TextStyle(color: Colors.black),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// Save Offline Section (Only if switchValue is false)
|
||||
Visibility(
|
||||
visible: !switchValue!,
|
||||
child: GestureDetector(
|
||||
onTap: onSaveOffline,
|
||||
child: Row(
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(15.0),
|
||||
child: Icon(
|
||||
Icons.save,
|
||||
color: Colors.deepOrange,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 5.0),
|
||||
child: Text(
|
||||
'Save Offline',
|
||||
style: TextStyle(color: Colors.black),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomCard extends StatefulWidget {
|
||||
final double? elevation;
|
||||
final Color? color;
|
||||
final Color? tintcolor;
|
||||
final Widget? child;
|
||||
|
||||
final double? bradius;
|
||||
const CustomCard(
|
||||
{super.key,
|
||||
this.elevation,
|
||||
this.color,
|
||||
this.bradius,
|
||||
this.tintcolor,
|
||||
this.child});
|
||||
|
||||
@override
|
||||
State<CustomCard> createState() => _CustomCardState();
|
||||
}
|
||||
|
||||
class _CustomCardState extends State<CustomCard> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Card(
|
||||
elevation: widget.elevation!,
|
||||
color: widget.color,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(widget.bradius!)),
|
||||
child: widget.child,
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:konectar_events/contacts_module/constants.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/text.dart';
|
||||
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_Certificate_k2.dart';
|
||||
|
@ -9,25 +11,29 @@ import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_eve
|
|||
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_location_k2.dart';
|
||||
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_pno_k2.dart';
|
||||
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_training_k2.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
|
||||
class CustomExpansionTile<T> extends StatefulWidget {
|
||||
final String title;
|
||||
final List<T> itemList;
|
||||
final List<T>? itemList;
|
||||
final String buttonText;
|
||||
final String field1;
|
||||
final String field2;
|
||||
bool? noexpand;
|
||||
final VoidCallback? onButtonPressed; // Add this parameter for button callback
|
||||
|
||||
final Function(T) onItemSelected;
|
||||
|
||||
const CustomExpansionTile({
|
||||
CustomExpansionTile({
|
||||
Key? key,
|
||||
required this.title,
|
||||
required this.itemList,
|
||||
this.itemList,
|
||||
required this.buttonText,
|
||||
required this.onItemSelected,
|
||||
required this.field1,
|
||||
required this.field2,
|
||||
this.noexpand,
|
||||
this.onButtonPressed, // Initialize it
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
|
@ -37,6 +43,8 @@ class CustomExpansionTile<T> extends StatefulWidget {
|
|||
class _CustomExpansionTileState<T> extends State<CustomExpansionTile<T>> {
|
||||
bool _isExpanded = false;
|
||||
|
||||
//var noexpand;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
print("Chekingg_Field_one: ${widget.field1}");
|
||||
|
@ -51,9 +59,9 @@ class _CustomExpansionTileState<T> extends State<CustomExpansionTile<T>> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
onExpansionChanged: (bool expanded) {
|
||||
|
@ -78,7 +86,7 @@ class _CustomExpansionTileState<T> extends State<CustomExpansionTile<T>> {
|
|||
),
|
||||
const SizedBox(width: 8.0),
|
||||
Text1(
|
||||
title: "(${widget.itemList.length})",
|
||||
title: "(${widget.itemList!.length})",
|
||||
txtcolor: Colors.black,
|
||||
fontweight: FontWeight.normal,
|
||||
txtfont: 16.0,
|
||||
|
@ -86,72 +94,76 @@ class _CustomExpansionTileState<T> extends State<CustomExpansionTile<T>> {
|
|||
],
|
||||
),
|
||||
children: [
|
||||
Scrollbar(
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Container(
|
||||
constraints: BoxConstraints(
|
||||
minWidth: MediaQuery.of(context).size.width,
|
||||
),
|
||||
color: Colors.white,
|
||||
child: DataTable(
|
||||
showCheckboxColumn: false,
|
||||
columns: [
|
||||
DataColumn(
|
||||
label: Expanded(
|
||||
child: Text(
|
||||
widget.field1 ?? 'Item',
|
||||
style: TextStyle(fontWeight: FontWeight.w600),
|
||||
softWrap: true,
|
||||
Visibility(
|
||||
visible: widget.noexpand!,
|
||||
child: Scrollbar(
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Container(
|
||||
constraints: BoxConstraints(
|
||||
minWidth: MediaQuery.of(context).size.width,
|
||||
),
|
||||
color: Colors.white,
|
||||
child: DataTable(
|
||||
showCheckboxColumn: false,
|
||||
columns: [
|
||||
DataColumn(
|
||||
label: Expanded(
|
||||
child: Text(
|
||||
widget.field1 ?? 'Item',
|
||||
style: TextStyle(fontWeight: FontWeight.w600),
|
||||
softWrap: true,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
DataColumn(
|
||||
label: Expanded(
|
||||
child: Text(
|
||||
widget.field2 ?? 'Details',
|
||||
style: TextStyle(fontWeight: FontWeight.w600),
|
||||
DataColumn(
|
||||
label: Expanded(
|
||||
child: Text(
|
||||
widget.field2 ?? 'Details',
|
||||
style: TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
rows: List.generate(widget.itemList.take(2).length,
|
||||
(index) {
|
||||
final item = widget.itemList[index];
|
||||
],
|
||||
rows: List.generate(widget.itemList!.take(2).length,
|
||||
(index) {
|
||||
final item = widget.itemList![index];
|
||||
|
||||
return DataRow(
|
||||
onSelectChanged: (value) {
|
||||
widget.onItemSelected(widget.itemList[index]);
|
||||
},
|
||||
cells: [
|
||||
DataCell(getdatacel1(item)),
|
||||
DataCell(
|
||||
getdatacel2(item),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
return DataRow(
|
||||
onSelectChanged: (value) {
|
||||
widget.onItemSelected(widget.itemList![index]);
|
||||
},
|
||||
cells: [
|
||||
DataCell(getdatacel1(item)),
|
||||
DataCell(
|
||||
getdatacel2(item),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
color: Colors.white,
|
||||
child: Align(
|
||||
alignment: Alignment.center,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: OutlinedButton(
|
||||
onPressed: () {
|
||||
// Handle the button action here
|
||||
},
|
||||
child: Text(
|
||||
widget.buttonText,
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
Visibility(
|
||||
visible: widget.noexpand!,
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
child: Align(
|
||||
alignment: Alignment.center,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: OutlinedButton(
|
||||
onPressed: widget.onButtonPressed,
|
||||
child: Text(
|
||||
widget.buttonText,
|
||||
style: TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/newformlist.dart';
|
||||
|
||||
class CustomFloatingBtn extends StatefulWidget {
|
||||
final double? height;
|
||||
final double? width;
|
||||
final Color? color;
|
||||
final double? borderWidth;
|
||||
final double? borderRadius;
|
||||
final IconData? icon;
|
||||
final Color? iconColor;
|
||||
final double? iconsize;
|
||||
final VoidCallbackAction? ontap;
|
||||
|
||||
const CustomFloatingBtn(
|
||||
{super.key,
|
||||
this.height,
|
||||
this.width,
|
||||
this.color,
|
||||
this.borderRadius,
|
||||
this.borderWidth,
|
||||
this.ontap,
|
||||
this.icon,
|
||||
this.iconColor,
|
||||
this.iconsize});
|
||||
|
||||
@override
|
||||
State<CustomFloatingBtn> createState() => _CustomFloatingBtnState();
|
||||
}
|
||||
|
||||
class _CustomFloatingBtnState extends State<CustomFloatingBtn> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: widget.width,
|
||||
height: widget.height,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: widget.color!, // Outer border color
|
||||
width: 1.8,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(widget.borderRadius!), // Rounded border
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: widget.color!.withOpacity(0.2), // Shadow color with opacity
|
||||
blurRadius: 5, // Shadow blur radius
|
||||
spreadRadius: 2, // Spread of the shadow
|
||||
offset: Offset(2, 2), // Shadow offset
|
||||
),
|
||||
],
|
||||
),
|
||||
child: FloatingActionButton(
|
||||
// shape: CircleBorder(),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(width: 7, color: widget.iconColor!),
|
||||
borderRadius: BorderRadius.circular(widget.borderRadius!)),
|
||||
|
||||
onPressed: () async {
|
||||
Navigator.push(
|
||||
context, MaterialPageRoute(builder: (context) => FormList()));
|
||||
},
|
||||
foregroundColor: widget.iconColor,
|
||||
backgroundColor: widget.color,
|
||||
child: Text(
|
||||
String.fromCharCode(widget.icon!.codePoint),
|
||||
style: TextStyle(
|
||||
color: widget.iconColor,
|
||||
inherit: false,
|
||||
fontSize: widget.iconsize,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: Icons.space_dashboard_outlined.fontFamily,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomSizedBox extends StatelessWidget {
|
||||
final double? height;
|
||||
final double? width;
|
||||
|
||||
const CustomSizedBox({this.height, this.width});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: height,
|
||||
width: width,
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class CustomSwitch extends StatefulWidget {
|
||||
final Color? activeclor;
|
||||
final bool? switchvalue;
|
||||
final ValueChanged<bool>? onchanged;
|
||||
const CustomSwitch(
|
||||
{super.key, this.activeclor, this.switchvalue, this.onchanged});
|
||||
|
||||
@override
|
||||
State<CustomSwitch> createState() => _CustomSwitchState();
|
||||
}
|
||||
|
||||
class _CustomSwitchState extends State<CustomSwitch> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CupertinoSwitch(
|
||||
activeColor: widget.activeclor,
|
||||
value: widget.switchvalue!,
|
||||
onChanged: widget.onchanged
|
||||
// (value) {
|
||||
// setState(() {
|
||||
// _switchValue = value;
|
||||
// });
|
||||
// },
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class IconTextRow extends StatelessWidget {
|
||||
final IconData? icon;
|
||||
final String? text;
|
||||
final double iconSize;
|
||||
final Color iconColor;
|
||||
final double fontSize;
|
||||
|
||||
const IconTextRow({
|
||||
Key? key,
|
||||
this.icon,
|
||||
required this.text,
|
||||
this.iconSize = 20.0,
|
||||
this.iconColor = Colors
|
||||
.blue, // Default color, replace with your Constants.k2color if needed
|
||||
this.fontSize = 16.0,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
children: [
|
||||
// Icon(
|
||||
// icon,
|
||||
// size: iconSize,
|
||||
// color: iconColor,
|
||||
// ),
|
||||
SizedBox(width: 8.0),
|
||||
Text(
|
||||
text ?? '', // Show empty string if text is null
|
||||
style: TextStyle(fontSize: fontSize),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,161 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/clickable_row.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/custiom_profilepic.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/custom_card.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/text.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../constants.dart';
|
||||
|
||||
class ProfileCard extends StatefulWidget {
|
||||
final String? name;
|
||||
final String? spl;
|
||||
final String? imgurl;
|
||||
final String? email;
|
||||
final String? pno;
|
||||
final String? address;
|
||||
const ProfileCard(
|
||||
{super.key,
|
||||
this.name,
|
||||
this.spl,
|
||||
this.imgurl,
|
||||
this.email,
|
||||
this.pno,
|
||||
this.address});
|
||||
|
||||
@override
|
||||
State<ProfileCard> createState() => _ProfileCardState();
|
||||
}
|
||||
|
||||
class _ProfileCardState extends State<ProfileCard> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomCard(
|
||||
elevation: 6,
|
||||
color: AppColors.profilecard,
|
||||
bradius: 28,
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 15.0, right: 15.0, top: 15.0, bottom: 15.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Flexible(
|
||||
flex: 7,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text1(
|
||||
title: widget.name ?? " ",
|
||||
txtcolor: Colors.white,
|
||||
fontweight: FontWeight.bold,
|
||||
txtfont: 18.0),
|
||||
Text1(
|
||||
title: widget.spl ?? "",
|
||||
txtcolor: Colors.white,
|
||||
fontweight: FontWeight.normal,
|
||||
txtfont: 14.0),
|
||||
],
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
flex: 3,
|
||||
child: Container(
|
||||
child: CustomProfile(
|
||||
imgstring: widget.imgurl,
|
||||
fontsize: 12.0,
|
||||
radius: 32,
|
||||
name: widget.name,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
ClickRow(
|
||||
icon: Icons.email,
|
||||
text: widget.email ?? "",
|
||||
onTap: () async {
|
||||
await emailSend(widget.email);
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 8.0,
|
||||
),
|
||||
ClickRow(
|
||||
icon: Icons.phone,
|
||||
text: widget.pno ?? "",
|
||||
onTap: () async {
|
||||
await callinfo(widget.pno);
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 8.0,
|
||||
),
|
||||
ClickRow(
|
||||
icon: Icons.location_pin,
|
||||
text: widget.address ??
|
||||
"Icahn School of Medicine at mount sinai, United States 580047",
|
||||
onTap: _openMapsByAddress,
|
||||
),
|
||||
SizedBox(
|
||||
height: 8.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _openMapsByAddress() async {
|
||||
final address = 'Italy';
|
||||
final Uri mapsUri = Uri(
|
||||
scheme: 'https',
|
||||
host: 'www.google.com',
|
||||
path: 'maps/search/',
|
||||
query: address,
|
||||
);
|
||||
|
||||
if (!await launchUrl(mapsUri)) {
|
||||
throw 'Could not launch $mapsUri';
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> emailSend(email) async {
|
||||
String? encodeQueryParameters(Map<String, String> params) {
|
||||
return params.entries
|
||||
.map((MapEntry<String, String> entry) =>
|
||||
Uri.encodeComponent(entry.key) +
|
||||
'=' +
|
||||
Uri.encodeComponent(entry.value))
|
||||
.join('&');
|
||||
}
|
||||
|
||||
final Uri emailLaunchUri = Uri(
|
||||
scheme: 'mailto',
|
||||
path: email,
|
||||
query: encodeQueryParameters(<String, String>{
|
||||
'subject': 'Example Subject',
|
||||
'body': 'Hello, this is a sample body text.',
|
||||
}),
|
||||
);
|
||||
|
||||
if (await launchUrl(emailLaunchUri)) {
|
||||
launchUrl(emailLaunchUri);
|
||||
} else {
|
||||
throw 'Could not launch $emailLaunchUri';
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> callinfo(pno) async {
|
||||
final call = Uri.parse('tel:$pno');
|
||||
if (await canLaunchUrl(call)) {
|
||||
launchUrl(call);
|
||||
} else {
|
||||
throw 'Could not launch $call';
|
||||
}
|
||||
}
|
|
@ -0,0 +1,161 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/clickable_row.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/custiom_profilepic.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/custom_card.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/text.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import '../constants.dart';
|
||||
|
||||
class ProfileCard extends StatefulWidget {
|
||||
final String? name;
|
||||
final String? spl;
|
||||
final String? imgurl;
|
||||
final String? email;
|
||||
final String? pno;
|
||||
final String? address;
|
||||
const ProfileCard(
|
||||
{super.key,
|
||||
this.name,
|
||||
this.spl,
|
||||
this.imgurl,
|
||||
this.email,
|
||||
this.pno,
|
||||
this.address});
|
||||
|
||||
@override
|
||||
State<ProfileCard> createState() => _ProfileCardState();
|
||||
}
|
||||
|
||||
class _ProfileCardState extends State<ProfileCard> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomCard(
|
||||
elevation: 6,
|
||||
color: AppColors.profilecard,
|
||||
bradius: 28,
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 15.0, right: 15.0, top: 15.0, bottom: 15.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Flexible(
|
||||
flex: 7,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text1(
|
||||
title: widget.name ?? " ",
|
||||
txtcolor: Colors.white,
|
||||
fontweight: FontWeight.bold,
|
||||
txtfont: 18.0),
|
||||
Text1(
|
||||
title: widget.spl ?? "",
|
||||
txtcolor: Colors.white,
|
||||
fontweight: FontWeight.normal,
|
||||
txtfont: 14.0),
|
||||
],
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
flex: 3,
|
||||
child: Container(
|
||||
child: CustomProfile(
|
||||
imgstring: widget.imgurl,
|
||||
fontsize: 12.0,
|
||||
radius: 32,
|
||||
name: widget.name,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
ClickRow(
|
||||
icon: Icons.email,
|
||||
text: widget.email ?? "",
|
||||
onTap: () async {
|
||||
await emailSend(widget.email);
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 8.0,
|
||||
),
|
||||
ClickRow(
|
||||
icon: Icons.phone,
|
||||
text: widget.pno ?? "",
|
||||
onTap: () async {
|
||||
await callinfo(widget.pno);
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
height: 8.0,
|
||||
),
|
||||
ClickRow(
|
||||
icon: Icons.location_pin,
|
||||
text: widget.address ??
|
||||
"Icahn School of Medicine at mount sinai, United States 580047",
|
||||
onTap: _openMapsByAddress,
|
||||
),
|
||||
SizedBox(
|
||||
height: 8.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _openMapsByAddress() async {
|
||||
final address = 'Italy';
|
||||
final Uri mapsUri = Uri(
|
||||
scheme: 'https',
|
||||
host: 'www.google.com',
|
||||
path: 'maps/search/',
|
||||
query: address,
|
||||
);
|
||||
|
||||
if (!await launchUrl(mapsUri)) {
|
||||
throw 'Could not launch $mapsUri';
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> emailSend(email) async {
|
||||
String? encodeQueryParameters(Map<String, String> params) {
|
||||
return params.entries
|
||||
.map((MapEntry<String, String> entry) =>
|
||||
Uri.encodeComponent(entry.key) +
|
||||
'=' +
|
||||
Uri.encodeComponent(entry.value))
|
||||
.join('&');
|
||||
}
|
||||
|
||||
final Uri emailLaunchUri = Uri(
|
||||
scheme: 'mailto',
|
||||
path: email,
|
||||
query: encodeQueryParameters(<String, String>{
|
||||
'subject': 'Example Subject',
|
||||
'body': 'Hello, this is a sample body text.',
|
||||
}),
|
||||
);
|
||||
|
||||
if (await launchUrl(emailLaunchUri)) {
|
||||
launchUrl(emailLaunchUri);
|
||||
} else {
|
||||
throw 'Could not launch $emailLaunchUri';
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> callinfo(pno) async {
|
||||
final call = Uri.parse('tel:$pno');
|
||||
if (await canLaunchUrl(call)) {
|
||||
launchUrl(call);
|
||||
} else {
|
||||
throw 'Could not launch $call';
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
// To parse this JSON data, do
|
||||
//
|
||||
// final fetchNotes = fetchNotesFromJson(jsonString);
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
FetchNotes fetchNotesFromJson(String str) =>
|
||||
FetchNotes.fromJson(json.decode(str));
|
||||
|
||||
String fetchNotesToJson(FetchNotes data) => json.encode(data.toJson());
|
||||
|
||||
class FetchNotes {
|
||||
int? code;
|
||||
String? message;
|
||||
List<HcpNotes>? data;
|
||||
int? lastPage;
|
||||
int? lastRow;
|
||||
int? count;
|
||||
|
||||
FetchNotes({
|
||||
this.code,
|
||||
this.message,
|
||||
this.data,
|
||||
this.lastPage,
|
||||
this.lastRow,
|
||||
this.count,
|
||||
});
|
||||
|
||||
factory FetchNotes.fromJson(Map<String, dynamic> json) => FetchNotes(
|
||||
code: json["code"],
|
||||
message: json["message"],
|
||||
data: json["data"] == null
|
||||
? []
|
||||
: List<HcpNotes>.from(
|
||||
json["data"]!.map((x) => HcpNotes.fromJson(x))),
|
||||
lastPage: json["last_page"],
|
||||
lastRow: json["last_row"],
|
||||
count: json["count"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"code": code,
|
||||
"message": message,
|
||||
"data": data == null
|
||||
? []
|
||||
: List<dynamic>.from(data!.map((x) => x.toJson())),
|
||||
"last_page": lastPage,
|
||||
"last_row": lastRow,
|
||||
"count": count,
|
||||
};
|
||||
}
|
||||
|
||||
class HcpNotes {
|
||||
String? uniqueId;
|
||||
String? userNote;
|
||||
dynamic fileName;
|
||||
dynamic documentUrl;
|
||||
String? kolUniqueId;
|
||||
String? createdByUser;
|
||||
String? updatedByUser;
|
||||
DateTime? formattedCreatedAt;
|
||||
DateTime? formattedUpdatedAt;
|
||||
|
||||
HcpNotes({
|
||||
this.uniqueId,
|
||||
this.userNote,
|
||||
this.fileName,
|
||||
this.documentUrl,
|
||||
this.kolUniqueId,
|
||||
this.createdByUser,
|
||||
this.updatedByUser,
|
||||
this.formattedCreatedAt,
|
||||
this.formattedUpdatedAt,
|
||||
});
|
||||
|
||||
factory HcpNotes.fromJson(Map<String, dynamic> json) => HcpNotes(
|
||||
uniqueId: json["unique_id"],
|
||||
userNote: json["user_note"],
|
||||
fileName: json["file_name"],
|
||||
documentUrl: json["document_url"],
|
||||
kolUniqueId: json["kol_unique_id"],
|
||||
createdByUser: json["created_by_user"],
|
||||
updatedByUser: json["updated_by_user"],
|
||||
formattedCreatedAt: json["formatted_created_at"] == null
|
||||
? null
|
||||
: DateTime.parse(json["formatted_created_at"]),
|
||||
formattedUpdatedAt: json["formatted_updated_at"] == null
|
||||
? null
|
||||
: DateTime.parse(json["formatted_updated_at"]),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"unique_id": uniqueId,
|
||||
"user_note": userNote,
|
||||
"file_name": fileName,
|
||||
"document_url": documentUrl,
|
||||
"kol_unique_id": kolUniqueId,
|
||||
"created_by_user": createdByUser,
|
||||
"updated_by_user": updatedByUser,
|
||||
"formatted_created_at": formattedCreatedAt?.toIso8601String(),
|
||||
"formatted_updated_at": formattedUpdatedAt?.toIso8601String(),
|
||||
};
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||
|
||||
class ApiListProvider extends ChangeNotifier {
|
||||
var call_api = CallK2api();
|
||||
List result = [];
|
||||
List get apiList => result;
|
||||
|
||||
apilist() async {
|
||||
final listallnotes = await call_api.getAllAPIList();
|
||||
|
||||
print("HiiiiiilistallAPiList : ${listallnotes}");
|
||||
result = listallnotes;
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||
|
||||
class AddNotesProvider extends ChangeNotifier {
|
||||
var call_api = CallK2api();
|
||||
List result = [];
|
||||
List get RList => result;
|
||||
|
||||
List deleteresult = [];
|
||||
List get DelList => deleteresult;
|
||||
|
||||
addnotes(String data, [uniqueId]) async {
|
||||
final listallnotes = await call_api.addnotesapi(data, uniqueId);
|
||||
|
||||
print("Hiiiiiilistallnotes : ${listallnotes}");
|
||||
result = listallnotes;
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
deletenotes(uniqueId) async {
|
||||
final dellistallnotes = await call_api.deletenotesapi(uniqueId);
|
||||
|
||||
print("Hiiiiiilistallnotes : ${dellistallnotes}");
|
||||
deleteresult = dellistallnotes;
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_aff_k2.dart';
|
||||
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class AffiliationsProviderk2 extends ChangeNotifier {
|
||||
final affapi = CallK2api();
|
||||
|
@ -26,6 +26,8 @@ class AffiliationsProviderk2 extends ChangeNotifier {
|
|||
notifyListeners();
|
||||
}
|
||||
|
||||
bool get hasData => affiliations1.isNotEmpty;
|
||||
|
||||
getAllAffiliationsdata() async {
|
||||
print("Affiliations_is: ");
|
||||
final affdata = await affapi.getallaffiliationsdata();
|
||||
|
|
|
@ -14,4 +14,6 @@ class AwardProviderK2 extends ChangeNotifier {
|
|||
awalist = email_result!;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
bool get hasData => awalist.isNotEmpty;
|
||||
}
|
||||
|
|
|
@ -14,4 +14,6 @@ class CertificateProviderK2 extends ChangeNotifier {
|
|||
cerlist = email_result!;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
bool get hasData => cerlist.isNotEmpty;
|
||||
}
|
||||
|
|
|
@ -14,4 +14,6 @@ class EducationProviderK2 extends ChangeNotifier {
|
|||
edulist = email_result!;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
bool get hasData => edulist.isNotEmpty;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_email_k2.dart';
|
||||
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/email_data/crud_email.dart';
|
||||
|
||||
class EmailProviderK2 extends ChangeNotifier {
|
||||
final apicall = CallK2api();
|
||||
|
@ -14,4 +15,11 @@ class EmailProviderK2 extends ChangeNotifier {
|
|||
emaillist = email_result!;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
bool get hasData => emaillist.isNotEmpty;
|
||||
|
||||
storeEmail(row) async {
|
||||
final emailresult = await apicall.getemaildata(row);
|
||||
await k2addEmail(emailresult);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,18 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_event_k2.dart';
|
||||
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class EventProviderK2 extends ChangeNotifier {
|
||||
final apicall = CallK2api();
|
||||
|
||||
List<EventList> eventlist = [];
|
||||
List<EventList> eventlistpagination = [];
|
||||
|
||||
bool _isLoading = false;
|
||||
bool _hasMore = true;
|
||||
|
||||
int _page = 1;
|
||||
final int _limit = 10;
|
||||
|
||||
List get EventsList => eventlist;
|
||||
|
||||
|
@ -13,17 +20,91 @@ class EventProviderK2 extends ChangeNotifier {
|
|||
|
||||
List get allEventsList => alleventlist;
|
||||
|
||||
geteventdata(text) async {
|
||||
final events = await apicall.geteventsdata(text);
|
||||
List get eventsListpagination => eventlistpagination;
|
||||
|
||||
eventlist = events!;
|
||||
notifyListeners();
|
||||
bool get isLoading => _isLoading;
|
||||
bool get hasMore => _hasMore;
|
||||
|
||||
geteventdata(text) async {
|
||||
if (_isLoading || !_hasMore) return;
|
||||
|
||||
try {
|
||||
final events = await apicall.geteventsdata(text);
|
||||
|
||||
eventlist = events!;
|
||||
notifyListeners();
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
bool get hasData => eventlist.isNotEmpty;
|
||||
|
||||
allgeteventdata() async {
|
||||
final events = await apicall.allgeteventsdata();
|
||||
|
||||
alleventlist = events;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Future<void> geteventsdatawithid() async {
|
||||
if (_isLoading || !_hasMore) return;
|
||||
_isLoading = true;
|
||||
notifyListeners();
|
||||
|
||||
//
|
||||
|
||||
try {
|
||||
final events = await apicall.geteventsdatapagelimit(_page, _limit);
|
||||
if (events!.isEmpty) {
|
||||
_hasMore = false;
|
||||
} else {
|
||||
eventlistpagination.addAll(events);
|
||||
_page++;
|
||||
// notifyListeners();
|
||||
}
|
||||
} catch (e) {
|
||||
} finally {
|
||||
_isLoading = false;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_event_k2.dart';
|
||||
// import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||
// import 'package:flutter/cupertino.dart';
|
||||
|
||||
// class EventProviderK2 extends ChangeNotifier {
|
||||
// final apicall = CallK2api();
|
||||
|
||||
// List<EventList> eventlist = [];
|
||||
|
||||
// List get EventsList => eventlist;
|
||||
|
||||
// List alleventlist = [];
|
||||
|
||||
// List get allEventsList => alleventlist;
|
||||
|
||||
// geteventdata(text) async {
|
||||
// final events = await apicall.geteventsdata(text);
|
||||
|
||||
// eventlist = events!;
|
||||
// notifyListeners();
|
||||
// }
|
||||
|
||||
// allgeteventdata() async {
|
||||
// final events = await apicall.allgeteventsdata();
|
||||
|
||||
// alleventlist = events;
|
||||
// notifyListeners();
|
||||
// }
|
||||
// }
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/loc_data/crud_loc.dart';
|
||||
|
||||
class LocationKolProvider extends ChangeNotifier {
|
||||
final apicall = CallK2api();
|
||||
|
@ -12,5 +13,40 @@ class LocationKolProvider extends ChangeNotifier {
|
|||
final publication_result = await apicall.getlocationsdata(text);
|
||||
loclist = publication_result;
|
||||
notifyListeners();
|
||||
|
||||
return publication_result;
|
||||
}
|
||||
|
||||
bool get hasData => loclist.isNotEmpty;
|
||||
|
||||
// Future<void> fetchLocations(int text, int? offline, bool? offlineMode) async {
|
||||
// // if (_isLoading) return;
|
||||
|
||||
// // _isLoading = true;
|
||||
// // notifyListeners();
|
||||
|
||||
// // Your API logic here
|
||||
|
||||
// print("FEcthing_var $text, $offline, $offlineMode");
|
||||
|
||||
// if (offline == 1) {
|
||||
// //_locationList = await retrieveidlocations(text);
|
||||
// } else {
|
||||
// print("FEcthing_data");
|
||||
// final publication_result = await apicall.getlocationsdata(text);
|
||||
// _locationList = publication_result;
|
||||
// // Fetch data when online
|
||||
// // Example: _locationList = await fetchFromAPI(text);
|
||||
// }
|
||||
|
||||
// _isLoading = false;
|
||||
// notifyListeners();
|
||||
// }
|
||||
|
||||
storeLoc(row) async {
|
||||
final publicationResult = await apicall.getlocationsdata(row);
|
||||
print("Getting_data_isss: ${publicationResult}");
|
||||
// await addLoc(publicationResult);
|
||||
await k2addLoc(publicationResult);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_pno_k2.dart';
|
||||
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/pno_data/crud_pno.dart';
|
||||
|
||||
class PhonenoProviderK2 extends ChangeNotifier {
|
||||
final apicall = CallK2api();
|
||||
|
@ -14,4 +15,13 @@ class PhonenoProviderK2 extends ChangeNotifier {
|
|||
phonelist = phone_result;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
bool get hasData => phonelist!.isNotEmpty;
|
||||
|
||||
storePno(row) async {
|
||||
print("Location_Text");
|
||||
final phoneresult = await apicall.getphonedata(row);
|
||||
print("StorinPnoooooo_is: ${phoneresult}");
|
||||
await k2addPno(phoneresult);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,4 +14,6 @@ class TrainigProviderK2 extends ChangeNotifier {
|
|||
tralist = email_result!;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
bool get hasData => tralist.isNotEmpty;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_fetchnotes_k2.dart';
|
||||
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||
|
||||
class HcpNotesFecth extends ChangeNotifier {
|
||||
var call_api = CallK2api();
|
||||
|
||||
List<HcpNotes> listnotes = [];
|
||||
|
||||
List get ListNotes => listnotes;
|
||||
|
||||
bool _isLoading = false;
|
||||
bool _hasMore = true;
|
||||
|
||||
int _page = 1;
|
||||
final int _limit = 10;
|
||||
|
||||
bool get isLoading => _isLoading;
|
||||
bool get hasMore => _hasMore;
|
||||
|
||||
// fetchhcpnotes() async {
|
||||
|
||||
// final listallnotes = await call_api.getallnotes();
|
||||
|
||||
// print("Hiiiiiilistallnotes : ${listallnotes}");
|
||||
|
||||
// listnotes = listallnotes!;
|
||||
// notifyListeners();
|
||||
// }
|
||||
|
||||
fetchhcpnotes() async {
|
||||
if (_isLoading || !_hasMore) return;
|
||||
_isLoading = true;
|
||||
notifyListeners();
|
||||
|
||||
try {
|
||||
// final events = await apicall.geteventsdatapagelimit(_page, _limit);
|
||||
final listallnotes = await call_api.getallnotes(_page, _limit);
|
||||
|
||||
if (listallnotes!.isEmpty) {
|
||||
_hasMore = false;
|
||||
} else {
|
||||
listnotes.addAll(listallnotes);
|
||||
_page++;
|
||||
// notifyListeners();
|
||||
}
|
||||
} catch (e) {
|
||||
} finally {
|
||||
_isLoading = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
// final listallnotes = await call_api.getallnotes();
|
||||
|
||||
// print("Hiiiiiilistallnotes : ${listallnotes}");
|
||||
|
||||
// listnotes = listallnotes!;
|
||||
// notifyListeners();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,172 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/hive_fun.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/affiliationsprovider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/award_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/certificate_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/educationprovider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/events_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_add_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_email_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_locationprovider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_pno_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/nih_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/patent_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/procedureprovider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/publications_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/speaker_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/training_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/trials_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/kol_info/curd_kol.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class ProfileStorageService {
|
||||
final BuildContext context;
|
||||
|
||||
ProfileStorageService(this.context);
|
||||
|
||||
offlineProfileK2Store(List<String> selectedIndices,
|
||||
[List? displayedHCPList]) async {
|
||||
for (int i = 0; i < selectedIndices.length; i++) {
|
||||
print('The id id : ${selectedIndices[i]}');
|
||||
|
||||
Map<String, dynamic>? row =
|
||||
findRecordById(displayedHCPList!, selectedIndices[i]);
|
||||
|
||||
print("Storingggg_isss:Row $row");
|
||||
|
||||
await addKolInfo(row!);
|
||||
|
||||
await storeAffiliations(row["id"].toString());
|
||||
await storePublications(row["id"].toString());
|
||||
await storeEvents(row["id"].toString());
|
||||
await storeTrials(row["id"].toString());
|
||||
await storeLocations(row["id"].toString());
|
||||
await storePhoneNumbers(row["id"].toString());
|
||||
await storeEmails(row["id"].toString());
|
||||
await storeEducation(row["id"].toString());
|
||||
await storeAwards(row["id"].toString());
|
||||
await storeCertificates(row["id"].toString());
|
||||
await storePatents(row["id"].toString());
|
||||
await storeNIHGrants(row["id"].toString());
|
||||
await storeProcedures(row["id"].toString());
|
||||
await storeTraining(row["id"].toString());
|
||||
await storeSpeakerEvaluations(row["id"].toString());
|
||||
var addnoteprovider =
|
||||
Provider.of<AddNotesProvider>(context, listen: false);
|
||||
|
||||
await addnoteprovider.addnotes("Background11Synccccc");
|
||||
// await addnoteprovider.addnotes("Background12");
|
||||
// await addnoteprovider.addnotes("Background13");
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> storeAffiliations(String id) async {
|
||||
await Provider.of<AffiliationsProvider>(context, listen: false)
|
||||
.storeAff(id);
|
||||
print("Storingggg_isss:Affiliations");
|
||||
}
|
||||
|
||||
Future<void> storePublications(String id) async {
|
||||
await Provider.of<PublicatioProvider>(context, listen: false).storePub(id);
|
||||
print("Storingggg_isss:Publications");
|
||||
}
|
||||
|
||||
Future<void> storeEvents(String id) async {
|
||||
await Provider.of<EventProvider>(context, listen: false).storeEvent(id);
|
||||
print("Storingggg_isss:Events");
|
||||
}
|
||||
|
||||
Future<void> storeTrials(String id) async {
|
||||
await Provider.of<TrialsProvider>(context, listen: false).storeTrials(id);
|
||||
print("Storingggg_isss:Trials");
|
||||
}
|
||||
|
||||
Future<void> storeLocations(String id) async {
|
||||
await Provider.of<LocationKolProvider>(context, listen: false).storeLoc(id);
|
||||
print("Storingggg_isss:Locations");
|
||||
}
|
||||
|
||||
Future<void> storePhoneNumbers(String id) async {
|
||||
await Provider.of<PhonenoProviderK2>(context, listen: false).storePno(id);
|
||||
print("Storingggg_isss:Phone_numbers");
|
||||
}
|
||||
|
||||
Future<void> storeEmails(String id) async {
|
||||
await Provider.of<EmailProviderK2>(context, listen: false).storeEmail(id);
|
||||
print("Storingggg_isss:Emails");
|
||||
}
|
||||
|
||||
Future<void> storeEducation(String id) async {
|
||||
await Provider.of<EducationProvider>(context, listen: false).storeEdu(id);
|
||||
print("Storingggg_isss:Educations");
|
||||
}
|
||||
|
||||
Future<void> storeAwards(String id) async {
|
||||
await Provider.of<AwardProvider>(context, listen: false).storeAwa(id);
|
||||
print("Storingggg_isss:Aards");
|
||||
}
|
||||
|
||||
Future<void> storeCertificates(String id) async {
|
||||
await Provider.of<CertificateProvider>(context, listen: false).storeCer(id);
|
||||
|
||||
print("Storingggg_isss:Certificates");
|
||||
}
|
||||
|
||||
Future<void> storePatents(String id) async {
|
||||
await Provider.of<PatentProvider>(context, listen: false).storePet(id);
|
||||
print("Storingggg_isss:Parents");
|
||||
}
|
||||
|
||||
Future<void> storeNIHGrants(String id) async {
|
||||
await Provider.of<NIHGrantsProvider>(context, listen: false).storeNih(id);
|
||||
|
||||
print("Storingggg_isss:NIHGrnts");
|
||||
}
|
||||
|
||||
Future<void> storeProcedures(String id) async {
|
||||
await Provider.of<ProcedureProvider>(context, listen: false).storePro(id);
|
||||
|
||||
print("Storingggg_isss:Procedures");
|
||||
}
|
||||
|
||||
Future<void> storeTraining(String id) async {
|
||||
await Provider.of<TrainigProvider>(context, listen: false)
|
||||
.storeTraining(id);
|
||||
print("Storingggg_isss:Training");
|
||||
}
|
||||
|
||||
Future<void> storeSpeakerEvaluations(String id) async {
|
||||
await Provider.of<SpekerEvalutionProvider>(context, listen: false)
|
||||
.storeSpeaker(id);
|
||||
print("Storingggg_isss:Evaluations");
|
||||
}
|
||||
|
||||
Map<String, dynamic> findRecordById(
|
||||
List displayedHCPList, String selectedIndic) {
|
||||
// print(
|
||||
// "Gettt11111 ${displayedHCPList.firstWhere((element) => element['id'] == int.parse(selectedIndic))}");
|
||||
return displayedHCPList
|
||||
.firstWhere((element) => element['id'] == int.parse(selectedIndic));
|
||||
}
|
||||
|
||||
offlineProfileAddContact(
|
||||
List<String> selectedIndices, List displayedHCPList) async {
|
||||
for (int i = 0; i < selectedIndices.length; i++) {
|
||||
print('The id id : ${selectedIndices[i]}');
|
||||
|
||||
Map<String, dynamic>? row =
|
||||
findRecordById(displayedHCPList!, selectedIndices[i]);
|
||||
|
||||
print("Storingggg_isss:Row $row");
|
||||
|
||||
await HiveFunctions.savemyContact(row);
|
||||
}
|
||||
}
|
||||
|
||||
offlineProfileRemoveContact(List<int> _selectedremoveIndices) async {
|
||||
print("Selected: ${_selectedremoveIndices.length}");
|
||||
for (int i = 0; i < _selectedremoveIndices.length; i++) {
|
||||
await HiveFunctions.deleteUser11(_selectedremoveIndices[i]);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,7 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/constants.dart';
|
||||
import 'package:konectar_events/contacts_module/model_class/affiliations.dart';
|
||||
import 'package:konectar_events/contacts_module/model_class/awards_model.dart';
|
||||
|
@ -727,4 +728,27 @@ class Callapi {
|
|||
|
||||
return jsonEvent.map((awards) => Pro.fromJson(awards)).toList();
|
||||
}
|
||||
|
||||
PostApiCall(url, methodName, sendPostData) async {
|
||||
try {
|
||||
final response = await Dio().post(
|
||||
url,
|
||||
data: sendPostData,
|
||||
options: Options(
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
debugPrint("Response_is : ${response.data}");
|
||||
return response;
|
||||
} else {
|
||||
return 'Failed to load data';
|
||||
}
|
||||
} catch (e) {
|
||||
print('Error fetching data123 from $url: $e');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// import 'package:konectar_events/storage_hive/email_data/email_model_hive.dart';
|
||||
// import 'package:konectar_events/storage_hive/loc_data/location_model_hive.dart';
|
||||
// import 'package:konectar_events/storage_hive/pno_data/pno_model_hive.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/email_data/email_model_hive.dart';
|
||||
// import 'package:discover_module/storage_hive/email_data/email_model_hive.dart';
|
||||
// import 'package:discover_module/storage_hive/loc_data/location_model_hive.dart';
|
||||
// import 'package:discover_module/storage_hive/pno_data/pno_model_hive.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/email_data/email_model_hive.dart';
|
||||
|
||||
addEmail(List emaillist) async {
|
||||
// static final apihcpdata = Hive.box("hcpdata");
|
||||
|
@ -27,25 +27,45 @@ addEmail(List emaillist) async {
|
|||
|
||||
for (var email in emails) {
|
||||
print("Storing_Affff: ${email.emailType}");
|
||||
await box.put(email.id, email); // Use `put` with id as key
|
||||
//await box.put(email.id, email); // Use `put` with id as key
|
||||
await box.put(await getNextAutoIncrementValue(), email);
|
||||
}
|
||||
}
|
||||
|
||||
// Future<void> retrievePublications() async {
|
||||
// var box = await Hive.openBox<Location>('pubhive');
|
||||
// print('Retrive Doctor}');
|
||||
|
||||
// List<Location> publications = box.values.toList();
|
||||
// print('Retrive Doctor publications ${publications}}');
|
||||
|
||||
// for (var publications in publications) {
|
||||
// print('Retrive artical_title Name: ${publications.artical_title}');
|
||||
// print('journal_name: ${publications.journal_name}');
|
||||
// // Access other fields as needed
|
||||
// }
|
||||
// await box.put(await getNextAutoIncrementValue(), doctor);
|
||||
// }
|
||||
|
||||
Future<int> getNextAutoIncrementValue() async {
|
||||
var counterBox = await Hive.openBox<int>('counterBox');
|
||||
if (!counterBox.containsKey('counter')) {
|
||||
counterBox.put('counter', 0);
|
||||
}
|
||||
|
||||
int? counter = counterBox.get('counter');
|
||||
counterBox.put('counter', counter! + 1);
|
||||
|
||||
await counterBox.close();
|
||||
|
||||
return counter;
|
||||
}
|
||||
|
||||
retrieveidemails(int id) async {
|
||||
var box = await Hive.openBox<Email>('emailhive');
|
||||
// print('Retrive Doctor}');
|
||||
|
||||
// var pnos = box.get(id);
|
||||
// print('Retrive Doctor locations ${pnos}}');
|
||||
|
||||
// List<Email> dataemail = [];
|
||||
// if (pnos != null) {
|
||||
// dataemail.add(pnos); // Add to the list if not null
|
||||
// }
|
||||
// return dataemail;
|
||||
|
||||
return box.values.toList();
|
||||
}
|
||||
|
||||
oldretrieveidemails(int id) async {
|
||||
var box = await Hive.openBox<Email>('emailhive');
|
||||
print('Retrive Doctor}');
|
||||
|
||||
|
@ -58,3 +78,24 @@ retrieveidemails(int id) async {
|
|||
}
|
||||
return dataemail;
|
||||
}
|
||||
|
||||
k2addEmail(List emaillist) async {
|
||||
var box = await Hive.openBox<Email>('emailhive');
|
||||
|
||||
List<Email> emails = emaillist.map((json) {
|
||||
return Email(
|
||||
id: json.uniqueId,
|
||||
userId: json.uniqueId,
|
||||
emailType: json.emailTypeName ?? '',
|
||||
email: json.email ?? '',
|
||||
);
|
||||
}).toList();
|
||||
|
||||
print("Publicattionnsss_isss: ${emails}");
|
||||
|
||||
for (var email in emails) {
|
||||
print("Storing_Affff: ${email.emailType}");
|
||||
//await box.put(email.id, email); // Use `put` with id as key
|
||||
await box.put(await getNextAutoIncrementValue(), email);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
// import 'package:konectar_events/storage_hive/loc_data/location_model_hive.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/loc_data/location_model_hive.dart';
|
||||
// import 'package:discover_module/storage_hive/loc_data/location_model_hive.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/loc_data/location_model_hive.dart';
|
||||
|
||||
addLoc(List loclist) async {
|
||||
print("Trying to store the data : ${loclist}");
|
||||
// static final apihcpdata = Hive.box("hcpdata");
|
||||
|
||||
var box = await Hive.openBox<Location>('lochive');
|
||||
|
@ -14,8 +15,8 @@ addLoc(List loclist) async {
|
|||
// Convert JSON list to List<Affiliation>
|
||||
List<Location> locations = loclist.map((json) {
|
||||
return Location(
|
||||
id: json.id,
|
||||
userId: json.userId,
|
||||
id: json.id.toString(),
|
||||
userId: json.userId.toString(),
|
||||
institution: json.institution ?? '',
|
||||
address: json.address ?? '',
|
||||
city: json.city ?? '',
|
||||
|
@ -27,11 +28,30 @@ addLoc(List loclist) async {
|
|||
print("Publicattionnsss_isss: ${locations}");
|
||||
|
||||
for (var loc in locations) {
|
||||
print("Storing_Affff: ${loc.institution}");
|
||||
print("Storing_Afffflocc: ${loc.institution}");
|
||||
await box.put(loc.id, loc); // Use `put` with id as key
|
||||
|
||||
//await box.put(await getNextAutoIncrementValue(), loc);
|
||||
}
|
||||
}
|
||||
|
||||
// await box.put(await getNextAutoIncrementValue(), doctor);
|
||||
// }
|
||||
|
||||
Future<int> getNextAutoIncrementValue() async {
|
||||
var counterBox = await Hive.openBox<int>('counterBox');
|
||||
if (!counterBox.containsKey('counter')) {
|
||||
counterBox.put('counter', 0);
|
||||
}
|
||||
|
||||
int? counter = counterBox.get('counter');
|
||||
counterBox.put('counter', counter! + 1);
|
||||
|
||||
await counterBox.close();
|
||||
|
||||
return counter;
|
||||
}
|
||||
|
||||
// Future<void> retrievePublications() async {
|
||||
// var box = await Hive.openBox<Location>('pubhive');
|
||||
// print('Retrive Doctor}');
|
||||
|
@ -48,14 +68,56 @@ addLoc(List loclist) async {
|
|||
|
||||
retrieveidlocations(int id) async {
|
||||
var box = await Hive.openBox<Location>('lochive');
|
||||
print('Retrive Doctor}');
|
||||
print('Retrive Doctor_Locationss : ${box.get}}');
|
||||
|
||||
var locations = box.get(id);
|
||||
print('Retrive Doctor locations ${locations}}');
|
||||
//var locations = box.get(id);
|
||||
print('Retrive Doctor locations ${box.values.toList()}');
|
||||
//print('Retrive Doctor locations1233 ${locations}}');
|
||||
print('Retrive Doctor locationsid ${id}}');
|
||||
|
||||
List<Location> dataloc = [];
|
||||
if (locations != null) {
|
||||
dataloc.add(locations); // Add to the list if not null
|
||||
}
|
||||
return dataloc;
|
||||
// List<Location> dataloc = [];
|
||||
// if (locations != null) {
|
||||
// dataloc.add(locations); // Add to the list if not null
|
||||
// }
|
||||
// print('dataloc ${dataloc}}');
|
||||
|
||||
// return dataloc;
|
||||
|
||||
return box.values.toList();
|
||||
}
|
||||
|
||||
///////////////////////////////////////K2////////////////////////////////
|
||||
///
|
||||
k2addLoc(List loclist) async {
|
||||
print("Trying to store the data : ${loclist}");
|
||||
// static final apihcpdata = Hive.box("hcpdata");
|
||||
|
||||
var box = await Hive.openBox<Location>('lochive');
|
||||
//
|
||||
//var box = await Hive.openBox<Affiliation>('affiliationshive');
|
||||
|
||||
// print("IamPublication_dataaa: ${publist},${publist.}");
|
||||
|
||||
// Convert JSON list to List<Affiliation>
|
||||
List<Location> locations = loclist.map((json) {
|
||||
return Location(
|
||||
id: json.uniqueId.toString(),
|
||||
userId: json.uniqueId.toString(),
|
||||
institution: json.organizationName ?? '',
|
||||
address: json.address1 ?? '',
|
||||
city: json.cityName ?? '',
|
||||
state: json.stateName ?? '',
|
||||
postalCode: json.postalCode.toString() ?? '',
|
||||
);
|
||||
}).toList();
|
||||
|
||||
print("Publicattionnsss_isss: ${locations}");
|
||||
|
||||
for (var loc in locations) {
|
||||
print("Storing_Locationnnnnnlocc: ${loc.institution}");
|
||||
await box.put(
|
||||
await getNextAutoIncrementValue(), loc); // Use `put` with id as key
|
||||
|
||||
//await box.put(await getNextAutoIncrementValue(), loc);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,10 +4,10 @@ part 'location_model_hive.g.dart'; // This part file will be generated
|
|||
@HiveType(typeId: 36)
|
||||
class Location extends HiveObject {
|
||||
@HiveField(0)
|
||||
final int id;
|
||||
final String? id;
|
||||
|
||||
@HiveField(1)
|
||||
final int userId;
|
||||
final String? userId;
|
||||
|
||||
@HiveField(2)
|
||||
final String? institution;
|
||||
|
|
|
@ -17,8 +17,8 @@ class LocationAdapter extends TypeAdapter<Location> {
|
|||
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||
};
|
||||
return Location(
|
||||
id: fields[0] as int,
|
||||
userId: fields[1] as int,
|
||||
id: fields[0] as String?,
|
||||
userId: fields[1] as String?,
|
||||
institution: fields[2] as String?,
|
||||
address: fields[3] as String?,
|
||||
city: fields[4] as String?,
|
||||
|
|
|
@ -1,20 +1,49 @@
|
|||
// import 'package:discover_module/storage_hive/note_data/note_model_hive.dart';
|
||||
// import 'package:discover_module/storage_hive/patent_data/patent_model_hive.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/note_data/note_model_hive.dart';
|
||||
|
||||
final Box<String> box = Hive.box<String>('notehive');
|
||||
final Box<Note> box = Hive.box<Note>('notehive');
|
||||
|
||||
addNote(String text) async {
|
||||
// var box = await Hive.openBox<String>('notehive');
|
||||
|
||||
print("Text_issss: $text");
|
||||
|
||||
box.add(text); // Save text with a key
|
||||
//box.add(text);
|
||||
// await Hive.openBox<Note>('notehive'); // Ensure the box is typed correctly
|
||||
|
||||
final note = Note(id: await getNextAutoIncrementValue(), note: text);
|
||||
|
||||
print("note_issss: $note");
|
||||
|
||||
await box.add(note);
|
||||
|
||||
print("noteAdded ${box.isEmpty}");
|
||||
|
||||
// List<Note> notes =
|
||||
// box.values.toList(); // Should return List<Note>, not List<String>
|
||||
|
||||
// print("List_isss: ${notes}");
|
||||
}
|
||||
|
||||
List<String> getText() {
|
||||
List<Note> getText() {
|
||||
//var box = await Hive.openBox<String>('notehive');
|
||||
print("SavedNotesssL : ${box.values.toList()}");
|
||||
//box.clear();
|
||||
return box.values.toList();
|
||||
}
|
||||
|
||||
Future<int> getNextAutoIncrementValue() async {
|
||||
var counterBox = await Hive.openBox<int>('counterBox');
|
||||
if (!counterBox.containsKey('counter')) {
|
||||
counterBox.put('counter', 0);
|
||||
}
|
||||
|
||||
int? counter = counterBox.get('counter');
|
||||
counterBox.put('counter', counter! + 1);
|
||||
|
||||
await counterBox.close();
|
||||
|
||||
return counter;
|
||||
}
|
||||
|
|
|
@ -4,13 +4,17 @@ part 'note_model_hive.g.dart'; // This part file will be generated
|
|||
@HiveType(typeId: 47)
|
||||
class Note extends HiveObject {
|
||||
@HiveField(0)
|
||||
final int id;
|
||||
final int? id;
|
||||
|
||||
@HiveField(1)
|
||||
final String? note;
|
||||
|
||||
Note({
|
||||
required this.id,
|
||||
this.id,
|
||||
this.note,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {'note': note};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ class NoteAdapter extends TypeAdapter<Note> {
|
|||
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||
};
|
||||
return Note(
|
||||
id: fields[0] as int,
|
||||
id: fields[0] as int?,
|
||||
note: fields[1] as String?,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// import 'package:konectar_events/storage_hive/loc_data/location_model_hive.dart';
|
||||
// import 'package:konectar_events/storage_hive/pno_data/pno_model_hive.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/pno_data/pno_model_hive.dart';
|
||||
// import 'package:discover_module/storage_hive/loc_data/location_model_hive.dart';
|
||||
// import 'package:discover_module/storage_hive/pno_data/pno_model_hive.dart';
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/pno_data/pno_model_hive.dart';
|
||||
|
||||
addPno(List pnolist) async {
|
||||
// static final apihcpdata = Hive.box("hcpdata");
|
||||
|
@ -27,10 +27,28 @@ addPno(List pnolist) async {
|
|||
|
||||
for (var pno in pnonos) {
|
||||
print("Storing_Affff: ${pno.phoneNumber}");
|
||||
await box.put(pno.id, pno); // Use `put` with id as key
|
||||
// await box.put(pno.id, pno); // Use `put` with id as key
|
||||
await box.put(await getNextAutoIncrementValue(), pno);
|
||||
}
|
||||
}
|
||||
|
||||
// await box.put(await getNextAutoIncrementValue(), doctor);
|
||||
// }
|
||||
|
||||
Future<int> getNextAutoIncrementValue() async {
|
||||
var counterBox = await Hive.openBox<int>('counterBox');
|
||||
if (!counterBox.containsKey('counter')) {
|
||||
counterBox.put('counter', 0);
|
||||
}
|
||||
|
||||
int? counter = counterBox.get('counter');
|
||||
counterBox.put('counter', counter! + 1);
|
||||
|
||||
await counterBox.close();
|
||||
|
||||
return counter;
|
||||
}
|
||||
|
||||
// Future<void> retrievePublications() async {
|
||||
// var box = await Hive.openBox<Location>('pubhive');
|
||||
// print('Retrive Doctor}');
|
||||
|
@ -49,12 +67,43 @@ retrieveidpnos(int id) async {
|
|||
var box = await Hive.openBox<PhoneNo>('pnohive');
|
||||
print('Retrive Doctor}');
|
||||
|
||||
var pnos = box.get(id);
|
||||
print('Retrive Doctor locations ${pnos}}');
|
||||
// var pnos = box.get(id);
|
||||
// print('Retrive Doctor locations ${pnos}}');
|
||||
|
||||
List<PhoneNo> datapno = [];
|
||||
if (pnos != null) {
|
||||
datapno.add(pnos); // Add to the list if not null
|
||||
}
|
||||
return datapno;
|
||||
// List<PhoneNo> datapno = [];
|
||||
// if (pnos != null) {
|
||||
// datapno.add(pnos); // Add to the list if not null
|
||||
// }
|
||||
// return datapno;
|
||||
|
||||
return box.values.toList();
|
||||
}
|
||||
|
||||
k2addPno(List pnolist) async {
|
||||
// static final apihcpdata = Hive.box("hcpdata");
|
||||
|
||||
var box = await Hive.openBox<PhoneNo>('pnohive');
|
||||
//
|
||||
//var box = await Hive.openBox<Affiliation>('affiliationshive');
|
||||
|
||||
// print("IamPublication_dataaa: ${publist},${publist.}");
|
||||
|
||||
// Convert JSON list to List<Affiliation>
|
||||
List<PhoneNo> pnonos = pnolist.map((json) {
|
||||
return PhoneNo(
|
||||
id: json.uniqueId.toString(),
|
||||
userId: json.uniqueId.toString(),
|
||||
phoneType: json.phoneTypeName.toString() ?? '',
|
||||
locations: json.organizationName.toString() ?? '',
|
||||
phoneNumber: json.number.toString() ?? '',
|
||||
);
|
||||
}).toList();
|
||||
|
||||
print("Publicattionnsss_isss: ${pnonos}");
|
||||
|
||||
for (var pno in pnonos) {
|
||||
print("Storing_Affff: ${pno.phoneNumber}");
|
||||
// await box.put(pno.id, pno); // Use `put` with id as key
|
||||
await box.put(await getNextAutoIncrementValue(), pno);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,10 +4,10 @@ part 'pno_model_hive.g.dart'; // This part file will be generated
|
|||
@HiveType(typeId: 37)
|
||||
class PhoneNo extends HiveObject {
|
||||
@HiveField(0)
|
||||
final int id;
|
||||
final String? id;
|
||||
|
||||
@HiveField(1)
|
||||
final int userId;
|
||||
final String? userId;
|
||||
|
||||
@HiveField(2)
|
||||
final String? phoneType;
|
||||
|
|
|
@ -17,8 +17,8 @@ class PhoneNoAdapter extends TypeAdapter<PhoneNo> {
|
|||
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||
};
|
||||
return PhoneNo(
|
||||
id: fields[0] as int,
|
||||
userId: fields[1] as int,
|
||||
id: fields[0] as String?,
|
||||
userId: fields[1] as String?,
|
||||
phoneType: fields[2] as String?,
|
||||
locations: fields[3] as String?,
|
||||
phoneNumber: fields[4] as String?,
|
||||
|
|
|
@ -0,0 +1,137 @@
|
|||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/savefilter/save_filter_hive.dart';
|
||||
|
||||
// AddFilterstoSave(selectedtypevalue, [selectedType]) async {
|
||||
// print("I_am AddFilters $selectedtypevalue, $selectedType");
|
||||
// var box = await Hive.openBox<savecontactfilter>('filtershive');
|
||||
|
||||
// final filter = savecontactfilter(
|
||||
// id: await getNextAutoIncrementValue(),
|
||||
// filerType: selectedType,
|
||||
// filterValue: selectedtypevalue,
|
||||
// );
|
||||
// print("Inserting_data_is: $filter");
|
||||
// print(
|
||||
// "Inserting_data_is: ${filter.id}, ${filter.filerType}, ${filter.filterValue}");
|
||||
|
||||
// await box.put(filter.id, filter);
|
||||
// }
|
||||
|
||||
AddFilterstoSaveListtt(List flist) async {
|
||||
print("I_am AddFilters11 $flist");
|
||||
|
||||
var box = await Hive.openBox<savecontactfilter>('filtershive');
|
||||
|
||||
List<savecontactfilter> pros = flist.map((json) {
|
||||
return savecontactfilter(
|
||||
id: 1,
|
||||
filerType: json['filerType'],
|
||||
filterValue: json['typeValue'],
|
||||
);
|
||||
}).toList();
|
||||
|
||||
for (var pro in pros) {
|
||||
// await box.put(pro.id, pro);
|
||||
// Use `put` with id as key
|
||||
|
||||
print("Pro_isss: $pro");
|
||||
await box.put(await getNextAutoIncrementValue(), pro);
|
||||
}
|
||||
}
|
||||
|
||||
AddFilterstoSaveListttnew(List flist) async {
|
||||
print("I_am AddFilters11 $flist");
|
||||
|
||||
var box = await Hive.openBox('filtersBox');
|
||||
|
||||
// // Convert the list of maps to a list of strings (or keep it as maps)
|
||||
// List<Map<String, String>> filtersToSave = filters;
|
||||
|
||||
// Store the list in the Hive box
|
||||
await box.put('filters', flist);
|
||||
|
||||
// var box = await Hive.openBox<savecontactfilter>('filtershive');
|
||||
|
||||
// await box.put(await getNextAutoIncrementValue(), flist);
|
||||
|
||||
// List<savecontactfilter> pros = flist.map((json) {
|
||||
// return savecontactfilter(
|
||||
// id: 1,
|
||||
// filerType: json['filerType'],
|
||||
// filterValue: json['typeValue'],
|
||||
// );
|
||||
// }).toList();
|
||||
|
||||
// for (var pro in pros) {
|
||||
// // await box.put(pro.id, pro);
|
||||
// // Use `put` with id as key
|
||||
|
||||
// print("Pro_isss: $pro");
|
||||
// await box.put(await getNextAutoIncrementValue(), pro);
|
||||
// }
|
||||
}
|
||||
|
||||
Future<int> getNextAutoIncrementValue() async {
|
||||
var counterBox = await Hive.openBox<int>('counterBox');
|
||||
if (!counterBox.containsKey('counter')) {
|
||||
counterBox.put('counter', 0);
|
||||
}
|
||||
|
||||
int? counter = counterBox.get('counter');
|
||||
counterBox.put('counter', counter! + 1);
|
||||
|
||||
await counterBox.close();
|
||||
|
||||
return counter;
|
||||
}
|
||||
|
||||
getAllFilters() async {
|
||||
var box = await Hive.openBox<savecontactfilter>('filtershive');
|
||||
|
||||
print(
|
||||
"GetAllFiltersss: ${box.values.toList()}, ${box.values.toList().length}");
|
||||
|
||||
return box.values.toList();
|
||||
}
|
||||
|
||||
Future<List<savecontactfilter?>> getFiltersFromHive1() async {
|
||||
var box = await Hive.openBox<savecontactfilter>('filtershive');
|
||||
|
||||
// Getting all the keys in the box
|
||||
final keys = box.keys;
|
||||
|
||||
// Mapping the keys to the corresponding values
|
||||
List<savecontactfilter?> filters = keys.map((key) {
|
||||
return box.get(key);
|
||||
}).toList();
|
||||
|
||||
return filters;
|
||||
}
|
||||
|
||||
Future<List<Map<String, String>>> getFiltersFromHive() async {
|
||||
var box = await Hive.openBox<savecontactfilter>('filtershive');
|
||||
|
||||
List<Map<String, String>> filtersList = [];
|
||||
|
||||
// Iterate through the box to get all saved filters
|
||||
for (var key in box.keys) {
|
||||
var filter = box.get(key) as savecontactfilter; // Cast to your model
|
||||
filtersList.add({
|
||||
'filerType': filter.filerType!,
|
||||
'typeValue': filter.filterValue!,
|
||||
});
|
||||
}
|
||||
print("FilterListttt_issss: $filtersList");
|
||||
return filtersList; // Return the list of maps
|
||||
}
|
||||
|
||||
Future<List<Map<String, String>>> getFilters() async {
|
||||
var box = await Hive.openBox('filtersBox');
|
||||
|
||||
// Get the list from the box
|
||||
List<Map<String, String>>? filters = box.get('filters');
|
||||
|
||||
print("Checking Filters: ${filters}");
|
||||
|
||||
return filters ?? []; // Return an empty list if none found
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
part 'save_filter_hive.g.dart'; // This part file will be generated
|
||||
|
||||
@HiveType(typeId: 48)
|
||||
class savecontactfilter extends HiveObject {
|
||||
@HiveField(0)
|
||||
final int? id;
|
||||
|
||||
@HiveField(1)
|
||||
final String? filerType;
|
||||
|
||||
@HiveField(2)
|
||||
final String? filterValue;
|
||||
|
||||
savecontactfilter({
|
||||
this.id,
|
||||
this.filerType,
|
||||
this.filterValue,
|
||||
});
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'save_filter_hive.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// TypeAdapterGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class savecontactfilterAdapter extends TypeAdapter<savecontactfilter> {
|
||||
@override
|
||||
final int typeId = 48;
|
||||
|
||||
@override
|
||||
savecontactfilter read(BinaryReader reader) {
|
||||
final numOfFields = reader.readByte();
|
||||
final fields = <int, dynamic>{
|
||||
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||
};
|
||||
return savecontactfilter(
|
||||
id: fields[0] as int?,
|
||||
filerType: fields[1] as String?,
|
||||
filterValue: fields[2] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void write(BinaryWriter writer, savecontactfilter obj) {
|
||||
writer
|
||||
..writeByte(3)
|
||||
..writeByte(0)
|
||||
..write(obj.id)
|
||||
..writeByte(1)
|
||||
..write(obj.filerType)
|
||||
..writeByte(2)
|
||||
..write(obj.filterValue);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => typeId.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is savecontactfilterAdapter &&
|
||||
runtimeType == other.runtimeType &&
|
||||
typeId == other.typeId;
|
||||
}
|
|
@ -22,6 +22,7 @@ import 'package:konectar_events/contacts_module/ui_screen/publication_data.dart'
|
|||
import 'package:konectar_events/contacts_module/ui_screen/trials_show_more.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class Activities extends StatefulWidget {
|
||||
|
@ -125,7 +126,7 @@ class _ActivitiesState extends State<Activities> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
|
@ -136,7 +137,7 @@ class _ActivitiesState extends State<Activities> {
|
|||
_isExpanded = expanded;
|
||||
});
|
||||
},
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
trailing: Icon(
|
||||
_isExpanded
|
||||
? Icons.keyboard_arrow_up
|
||||
|
@ -250,7 +251,8 @@ class _ActivitiesState extends State<Activities> {
|
|||
},
|
||||
child: Text(
|
||||
'Show More',
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
style:
|
||||
TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -278,7 +280,7 @@ class _ActivitiesState extends State<Activities> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
|
@ -289,7 +291,7 @@ class _ActivitiesState extends State<Activities> {
|
|||
_isExpanded = expanded;
|
||||
});
|
||||
},
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
trailing: Icon(
|
||||
_isExpanded
|
||||
? Icons.keyboard_arrow_up
|
||||
|
@ -412,7 +414,8 @@ class _ActivitiesState extends State<Activities> {
|
|||
},
|
||||
child: Text(
|
||||
'Show More',
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
style:
|
||||
TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -440,7 +443,7 @@ class _ActivitiesState extends State<Activities> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
|
@ -449,7 +452,7 @@ class _ActivitiesState extends State<Activities> {
|
|||
_isExpanded = expanded;
|
||||
});
|
||||
},
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
trailing: Icon(
|
||||
_isExpanded
|
||||
? Icons.keyboard_arrow_up
|
||||
|
@ -568,7 +571,8 @@ class _ActivitiesState extends State<Activities> {
|
|||
},
|
||||
child: Text(
|
||||
'Show More',
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
style:
|
||||
TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -596,7 +600,7 @@ class _ActivitiesState extends State<Activities> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
|
@ -605,7 +609,7 @@ class _ActivitiesState extends State<Activities> {
|
|||
_isExpanded = expanded;
|
||||
});
|
||||
},
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
trailing: Icon(
|
||||
_isExpanded
|
||||
? Icons.keyboard_arrow_up
|
||||
|
@ -727,7 +731,8 @@ class _ActivitiesState extends State<Activities> {
|
|||
),
|
||||
child: Text(
|
||||
'Show More',
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
style:
|
||||
TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,313 @@
|
|||
// import 'package:discover_module/contacts_module/custom_widget/show_alert.dart';
|
||||
// import 'package:discover_module/contacts_module/custom_widget/text.dart';
|
||||
// import 'package:discover_module/contacts_module/model_class/awards_model.dart';
|
||||
// import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_add_provider.dart';
|
||||
// import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_viewnotes.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/show_alert.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/text.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_add_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_viewnotes.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class ViewNotes extends StatefulWidget {
|
||||
const ViewNotes({super.key});
|
||||
|
||||
@override
|
||||
State<ViewNotes> createState() => _ViewNotesState();
|
||||
}
|
||||
|
||||
class _ViewNotesState extends State<ViewNotes> {
|
||||
// late FetchNotes;
|
||||
|
||||
List notess = [];
|
||||
|
||||
var _isLoading = false;
|
||||
|
||||
// var events;
|
||||
|
||||
late HcpNotesFecth fetchNotesProviderK2;
|
||||
|
||||
TextEditingController updatenoteController = TextEditingController();
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
//fetchhcpnotes();
|
||||
|
||||
fetchNotesProviderK2 = HcpNotesFecth();
|
||||
}
|
||||
|
||||
// Future<void> fetchhcpnotes() async {
|
||||
// print("Hiiiiii");
|
||||
// var notesprovider = Provider.of<HcpNotesFecth>(context, listen: false);
|
||||
|
||||
// await notesprovider.fetchhcpnotes();
|
||||
|
||||
// var getnotes = notesprovider.ListNotes;
|
||||
|
||||
// setState(() {
|
||||
// notess = getnotes;
|
||||
// });
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Notes'),
|
||||
),
|
||||
body: ChangeNotifierProvider(
|
||||
create: (context) => fetchNotesProviderK2..fetchhcpnotes(),
|
||||
child: Consumer<HcpNotesFecth>(builder: (context, hcpnotes, child) {
|
||||
return NotificationListener(
|
||||
onNotification: (ScrollNotification scrollinfo) {
|
||||
if (scrollinfo.metrics.pixels ==
|
||||
scrollinfo.metrics.maxScrollExtent &&
|
||||
!fetchNotesProviderK2.isLoading) {
|
||||
hcpnotes.fetchhcpnotes();
|
||||
}
|
||||
return false;
|
||||
},
|
||||
child: ListView.builder(
|
||||
itemCount:
|
||||
hcpnotes.ListNotes.length + (hcpnotes.hasMore ? 1 : 0),
|
||||
// +(events.hasMore ? 1 : 0),
|
||||
itemBuilder: (context, index) {
|
||||
if (index == hcpnotes.ListNotes.length) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
var data = hcpnotes.ListNotes[index];
|
||||
// print("I_amCheckingggggg12345: ${data.name}");
|
||||
return ListTile(
|
||||
title: Text1(title: "Note : " + data.userNote),
|
||||
subtitle:
|
||||
Text1(title: "Created by : " + data.createdByUser),
|
||||
trailing: Wrap(
|
||||
spacing: -16,
|
||||
children: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.edit),
|
||||
onPressed: () {
|
||||
print("Clickedd: ${data.userNote}");
|
||||
//updatenoteController.text = data.userNote;
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (_) {
|
||||
return updatedata(data);
|
||||
});
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(
|
||||
Icons.delete,
|
||||
//color: Colors.redAccent,
|
||||
),
|
||||
onPressed: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (_) {
|
||||
//return updatedata(data);
|
||||
return AlertDialog(
|
||||
// title: Text1(
|
||||
// title: "Alert",
|
||||
// txtfont: 22.0,
|
||||
// ),
|
||||
content: Text1(
|
||||
title: data.userNote,
|
||||
txtfont: 18.0,
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {},
|
||||
child: Text("Cancel")),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
Navigator.of(context).pop();
|
||||
var addnoteprovider = Provider
|
||||
.of<AddNotesProvider>(
|
||||
context,
|
||||
listen: false);
|
||||
await addnoteprovider
|
||||
.deletenotes(data.uniqueId);
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (_) {
|
||||
return Alert(
|
||||
data: "Deleted ",
|
||||
onPressed: () {
|
||||
//noteController.clear();
|
||||
Navigator.of(context)
|
||||
.pop();
|
||||
},
|
||||
);
|
||||
});
|
||||
},
|
||||
child: Text("Delete"))
|
||||
],
|
||||
);
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}));
|
||||
}),
|
||||
));
|
||||
}
|
||||
|
||||
updatedata(data) {
|
||||
return AlertDialog(
|
||||
title: Text1(
|
||||
title: "Update",
|
||||
txtfont: 22.0,
|
||||
),
|
||||
content: TextField(
|
||||
controller: updatenoteController..text = data.userNote,
|
||||
//controller: TextEditingController()..text = data,
|
||||
|
||||
decoration: InputDecoration(
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
hintText: 'Write your note here',
|
||||
contentPadding: EdgeInsets.all(16.0),
|
||||
),
|
||||
maxLines: null, // Allows the TextField to expand vertically
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
print("Iam OKKK ${updatenoteController.text}");
|
||||
print("Iam OKKK ${data.uniqueId}");
|
||||
var addnoteprovider =
|
||||
Provider.of<AddNotesProvider>(context, listen: false);
|
||||
await addnoteprovider.addnotes(
|
||||
updatenoteController.text, data.uniqueId);
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (_) {
|
||||
return Alert(
|
||||
data: "Updated ",
|
||||
onPressed: () async {
|
||||
// noteController.clear();
|
||||
// Refresh the notes list
|
||||
setState(() {
|
||||
fetchNotesProviderK2..fetchhcpnotes();
|
||||
});
|
||||
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
);
|
||||
});
|
||||
},
|
||||
child: Text("Update")),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
print("Iam Cancel");
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text("Cancel"))
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// import 'package:discover_module/contacts_module/model_class/awards_model.dart';
|
||||
// import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_viewnotes.dart';
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:provider/provider.dart';
|
||||
|
||||
// class ViewNotes extends StatefulWidget {
|
||||
// const ViewNotes({super.key});
|
||||
|
||||
// @override
|
||||
// State<ViewNotes> createState() => _ViewNotesState();
|
||||
// }
|
||||
|
||||
// class _ViewNotesState extends State<ViewNotes> {
|
||||
// // late FetchNotes;
|
||||
|
||||
// List notess = [];
|
||||
|
||||
// @override
|
||||
// void initState() {
|
||||
// // TODO: implement initState
|
||||
// super.initState();
|
||||
// fetchhcpnotes();
|
||||
// }
|
||||
|
||||
// Future<void> fetchhcpnotes() async {
|
||||
// print("Hiiiiii");
|
||||
// var notesprovider = Provider.of<HcpNotesFecth>(context, listen: false);
|
||||
|
||||
// await notesprovider.fetchhcpnotes();
|
||||
|
||||
// var getnotes = notesprovider.ListNotes;
|
||||
|
||||
// setState(() {
|
||||
// notess = getnotes;
|
||||
// });
|
||||
// }
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Scaffold(
|
||||
// appBar: AppBar(
|
||||
// title: Text('Notes'),
|
||||
// ),
|
||||
// body: ListView.builder(
|
||||
// itemCount: notess.length,
|
||||
// itemBuilder: (context, index) {
|
||||
// var data = notess[index];
|
||||
|
||||
// return Text(data.userNote);
|
||||
// }));
|
||||
// }
|
||||
// }
|
|
@ -24,6 +24,7 @@ import 'package:flutter/cupertino.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:dropdown_button2/dropdown_button2.dart';
|
||||
|
@ -155,11 +156,11 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
|
|||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(0.0),
|
||||
// ),
|
||||
color: Constants.k2color,
|
||||
color: AppColors.blueColor,
|
||||
child: ExpansionTile(
|
||||
maintainState: true,
|
||||
// backgroundColor: Colors.white,
|
||||
backgroundColor: Constants.k2color,
|
||||
backgroundColor: AppColors.blueColor,
|
||||
|
||||
// collapsedBackgroundColor: Color(0xFF2b9af3),
|
||||
initiallyExpanded: true,
|
||||
|
@ -172,7 +173,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
|
|||
padding: const EdgeInsets.all(0.0),
|
||||
decoration: BoxDecoration(
|
||||
// color: Color(0xFF2b9af3),
|
||||
color: Constants.k2color),
|
||||
color: AppColors.blueColor),
|
||||
child: Text(
|
||||
item.sectionName,
|
||||
style: const TextStyle(
|
||||
|
|
|
@ -25,6 +25,7 @@ import 'package:flutter/rendering.dart';
|
|||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:popover/popover.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -131,10 +132,10 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
elevation: 5,
|
||||
color: Constants.k2color,
|
||||
color: AppColors.blueColor,
|
||||
child: ExpansionTile(
|
||||
maintainState: true,
|
||||
backgroundColor: Constants.k2color,
|
||||
backgroundColor: AppColors.blueColor,
|
||||
onExpansionChanged: (bool expanded) {
|
||||
setState(() {
|
||||
_isExpanded = expanded;
|
||||
|
@ -156,7 +157,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
|||
padding: const EdgeInsets.all(0.0),
|
||||
decoration: BoxDecoration(
|
||||
// color: Color(0xFF2b9af3),
|
||||
color: Constants.k2color,
|
||||
color: AppColors.blueColor,
|
||||
),
|
||||
child: Text(
|
||||
item.sectionName,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -68,6 +68,22 @@ Future<String> formJsonForSync() async {
|
|||
return jsonstr;
|
||||
}
|
||||
|
||||
Future<String> formJsonForIntervalSync(String hivename) async {
|
||||
final provider = ViewInteractionProvider();
|
||||
final prov = InteractionProvider();
|
||||
List<SaveInteractionFormJson> senSavedList = [];
|
||||
List<SaveInteraction> savedList =
|
||||
await provider.getAllRecordsforIntervalSync(hivename);
|
||||
for (var obj in savedList) {
|
||||
senSavedList.add(prov.formJson(obj));
|
||||
}
|
||||
|
||||
SendSaveJson jsonData = SendSaveJson(savedList: senSavedList);
|
||||
String jsonstr = saveFormJsonToJson(jsonData);
|
||||
print(jsonstr);
|
||||
return jsonstr;
|
||||
}
|
||||
|
||||
Future<bool> checkRecordsAvailable() async {
|
||||
final provider = ViewInteractionProvider();
|
||||
List<SaveInteraction> savedList = await provider.getAllRecords();
|
||||
|
|
|
@ -13,6 +13,7 @@ import 'package:konectar_events/contacts_module/ui_screen/interactionform/util.d
|
|||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/custombutton.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/responsive_ext.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
|
@ -91,7 +92,7 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen> {
|
|||
var item = provider.interactionReponseList[index];
|
||||
sectionList = item.sectionList;
|
||||
return Container(
|
||||
color: Constants.k2color,
|
||||
color: AppColors.blueColor,
|
||||
child: ExpansionTile(
|
||||
initiallyExpanded: true,
|
||||
title: Stack(
|
||||
|
@ -103,7 +104,7 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen> {
|
|||
padding: const EdgeInsets.all(0.0),
|
||||
decoration: BoxDecoration(
|
||||
// color: Color(0xFF2b9af3),
|
||||
color: Constants.k2color,
|
||||
color: AppColors.blueColor,
|
||||
),
|
||||
child: Text(
|
||||
item.sectionName,
|
||||
|
|
|
@ -64,11 +64,11 @@ class ViewInteractionProvider extends ChangeNotifier {
|
|||
Future<void> getRecords(String formname, {String? hcp}) async {
|
||||
var box = await Hive.openBox<SaveInteraction>('InteractionDataBox');
|
||||
savedList = box.values.toList();
|
||||
savedList = savedList
|
||||
.where((element) => element.form == formname && element.hcp != null
|
||||
? element.hcp == hcp
|
||||
: element.form == formname)
|
||||
.toList();
|
||||
// savedList = savedList
|
||||
// .where((element) => element.form == formname && element.hcp != null
|
||||
// ? element.hcp == hcp
|
||||
// : element.form == formname)
|
||||
// .toList();
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,14 @@ class ViewInteractionProvider extends ChangeNotifier {
|
|||
return savedList;
|
||||
}
|
||||
|
||||
Future<List<SaveInteraction>> getAllRecordsforIntervalSync(
|
||||
String hivename) async {
|
||||
var box = await Hive.openBox<SaveInteraction>(hivename);
|
||||
List<SaveInteraction> savedList = box.values.toList();
|
||||
|
||||
return savedList;
|
||||
}
|
||||
|
||||
init(int index) async {
|
||||
// _hiveprovider = HiveDataRepository(
|
||||
// Hive.box<InteractionConfigData>('InteractionConfigDataBox'));
|
||||
|
|
|
@ -34,7 +34,7 @@ class CustomButton extends StatelessWidget {
|
|||
backgroundColor:
|
||||
MaterialStateColor.resolveWith((states) => backgroundColor),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(20), // <-- Radius
|
||||
borderRadius: BorderRadius.circular(10), // <-- Radius
|
||||
),
|
||||
),
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ import 'package:konectar_events/contacts_module/ui_screen/trials_show_more.dart'
|
|||
// import 'package:discover_module/ui_screen/trials_show_more.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class ActivitiesK2 extends StatefulWidget {
|
||||
|
@ -146,7 +147,7 @@ class _ActivitiesState extends State<ActivitiesK2> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
|
@ -157,7 +158,7 @@ class _ActivitiesState extends State<ActivitiesK2> {
|
|||
_isExpanded = expanded;
|
||||
});
|
||||
},
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
trailing: Icon(
|
||||
_isExpanded
|
||||
? Icons.keyboard_arrow_up
|
||||
|
@ -280,7 +281,8 @@ class _ActivitiesState extends State<ActivitiesK2> {
|
|||
},
|
||||
child: Text(
|
||||
'Show More',
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
style:
|
||||
TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -329,7 +331,7 @@ class _ActivitiesState extends State<ActivitiesK2> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
|
@ -338,7 +340,7 @@ class _ActivitiesState extends State<ActivitiesK2> {
|
|||
_isExpanded = expanded;
|
||||
});
|
||||
},
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
trailing: Icon(
|
||||
_isExpanded
|
||||
? Icons.keyboard_arrow_up
|
||||
|
@ -460,7 +462,8 @@ class _ActivitiesState extends State<ActivitiesK2> {
|
|||
),
|
||||
child: Text(
|
||||
'Show More',
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
style:
|
||||
TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -0,0 +1,344 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/custom_expansiontile.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/custom_sizedbox.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/text.dart';
|
||||
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_aff_k2.dart';
|
||||
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_event_k2.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_aff_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_event_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/k2api_integrated_ui/k2testbshhet.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/show_morek2/events_showmorek2.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class ActivitiesK2Demo extends StatefulWidget {
|
||||
const ActivitiesK2Demo({required this.text, super.key, this.offlineMode});
|
||||
|
||||
final int text;
|
||||
final bool? offlineMode;
|
||||
|
||||
@override
|
||||
State<ActivitiesK2Demo> createState() => _ActivitiesState();
|
||||
}
|
||||
|
||||
class _ActivitiesState extends State<ActivitiesK2Demo> {
|
||||
bool isDataLoaded = false;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
getaffiliations();
|
||||
}
|
||||
|
||||
Future<void> getaffiliations() async {
|
||||
final affProvider =
|
||||
Provider.of<AffiliationsProviderk2>(context, listen: false);
|
||||
|
||||
final eveProvider = Provider.of<EventProviderK2>(context, listen: false);
|
||||
|
||||
if (!affProvider.hasData) {
|
||||
await affProvider.getAffiliationsdata(widget.text);
|
||||
}
|
||||
|
||||
if (mounted) {
|
||||
if (!eveProvider.hasData) {
|
||||
await eveProvider.geteventdata(widget.text);
|
||||
}
|
||||
}
|
||||
setState(() {
|
||||
isDataLoaded = true; // Mark data as loaded
|
||||
});
|
||||
}
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
final affProvider =
|
||||
Provider.of<AffiliationsProviderk2>(context, listen: false);
|
||||
|
||||
final eveProvider = Provider.of<EventProviderK2>(context, listen: false);
|
||||
return Center(
|
||||
child: ListView(children: [
|
||||
affProvider.hasData
|
||||
? CustomExpansionTile<AffList>(
|
||||
title: "Affiliations",
|
||||
itemList: affProvider.adddta.cast<AffList>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Organization Name',
|
||||
field2: 'TimeFrame',
|
||||
noexpand: widget.offlineMode == null ? true : false,
|
||||
onItemSelected: (AffList selectedLocation) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"Department": selectedLocation.department,
|
||||
"Title": selectedLocation.title,
|
||||
"Start Year": selectedLocation.startYear,
|
||||
"End Year": selectedLocation.endYear,
|
||||
"Role": selectedLocation.role,
|
||||
"Organization Type": selectedLocation.kolOrganizationType,
|
||||
"Engagement Type": selectedLocation.kolEngagementType,
|
||||
}
|
||||
];
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
)
|
||||
: Container(),
|
||||
eveProvider.hasData
|
||||
? CustomExpansionTile<EventList>(
|
||||
title: "Events",
|
||||
itemList: eveProvider.EventsList.cast<EventList>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Event Name',
|
||||
field2: 'Role',
|
||||
noexpand: widget.offlineMode == null ? true : false,
|
||||
onItemSelected: (EventList selectedLocation) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"Name": selectedLocation.name,
|
||||
"Notes": selectedLocation.notes,
|
||||
"Partially Released Event":
|
||||
selectedLocation.partiallyReleasedEvent,
|
||||
}
|
||||
];
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
onButtonPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => Events2ShowMore(text: widget.text)));
|
||||
},
|
||||
)
|
||||
: Container(),
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
||||
void bottomshet(affiliation_data) {
|
||||
showModalBottomSheet<void>(
|
||||
context: context,
|
||||
|
||||
useRootNavigator: true,
|
||||
isScrollControlled: false,
|
||||
enableDrag: true,
|
||||
useSafeArea: true,
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: double.infinity,
|
||||
),
|
||||
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(
|
||||
top: Radius.circular(0),
|
||||
),
|
||||
),
|
||||
clipBehavior: Clip.antiAliasWithSaveLayer,
|
||||
// sheetAnimationStyle: _animationStyle,
|
||||
builder: (BuildContext context) {
|
||||
return
|
||||
// makeDismissible(
|
||||
// child:
|
||||
DraggableScrollableSheet(
|
||||
expand: false,
|
||||
builder: (BuildContext context, ScrollController scrollController) {
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
//color: Colors.white,
|
||||
color: Color.fromARGB(255, 246, 248, 252),
|
||||
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
controller: scrollController,
|
||||
itemCount: 1,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const CustomSizedBox(height: 18.0),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(18.0),
|
||||
child: Text(
|
||||
affiliation_data.org_name,
|
||||
softWrap: true,
|
||||
maxLines: 4,
|
||||
style: const TextStyle(
|
||||
fontSize: 16.0, color: Colors.black),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const CustomSizedBox(height: 18.0),
|
||||
Divider(),
|
||||
const CustomSizedBox(height: 18.0),
|
||||
affiliation_data['dept'] != ""
|
||||
? Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 18.0),
|
||||
child: Text1(
|
||||
title: "Department",
|
||||
txtfont: 13.0,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 18.0),
|
||||
child: Text(
|
||||
affiliation_data['dept'],
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.grey[700]),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: Container(),
|
||||
affiliation_data['role'] != ""
|
||||
? Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 18.0, top: 18.0),
|
||||
child: Text1(
|
||||
title: "Role",
|
||||
txtfont: 13.0,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 18.0),
|
||||
child: Text(
|
||||
affiliation_data['role'],
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.grey[700]),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: Container(),
|
||||
affiliation_data['time_frame'] != ""
|
||||
? Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 18.0, top: 18.0),
|
||||
child: Text(
|
||||
"Time Frame".toString(),
|
||||
style: TextStyle(fontSize: 13.0),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 18.0),
|
||||
child: Text(
|
||||
affiliation_data['time_frame']
|
||||
.toString(),
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.grey[700]),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: Container(),
|
||||
affiliation_data['org_type'] != ""
|
||||
? Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 18.0, top: 18.0),
|
||||
child: Text1(
|
||||
title: "Oraganization Type",
|
||||
txtfont: 13.0,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 18.0),
|
||||
child: Text(
|
||||
affiliation_data['org_type'],
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.grey[700]),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: Container(),
|
||||
affiliation_data['emg_type'] != ""
|
||||
? Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 18.0, top: 18.0),
|
||||
child: Text(
|
||||
"Eng Type",
|
||||
style: TextStyle(fontSize: 13.0),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 18.0),
|
||||
child: Text(
|
||||
affiliation_data['emg_type'],
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: Colors.grey[700]),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: Container(),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
//);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void modelbsheet(List<Map<String, dynamic>> keyValue) {
|
||||
showModalBottomSheet(
|
||||
useRootNavigator: true,
|
||||
isScrollControlled: false,
|
||||
enableDrag: true,
|
||||
useSafeArea: true,
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: double.infinity,
|
||||
),
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(
|
||||
top: Radius.circular(0),
|
||||
),
|
||||
),
|
||||
clipBehavior: Clip.antiAliasWithSaveLayer,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return bsheetk2new(keyValue);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
|
@ -86,6 +86,7 @@ import 'package:flutter/cupertino.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
||||
|
@ -232,7 +233,7 @@ class _Contactsk2State extends State<Contactsk2> {
|
|||
setState(() {});
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
fillColor: Constants.k2color,
|
||||
fillColor: AppColors.blueColor,
|
||||
contentPadding: EdgeInsets.symmetric(vertical: 9.0),
|
||||
border: OutlineInputBorder(),
|
||||
hintText: "Search",
|
||||
|
@ -1062,7 +1063,7 @@ class _Contactsk2State extends State<Contactsk2> {
|
|||
Text(
|
||||
'Cancel',
|
||||
style: TextStyle(
|
||||
color: Constants.k2color),
|
||||
color: AppColors.blueColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -1126,7 +1127,7 @@ class _Contactsk2State extends State<Contactsk2> {
|
|||
},
|
||||
child: Text(
|
||||
'Reset Filter',
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
style: TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -1276,7 +1277,7 @@ class _Contactsk2State extends State<Contactsk2> {
|
|||
},
|
||||
child: Text(
|
||||
'Saved Profiles123',
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
style: TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// import 'package:konectar_events/custom_widget/custom_expansiontile.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/card_expansiontile.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/custom_expansiontile.dart';
|
||||
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_Certificate_k2.dart';
|
||||
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_awards_k2.dart';
|
||||
|
@ -14,327 +15,443 @@ import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_e
|
|||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_locationprovider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_pno_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_training_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/awa_data/crud_awa.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/cer_hive/crud_cer.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/edu_data/crud_edu.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/email_data/crud_email.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/loc_data/crud_loc.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/pno_data/crud_pno.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/traning_data/crud_training.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/k2api_integrated_ui/k2testbshhet.dart';
|
||||
// import 'package:konectar_events/model_class/k2_api_model/kol_Certificate_k2.dart';
|
||||
// import 'package:konectar_events/model_class/k2_api_model/kol_awards_k2.dart';
|
||||
// import 'package:konectar_events/model_class/k2_api_model/kol_education_k2.dart';
|
||||
// import 'package:konectar_events/model_class/k2_api_model/kol_email_k2.dart';
|
||||
// import 'package:konectar_events/model_class/k2_api_model/kol_location_k2.dart';
|
||||
// import 'package:konectar_events/model_class/k2_api_model/kol_pno_k2.dart';
|
||||
// import 'package:konectar_events/model_class/k2_api_model/kol_training_k2.dart';
|
||||
// import 'package:konectar_events/provider_class/k2_provider/kol_awards_provider.dart';
|
||||
// import 'package:konectar_events/provider_class/k2_provider/kol_certificate_provider.dart';
|
||||
// import 'package:konectar_events/provider_class/k2_provider/kol_education_provider.dart';
|
||||
// import 'package:konectar_events/provider_class/k2_provider/kol_email_provider.dart';
|
||||
// import 'package:konectar_events/provider_class/k2_provider/kol_locationprovider.dart';
|
||||
// import 'package:konectar_events/provider_class/k2_provider/kol_pno_provider.dart';
|
||||
// import 'package:konectar_events/provider_class/k2_provider/kol_training_provider.dart';
|
||||
// import 'package:konectar_events/storage_hive/awa_data/crud_awa.dart';
|
||||
// import 'package:konectar_events/storage_hive/cer_hive/crud_cer.dart';
|
||||
// import 'package:konectar_events/storage_hive/edu_data/crud_edu.dart';
|
||||
// import 'package:konectar_events/storage_hive/email_data/crud_email.dart';
|
||||
// import 'package:konectar_events/storage_hive/loc_data/crud_loc.dart';
|
||||
// import 'package:konectar_events/storage_hive/pno_data/crud_pno.dart';
|
||||
// import 'package:konectar_events/storage_hive/traning_data/crud_training.dart';
|
||||
// import 'package:konectar_events/ui_screen/k2api_integrated_ui/k2testbshhet.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/show_morek2/location_showmorek2.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class LocationK2Tab extends StatefulWidget {
|
||||
// const LocationTab({super.key});
|
||||
LocationK2Tab({required this.text, this.offline, Key? key}) : super(key: key);
|
||||
const LocationK2Tab(
|
||||
{required this.text, this.offline, super.key, this.offlineMode});
|
||||
|
||||
final int text;
|
||||
int? offline;
|
||||
final int? offline;
|
||||
final bool? offlineMode;
|
||||
@override
|
||||
State<LocationK2Tab> createState() => _LocationK2TabState();
|
||||
}
|
||||
|
||||
class _LocationK2TabState extends State<LocationK2Tab> {
|
||||
List locationList = [];
|
||||
List pno = [];
|
||||
List emailid = [];
|
||||
bool isDataLoaded = false;
|
||||
|
||||
List training = [];
|
||||
List education = [];
|
||||
List award = [];
|
||||
List certificate = [];
|
||||
List locationList = [];
|
||||
|
||||
List phonenolist = [];
|
||||
|
||||
List mailList = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
||||
getAffiliations();
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
print("I_aminitstate");
|
||||
|
||||
if (!isDataLoaded) {
|
||||
getAffiliations();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> getAffiliations() async {
|
||||
// ignore: prefer_typing_uninitialized_variables
|
||||
var loclist, phoneno, emailno1, edu1, awa1, cer1, training1;
|
||||
final locationProvider =
|
||||
Provider.of<LocationKolProvider>(context, listen: false);
|
||||
|
||||
if (widget.offline == 1) {
|
||||
loclist = await retrieveidlocations(widget.text);
|
||||
print("Saved_Checkingloclist: $loclist");
|
||||
} else {
|
||||
var location = Provider.of<LocationKolProvider>(context, listen: false);
|
||||
await location.locationinfo(widget.text);
|
||||
loclist = location.locationlist;
|
||||
final pnoProvider = Provider.of<PhonenoProviderK2>(context, listen: false);
|
||||
final emailProvider = Provider.of<EmailProviderK2>(context, listen: false);
|
||||
final trainingProvider =
|
||||
Provider.of<TrainigProviderK2>(context, listen: false);
|
||||
final educationProvider =
|
||||
Provider.of<EducationProviderK2>(context, listen: false);
|
||||
final awardsProvider = Provider.of<AwardProviderK2>(context, listen: false);
|
||||
final certificateProvider =
|
||||
Provider.of<CertificateProviderK2>(context, listen: false);
|
||||
|
||||
setState(() {
|
||||
locationList = loclist;
|
||||
});
|
||||
}
|
||||
|
||||
if (mounted) {
|
||||
if (widget.offline == 1) {
|
||||
phoneno = await retrieveidpnos(widget.text);
|
||||
print("Saved_Checkingloclist: $loclist");
|
||||
} else {
|
||||
var phone = Provider.of<PhonenoProviderK2>(context, listen: false);
|
||||
await phone.phonek2info(widget.text);
|
||||
phoneno = phone.phonenolist;
|
||||
Future<void> _loadData(
|
||||
bool hasData,
|
||||
Function fetchDataOffline,
|
||||
Function fetchDataOnline,
|
||||
dynamic setStateCallback,
|
||||
) async {
|
||||
if (!hasData) {
|
||||
if (widget.offline == 1) {
|
||||
print("Offline mode: ${widget.offline}");
|
||||
var data = await fetchDataOffline(widget.text);
|
||||
print("Retrieved data: $data");
|
||||
setState(() => setStateCallback(data));
|
||||
} else {
|
||||
await fetchDataOnline(widget.text);
|
||||
}
|
||||
}
|
||||
setState(() {
|
||||
pno = phoneno;
|
||||
});
|
||||
}
|
||||
|
||||
// Location data fetch logic
|
||||
if (mounted) {
|
||||
if (widget.offline == 1) {
|
||||
emailno1 = await retrieveidemails(widget.text);
|
||||
print("Saved_CheckingloclistEmailll: $emailno1");
|
||||
} else {
|
||||
var email = Provider.of<EmailProviderK2>(context, listen: false);
|
||||
await email.emailinfo(widget.text);
|
||||
emailno1 = email.emailkollist;
|
||||
print("Saved_CheckingloclistEmailll123: $emailno1");
|
||||
}
|
||||
|
||||
setState(() {
|
||||
emailid = emailno1;
|
||||
});
|
||||
await _loadData(
|
||||
locationProvider.hasData,
|
||||
retrieveidlocations,
|
||||
locationProvider.locationinfo,
|
||||
(data) => locationList = data,
|
||||
);
|
||||
}
|
||||
|
||||
// Phone number data fetch logic
|
||||
if (mounted) {
|
||||
if (widget.offline == 1) {
|
||||
training1 = await retrieveidtri(widget.text);
|
||||
print("Saved_CheckingloclistEmailll: $emailno1");
|
||||
} else {
|
||||
var trai = Provider.of<TrainigProviderK2>(context, listen: false);
|
||||
await trai.traininginfo(widget.text);
|
||||
training1 = trai.traininglist;
|
||||
}
|
||||
|
||||
setState(() {
|
||||
training = training1;
|
||||
});
|
||||
await _loadData(
|
||||
pnoProvider.hasData,
|
||||
retrieveidpnos,
|
||||
pnoProvider.phonek2info,
|
||||
(data) => phonenolist = data,
|
||||
);
|
||||
}
|
||||
|
||||
// Email data fetch logic
|
||||
if (mounted) {
|
||||
if (widget.offline == 1) {
|
||||
edu1 = await retrieveidedus(widget.text);
|
||||
print("Saved_CheckingloclistEdu: $edu1");
|
||||
} else {
|
||||
var edu = Provider.of<EducationProviderK2>(context, listen: false);
|
||||
await edu.eduinfo(widget.text);
|
||||
edu1 = edu.educationlist;
|
||||
print("Saved_CheckingloclistEdu123: $edu1");
|
||||
}
|
||||
|
||||
setState(() {
|
||||
education = edu1;
|
||||
});
|
||||
await _loadData(
|
||||
emailProvider.hasData,
|
||||
retrieveidemails,
|
||||
emailProvider.emailinfo,
|
||||
(data) => mailList = data,
|
||||
);
|
||||
}
|
||||
|
||||
// Training data fetch logic
|
||||
if (mounted) {
|
||||
if (widget.offline == 1) {
|
||||
awa1 = await retrieveidawa(widget.text);
|
||||
print("Saved_CheckingloclistEdu: $edu1");
|
||||
} else {
|
||||
var awa = Provider.of<AwardProviderK2>(context, listen: false);
|
||||
await awa.awainfo(widget.text);
|
||||
awa1 = awa.awardlist;
|
||||
}
|
||||
setState(() {
|
||||
award = awa1;
|
||||
});
|
||||
await _loadData(
|
||||
trainingProvider.hasData,
|
||||
retrieveidtri,
|
||||
trainingProvider.traininginfo,
|
||||
(data) => {}, // Handle training data if needed
|
||||
);
|
||||
}
|
||||
|
||||
// Education data fetch logic
|
||||
if (mounted) {
|
||||
if (widget.offline == 1) {
|
||||
cer1 = await retrieveidcer(widget.text);
|
||||
print("Saved_CheckingloclistEdu: $edu1");
|
||||
} else {
|
||||
var cer = Provider.of<CertificateProviderK2>(context, listen: false);
|
||||
await cer.certificateinfo(widget.text);
|
||||
cer1 = cer.certificatelist;
|
||||
}
|
||||
|
||||
setState(() {
|
||||
certificate = cer1;
|
||||
});
|
||||
await _loadData(
|
||||
educationProvider.hasData,
|
||||
retrieveidtri,
|
||||
educationProvider.eduinfo,
|
||||
(data) => {}, // Handle education data if needed
|
||||
);
|
||||
}
|
||||
|
||||
// Awards data fetch logic
|
||||
if (mounted) {
|
||||
await _loadData(
|
||||
awardsProvider.hasData,
|
||||
retrieveidtri,
|
||||
awardsProvider.awainfo,
|
||||
(data) => {}, // Handle awards data if needed
|
||||
);
|
||||
}
|
||||
|
||||
// Certificate data fetch logic
|
||||
if (mounted) {
|
||||
await _loadData(
|
||||
certificateProvider.hasData,
|
||||
retrieveidtri,
|
||||
certificateProvider.certificateinfo,
|
||||
(data) => {}, // Handle certificate data if needed
|
||||
);
|
||||
}
|
||||
|
||||
setState(() {
|
||||
isDataLoaded = true; // Mark data as loaded
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final locationProvider = Provider.of<LocationKolProvider>(context);
|
||||
|
||||
final pnoProvider = Provider.of<PhonenoProviderK2>(context);
|
||||
final emailProvider = Provider.of<EmailProviderK2>(context);
|
||||
final trainingProvider =
|
||||
Provider.of<TrainigProviderK2>(context, listen: false);
|
||||
|
||||
final educationProvider =
|
||||
Provider.of<EducationProviderK2>(context, listen: false);
|
||||
|
||||
final awardsProvider = Provider.of<AwardProviderK2>(context, listen: false);
|
||||
|
||||
var certificateProvider =
|
||||
Provider.of<CertificateProviderK2>(context, listen: false);
|
||||
print("LocationProvider_hasdata: ${locationProvider.hasData}");
|
||||
|
||||
List<Data> dataList = locationList.map((location) {
|
||||
print("Location_dataaaa_issss: ${location.address}");
|
||||
return Data(address1: location.address, postalCode: location.city);
|
||||
}).toList();
|
||||
|
||||
List<DataPhno> dataPnoList = phonenolist.map((location) {
|
||||
print("Pnooo_dataaaa_issss: ${location.phoneType}");
|
||||
return DataPhno(
|
||||
organizationName: location.phoneType.toString(),
|
||||
number: int.parse(location.phoneNumber));
|
||||
}).toList();
|
||||
|
||||
List<EmailData> dataEmailList = mailList.map((location) {
|
||||
// print("Pnooo_dataaaa_issss: ${location.emailType}");
|
||||
return EmailData(
|
||||
email: location.email, emailTypeName: location.emailType);
|
||||
}).toList();
|
||||
return Center(
|
||||
child: ListView(children: [
|
||||
locationList.length != 0
|
||||
? CustomExpansionTile<Data>(
|
||||
title: "Locations",
|
||||
itemList: locationList.cast<Data>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Institutation',
|
||||
field2: 'Address',
|
||||
onItemSelected: (Data selectedPhoneNumber) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"Address": selectedPhoneNumber.address1,
|
||||
"Postal Code": selectedPhoneNumber.postalCode,
|
||||
"Primary": selectedPhoneNumber.formattedIsPrimary,
|
||||
"organization Name": selectedPhoneNumber.organizationName,
|
||||
"Country Name": selectedPhoneNumber.countryName,
|
||||
"State Name": selectedPhoneNumber.stateName,
|
||||
"City Name": selectedPhoneNumber.cityName,
|
||||
}
|
||||
];
|
||||
child: ListView(
|
||||
children: [
|
||||
locationProvider.hasData
|
||||
? CardCustomExpansionTile<Data>(
|
||||
title: "Locations",
|
||||
itemList: locationProvider.locationlist.cast<Data>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Institutation',
|
||||
field2: 'Address',
|
||||
noexpand: widget.offlineMode == null ? true : false,
|
||||
onItemSelected: (Data selectedPhoneNumber) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"Address": selectedPhoneNumber.address1,
|
||||
"Postal Code": selectedPhoneNumber.postalCode,
|
||||
"Primary": selectedPhoneNumber.formattedIsPrimary,
|
||||
"organization Name":
|
||||
selectedPhoneNumber.organizationName,
|
||||
"Country Name": selectedPhoneNumber.countryName,
|
||||
"State Name": selectedPhoneNumber.stateName,
|
||||
"City Name": selectedPhoneNumber.cityName,
|
||||
}
|
||||
];
|
||||
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
)
|
||||
: Container(),
|
||||
pno.length != 0
|
||||
? CustomExpansionTile<DataPhno>(
|
||||
title: "Phone Numbers",
|
||||
itemList: pno.cast<DataPhno>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Phone Type',
|
||||
field2: 'Phone No',
|
||||
onItemSelected: (DataPhno selectedPhoneNumber) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"Phone Number": selectedPhoneNumber.number,
|
||||
"Phone Type": selectedPhoneNumber.phoneTypeName,
|
||||
"Primary": selectedPhoneNumber.formattedIsPrimary,
|
||||
"organization Name": selectedPhoneNumber.organizationName,
|
||||
}
|
||||
];
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
// onButtonPressed: () {
|
||||
// print("Show More button clicked");
|
||||
// },
|
||||
onButtonPressed: () {
|
||||
Navigator.push(context,
|
||||
MaterialPageRoute(builder: (_) => Lock2ShowMore()));
|
||||
},
|
||||
)
|
||||
:
|
||||
// widget.offlineMode != null
|
||||
// ?
|
||||
CustomExpansionTile<Data>(
|
||||
title: "Locations1",
|
||||
// itemList: locationList.cast<Data>(),
|
||||
itemList: dataList,
|
||||
buttonText: 'Show More',
|
||||
field1: 'Institutation',
|
||||
field2: 'Address',
|
||||
noexpand: widget.offlineMode == null ? true : false,
|
||||
onItemSelected: (Data selectedPhoneNumber) {},
|
||||
),
|
||||
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
)
|
||||
: Container(),
|
||||
emailid.length != 0
|
||||
? CustomExpansionTile<EmailData>(
|
||||
title: "Emails",
|
||||
itemList: emailid.cast<EmailData>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Email Type',
|
||||
field2: 'Email',
|
||||
onItemSelected: (EmailData selectedPhoneNumber) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"Email": selectedPhoneNumber.email,
|
||||
"Email Type": selectedPhoneNumber.emailTypeName,
|
||||
}
|
||||
];
|
||||
//: Container(),
|
||||
pnoProvider.hasData
|
||||
? CardCustomExpansionTile<DataPhno>(
|
||||
title: "Phone Numbers",
|
||||
itemList: pnoProvider.phonenolist.cast<DataPhno>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Institutation',
|
||||
field2: 'Address',
|
||||
noexpand: widget.offlineMode == null ? true : false,
|
||||
onItemSelected: (DataPhno selectedPhoneNumber) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"Phone Number": selectedPhoneNumber.number,
|
||||
"Phone Type": selectedPhoneNumber.phoneTypeName,
|
||||
"Primary": selectedPhoneNumber.formattedIsPrimary,
|
||||
"organization Name":
|
||||
selectedPhoneNumber.organizationName,
|
||||
}
|
||||
];
|
||||
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
)
|
||||
: Container(),
|
||||
training.length != 0
|
||||
? CustomExpansionTile<TrainingList>(
|
||||
title: "Trainings",
|
||||
itemList: training.cast<TrainingList>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Education Type',
|
||||
field2: 'Institution Name',
|
||||
onItemSelected: (TrainingList selectedPhoneNumber) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"organization Id": selectedPhoneNumber.organizationId,
|
||||
"Degree": selectedPhoneNumber.degree,
|
||||
"Specialty": selectedPhoneNumber.specialty,
|
||||
"Start Date": selectedPhoneNumber.startDate,
|
||||
"End Date": selectedPhoneNumber.endDate,
|
||||
}
|
||||
];
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
)
|
||||
: Container(),
|
||||
education.length != 0
|
||||
? CustomExpansionTile<EducationList>(
|
||||
title: "Education",
|
||||
itemList: education.cast<EducationList>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Education Type',
|
||||
field2: 'Institution Name',
|
||||
onItemSelected: (EducationList selectedPhoneNumber) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"organization Id": selectedPhoneNumber.organizationId,
|
||||
"Degree": selectedPhoneNumber.degree,
|
||||
"Specialty": selectedPhoneNumber.specialty,
|
||||
"Start Date": selectedPhoneNumber.startDate,
|
||||
"End Date": selectedPhoneNumber.endDate,
|
||||
}
|
||||
];
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
)
|
||||
: Container(),
|
||||
award.length != 0
|
||||
? CustomExpansionTile<AwardsList>(
|
||||
title: "Awards",
|
||||
itemList: award.cast<AwardsList>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Education Type',
|
||||
field2: 'Institution Name',
|
||||
onItemSelected: (AwardsList selectedPhoneNumber) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"Name": selectedPhoneNumber.name,
|
||||
"Start Date": selectedPhoneNumber.startDate,
|
||||
"End Date": selectedPhoneNumber.endDate,
|
||||
}
|
||||
];
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
)
|
||||
: Container(),
|
||||
certificate.length != 0
|
||||
? CustomExpansionTile<CertificateList>(
|
||||
title: "Certificates",
|
||||
itemList: certificate.cast<CertificateList>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Education Type',
|
||||
field2: 'Institution Name',
|
||||
onItemSelected: (CertificateList selectedPhoneNumber) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"Organization Id": selectedPhoneNumber.organizationId,
|
||||
"specialty": selectedPhoneNumber.specialty,
|
||||
"Start Date": selectedPhoneNumber.startDate,
|
||||
"End Date": selectedPhoneNumber.endDate,
|
||||
}
|
||||
];
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
)
|
||||
: Container(),
|
||||
]),
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
onButtonPressed: () {
|
||||
print("Show More button clicked");
|
||||
},
|
||||
)
|
||||
:
|
||||
// widget.offlineMode != null
|
||||
// ?
|
||||
CustomExpansionTile<DataPhno>(
|
||||
title: "Phone Numbers",
|
||||
// itemList: pnoProvider.phonenolist.cast<DataPhno>(),
|
||||
itemList: dataPnoList,
|
||||
|
||||
buttonText: 'Show More',
|
||||
field1: 'Phone Type',
|
||||
field2: 'Phone No',
|
||||
noexpand: widget.offlineMode == null ? true : false,
|
||||
//noexpand: widget.offlineMode == null ? true : false,
|
||||
onItemSelected: (DataPhno selectedPhoneNumber) {},
|
||||
),
|
||||
|
||||
// : Container(),
|
||||
emailProvider.hasData
|
||||
? CardCustomExpansionTile<EmailData>(
|
||||
title: "Emails",
|
||||
itemList: emailProvider.emailkollist.cast<EmailData>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Email Type',
|
||||
field2: 'Email',
|
||||
noexpand: widget.offlineMode == null ? true : false,
|
||||
onItemSelected: (EmailData selectedPhoneNumber) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"Email": selectedPhoneNumber.email,
|
||||
"Email Type": selectedPhoneNumber.emailTypeName,
|
||||
}
|
||||
];
|
||||
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
onButtonPressed: () {
|
||||
print("Show More button clicked");
|
||||
},
|
||||
)
|
||||
: CustomExpansionTile<EmailData>(
|
||||
title: "Emails",
|
||||
//itemList: emailProvider.emailkollist.cast<EmailData>(),
|
||||
itemList: dataEmailList,
|
||||
|
||||
buttonText: 'Show More',
|
||||
field1: 'Email Type',
|
||||
field2: 'Email',
|
||||
noexpand: widget.offlineMode == null ? true : false,
|
||||
onItemSelected: (EmailData selectedPhoneNumber) {},
|
||||
),
|
||||
// : Container(),
|
||||
trainingProvider.hasData
|
||||
? CardCustomExpansionTile<TrainingList>(
|
||||
title: "Trainings",
|
||||
itemList: trainingProvider.traininglist.cast<TrainingList>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Education Type',
|
||||
field2: 'Institution Name',
|
||||
noexpand: widget.offlineMode == null ? true : false,
|
||||
onItemSelected: (TrainingList selectedPhoneNumber) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"organization Id": selectedPhoneNumber.organizationId,
|
||||
"Degree": selectedPhoneNumber.degree,
|
||||
"Specialty": selectedPhoneNumber.specialty,
|
||||
"Start Date": selectedPhoneNumber.startDate,
|
||||
"End Date": selectedPhoneNumber.endDate,
|
||||
}
|
||||
];
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
)
|
||||
: widget.offlineMode != null
|
||||
? CustomExpansionTile<TrainingList>(
|
||||
title: "Trainings",
|
||||
// itemList: trainingProvider.traininglist.cast<TrainingList>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Education Type',
|
||||
field2: 'Institution Name',
|
||||
noexpand: false,
|
||||
onItemSelected: (TrainingList selectedPhoneNumber) {},
|
||||
)
|
||||
: Container(),
|
||||
educationProvider.hasData
|
||||
? CardCustomExpansionTile<EducationList>(
|
||||
title: "Education",
|
||||
itemList:
|
||||
educationProvider.educationlist.cast<EducationList>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Education Type',
|
||||
field2: 'Institution Name',
|
||||
noexpand: widget.offlineMode == null ? true : false,
|
||||
onItemSelected: (EducationList selectedPhoneNumber) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"organization Id": selectedPhoneNumber.organizationId,
|
||||
"Degree": selectedPhoneNumber.degree,
|
||||
"Specialty": selectedPhoneNumber.specialty,
|
||||
"Start Date": selectedPhoneNumber.startDate,
|
||||
"End Date": selectedPhoneNumber.endDate,
|
||||
}
|
||||
];
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
)
|
||||
: widget.offlineMode != null
|
||||
? CustomExpansionTile<EducationList>(
|
||||
title: "Education",
|
||||
// itemList: trainingProvider.traininglist.cast<TrainingList>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Education Type',
|
||||
field2: 'Institution Name',
|
||||
noexpand: false,
|
||||
onItemSelected: (EducationList selectedPhoneNumber) {},
|
||||
)
|
||||
: Container(),
|
||||
awardsProvider.hasData
|
||||
? CardCustomExpansionTile<AwardsList>(
|
||||
title: "Awards",
|
||||
itemList: awardsProvider.awardlist.cast<AwardsList>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Education Type',
|
||||
field2: 'Institution Name',
|
||||
noexpand: widget.offlineMode == null ? true : false,
|
||||
onItemSelected: (AwardsList selectedPhoneNumber) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"Name": selectedPhoneNumber.name,
|
||||
"Start Date": selectedPhoneNumber.startDate,
|
||||
"End Date": selectedPhoneNumber.endDate,
|
||||
}
|
||||
];
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
)
|
||||
: widget.offlineMode != null
|
||||
? CustomExpansionTile<AwardsList>(
|
||||
title: "Awards",
|
||||
// itemList: trainingProvider.traininglist.cast<TrainingList>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Education Type',
|
||||
field2: 'Institution Name',
|
||||
noexpand: false,
|
||||
onItemSelected: (AwardsList selectedPhoneNumber) {},
|
||||
)
|
||||
: Container(),
|
||||
certificateProvider.hasData
|
||||
? CardCustomExpansionTile<CertificateList>(
|
||||
title: "Certificates",
|
||||
itemList: certificateProvider.cerlist.cast<CertificateList>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Education Type',
|
||||
field2: 'Institution Name',
|
||||
noexpand: widget.offlineMode == null ? true : false,
|
||||
onItemSelected: (CertificateList selectedPhoneNumber) {
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"Organization Id": selectedPhoneNumber.organizationId,
|
||||
"specialty": selectedPhoneNumber.specialty,
|
||||
"Start Date": selectedPhoneNumber.startDate,
|
||||
"End Date": selectedPhoneNumber.endDate,
|
||||
}
|
||||
];
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
)
|
||||
: widget.offlineMode != null
|
||||
? CustomExpansionTile<CertificateList>(
|
||||
title: "Awards",
|
||||
// itemList: trainingProvider.traininglist.cast<TrainingList>(),
|
||||
buttonText: 'Show More',
|
||||
field1: 'Education Type',
|
||||
field2: 'Institution Name',
|
||||
noexpand: false,
|
||||
onItemSelected: (CertificateList selectedPhoneNumber) {},
|
||||
)
|
||||
: Container(),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ import 'package:konectar_events/contacts_module/ui_screen/pno_showmore.dart';
|
|||
import 'package:konectar_events/contacts_module/ui_screen/training_showmore.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class LocationTab extends StatefulWidget {
|
||||
|
@ -188,9 +189,9 @@ class _LocationTabState extends State<LocationTab> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
// backgroundColor: Colors.white,
|
||||
|
@ -310,8 +311,8 @@ class _LocationTabState extends State<LocationTab> {
|
|||
},
|
||||
child: Text(
|
||||
'Show More',
|
||||
style:
|
||||
TextStyle(color: Constants.k2color),
|
||||
style: TextStyle(
|
||||
color: AppColors.contentColorWhite),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -341,9 +342,9 @@ class _LocationTabState extends State<LocationTab> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
// backgroundColor: Colors.white,
|
||||
|
@ -461,8 +462,8 @@ class _LocationTabState extends State<LocationTab> {
|
|||
},
|
||||
child: Text(
|
||||
'Show More',
|
||||
style:
|
||||
TextStyle(color: Constants.k2color),
|
||||
style: TextStyle(
|
||||
color: AppColors.contentColorWhite),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -492,9 +493,9 @@ class _LocationTabState extends State<LocationTab> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
// backgroundColor: Colors.white,
|
||||
|
@ -615,7 +616,7 @@ class _LocationTabState extends State<LocationTab> {
|
|||
child: Text(
|
||||
'Show More',
|
||||
style:
|
||||
TextStyle(color: Constants.k2color),
|
||||
TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -645,9 +646,9 @@ class _LocationTabState extends State<LocationTab> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
// backgroundColor: Colors.white,
|
||||
|
@ -770,7 +771,7 @@ class _LocationTabState extends State<LocationTab> {
|
|||
child: Text(
|
||||
'Show More',
|
||||
style:
|
||||
TextStyle(color: Constants.k2color),
|
||||
TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -799,9 +800,9 @@ class _LocationTabState extends State<LocationTab> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
// backgroundColor: Colors.white,
|
||||
|
@ -920,7 +921,7 @@ class _LocationTabState extends State<LocationTab> {
|
|||
},
|
||||
child: Text(
|
||||
'Show More',
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
style: TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -948,9 +949,9 @@ class _LocationTabState extends State<LocationTab> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
// backgroundColor: Colors.white,
|
||||
|
@ -1073,7 +1074,7 @@ class _LocationTabState extends State<LocationTab> {
|
|||
child: Text(
|
||||
'Show More',
|
||||
style:
|
||||
TextStyle(color: Constants.k2color),
|
||||
TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -1102,9 +1103,9 @@ class _LocationTabState extends State<LocationTab> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
// backgroundColor: Colors.white,
|
||||
|
@ -1228,7 +1229,7 @@ class _LocationTabState extends State<LocationTab> {
|
|||
child: Text(
|
||||
'Show More',
|
||||
style:
|
||||
TextStyle(color: Constants.k2color),
|
||||
TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'package:konectar_events/contacts_module/constants.dart';
|
|||
import 'package:konectar_events/contacts_module/provider_class/medicalinsightprovider.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/view_insight.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class MedicalInsight1 extends StatefulWidget {
|
||||
|
@ -150,7 +151,7 @@ class _MedicalInsightState extends State<MedicalInsight1> {
|
|||
setState(() {});
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
fillColor: Constants.k2color,
|
||||
fillColor: AppColors.blueColor,
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 9.0),
|
||||
border: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.only(
|
||||
|
|
|
@ -1,62 +1,27 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
import 'package:konectar_events/contacts_module/constants.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/custiom_profilepic.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/custom_bottomdailog.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/custom_sizedbox.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/custom_switch.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/show_alert.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/text.dart';
|
||||
import 'package:konectar_events/contacts_module/hive_fun.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/affiliationsprovider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/award_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/certificate_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/educationprovider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/email_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/events_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/hcp%20_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/location_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/nih_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/patent_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/phoneno_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/procedureprovider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/publications_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/speaker_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/training_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/trials_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/kol_info/curd_kol.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/contact_filters.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/util.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/new_new_profile.dart';
|
||||
// import 'package:konectar_events/constants.dart';
|
||||
// import 'package:discover_module/custom_widget/text.dart';
|
||||
// import 'package:discover_module/hive_fun.dart';
|
||||
// import 'package:discover_module/provider_class/affiliationsprovider.dart';
|
||||
// import 'package:discover_module/provider_class/award_provider.dart';
|
||||
// import 'package:discover_module/provider_class/certificate_provider.dart';
|
||||
// import 'package:discover_module/provider_class/educationprovider.dart';
|
||||
// import 'package:discover_module/provider_class/email_provider.dart';
|
||||
// import 'package:discover_module/provider_class/events_provider.dart';
|
||||
// import 'package:discover_module/provider_class/hcp%20_provider.dart';
|
||||
// import 'package:discover_module/provider_class/location_provider.dart';
|
||||
// import 'package:discover_module/provider_class/nih_provider.dart';
|
||||
// import 'package:discover_module/provider_class/patent_provider.dart';
|
||||
// import 'package:discover_module/provider_class/phoneno_provider.dart';
|
||||
// import 'package:discover_module/provider_class/procedureprovider.dart';
|
||||
// import 'package:discover_module/provider_class/publications_provider.dart';
|
||||
// import 'package:discover_module/provider_class/speaker_provider.dart';
|
||||
// import 'package:discover_module/provider_class/training_provider.dart';
|
||||
// import 'package:discover_module/provider_class/trials_provider.dart';
|
||||
// import 'package:discover_module/storage_hive/kol_info/curd_kol.dart';
|
||||
// import 'package:discover_module/ui_screen/contact_filters.dart';
|
||||
// import 'package:discover_module/ui_screen/interactionform/util.dart';
|
||||
// import 'package:discover_module/ui_screen/new_new_profile.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/profile_storage.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:konectar_events/utils/util.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
||||
|
||||
import 'contact_filters.dart';
|
||||
import 'new_new_profile.dart';
|
||||
|
||||
final ValueNotifier<List<String>> ddlist = ValueNotifier<List<String>>([]);
|
||||
String selectedValue = '';
|
||||
|
||||
String? selectedType;
|
||||
final TextEditingController searchController = TextEditingController();
|
||||
|
||||
|
@ -87,7 +52,6 @@ class _Contacts1State extends State<Contacts1> {
|
|||
bool longpressmy = false;
|
||||
|
||||
late List<dynamic> hcpdataList;
|
||||
// ignore: prefer_typing_uninitialized_variables
|
||||
|
||||
var hcpDataProvider1;
|
||||
|
||||
|
@ -95,6 +59,10 @@ class _Contacts1State extends State<Contacts1> {
|
|||
final Connectivity _connectivity = Connectivity();
|
||||
late StreamSubscription<List<ConnectivityResult>> _connectivitySubscription;
|
||||
|
||||
bool offMode = false;
|
||||
|
||||
List<Map<String, String>> filterList = [];
|
||||
|
||||
get developer => null;
|
||||
|
||||
@override
|
||||
|
@ -106,6 +74,7 @@ class _Contacts1State extends State<Contacts1> {
|
|||
|
||||
_connectivitySubscription =
|
||||
_connectivity.onConnectivityChanged.listen(_updateConnectionStatus);
|
||||
|
||||
hcpList();
|
||||
});
|
||||
}
|
||||
|
@ -119,19 +88,41 @@ class _Contacts1State extends State<Contacts1> {
|
|||
hcpdataList = hcplist;
|
||||
}
|
||||
|
||||
void _onSwitchChanged(bool value) {
|
||||
setState(() {
|
||||
_switchValue = value; // Update the switch value
|
||||
});
|
||||
print("Switch value: $_switchValue"); // Optional: Log the switch value
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setSystemUIOverlayStyle(
|
||||
SystemUiOverlayStyle(statusBarColor: Color.fromARGB(255, 0, 71, 132)));
|
||||
SystemUiOverlayStyle(statusBarColor: AppColors.blueColor));
|
||||
|
||||
void updateSelectedValue(String newValue) {
|
||||
setState(() {
|
||||
selectedValue = newValue;
|
||||
searchController.text = selectedValue;
|
||||
});
|
||||
}
|
||||
|
||||
void updatemultivalue(String newValue) {
|
||||
print("FilterdList_isss: ${newValue}");
|
||||
setState(() {
|
||||
selectedValue = newValue;
|
||||
searchController.text = selectedValue;
|
||||
});
|
||||
}
|
||||
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
key: _scaffoldKey, // Assign the key to the Scaffold
|
||||
|
||||
appBar: AppBar(
|
||||
backgroundColor: AppColors.blueColor,
|
||||
automaticallyImplyLeading: false,
|
||||
centerTitle: true,
|
||||
backgroundColor: EventsConstants.blueColor,
|
||||
title: isSearchClickd
|
||||
? Container(
|
||||
height: 40,
|
||||
|
@ -141,24 +132,31 @@ class _Contacts1State extends State<Contacts1> {
|
|||
child: TextField(
|
||||
controller: searchController,
|
||||
onChanged: (value) {
|
||||
setState(() {});
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
setState(() {
|
||||
selectedValue = value;
|
||||
searchController.text = selectedValue;
|
||||
});
|
||||
});
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
fillColor: Constants.k2color,
|
||||
fillColor: AppColors.blueColor,
|
||||
contentPadding: EdgeInsets.symmetric(vertical: 9.0),
|
||||
border: OutlineInputBorder(),
|
||||
hintText: "Search",
|
||||
// labelText: ' Search',
|
||||
prefixIcon: Icon(
|
||||
color: AppColors.contentColorWhite,
|
||||
Icons.search,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: Text1(
|
||||
title: "Contacts",
|
||||
txtcolor: Colors.white,
|
||||
: Center(
|
||||
child: Text1(
|
||||
title: "Contacts",
|
||||
txtcolor: AppColors.contentColorWhite,
|
||||
),
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
|
@ -172,15 +170,14 @@ class _Contacts1State extends State<Contacts1> {
|
|||
},
|
||||
icon: Icon(
|
||||
isSearchClickd ? Icons.close : Icons.search,
|
||||
color: Colors.white,
|
||||
color: AppColors.contentColorWhite,
|
||||
))
|
||||
],
|
||||
),
|
||||
endDrawer: FilterDrawer(_switchValue, searchController),
|
||||
endDrawer: FilterDrawer(_switchValue, searchController,
|
||||
onValueChanged: updateSelectedValue,
|
||||
onValueMultiChanged: updatemultivalue),
|
||||
|
||||
// Drawer(
|
||||
// child: listdata(),
|
||||
// ),
|
||||
body: Consumer<hcpProvider>(
|
||||
builder: (context, hcpProvider, child) {
|
||||
print("_selectedValueConsumerConsumer_isss: $selectedValue");
|
||||
|
@ -199,81 +196,16 @@ class _Contacts1State extends State<Contacts1> {
|
|||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Wrap(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, right: 2.0),
|
||||
child: CupertinoSwitch(
|
||||
activeColor: Color.fromARGB(255, 0, 71, 132),
|
||||
value: _switchValue,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_switchValue = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(right: 8.0, top: 9.0),
|
||||
child: !_switchValue
|
||||
? Text1(
|
||||
title: 'My Contacts',
|
||||
txtfont: 15,
|
||||
txtcolor: Colors.grey,
|
||||
)
|
||||
: Text1(
|
||||
title: 'My Contacts',
|
||||
txtfont: 15,
|
||||
txtcolor: Colors.grey,
|
||||
))
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: Row(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
print("SearchVon: ${searchController.text}");
|
||||
|
||||
setState(() {
|
||||
selectedValue = '';
|
||||
});
|
||||
},
|
||||
child: Text1(title: 'My Filters'),
|
||||
// child: Text1(
|
||||
// title: _connectionStatus[0].toString(),
|
||||
// )
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
_scaffoldKey.currentState?.openEndDrawer();
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.sort,
|
||||
size: 30,
|
||||
)),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
_offlineBanner(),
|
||||
headerRow(),
|
||||
const CustomSizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
// !_switchValue
|
||||
// ? hcpContactlistview(displayedHCPList)
|
||||
// : hcpContactlistview(myContactHCPList),
|
||||
// contactsBottomdailog()
|
||||
!_switchValue
|
||||
? _connectionStatus[0]
|
||||
.toString()
|
||||
.contains("ConnectivityResult.none")
|
||||
? hcpContactlistview(myContactHCPList)
|
||||
? hcpContactlistview(myContactHCPList, offMode)
|
||||
: hcpContactlistview(displayedHCPList)
|
||||
: hcpContactlistview(myContactHCPList),
|
||||
contactsBottomdailog()
|
||||
|
@ -285,40 +217,6 @@ class _Contacts1State extends State<Contacts1> {
|
|||
);
|
||||
}
|
||||
|
||||
Future<void> _showMyDialog(String data) async {
|
||||
return showDialog<void>(
|
||||
context: context,
|
||||
barrierDismissible: false, // user must tap button!
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: const Text('Successfully'),
|
||||
content: SingleChildScrollView(
|
||||
child: ListBody(
|
||||
children: <Widget>[
|
||||
// Text('This is a demo alert dialog.'),
|
||||
Text(data),
|
||||
],
|
||||
),
|
||||
),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
child: const Text('Ok'),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
setState(() {
|
||||
_selectedIndices.clear();
|
||||
_selectedremoveIndices.clear();
|
||||
longpress = false;
|
||||
longpressmy = false;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> findRecordById(
|
||||
List displayedHCPList, String selectedIndic) {
|
||||
// print(
|
||||
|
@ -327,7 +225,7 @@ class _Contacts1State extends State<Contacts1> {
|
|||
.firstWhere((element) => element['id'] == int.parse(selectedIndic));
|
||||
}
|
||||
|
||||
hcpContactlistview(List HCPList) {
|
||||
hcpContactlistview(List HCPList, [offMode]) {
|
||||
return Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: HCPList.length,
|
||||
|
@ -337,138 +235,114 @@ class _Contacts1State extends State<Contacts1> {
|
|||
print("CheckinggggImage_path: ${data['img_path']}");
|
||||
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ListTile(
|
||||
onLongPress: () {
|
||||
print("LongPresss");
|
||||
setState(() {
|
||||
longpress = true;
|
||||
});
|
||||
},
|
||||
onTap: () async {
|
||||
print("Check_data11 = ${data}");
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
|
||||
child: ListTile(
|
||||
onLongPress: () {
|
||||
print("LongPresss");
|
||||
setState(() {
|
||||
longpress = true;
|
||||
});
|
||||
},
|
||||
onTap: () async {
|
||||
print("Check_data11 = ${offMode}");
|
||||
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => NewProfile1(text: data),
|
||||
),
|
||||
);
|
||||
},
|
||||
leading: data["img_path"] == ""
|
||||
? ProfilePicture(
|
||||
name: data["First Name"],
|
||||
radius: 30,
|
||||
fontsize: 12,
|
||||
)
|
||||
: ClipOval(
|
||||
child: SizedBox.fromSize(
|
||||
size: const Size.fromRadius(30),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: data["img_path"],
|
||||
imageBuilder: (context, imageProvider) => Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: imageProvider,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
offMode != null
|
||||
? Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
NewProfile1(text: data, offlinemode: offMode),
|
||||
),
|
||||
)
|
||||
: Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => NewProfile1(text: data),
|
||||
),
|
||||
);
|
||||
},
|
||||
leading: CustomProfile(
|
||||
imgstring: data["img_path"],
|
||||
fontsize: 12.0,
|
||||
radius: 30,
|
||||
name: data["First Name"],
|
||||
),
|
||||
trailing: Visibility(
|
||||
visible: longpress,
|
||||
child: !_switchValue
|
||||
? Checkbox(
|
||||
value: _selectedIndices
|
||||
.contains(data["id"].toString()),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
if (value!) {
|
||||
print("Datata_issss_iddd: ${data["id"]}");
|
||||
_selectedIndices.add(data["id"].toString());
|
||||
} else {
|
||||
_selectedIndices
|
||||
.remove(data["id"].toString());
|
||||
}
|
||||
print("id_total123: ${_selectedIndices}");
|
||||
});
|
||||
})
|
||||
: Checkbox(
|
||||
value: _selectedremoveIndices.contains(data["id"]),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
if (value!) {
|
||||
_selectedremoveIndices.add(data["id"]);
|
||||
} else {
|
||||
_selectedremoveIndices.remove(data["id"]);
|
||||
}
|
||||
print("id_total: ${_selectedremoveIndices}");
|
||||
});
|
||||
}),
|
||||
),
|
||||
title: Text1(
|
||||
title: "Dr. " + data['name'],
|
||||
fontweight: FontWeight.bold,
|
||||
txtfont: isTablet ? 22 : 15,
|
||||
),
|
||||
subtitle: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text1(
|
||||
title: data["speciality"] ?? data['spl'],
|
||||
fontweight: FontWeight.normal,
|
||||
txtcolor: Colors.black,
|
||||
txtfont: isTablet ? 20 : 13,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
trailing: Visibility(
|
||||
visible: longpress,
|
||||
child: !_switchValue
|
||||
? Checkbox(
|
||||
value:
|
||||
_selectedIndices.contains(data["id"].toString()),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
if (value!) {
|
||||
print("Datata_issss_iddd: ${data["id"]}");
|
||||
_selectedIndices.add(data["id"].toString());
|
||||
} else {
|
||||
_selectedIndices.remove(data["id"].toString());
|
||||
}
|
||||
print("id_total123: ${_selectedIndices}");
|
||||
});
|
||||
})
|
||||
: Checkbox(
|
||||
value: _selectedremoveIndices.contains(data["id"]),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
if (value!) {
|
||||
_selectedremoveIndices.add(data["id"]);
|
||||
} else {
|
||||
_selectedremoveIndices.remove(data["id"]);
|
||||
}
|
||||
print("id_total: ${_selectedremoveIndices}");
|
||||
});
|
||||
}),
|
||||
),
|
||||
title: Text1(
|
||||
title: data['name'],
|
||||
fontweight: FontWeight.bold,
|
||||
txtfont: isTablet ? 22 : 16,
|
||||
),
|
||||
subtitle: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text1(
|
||||
title: data["speciality"] ?? data['spl'],
|
||||
fontweight: FontWeight.normal,
|
||||
txtfont: isTablet ? 20 : 14,
|
||||
const CustomSizedBox(
|
||||
height: 10.0,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text1(
|
||||
title: "Added by Pooja k on 01/07/2023",
|
||||
fontweight: FontWeight.normal,
|
||||
txtfont: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text1(
|
||||
title: data["State"] ?? '',
|
||||
fontweight: FontWeight.normal,
|
||||
txtfont: 14,
|
||||
),
|
||||
SizedBox(
|
||||
width: 3.0,
|
||||
),
|
||||
Expanded(
|
||||
child: Text1(
|
||||
title: data["Country"] ?? '',
|
||||
fontweight: FontWeight.normal,
|
||||
txtfont: 14,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 10.0),
|
||||
child: Text1(
|
||||
title: "Added by Pooja k",
|
||||
fontweight: FontWeight.normal,
|
||||
txtfont: 14,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 10.0),
|
||||
child: Text1(
|
||||
title: "Added on 01/07/2023",
|
||||
fontweight: FontWeight.normal,
|
||||
txtfont: 14,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
const Padding(
|
||||
padding: EdgeInsets.only(left: 20.0, right: 20.0),
|
||||
child: Divider(),
|
||||
),
|
||||
Divider(),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
@ -476,217 +350,19 @@ class _Contacts1State extends State<Contacts1> {
|
|||
);
|
||||
}
|
||||
|
||||
Future<void> offlineProfileStore(List<String> selectedIndices) async {
|
||||
for (int i = 0; i < selectedIndices.length; i++) {
|
||||
print('The id id : ${selectedIndices[i]}');
|
||||
|
||||
Map<String, dynamic>? row =
|
||||
findRecordById(displayedHCPList, selectedIndices[i]);
|
||||
|
||||
print("Storingggg_isss:Row $row");
|
||||
|
||||
await addKolInfo(row);
|
||||
|
||||
await Provider.of<AffiliationsProvider>(context, listen: false)
|
||||
.storeAff(row["id"]);
|
||||
|
||||
await Provider.of<PublicatioProvider>(context, listen: false)
|
||||
.storePub(row["id"]);
|
||||
|
||||
await Provider.of<EventProvider>(context, listen: false)
|
||||
.storeEvent(row["id"]);
|
||||
|
||||
await Provider.of<TrialsProvider>(context, listen: false)
|
||||
.storeTrials(row["id"]);
|
||||
|
||||
await Provider.of<LocationProvider>(context, listen: false)
|
||||
.storeLoc(row["id"]);
|
||||
|
||||
await Provider.of<PhonenoProvider>(context, listen: false)
|
||||
.storePno(row["id"]);
|
||||
|
||||
await Provider.of<EmailProvider>(context, listen: false)
|
||||
.storeEmail(row["id"]);
|
||||
|
||||
await Provider.of<EducationProvider>(context, listen: false)
|
||||
.storeEdu(row["id"]);
|
||||
|
||||
await Provider.of<AwardProvider>(context, listen: false)
|
||||
.storeAwa(row["id"]);
|
||||
|
||||
await Provider.of<CertificateProvider>(context, listen: false)
|
||||
.storeCer(row["id"]);
|
||||
|
||||
await Provider.of<PatentProvider>(context, listen: false)
|
||||
.storePet(row["id"]);
|
||||
|
||||
await Provider.of<NIHGrantsProvider>(context, listen: false)
|
||||
.storeNih(row["id"]);
|
||||
|
||||
await Provider.of<ProcedureProvider>(context, listen: false)
|
||||
.storePro(row["id"]);
|
||||
|
||||
await Provider.of<TrainigProvider>(context, listen: false)
|
||||
.storeTraining(row["id"]);
|
||||
|
||||
await Provider.of<SpekerEvalutionProvider>(context, listen: false)
|
||||
.storeSpeaker(row["id"]);
|
||||
}
|
||||
}
|
||||
|
||||
contactsBottomdailog() {
|
||||
return Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: longpress
|
||||
? Container(
|
||||
color: const Color.fromARGB(255, 251, 242, 242),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 200.0,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
!_switchValue
|
||||
? GestureDetector(
|
||||
onTap: () async {
|
||||
print("Selected: ${_selectedIndices}");
|
||||
print("Selected: ${_selectedIndices.length}");
|
||||
|
||||
for (int i = 0; i < _selectedIndices.length; i++) {
|
||||
Map<String, dynamic>? row = findRecordById(
|
||||
displayedHCPList, _selectedIndices[i]);
|
||||
print("StoringgggMyContact_isss_isss:Row $row");
|
||||
|
||||
await HiveFunctions.savemyContact(row);
|
||||
}
|
||||
|
||||
_showMyDialog(
|
||||
"Selected contact has been added to my contacts ");
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(15.0),
|
||||
child: Icon(
|
||||
Icons.add,
|
||||
color: Colors.green,
|
||||
),
|
||||
),
|
||||
Text1(
|
||||
title: 'Add to My Contacts',
|
||||
txtcolor: Colors.black,
|
||||
txtfont: 14.0),
|
||||
],
|
||||
),
|
||||
)
|
||||
: GestureDetector(
|
||||
onTap: () async {
|
||||
print(
|
||||
"SelectedRemoveee: ${_selectedremoveIndices}");
|
||||
print("Selected: ${_selectedremoveIndices.length}");
|
||||
for (int i = 0;
|
||||
i < _selectedremoveIndices.length;
|
||||
i++) {
|
||||
await HiveFunctions.deleteUser11(
|
||||
_selectedremoveIndices[i]);
|
||||
}
|
||||
|
||||
setState(() {});
|
||||
|
||||
_showMyDialog("selected contact has been removed");
|
||||
},
|
||||
child: const Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.all(15.0),
|
||||
child: Icon(
|
||||
Icons.remove,
|
||||
color: Colors.green,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Remove from My Contacts',
|
||||
style: TextStyle(color: Colors.black),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(15.0),
|
||||
child: Icon(
|
||||
Icons.download,
|
||||
color: Colors.blue,
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {},
|
||||
child: Text1(
|
||||
title: 'Download',
|
||||
txtcolor: Colors.black,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
longpress = false;
|
||||
_selectedIndices.clear();
|
||||
_selectedremoveIndices.clear();
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(15.0),
|
||||
child: Icon(
|
||||
Icons.close,
|
||||
color: Colors.red,
|
||||
),
|
||||
),
|
||||
Text1(
|
||||
title: 'Cancel',
|
||||
txtcolor: Colors.black,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Visibility(
|
||||
visible: !_switchValue ? true : false,
|
||||
child: Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () async {
|
||||
print("Selected: ${_selectedIndices}");
|
||||
offlineProfileStore(_selectedIndices);
|
||||
_showMyDialog(
|
||||
"selected contact has been added to offline");
|
||||
|
||||
setState(() {});
|
||||
},
|
||||
child: const Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.all(15.0),
|
||||
child: Icon(
|
||||
Icons.save,
|
||||
color: Colors.deepOrange,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 15.0),
|
||||
child: Text(
|
||||
'Save Offline',
|
||||
style: TextStyle(color: Colors.black),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
? CustomLongPressContainer(
|
||||
switchValue: _switchValue,
|
||||
selectedIndices: _selectedIndices,
|
||||
selectedRemoveIndices: _selectedremoveIndices,
|
||||
onAddToContacts: _onAddToContacts,
|
||||
onRemoveFromContacts: _onRemoveFromContacts,
|
||||
onDownload: _onDownload,
|
||||
onCancel: _onCancel,
|
||||
onSaveOffline: _onSaveOffline,
|
||||
)
|
||||
: Container(),
|
||||
);
|
||||
|
@ -702,9 +378,6 @@ class _Contacts1State extends State<Contacts1> {
|
|||
return;
|
||||
}
|
||||
|
||||
// If the widget was removed from the tree while the asynchronous platform
|
||||
// message was in flight, we want to discard the reply rather than calling
|
||||
// setState to update our non-existent appearance.
|
||||
if (!mounted) {
|
||||
return Future.value(null);
|
||||
}
|
||||
|
@ -715,8 +388,160 @@ class _Contacts1State extends State<Contacts1> {
|
|||
Future<void> _updateConnectionStatus(List<ConnectivityResult> result) async {
|
||||
setState(() {
|
||||
_connectionStatus = result;
|
||||
|
||||
if (_connectionStatus[0].toString().contains("ConnectivityResult.none")) {
|
||||
offMode = true; // Set to true when offline
|
||||
} else {
|
||||
offMode = false; // Set to false when online
|
||||
}
|
||||
});
|
||||
// ignore: avoid_print
|
||||
print('Connectivity changed: $_connectionStatus');
|
||||
}
|
||||
|
||||
headerRow() {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Wrap(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, right: 2.0),
|
||||
child: CustomSwitch(
|
||||
activeclor: AppColors.blueColor,
|
||||
switchvalue: _switchValue,
|
||||
onchanged: _onSwitchChanged,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0, top: 9.0),
|
||||
child: Text1(
|
||||
title: 'My Contacts',
|
||||
txtfont: 15,
|
||||
txtcolor: !_switchValue ? Colors.grey : Colors.black,
|
||||
))
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
print("SearchVon: ${selectedType}");
|
||||
|
||||
setState(() {
|
||||
selectedValue = '';
|
||||
selectedType = null;
|
||||
});
|
||||
},
|
||||
child: Text1(title: 'My Filters'),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
_scaffoldKey.currentState?.openEndDrawer();
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.sort,
|
||||
size: 30,
|
||||
)),
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _onAddToContacts() async {
|
||||
print("Selected: ${_selectedIndices}");
|
||||
print("Selected: ${_selectedIndices.length}");
|
||||
|
||||
ProfileStorageService profileStorageService =
|
||||
ProfileStorageService(context);
|
||||
|
||||
await profileStorageService.offlineProfileAddContact(
|
||||
_selectedIndices, displayedHCPList);
|
||||
|
||||
displayAlert("Added");
|
||||
}
|
||||
|
||||
Future<void> _onRemoveFromContacts() async {
|
||||
ProfileStorageService profileStorageService =
|
||||
ProfileStorageService(context);
|
||||
|
||||
await profileStorageService
|
||||
.offlineProfileRemoveContact(_selectedremoveIndices);
|
||||
|
||||
displayAlert("selected contact has been removed");
|
||||
}
|
||||
|
||||
void _onDownload() {
|
||||
// Handle download
|
||||
print("Download action triggered");
|
||||
}
|
||||
|
||||
void _onCancel() {
|
||||
setState(() {
|
||||
longpress = false;
|
||||
_selectedIndices.clear();
|
||||
_selectedremoveIndices.clear();
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> _onSaveOffline() async {
|
||||
// Handle save offline
|
||||
print("Save offline triggered");
|
||||
|
||||
print("Selected: ${_selectedIndices}");
|
||||
|
||||
ProfileStorageService profileStorageService =
|
||||
ProfileStorageService(context);
|
||||
|
||||
await profileStorageService.offlineProfileK2Store(
|
||||
_selectedIndices, displayedHCPList);
|
||||
|
||||
displayAlert("selected contact has been added to offline");
|
||||
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
displayAlert(String data) {
|
||||
return showDialog(
|
||||
context: context,
|
||||
builder: (_) {
|
||||
return Alert(
|
||||
data: data,
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
setState(() {
|
||||
_selectedIndices.clear();
|
||||
_selectedremoveIndices.clear();
|
||||
longpress = false;
|
||||
longpressmy = false;
|
||||
});
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Widget _offlineBanner() {
|
||||
return offMode
|
||||
? Container(
|
||||
color: Colors.red, // Set the color of the banner
|
||||
padding: EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.signal_wifi_off,
|
||||
color: Colors.white,
|
||||
size: 20,
|
||||
),
|
||||
SizedBox(width: 8.0),
|
||||
Text(
|
||||
'You are offline',
|
||||
style: TextStyle(color: Colors.white, fontSize: 16),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: SizedBox.shrink(); // Empty widget if online
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_carousel_widget/flutter_carousel_widget.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:dropdown_button2/dropdown_button2.dart';
|
||||
|
@ -60,7 +61,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
|||
String? fileName;
|
||||
final TextEditingController textEditingController = TextEditingController();
|
||||
|
||||
final FlutterCarouselController _controller = FlutterCarouselController();
|
||||
//final CarouselController _controller = CarouselController();
|
||||
|
||||
int _currentPage = 0;
|
||||
late int _totalPages =
|
||||
|
@ -122,7 +123,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
|||
return SafeArea(
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Constants.k2color,
|
||||
backgroundColor: AppColors.blueColor,
|
||||
title: Text(
|
||||
widget.saveInteraction.id,
|
||||
style: TextStyle(
|
||||
|
@ -146,295 +147,295 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
|||
body: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Expanded(
|
||||
// child: ListView.builder(
|
||||
// itemCount: provider.interactionReponseList.length,
|
||||
// padding: EdgeInsets.zero,
|
||||
// cacheExtent: double.parse(
|
||||
// provider.interactionReponseList.length.toString()),
|
||||
// itemBuilder: (context, index) {
|
||||
// var item = provider.interactionReponseList[index];
|
||||
// sectionList = item.sectionList;
|
||||
child: FlutterCarousel(
|
||||
options: FlutterCarouselOptions(
|
||||
onPageChanged: (index, reason) {
|
||||
setState(() {
|
||||
_currentPage = index;
|
||||
});
|
||||
// Example: Perform actions when reaching the last page
|
||||
// if (_currentPage == _totalPages - 1) {
|
||||
// print('Reached the last page!');
|
||||
// // Add your actions here
|
||||
// }
|
||||
},
|
||||
controller: _controller,
|
||||
// Expanded(
|
||||
// // child: ListView.builder(
|
||||
// // itemCount: provider.interactionReponseList.length,
|
||||
// // padding: EdgeInsets.zero,
|
||||
// // cacheExtent: double.parse(
|
||||
// // provider.interactionReponseList.length.toString()),
|
||||
// // itemBuilder: (context, index) {
|
||||
// // var item = provider.interactionReponseList[index];
|
||||
// // sectionList = item.sectionList;
|
||||
// child: FlutterCarousel(
|
||||
// options: CarouselOptions(
|
||||
// onPageChanged: (index, reason) {
|
||||
// setState(() {
|
||||
// _currentPage = index;
|
||||
// });
|
||||
// // Example: Perform actions when reaching the last page
|
||||
// // if (_currentPage == _totalPages - 1) {
|
||||
// // print('Reached the last page!');
|
||||
// // // Add your actions here
|
||||
// // }
|
||||
// },
|
||||
// controller: _controller,
|
||||
|
||||
height: MediaQuery.of(context)
|
||||
.size
|
||||
.height, // Adjust as needed
|
||||
// aspectRatio: 16 / 9, // Optional aspect ratio adjustment
|
||||
//viewportFraction: 0.9,
|
||||
viewportFraction: 1.0,
|
||||
// height: MediaQuery.of(context)
|
||||
// .size
|
||||
// .height, // Adjust as needed
|
||||
// // aspectRatio: 16 / 9, // Optional aspect ratio adjustment
|
||||
// //viewportFraction: 0.9,
|
||||
// viewportFraction: 1.0,
|
||||
|
||||
initialPage: 0,
|
||||
enableInfiniteScroll: false,
|
||||
reverse: false,
|
||||
autoPlay: false,
|
||||
autoPlayInterval: Duration(seconds: 3),
|
||||
autoPlayAnimationDuration:
|
||||
Duration(milliseconds: 800),
|
||||
autoPlayCurve: Curves.fastOutSlowIn,
|
||||
enlargeCenterPage: false,
|
||||
disableCenter: false,
|
||||
showIndicator: true,
|
||||
scrollDirection: Axis.horizontal,
|
||||
// initialPage: 0,
|
||||
// enableInfiniteScroll: false,
|
||||
// reverse: false,
|
||||
// autoPlay: false,
|
||||
// autoPlayInterval: Duration(seconds: 3),
|
||||
// autoPlayAnimationDuration:
|
||||
// Duration(milliseconds: 800),
|
||||
// autoPlayCurve: Curves.fastOutSlowIn,
|
||||
// enlargeCenterPage: false,
|
||||
// disableCenter: false,
|
||||
// showIndicator: true,
|
||||
// scrollDirection: Axis.horizontal,
|
||||
|
||||
slideIndicator: CircularWaveSlideIndicator(
|
||||
slideIndicatorOptions: SlideIndicatorOptions(
|
||||
alignment: Alignment.bottomCenter,
|
||||
currentIndicatorColor: Constants.k2color,
|
||||
indicatorBackgroundColor: Colors.grey),
|
||||
),
|
||||
),
|
||||
items: provider.interactionReponseList.map((item) {
|
||||
sectionList = item.sectionList;
|
||||
print("Item_sectionListt11: ${item.sectionName}");
|
||||
// slideIndicator: CircularWaveSlideIndicator(
|
||||
// slideIndicatorOptions: SlideIndicatorOptions(
|
||||
// alignment: Alignment.bottomCenter,
|
||||
// currentIndicatorColor: Constants.k2color,
|
||||
// indicatorBackgroundColor: Colors.grey),
|
||||
// ),
|
||||
// ),
|
||||
// items: provider.interactionReponseList.map((item) {
|
||||
// sectionList = item.sectionList;
|
||||
// print("Item_sectionListt11: ${item.sectionName}");
|
||||
|
||||
print("Item_sectionListt: ${item.sectionList}");
|
||||
return ListView(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Text(
|
||||
item.sectionName,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 18.0),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
color: Colors.white,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 0.0),
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
GridView.count(
|
||||
physics:
|
||||
const NeverScrollableScrollPhysics(),
|
||||
// crossAxisCount:
|
||||
// context.responsive<int>(
|
||||
// 1,
|
||||
// sm: 1, // small
|
||||
// md: 1, // medium
|
||||
// lg: sectionList.length == 1
|
||||
// ? 1
|
||||
// : 4, // large
|
||||
// xl: 3, // extra large screen
|
||||
// ),
|
||||
crossAxisCount: context.responsive<int>(
|
||||
1,
|
||||
sm: 1, // small
|
||||
md: 2, // medium
|
||||
lg: sectionList.length == 1
|
||||
? 1
|
||||
: 3, // large
|
||||
xl: 3, // extra large screen
|
||||
),
|
||||
mainAxisSpacing:
|
||||
sectionList.length == 1 || !isTablet
|
||||
? 1
|
||||
: 3.5,
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.zero,
|
||||
// print("Item_sectionListt: ${item.sectionList}");
|
||||
// return ListView(
|
||||
// children: [
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(10.0),
|
||||
// child: Text(
|
||||
// item.sectionName,
|
||||
// textAlign: TextAlign.center,
|
||||
// style: const TextStyle(
|
||||
// color: Colors.black,
|
||||
// fontWeight: FontWeight.normal,
|
||||
// fontSize: 18.0),
|
||||
// ),
|
||||
// ),
|
||||
// Container(
|
||||
// color: Colors.white,
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.only(top: 0.0),
|
||||
// child: Column(
|
||||
// crossAxisAlignment:
|
||||
// CrossAxisAlignment.center,
|
||||
// children: [
|
||||
// GridView.count(
|
||||
// physics:
|
||||
// const NeverScrollableScrollPhysics(),
|
||||
// // crossAxisCount:
|
||||
// // context.responsive<int>(
|
||||
// // 1,
|
||||
// // sm: 1, // small
|
||||
// // md: 1, // medium
|
||||
// // lg: sectionList.length == 1
|
||||
// // ? 1
|
||||
// // : 4, // large
|
||||
// // xl: 3, // extra large screen
|
||||
// // ),
|
||||
// crossAxisCount: context.responsive<int>(
|
||||
// 1,
|
||||
// sm: 1, // small
|
||||
// md: 2, // medium
|
||||
// lg: sectionList.length == 1
|
||||
// ? 1
|
||||
// : 3, // large
|
||||
// xl: 3, // extra large screen
|
||||
// ),
|
||||
// mainAxisSpacing:
|
||||
// sectionList.length == 1 || !isTablet
|
||||
// ? 1
|
||||
// : 3.5,
|
||||
// shrinkWrap: true,
|
||||
// padding: EdgeInsets.zero,
|
||||
|
||||
childAspectRatio:
|
||||
sectionList.length == 1
|
||||
? orientation ==
|
||||
Orientation.landscape
|
||||
? 10
|
||||
: 4.8
|
||||
: isTablet
|
||||
? 2.8
|
||||
: 4.5,
|
||||
children: List.generate(
|
||||
sectionList.length,
|
||||
(i) {
|
||||
// print(sectionList);
|
||||
SectionList sectionItem =
|
||||
sectionList[i];
|
||||
dropdownvalue = sectionItem
|
||||
.widget ==
|
||||
InteractionWidget.DROPDOWN
|
||||
? sectionItem.value ?? "Select"
|
||||
: ' ';
|
||||
List<InputClass> list = sectionItem
|
||||
.widget ==
|
||||
InteractionWidget
|
||||
.DROPDOWN ||
|
||||
sectionItem.widget ==
|
||||
InteractionWidget
|
||||
.AUTOCOMPLETE ||
|
||||
sectionItem.widget ==
|
||||
InteractionWidget
|
||||
.MULTISELECT
|
||||
? provider.getData2(sectionItem)
|
||||
: [];
|
||||
provider.checkboxlist = sectionItem
|
||||
.widget ==
|
||||
InteractionWidget.CHECKBOX
|
||||
? provider.getData2(sectionItem)
|
||||
: [];
|
||||
// childAspectRatio:
|
||||
// sectionList.length == 1
|
||||
// ? orientation ==
|
||||
// Orientation.landscape
|
||||
// ? 10
|
||||
// : 4.8
|
||||
// : isTablet
|
||||
// ? 2.8
|
||||
// : 4.5,
|
||||
// children: List.generate(
|
||||
// sectionList.length,
|
||||
// (i) {
|
||||
// // print(sectionList);
|
||||
// SectionList sectionItem =
|
||||
// sectionList[i];
|
||||
// dropdownvalue = sectionItem
|
||||
// .widget ==
|
||||
// InteractionWidget.DROPDOWN
|
||||
// ? sectionItem.value ?? "Select"
|
||||
// : ' ';
|
||||
// List<InputClass> list = sectionItem
|
||||
// .widget ==
|
||||
// InteractionWidget
|
||||
// .DROPDOWN ||
|
||||
// sectionItem.widget ==
|
||||
// InteractionWidget
|
||||
// .AUTOCOMPLETE ||
|
||||
// sectionItem.widget ==
|
||||
// InteractionWidget
|
||||
// .MULTISELECT
|
||||
// ? provider.getData2(sectionItem)
|
||||
// : [];
|
||||
// provider.checkboxlist = sectionItem
|
||||
// .widget ==
|
||||
// InteractionWidget.CHECKBOX
|
||||
// ? provider.getData2(sectionItem)
|
||||
// : [];
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
sectionItem.widget ==
|
||||
InteractionWidget
|
||||
.BUTTON &&
|
||||
sectionItem.input ==
|
||||
'add'
|
||||
? const SizedBox.shrink()
|
||||
: Padding(
|
||||
padding:
|
||||
const EdgeInsets
|
||||
.only(
|
||||
left: 8.0,
|
||||
right: 8.0),
|
||||
// child: Text(
|
||||
// '${sectionItem.name}:*',
|
||||
// style: TextStyle(
|
||||
// color: Colors
|
||||
// .orange
|
||||
// .shade800,
|
||||
// fontSize:
|
||||
// isTablet
|
||||
// ? 18
|
||||
// : 12,
|
||||
// ),
|
||||
// ),
|
||||
child: Text(
|
||||
sectionItem.isRequired
|
||||
? '${sectionItem.name}:*'
|
||||
: '${sectionItem.name}:',
|
||||
style: TextStyle(
|
||||
color: Colors.orange
|
||||
.shade800,
|
||||
fontSize: 18.0,
|
||||
// fontSize: isTablet
|
||||
// ? 18
|
||||
// : 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
// SizedBox(
|
||||
// height:
|
||||
// isTablet ? 15 : 5,
|
||||
// ),
|
||||
returnWidget(
|
||||
sectionItem: sectionItem,
|
||||
item: item,
|
||||
provider: provider,
|
||||
list: list,
|
||||
gridIndex: i,
|
||||
listIndex: 0,
|
||||
widgetData:
|
||||
sectionItem.widget!,
|
||||
multiple: false),
|
||||
// SizedBox(
|
||||
// height: isTablet ? 15 : 5,
|
||||
// ),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
// SizedBox(
|
||||
// height: isTablet ? 15 : 5,
|
||||
// ),
|
||||
item.multiple
|
||||
? gridViewWidget(
|
||||
provider,
|
||||
item.sectionName,
|
||||
item.multipleList ?? [],
|
||||
orientation,
|
||||
item,
|
||||
0)
|
||||
: const SizedBox.shrink(),
|
||||
provider.interactionReponseList.length ==
|
||||
0 - 1
|
||||
? saveActions(provider)
|
||||
: const SizedBox.shrink()
|
||||
//const Spacer(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
),
|
||||
// return Column(
|
||||
// crossAxisAlignment:
|
||||
// CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// sectionItem.widget ==
|
||||
// InteractionWidget
|
||||
// .BUTTON &&
|
||||
// sectionItem.input ==
|
||||
// 'add'
|
||||
// ? const SizedBox.shrink()
|
||||
// : Padding(
|
||||
// padding:
|
||||
// const EdgeInsets
|
||||
// .only(
|
||||
// left: 8.0,
|
||||
// right: 8.0),
|
||||
// // child: Text(
|
||||
// // '${sectionItem.name}:*',
|
||||
// // style: TextStyle(
|
||||
// // color: Colors
|
||||
// // .orange
|
||||
// // .shade800,
|
||||
// // fontSize:
|
||||
// // isTablet
|
||||
// // ? 18
|
||||
// // : 12,
|
||||
// // ),
|
||||
// // ),
|
||||
// child: Text(
|
||||
// sectionItem.isRequired
|
||||
// ? '${sectionItem.name}:*'
|
||||
// : '${sectionItem.name}:',
|
||||
// style: TextStyle(
|
||||
// color: Colors.orange
|
||||
// .shade800,
|
||||
// fontSize: 18.0,
|
||||
// // fontSize: isTablet
|
||||
// // ? 18
|
||||
// // : 12,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// // SizedBox(
|
||||
// // height:
|
||||
// // isTablet ? 15 : 5,
|
||||
// // ),
|
||||
// returnWidget(
|
||||
// sectionItem: sectionItem,
|
||||
// item: item,
|
||||
// provider: provider,
|
||||
// list: list,
|
||||
// gridIndex: i,
|
||||
// listIndex: 0,
|
||||
// widgetData:
|
||||
// sectionItem.widget!,
|
||||
// multiple: false),
|
||||
// // SizedBox(
|
||||
// // height: isTablet ? 15 : 5,
|
||||
// // ),
|
||||
// ],
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// // SizedBox(
|
||||
// // height: isTablet ? 15 : 5,
|
||||
// // ),
|
||||
// item.multiple
|
||||
// ? gridViewWidget(
|
||||
// provider,
|
||||
// item.sectionName,
|
||||
// item.multipleList ?? [],
|
||||
// orientation,
|
||||
// item,
|
||||
// 0)
|
||||
// : const SizedBox.shrink(),
|
||||
// provider.interactionReponseList.length ==
|
||||
// 0 - 1
|
||||
// ? saveActions(provider)
|
||||
// : const SizedBox.shrink()
|
||||
// //const Spacer(),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// }).toList(),
|
||||
// ),
|
||||
// ),
|
||||
// const Spacer(),
|
||||
// saveActions(provider),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 8.0),
|
||||
child: Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Flexible(
|
||||
child: OutlinedButton(
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: CircleBorder()),
|
||||
onPressed: () {
|
||||
//if (_currentPageIndex > _totalPages - 1)
|
||||
_controller.previousPage();
|
||||
},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Icon(
|
||||
Icons.arrow_back,
|
||||
color: Constants.k2color,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: OutlinedButton(
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: CircleBorder()),
|
||||
// onPressed: () {
|
||||
// _controller.nextPage(
|
||||
// duration: Duration(milliseconds: 300),
|
||||
// curve: Curves.ease,
|
||||
// );
|
||||
// },
|
||||
onPressed: () {
|
||||
_controller.nextPage(
|
||||
duration: Duration(milliseconds: 300),
|
||||
curve: Curves.ease,
|
||||
);
|
||||
},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Icon(
|
||||
Icons.arrow_forward,
|
||||
color: Constants.k2color,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(bottom: 8.0),
|
||||
// child: Align(
|
||||
// alignment: Alignment.bottomCenter,
|
||||
// child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// Flexible(
|
||||
// child: OutlinedButton(
|
||||
// style: OutlinedButton.styleFrom(
|
||||
// shape: CircleBorder()),
|
||||
// onPressed: () {
|
||||
// //if (_currentPageIndex > _totalPages - 1)
|
||||
// _controller.previousPage();
|
||||
// },
|
||||
// child: Padding(
|
||||
// padding: EdgeInsets.all(8.0),
|
||||
// child: Icon(
|
||||
// Icons.arrow_back,
|
||||
// color: Constants.k2color,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Flexible(
|
||||
// child: OutlinedButton(
|
||||
// style: OutlinedButton.styleFrom(
|
||||
// shape: CircleBorder()),
|
||||
// // onPressed: () {
|
||||
// // _controller.nextPage(
|
||||
// // duration: Duration(milliseconds: 300),
|
||||
// // curve: Curves.ease,
|
||||
// // );
|
||||
// // },
|
||||
// onPressed: () {
|
||||
// _controller.nextPage(
|
||||
// duration: Duration(milliseconds: 300),
|
||||
// curve: Curves.ease,
|
||||
// );
|
||||
// },
|
||||
// child: Padding(
|
||||
// padding: EdgeInsets.all(8.0),
|
||||
// child: Icon(
|
||||
// Icons.arrow_forward,
|
||||
// color: Constants.k2color,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
)),
|
||||
);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -13,6 +13,7 @@ import 'package:konectar_events/contacts_module/ui_screen/interactionform/util.d
|
|||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/custombutton.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/responsive_ext.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
|
@ -63,7 +64,7 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen1> {
|
|||
backgroundColor: Colors.white,
|
||||
//resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Constants.k2color,
|
||||
backgroundColor: AppColors.blueColor,
|
||||
title: Text(
|
||||
widget.saveInteraction.id,
|
||||
style: TextStyle(
|
||||
|
@ -216,8 +217,8 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen1> {
|
|||
: Text(
|
||||
'${sectionItem.name}:*',
|
||||
style: TextStyle(
|
||||
color: Constants
|
||||
.k2color,
|
||||
color: AppColors
|
||||
.blueColor,
|
||||
fontSize:
|
||||
isTablet
|
||||
? 18
|
||||
|
@ -492,7 +493,7 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen1> {
|
|||
: Text(
|
||||
'${sectionItem.name}:*',
|
||||
style: TextStyle(
|
||||
color: Constants.k2color,
|
||||
color: AppColors.blueColor,
|
||||
fontSize: isTablet ? 18 : 12,
|
||||
),
|
||||
),
|
||||
|
|
|
@ -26,6 +26,7 @@ import 'package:konectar_events/contacts_module/ui_screen/publication_data.dart'
|
|||
import 'package:konectar_events/contacts_module/ui_screen/trials_show_more.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class SavedActivities extends StatefulWidget {
|
||||
|
@ -121,7 +122,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
|
@ -132,7 +133,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
|||
_isExpanded = expanded;
|
||||
});
|
||||
},
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
trailing: Icon(
|
||||
_isExpanded
|
||||
? Icons.keyboard_arrow_up
|
||||
|
@ -246,7 +247,8 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
|||
},
|
||||
child: Text(
|
||||
'Show More',
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
style:
|
||||
TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -274,7 +276,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
|
@ -285,7 +287,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
|||
_isExpanded = expanded;
|
||||
});
|
||||
},
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
trailing: Icon(
|
||||
_isExpanded
|
||||
? Icons.keyboard_arrow_up
|
||||
|
@ -408,7 +410,8 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
|||
},
|
||||
child: Text(
|
||||
'Show More',
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
style:
|
||||
TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -436,7 +439,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
|
@ -445,7 +448,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
|||
_isExpanded = expanded;
|
||||
});
|
||||
},
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
trailing: Icon(
|
||||
_isExpanded
|
||||
? Icons.keyboard_arrow_up
|
||||
|
@ -564,7 +567,8 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
|||
},
|
||||
child: Text(
|
||||
'Show More',
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
style:
|
||||
TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -592,7 +596,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
initiallyExpanded: false,
|
||||
maintainState: true,
|
||||
|
@ -601,7 +605,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
|||
_isExpanded = expanded;
|
||||
});
|
||||
},
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
trailing: Icon(
|
||||
_isExpanded
|
||||
? Icons.keyboard_arrow_up
|
||||
|
@ -723,7 +727,8 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
|||
),
|
||||
child: Text(
|
||||
'Show More',
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
style:
|
||||
TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -37,6 +37,7 @@ import 'package:flutter/cupertino.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
||||
|
@ -208,7 +209,7 @@ class SavedContacts1State extends State<SavedContacts1> {
|
|||
setState(() {});
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
fillColor: Constants.k2color,
|
||||
fillColor: AppColors.blueColor,
|
||||
contentPadding: EdgeInsets.symmetric(vertical: 9.0),
|
||||
border: OutlineInputBorder(),
|
||||
hintText: "Search",
|
||||
|
@ -1030,7 +1031,7 @@ class SavedContacts1State extends State<SavedContacts1> {
|
|||
Text(
|
||||
'Cancel',
|
||||
style: TextStyle(
|
||||
color: Constants.k2color),
|
||||
color: AppColors.blueColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -1094,7 +1095,7 @@ class SavedContacts1State extends State<SavedContacts1> {
|
|||
},
|
||||
child: Text(
|
||||
'Reset Filter',
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
style: TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
|
|
@ -32,6 +32,7 @@ import 'package:flutter/painting.dart';
|
|||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
@ -127,7 +128,7 @@ class SavedNewProfile1State extends State<SavedNewProfile1>
|
|||
Widget headerview(BuildContext context) {
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
backgroundColor: Constants.bgcolor,
|
||||
backgroundColor: AppColors.bgcolor,
|
||||
// appBar: AppBar(),
|
||||
body: Stack(
|
||||
children: <Widget>[
|
||||
|
@ -171,8 +172,8 @@ class SavedNewProfile1State extends State<SavedNewProfile1>
|
|||
end: Alignment.topCenter,
|
||||
colors: [
|
||||
// Constants.blueColor,
|
||||
Constants.tabbgColor,
|
||||
Constants.k2color,
|
||||
AppColors.tabbgColor,
|
||||
AppColors.blueColor,
|
||||
// Constants.tabbgColor,
|
||||
// const Color.fromARGB(255, 222, 237, 247),
|
||||
// const Color.fromARGB(255, 222, 237, 247),
|
||||
|
@ -294,7 +295,7 @@ class SavedNewProfile1State extends State<SavedNewProfile1>
|
|||
width:
|
||||
MediaQuery.of(context).size.width, // Adjust width as needed
|
||||
height: 110, // Adjust height as needed
|
||||
decoration: BoxDecoration(color: Constants.k2color),
|
||||
decoration: BoxDecoration(color: AppColors.blueColor),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
|
@ -617,7 +618,7 @@ class SavedNewProfile1State extends State<SavedNewProfile1>
|
|||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
),
|
||||
color: Constants.k2color11,
|
||||
color: AppColors.contentColorWhite,
|
||||
child: ExpansionTile(
|
||||
// collapsedBackgroundColor: Color(0xFF2b9af3),
|
||||
onExpansionChanged: (bool expanded) {
|
||||
|
@ -625,7 +626,7 @@ class SavedNewProfile1State extends State<SavedNewProfile1>
|
|||
_isExpanded = expanded;
|
||||
});
|
||||
},
|
||||
backgroundColor: Constants.k2color11,
|
||||
backgroundColor: AppColors.contentColorWhite,
|
||||
trailing: Icon(
|
||||
_isExpanded
|
||||
? Icons.keyboard_arrow_up
|
||||
|
@ -679,7 +680,7 @@ class SavedNewProfile1State extends State<SavedNewProfile1>
|
|||
},
|
||||
child: Text(
|
||||
'Save',
|
||||
style: TextStyle(color: Constants.k2color),
|
||||
style: TextStyle(color: AppColors.blueColor),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -702,7 +703,7 @@ class SavedNewProfile1State extends State<SavedNewProfile1>
|
|||
final note =
|
||||
getText()[index]; // Get note at current index
|
||||
return ListTile(
|
||||
title: Text(note), // Display the note
|
||||
title: Text(note.note!), // Display the note
|
||||
);
|
||||
},
|
||||
),
|
||||
|
@ -1089,7 +1090,7 @@ class SavedNewProfile1State extends State<SavedNewProfile1>
|
|||
Widget getAppBarUI() {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Constants.k2color,
|
||||
color: AppColors.blueColor,
|
||||
boxShadow: <BoxShadow>[
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.2),
|
||||
|
|
|
@ -0,0 +1,250 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/text.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_event_provider.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class Events2ShowMore extends StatefulWidget {
|
||||
Events2ShowMore({required this.text, Key? key}) : super(key: key);
|
||||
final int text;
|
||||
|
||||
@override
|
||||
State<Events2ShowMore> createState() => _Events2ShowMoreState();
|
||||
}
|
||||
|
||||
class _Events2ShowMoreState extends State<Events2ShowMore> {
|
||||
//List evelist = [];
|
||||
|
||||
// var _items = <String>[];
|
||||
var _isLoading = false;
|
||||
|
||||
// var events;
|
||||
|
||||
late EventProviderK2 eventProviderK2;
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
|
||||
// affdata();
|
||||
eventProviderK2 = EventProviderK2();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// TODO: implement dispose
|
||||
// eventProviderK2.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Events'),
|
||||
),
|
||||
body: ChangeNotifierProvider(
|
||||
create: (context) => eventProviderK2..geteventsdatawithid(),
|
||||
child: Consumer<EventProviderK2>(builder: (context, eventss, child) {
|
||||
return NotificationListener(
|
||||
onNotification: (ScrollNotification scrollinfo) {
|
||||
if (scrollinfo.metrics.pixels ==
|
||||
scrollinfo.metrics.maxScrollExtent &&
|
||||
!eventProviderK2.isLoading) {
|
||||
eventss.geteventsdatawithid();
|
||||
}
|
||||
return false;
|
||||
},
|
||||
child: ListView.builder(
|
||||
itemCount: eventss.eventsListpagination.length +
|
||||
(eventss.hasMore ? 1 : 0),
|
||||
// +(events.hasMore ? 1 : 0),
|
||||
itemBuilder: (context, index) {
|
||||
if (index == eventss.eventsListpagination.length) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
var data = eventss.eventsListpagination[index];
|
||||
// print("I_amCheckingggggg12345: ${data.name}");
|
||||
return ListTile(
|
||||
title: Text1(title: "Event : " + data.name),
|
||||
subtitle:
|
||||
Text1(title: "Created by : " + data.createdByUser),
|
||||
);
|
||||
}));
|
||||
}),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// import 'package:discover_module/contacts_module/custom_widget/text.dart';
|
||||
// import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_event_provider.dart';
|
||||
// import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_locationprovider.dart';
|
||||
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:provider/provider.dart';
|
||||
// import 'package:very_good_infinite_list/very_good_infinite_list.dart';
|
||||
|
||||
// class Events2ShowMore extends StatefulWidget {
|
||||
// Events2ShowMore({required this.text, Key? key}) : super(key: key);
|
||||
// final int text;
|
||||
|
||||
// @override
|
||||
// State<Events2ShowMore> createState() => _Events2ShowMoreState();
|
||||
// }
|
||||
|
||||
// class _Events2ShowMoreState extends State<Events2ShowMore> {
|
||||
// List evelist = [];
|
||||
|
||||
// // var _items = <String>[];
|
||||
// var _isLoading = false;
|
||||
|
||||
// var events;
|
||||
// @override
|
||||
// void initState() {
|
||||
// // TODO: implement initState
|
||||
// super.initState();
|
||||
|
||||
// affdata();
|
||||
// }
|
||||
|
||||
// affdata() async {
|
||||
// // var location = Provider.of<LocationKolProvider>(context, listen: false);
|
||||
// // await location.locationinfo(widget.text);
|
||||
// // final loclist = location.locationlist;
|
||||
|
||||
// // setState(() {
|
||||
// // locationList = loclist;
|
||||
// // });
|
||||
|
||||
// events = Provider.of<EventProviderK2>(context, listen: false);
|
||||
// await events.geteventsdatawithid(widget.text);
|
||||
// final eventlist = events.eventsListpagination;
|
||||
// print("getting_listttt_ofEvent: ${eventlist}");
|
||||
|
||||
// setState(() {
|
||||
// evelist = eventlist;
|
||||
// });
|
||||
// }
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Scaffold(
|
||||
// appBar: AppBar(
|
||||
// title: Text('Phone Numbers'),
|
||||
// ),
|
||||
// body: Consumer<LocationKolProvider>(builder: (context, loc, child) {
|
||||
// return NotificationListener(
|
||||
// onNotification: (ScrollNotification scrollinfo) {
|
||||
// if (scrollinfo.metrics.pixels ==
|
||||
// scrollinfo.metrics.maxScrollExtent) {
|
||||
// events.geteventsdatawithid(widget.text);
|
||||
// }
|
||||
// return false;
|
||||
// },
|
||||
// child: ListView.builder(
|
||||
// itemCount: evelist.length + (events.hasMore ? 1 : 0),
|
||||
// itemBuilder: (context, index) {
|
||||
// if (index == evelist.length) {
|
||||
// return const Center(child: CircularProgressIndicator());
|
||||
// }
|
||||
// var data = evelist[index];
|
||||
// // print("I_amCheckingggggg12345: ${data.name}");
|
||||
// return ListTile(
|
||||
// title: Text1(title: data.name),
|
||||
// );
|
||||
// }));
|
||||
// })
|
||||
|
||||
// // Scrollbar(
|
||||
// // child: SingleChildScrollView(
|
||||
// // scrollDirection: Axis.horizontal,
|
||||
// // child: SingleChildScrollView(
|
||||
// // scrollDirection: Axis.vertical,
|
||||
// // child: Container(
|
||||
// // constraints:
|
||||
// // BoxConstraints(minWidth: MediaQuery.of(context).size.width),
|
||||
// // color: Colors.white,
|
||||
// // child: DataTable(
|
||||
// // showCheckboxColumn: false,
|
||||
// // columns: const [
|
||||
// // DataColumn(
|
||||
// // label: Expanded(
|
||||
// // child: Text('phone Type',
|
||||
// // style: TextStyle(fontWeight: FontWeight.w600),
|
||||
// // softWrap: true),
|
||||
// // )),
|
||||
// // DataColumn(
|
||||
// // label: Expanded(
|
||||
// // child: Text('Phone No',
|
||||
// // style:
|
||||
// // TextStyle(fontWeight: FontWeight.w600)))),
|
||||
// // ],
|
||||
// // rows: List.generate(
|
||||
// // pno.length,
|
||||
// // (index) => DataRow(
|
||||
// // onSelectChanged: (value) {
|
||||
// // print("message ${pno[index]}");
|
||||
|
||||
// // showModalBottomSheet(
|
||||
// // useRootNavigator: true,
|
||||
// // isScrollControlled: false,
|
||||
// // enableDrag: true,
|
||||
// // useSafeArea: true,
|
||||
// // constraints: const BoxConstraints(
|
||||
// // maxWidth: double.infinity,
|
||||
// // ),
|
||||
// // shape: RoundedRectangleBorder(
|
||||
// // borderRadius: BorderRadius.vertical(
|
||||
// // top: Radius.circular(0),
|
||||
// // ),
|
||||
// // ),
|
||||
// // clipBehavior: Clip.antiAliasWithSaveLayer,
|
||||
// // context: context,
|
||||
// // builder: (context) {
|
||||
// // return bsheet(pno[index]);
|
||||
// // },
|
||||
// // );
|
||||
// // },
|
||||
// // cells: [
|
||||
// // DataCell(Text(pno[index]['Phone type'].toString(),
|
||||
// // softWrap: true)),
|
||||
// // DataCell(Text(pno[index]['phone Number'].toString(),
|
||||
// // softWrap: true)),
|
||||
// // ],
|
||||
// // ),
|
||||
// // ),
|
||||
// // ),
|
||||
// // ),
|
||||
// // ),
|
||||
// // ),
|
||||
|
||||
// // )
|
||||
|
||||
// );
|
||||
// }
|
||||
|
||||
// void _fetchData() async {
|
||||
// setState(() {
|
||||
// _isLoading = true;
|
||||
// });
|
||||
|
||||
// await Future.delayed(const Duration(seconds: 1));
|
||||
|
||||
// if (!mounted) {
|
||||
// return;
|
||||
// } //
|
||||
|
||||
// setState(() {
|
||||
// _isLoading = false;
|
||||
// evelist = List.generate(evelist.length + 10, (i) => 'Item $i');
|
||||
// });
|
||||
// }
|
||||
// }
|
|
@ -0,0 +1,322 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart';
|
||||
import 'package:konectar_events/contacts_module/constants.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/icontext_widget.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/text.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_locationprovider.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/k2api_integrated_ui/k2testbshhet.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class Lock2ShowMore extends StatefulWidget {
|
||||
Lock2ShowMore({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<Lock2ShowMore> createState() => _Lock2ShowMoreState();
|
||||
}
|
||||
|
||||
class _Lock2ShowMoreState extends State<Lock2ShowMore> {
|
||||
final PagingController<int, dynamic> _pagingController =
|
||||
PagingController(firstPageKey: 0);
|
||||
|
||||
int page = 1;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
|
||||
_pagingController.addPageRequestListener((page) {
|
||||
_fetchNewPage();
|
||||
//affdata();
|
||||
});
|
||||
|
||||
//affdata();
|
||||
}
|
||||
|
||||
locdata(int page) async {
|
||||
var location = Provider.of<LocationKolProvider>(context, listen: false);
|
||||
return await location.locationinfo(page);
|
||||
}
|
||||
|
||||
Future<void> _fetchNewPage() async {
|
||||
try {
|
||||
print("Page_issssss: $page");
|
||||
final newItems = await locdata(page);
|
||||
final isLastPage = newItems.length < 10;
|
||||
if (isLastPage) {
|
||||
print("LoadData: Yes");
|
||||
|
||||
_pagingController.appendLastPage(newItems);
|
||||
} else {
|
||||
print("LoadData: No");
|
||||
|
||||
final nextPageKey = page + newItems.length;
|
||||
_pagingController.appendPage(newItems, page++);
|
||||
}
|
||||
} catch (e) {
|
||||
_pagingController.error = e;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Locations'),
|
||||
),
|
||||
body: RefreshIndicator(
|
||||
onRefresh: () => Future.sync(
|
||||
() => _pagingController.refresh(),
|
||||
),
|
||||
child: PagedListView<int, dynamic>(
|
||||
pagingController: _pagingController,
|
||||
builderDelegate: PagedChildBuilderDelegate<dynamic>(
|
||||
itemBuilder: (context, item, index) {
|
||||
return Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
print("OnclickLocationData: ${item.address1}");
|
||||
List<Map<String, dynamic>> keyValue = [
|
||||
{
|
||||
"Address": item.address1,
|
||||
"Postal Code": item.postalCode,
|
||||
"Primary": item.formattedIsPrimary,
|
||||
"organization Name": item.organizationName,
|
||||
"Country Name": item.countryName,
|
||||
"State Name": item.stateName,
|
||||
"City Name": item.cityName,
|
||||
}
|
||||
];
|
||||
|
||||
modelbsheet(keyValue);
|
||||
},
|
||||
child: Container(
|
||||
//color: Colors.white,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(30),
|
||||
bottomRight: Radius.circular(30),
|
||||
),
|
||||
border: Border.all(
|
||||
color: AppColors.blueColor,
|
||||
width: 2.0,
|
||||
style: BorderStyle.solid)),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: IconTextRow(
|
||||
icon: Icons.business,
|
||||
text: item.organizationName ?? "Aissel",
|
||||
fontSize: 16.0,
|
||||
iconColor: AppColors.blueColor,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.location_pin,
|
||||
size: 20.0,
|
||||
color: AppColors.blueColor,
|
||||
),
|
||||
SizedBox(width: 8.0),
|
||||
// Row(
|
||||
// children: [
|
||||
// IconTextRow(
|
||||
// icon: Icons.business,
|
||||
// text: item.organizationName ?? "Aissel",
|
||||
// fontSize: 16.0,
|
||||
// iconColor: Constants.k2color,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
// Column(
|
||||
// children: [
|
||||
// ListTile(
|
||||
// leading: Icon(
|
||||
// Icons.location_on_outlined,
|
||||
// size: 35.0,
|
||||
// color: Constants.k2color,
|
||||
// ),
|
||||
// title: Text1(
|
||||
// title: item.organizationName ?? "Aissel"),
|
||||
// subtitle: Text1(title: item.address1 ?? ""),
|
||||
// ),
|
||||
// // Row(
|
||||
// // mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// // children: [
|
||||
// // Padding(
|
||||
// // padding: const EdgeInsets.only(left: 15.0),
|
||||
// // child: Column(
|
||||
// // children: [
|
||||
// // Text1(title: "City"),
|
||||
// // Text1(title: item.cityName ?? "--")
|
||||
// // ],
|
||||
// // ),
|
||||
// // ),
|
||||
// // Padding(
|
||||
// // padding: const EdgeInsets.only(right: 15.0),
|
||||
// // child: Column(
|
||||
// // children: [
|
||||
// // Text1(title: "State"),
|
||||
// // Text1(title: item.stateName ?? "")
|
||||
// // ],
|
||||
// // ),
|
||||
// // )
|
||||
// // ],
|
||||
// // ),
|
||||
// // Row(
|
||||
// // mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// // children: [
|
||||
// // Padding(
|
||||
// // padding: const EdgeInsets.only(left: 15.0),
|
||||
// // child: Column(
|
||||
// // children: [
|
||||
// // Text1(title: "Country"),
|
||||
// // Text1(title: item.countryName ?? " ")
|
||||
// // ],
|
||||
// // ),
|
||||
// // ),
|
||||
// // Padding(
|
||||
// // padding: const EdgeInsets.only(right: 15.0),
|
||||
// // child: Column(
|
||||
// // children: [
|
||||
// // Text1(title: "Postal Code"),
|
||||
// // Text1(title: item.postalCode ?? "")
|
||||
// // ],
|
||||
// // ),
|
||||
// // )
|
||||
// // ],
|
||||
// // )
|
||||
// ],
|
||||
// ),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (index == _pagingController.itemList!.length - 1)
|
||||
Container(
|
||||
child: Text1(
|
||||
title: "No More Data",
|
||||
))
|
||||
],
|
||||
);
|
||||
}),
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_pagingController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void modelbsheet(List<Map<String, dynamic>> keyValue) {
|
||||
showModalBottomSheet(
|
||||
useRootNavigator: true,
|
||||
isScrollControlled: false,
|
||||
enableDrag: true,
|
||||
useSafeArea: true,
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: double.infinity,
|
||||
),
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(
|
||||
top: Radius.circular(0),
|
||||
),
|
||||
),
|
||||
clipBehavior: Clip.antiAliasWithSaveLayer,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return bsheetk2new(keyValue);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// import 'package:discover_module/contacts_module/custom_widget/text.dart';
|
||||
// import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_locationprovider.dart';
|
||||
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:provider/provider.dart';
|
||||
// import 'package:very_good_infinite_list/very_good_infinite_list.dart';
|
||||
|
||||
// class Lock2ShowMore extends StatefulWidget {
|
||||
// Lock2ShowMore({Key? key}) : super(key: key);
|
||||
|
||||
// @override
|
||||
// State<Lock2ShowMore> createState() => _Lock2ShowMoreState();
|
||||
// }
|
||||
|
||||
// class _Lock2ShowMoreState extends State<Lock2ShowMore> {
|
||||
// List locationList = [];
|
||||
|
||||
// // var _items = <String>[];
|
||||
// var _isLoading = false;
|
||||
// @override
|
||||
// void initState() {
|
||||
// // TODO: implement initState
|
||||
// super.initState();
|
||||
|
||||
// affdata();
|
||||
// }
|
||||
|
||||
// affdata() async {
|
||||
// var location = Provider.of<LocationKolProvider>(context, listen: false);
|
||||
// final loclist = location.locationlist;
|
||||
|
||||
// setState(() {
|
||||
// locationList = loclist;
|
||||
// });
|
||||
// }
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Scaffold(
|
||||
// appBar: AppBar(
|
||||
// title: Text('Locations'),
|
||||
// ),
|
||||
// body: Consumer<LocationKolProvider>(builder: (context, loc, child) {
|
||||
// return NotificationListener(
|
||||
// child: ListView.builder(
|
||||
// itemCount: loc.locationlist.length,
|
||||
// itemBuilder: (context, index) {
|
||||
// var data = loc.locationlist[index];
|
||||
// return ListTile(
|
||||
// title: Text1(title: data.address1),
|
||||
// );
|
||||
// }));
|
||||
// })
|
||||
|
||||
// );
|
||||
// }
|
||||
|
||||
// void _fetchData() async {
|
||||
// setState(() {
|
||||
// _isLoading = true;
|
||||
// });
|
||||
|
||||
// await Future.delayed(const Duration(seconds: 1));
|
||||
|
||||
// if (!mounted) {
|
||||
// return;
|
||||
// } //
|
||||
|
||||
// setState(() {
|
||||
// _isLoading = false;
|
||||
// locationList = List.generate(locationList.length + 10, (i) => 'Item $i');
|
||||
// });
|
||||
// }
|
||||
// }
|
|
@ -2,6 +2,7 @@
|
|||
import 'package:konectar_events/contacts_module/constants.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
|
||||
class MyWidget22 extends StatefulWidget {
|
||||
const MyWidget22({super.key});
|
||||
|
@ -30,7 +31,7 @@ class _MyWidget22State extends State<MyWidget22> {
|
|||
children: [
|
||||
Icon(
|
||||
Icons.edit,
|
||||
color: Constants.k2color,
|
||||
color: AppColors.blueColor,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
740
lib/main.dart
740
lib/main.dart
|
@ -1,6 +1,430 @@
|
|||
// import 'dart:async';
|
||||
// import 'dart:convert';
|
||||
// import 'dart:io';
|
||||
// import 'dart:ui';
|
||||
|
||||
// import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
// import 'package:dio/dio.dart';
|
||||
// import 'package:firebase_core/firebase_core.dart';
|
||||
// import 'package:firebase_remote_config/firebase_remote_config.dart';
|
||||
// import 'package:flutter/foundation.dart';
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:flutter/services.dart';
|
||||
// import 'package:flutter/widgets.dart';
|
||||
|
||||
// import 'package:hive_flutter/hive_flutter.dart';
|
||||
// import 'package:konectar_events/contacts_module/constants.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/affiliationsprovider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/certificate_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/educationprovider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/email_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/engagement_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/events_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/hcp%20_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_aff_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_awards_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_certificate_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_education_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_email_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_event_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_list_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_locationprovider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_pno_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_training_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/location_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/medicalinsightprovider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/nih_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/patent_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/phoneno_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/procedureprovider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/publications_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/single_hcpprovider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/speaker_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/training_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/provider_class/trials_provider.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/aff_data/aff_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/awa_data/awa_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/cer_hive/cer_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/edu_data/edu_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/email_data/email_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/events_data/event_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/kol_info/kol_info_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/loc_data/location_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/nih_grant_data/nih_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/patent_data/patent_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/pno_data/pno_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/procedure_data/pro_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/pub_data/pub_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/speaker_data/speaker_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/traning_data/traning_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/storage_hive/trials_data/trial_model_hive.dart';
|
||||
// import 'package:konectar_events/contacts_module/ui_screen/interactionform/interactionprovider.dart';
|
||||
// import 'package:konectar_events/contacts_module/ui_screen/interactionform/model/interaction_config_data.dart';
|
||||
// import 'package:konectar_events/contacts_module/ui_screen/interactionform/model/interaction_data.dart';
|
||||
// import 'package:konectar_events/contacts_module/ui_screen/interactionform/model/json_form_data.dart';
|
||||
// import 'package:konectar_events/contacts_module/ui_screen/interactionform/model/save_interaction.dart';
|
||||
// import 'package:konectar_events/contacts_module/ui_screen/interactionform/repository/hive_repository.dart';
|
||||
// import 'package:konectar_events/contacts_module/ui_screen/interactionform/viewinteractionprovider.dart';
|
||||
// import 'package:konectar_events/firebaseexample.dart';
|
||||
// import 'package:konectar_events/model/hive_api_constants.dart';
|
||||
// import 'package:konectar_events/model/myeventsmodel.dart';
|
||||
// import 'package:konectar_events/model/neweventsmodel.dart';
|
||||
// import 'package:konectar_events/model/sessionnotesmodel.dart';
|
||||
// import 'package:konectar_events/model/userdata_model.dart';
|
||||
// import 'package:konectar_events/utils/sessionmanager.dart';
|
||||
// import 'package:konectar_events/view/home.dart';
|
||||
// import 'package:konectar_events/view/login.dart';
|
||||
// import 'package:konectar_events/view/login_components/intropaging.dart';
|
||||
// import 'package:konectar_events/view/navigation_home_screen.dart';
|
||||
// import 'package:konectar_events/viewmodel/eventsprovider.dart';
|
||||
// import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
|
||||
// import 'package:konectar_events/viewmodel/loginprovider.dart';
|
||||
// import 'package:overlay_support/overlay_support.dart';
|
||||
|
||||
// import 'package:provider/provider.dart';
|
||||
|
||||
// import 'package:openid_client/openid_client.dart';
|
||||
// import 'package:flutter_web_plugins/url_strategy.dart';
|
||||
|
||||
// import 'package:shared_preferences/shared_preferences.dart';
|
||||
// //import 'openid/openid_io.dart' if (dart.library.html) 'openid_browser.dart';
|
||||
// import 'contacts_module/provider_class/award_provider.dart';
|
||||
// import 'firebase_options.dart';
|
||||
// import 'package:flutter_background_service/flutter_background_service.dart';
|
||||
|
||||
// Future main() async {
|
||||
// WidgetsFlutterBinding.ensureInitialized();
|
||||
// final dio = Dio();
|
||||
|
||||
// await Hive.initFlutter();
|
||||
|
||||
// await initializeService();
|
||||
|
||||
// Hive.registerAdapter(UserDataAdapter());
|
||||
// Hive.registerAdapter(EventsListAdapter());
|
||||
// Hive.registerAdapter(SessionNotesModelAdapter());
|
||||
// Hive.registerAdapter(MyEventsModelAdapter());
|
||||
// Hive.registerAdapter(SaveInteractionAdapter());
|
||||
// Hive.registerAdapter(InteractionConfigDataAdapter());
|
||||
|
||||
// Hive.registerAdapter(InteractionResultDataAdapter());
|
||||
// Hive.registerAdapter(FormFieldDataAdapter());
|
||||
// Hive.registerAdapter(ValidationAdapter());
|
||||
// Hive.registerAdapter(SectionListAdapter());
|
||||
// Hive.registerAdapter(InputClassAdapter());
|
||||
// Hive.registerAdapter(InteractionWidgetAdapter());
|
||||
|
||||
// // Hive.registerAdapter(UserDataAdapter());
|
||||
// Hive.registerAdapter(SendSaveJsonAdapter());
|
||||
// Hive.registerAdapter(MultipleSectionListAdapter());
|
||||
// Hive.registerAdapter(SaveAdapter());
|
||||
// Hive.registerAdapter(SaveInteractionFormJsonAdapter());
|
||||
// await Hive.openBox<SaveInteraction>('InteractionDataBox');
|
||||
|
||||
// await Hive.openBox<InteractionConfigData>('InteractionConfigDataBox');
|
||||
|
||||
// var box = await Hive.openBox('mycontact');
|
||||
// var box1 = await Hive.openBox('myfilter');
|
||||
|
||||
// await Hive.openBox('checkvalue');
|
||||
|
||||
// await Hive.openBox('hcpdata');
|
||||
|
||||
// await Hive.openBox<String>('notehive');
|
||||
|
||||
// Hive.registerAdapter(AffiliationAdapter());
|
||||
// // await Hive.openBox<Affiliation>('affiliationshive');
|
||||
|
||||
// Hive.registerAdapter(KolInfoAdapter());
|
||||
// Hive.registerAdapter(PublicationAdapter());
|
||||
// Hive.registerAdapter(EventsAdapter());
|
||||
// Hive.registerAdapter(TrialsAdapter());
|
||||
// Hive.registerAdapter(LocationAdapter());
|
||||
// Hive.registerAdapter(PhoneNoAdapter());
|
||||
// Hive.registerAdapter(EmailAdapter());
|
||||
// Hive.registerAdapter(EduAdapter());
|
||||
// Hive.registerAdapter(AwaAdapter());
|
||||
// Hive.registerAdapter(CerAdapter());
|
||||
// Hive.registerAdapter(PatentAdapter());
|
||||
// Hive.registerAdapter(NihAdapter());
|
||||
// Hive.registerAdapter(ProAdapter());
|
||||
// Hive.registerAdapter(Training1Adapter());
|
||||
// Hive.registerAdapter(SpeAdapter());
|
||||
// Hive.registerAdapter(HiveApiConstantsAdapter());
|
||||
|
||||
// await Hive.openBox<UserData>("UserDataBox");
|
||||
// await Hive.openBox<EventsList>("EventsListBox");
|
||||
// await Hive.openBox<SessionNotesModel>("SessionNotesModelBox");
|
||||
// await Hive.openBox<MyEventsModel>("MyEventsBox");
|
||||
// await Hive.openBox<HiveApiConstants>("hiveApiConstants");
|
||||
|
||||
// WidgetsFlutterBinding.ensureInitialized();
|
||||
// // FirebaseMessaging.instance.getToken().then((value) {
|
||||
// // String? token = value;
|
||||
// // print("token: $token");
|
||||
// // });
|
||||
// usePathUrlStrategy();
|
||||
// // client = await getClient();
|
||||
// // //credential = await getRedirectResult(client, scopes: scopes);
|
||||
// // credential = await authenticate(client, scopes: scopes);
|
||||
// // userInfo = await credential!.getUserInfo();
|
||||
// //runApp(const MyApp());
|
||||
// // activateTimer();
|
||||
// SharedPreferences.getInstance().then((instance) {
|
||||
// //StorageService().sharedPreferencesInstance = instance;
|
||||
// bool isloggedIn = instance.getBool('isloggedin') ?? false;
|
||||
|
||||
// print("checkhere before:$isloggedIn");
|
||||
// String secretkey = instance.getString('secretkey') ?? "";
|
||||
// OverlaySupportEntry entry;
|
||||
// Connectivity().onConnectivityChanged.listen((event) {
|
||||
// print("CHECK INTERNET");
|
||||
// print(event);
|
||||
// if (event.toString().contains("ConnectivityResult.none")) {
|
||||
// entry = showOverlayNotification((context) {
|
||||
// return Text("this is a message from simple notification");
|
||||
// }, duration: Duration(hours: 1));
|
||||
// }
|
||||
// });
|
||||
// OverlaySupport overlaySupport = OverlaySupport.global(
|
||||
// child: Text("ONLINE"),
|
||||
// );
|
||||
// runApp(
|
||||
// MultiProvider(
|
||||
// providers: [
|
||||
// ChangeNotifierProvider(create: (_) => LoginProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => EventsProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => HcpProfileProvider()),
|
||||
// //Contacts
|
||||
// ChangeNotifierProvider(create: (_) => InteractionProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => ViewInteractionProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => hcpProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => Singlehcpdetails()),
|
||||
// ChangeNotifierProvider(create: (_) => AffiliationsProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => PublicatioProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => EventProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => TrialsProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => MediacalInsightProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => SpekerEvalutionProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => EnagagementProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => LocationProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => PhonenoProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => EmailProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => PatentProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => TrainigProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => EducationProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => AwardProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => CertificateProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => NIHGrantsProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => ProcedureProvider()),
|
||||
|
||||
// //K2 Provider
|
||||
|
||||
// ChangeNotifierProvider(create: (_) => KolListProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => LocationKolProvider()),
|
||||
// ChangeNotifierProvider(create: (_) => PhonenoProviderK2()),
|
||||
// ChangeNotifierProvider(create: (_) => EmailProviderK2()),
|
||||
// ChangeNotifierProvider(create: (_) => EducationProviderK2()),
|
||||
// ChangeNotifierProvider(create: (_) => TrainigProviderK2()),
|
||||
// ChangeNotifierProvider(create: (_) => AwardProviderK2()),
|
||||
// ChangeNotifierProvider(create: (_) => CertificateProviderK2()),
|
||||
// ChangeNotifierProvider(create: (_) => AffiliationsProviderk2()),
|
||||
// ChangeNotifierProvider(create: (_) => EventProviderK2()),
|
||||
// ChangeNotifierProvider<HiveDataRepository>(
|
||||
// create: (_) => HiveDataRepository(
|
||||
// Hive.box<InteractionConfigData>('InteractionConfigDataBox'))),
|
||||
// ],
|
||||
// child:
|
||||
// // SafeArea(
|
||||
// // top: true,
|
||||
// // child:
|
||||
// MaterialApp(
|
||||
// theme: ThemeData(
|
||||
// //fontFamily: "SourceSerif",
|
||||
// ),
|
||||
// debugShowCheckedModeBanner: false,
|
||||
// title: 'Dynamic Links Example',
|
||||
// initialRoute: '/',
|
||||
// routes: <String, WidgetBuilder>{
|
||||
// '/': (BuildContext context) => FutureBuilder<bool>(
|
||||
// future: SessionManager().isLoggedIn(),
|
||||
// builder: (context, snapshot) {
|
||||
// print("Data_is : $snapshot");
|
||||
// if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
// return const CircularProgressIndicator();
|
||||
// } else if (snapshot.hasError) {
|
||||
// return Text('Error: ${snapshot.error}');
|
||||
// } else {
|
||||
// final isLoggedIn = snapshot.data ?? false;
|
||||
// print("isLoggedIn_is : $isLoggedIn");
|
||||
// print("secret : $secretkey");
|
||||
// return isLoggedIn
|
||||
// ? NavigationHomeScreen()
|
||||
// : IntroductionAnimationScreen();
|
||||
// }
|
||||
// },
|
||||
// ), //userInfo != null ? const Home() : OpenidScreen(credential: credential,),
|
||||
// // '/details': (BuildContext context) => const HomeScreen(),
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// // ),
|
||||
// );
|
||||
// });
|
||||
// }
|
||||
|
||||
// Future<void> initializeService() async {
|
||||
// final service = FlutterBackgroundService();
|
||||
|
||||
// await service.configure(
|
||||
// androidConfiguration: AndroidConfiguration(
|
||||
// // this will be executed when app is in foreground or background in separated isolate
|
||||
// onStart: onStart,
|
||||
|
||||
// // auto start service
|
||||
// autoStart: true,
|
||||
// isForegroundMode: false,
|
||||
// ),
|
||||
// iosConfiguration: IosConfiguration(
|
||||
// // auto start service
|
||||
// autoStart: true,
|
||||
|
||||
// // this will be executed when app is in foreground in separated isolate
|
||||
// onForeground: onStart,
|
||||
|
||||
// // you have to enable background fetch capability on xcode project
|
||||
// onBackground: onIosBackground,
|
||||
// ),
|
||||
// );
|
||||
// await service.startService();
|
||||
// }
|
||||
|
||||
// @pragma('vm:entry-point')
|
||||
// Future<bool> onIosBackground(ServiceInstance service) async {
|
||||
// WidgetsFlutterBinding.ensureInitialized();
|
||||
// DartPluginRegistrant.ensureInitialized();
|
||||
|
||||
// SharedPreferences preferences = await SharedPreferences.getInstance();
|
||||
// await preferences.reload();
|
||||
// final log = preferences.getStringList('log') ?? <String>[];
|
||||
// log.add(DateTime.now().toIso8601String());
|
||||
// await preferences.setStringList('log', log);
|
||||
|
||||
// return true;
|
||||
// }
|
||||
|
||||
// @pragma('vm:entry-point')
|
||||
// void onStart(ServiceInstance service) async {
|
||||
// print("Background service started");
|
||||
|
||||
// if (service is AndroidServiceInstance) {
|
||||
// // callApiInBackground;
|
||||
// service.on('setAsForeground').listen((event) {
|
||||
// service.setAsForegroundService();
|
||||
// print("Hey Hi i am foground");
|
||||
// });
|
||||
|
||||
// service.on('setAsBackground').listen((event) {
|
||||
// service.setAsBackgroundService();
|
||||
// print("Hey Hi i am background");
|
||||
// });
|
||||
// }
|
||||
|
||||
// print('NewwwFLUTTER BACKGROUND SERVICE: ${DateTime.now()}');
|
||||
|
||||
// service.on('stopService').listen((event) {
|
||||
// service.stopSelf();
|
||||
// });
|
||||
// startPeriodicCalls();
|
||||
|
||||
// // Timer.periodic(const Duration(seconds: 20), (timer) async {
|
||||
// // print('FLUTTER BACKGROUND SERVICE: ${DateTime.now()}');
|
||||
|
||||
// // // final response1 =
|
||||
// // // await http.get(Uri.parse('http://192.168.2.170:8000/all-routes'));
|
||||
// // // if (response1.statusCode == 200) {
|
||||
// // // print('API call successful1 : ${response1.body}');
|
||||
// // // } else {
|
||||
// // // print('API call failed : ${response1.body}');
|
||||
// // // }
|
||||
// // startPeriodicCalls();
|
||||
// // });
|
||||
// }
|
||||
|
||||
// Map<String, Timer> _timers = {};
|
||||
// // void startPeriodicCalls() {
|
||||
// // Constants.apiIntervals1.forEach((url, interval) {
|
||||
// // print("URL_iss: ${url}, InterVal_iss: ${interval}");
|
||||
// // _timers[url] = Timer.periodic(Duration(minutes: interval), (timer) async {
|
||||
// // await fetchApiData(url);
|
||||
// // });
|
||||
// // });
|
||||
// // }
|
||||
|
||||
// startPeriodicCalls() {
|
||||
// print("pooja");
|
||||
// Constants.apiIntervals1.forEach((key, item) {
|
||||
// print(
|
||||
// "URL_iss: ${item['url']}, InterVal_iss: ${item['intervals']}, HiveName: ${item['hivename']}");
|
||||
|
||||
// _timers[item['url']] =
|
||||
// Timer.periodic(Duration(minutes: item['intervals']), (timer) async {
|
||||
// await fetchApiData(item['url'], item['hivename'], item['hivetype']);
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
|
||||
// PostApiCall(url, methodName, sendPostData) async {
|
||||
// try {
|
||||
// final response = await Dio().post(
|
||||
// url,
|
||||
// data: sendPostData,
|
||||
// options: Options(
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/json',
|
||||
// },
|
||||
// ),
|
||||
// );
|
||||
|
||||
// if (response.statusCode == 200) {
|
||||
// debugPrint("Response_is : ${response.data}");
|
||||
// return response;
|
||||
// } else {
|
||||
// return 'Failed to load data';
|
||||
// }
|
||||
// } catch (e) {
|
||||
// print('Error fetching data123 from $url: $e');
|
||||
// }
|
||||
// }
|
||||
|
||||
// Future<void> fetchApiData(String url, String hivename, String hivetype) async {
|
||||
// print("Post_Url_iss: ${url}, ${hivename} , ${hivetype}");
|
||||
// var box, postdata;
|
||||
|
||||
// // var box = Hive.box(hivename);
|
||||
// switch (hivename) {
|
||||
// case 'InteractionDataBox':
|
||||
// box = await Hive.openBox<SaveInteraction>(hivename);
|
||||
// final provider = ViewInteractionProvider();
|
||||
// final prov = InteractionProvider();
|
||||
// postdata = await provider.getAllRecordsforIntervalSync(hivename);
|
||||
// postdata.forEach((item) async {
|
||||
// PostApiCall(url, "post", prov.formJson(item));
|
||||
// });
|
||||
// break;
|
||||
// default:
|
||||
// box = Hive.box<String>(hivename);
|
||||
// postdata = box.values.toList();
|
||||
// postdata.forEach((item) async {
|
||||
// PostApiCall(url, "post", item);
|
||||
// });
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
@ -12,6 +436,7 @@ import 'package:flutter/services.dart';
|
|||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import 'package:hive_flutter/hive_flutter.dart';
|
||||
import 'package:konectar_events/contacts_module/constants.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/affiliationsprovider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/certificate_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/educationprovider.dart';
|
||||
|
@ -19,6 +444,7 @@ import 'package:konectar_events/contacts_module/provider_class/email_provider.da
|
|||
import 'package:konectar_events/contacts_module/provider_class/engagement_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/events_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/hcp%20_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_add_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_aff_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_awards_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/k2_provider/kol_certificate_provider.dart';
|
||||
|
@ -40,6 +466,7 @@ import 'package:konectar_events/contacts_module/provider_class/single_hcpprovide
|
|||
import 'package:konectar_events/contacts_module/provider_class/speaker_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/training_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/provider_class/trials_provider.dart';
|
||||
import 'package:konectar_events/contacts_module/service.dart/service.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/aff_data/aff_model_hive.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/awa_data/awa_model_hive.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/cer_hive/cer_model_hive.dart';
|
||||
|
@ -49,6 +476,7 @@ import 'package:konectar_events/contacts_module/storage_hive/events_data/event_m
|
|||
import 'package:konectar_events/contacts_module/storage_hive/kol_info/kol_info_model_hive.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/loc_data/location_model_hive.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/nih_grant_data/nih_model_hive.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/note_data/note_model_hive.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/patent_data/patent_model_hive.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/pno_data/pno_model_hive.dart';
|
||||
import 'package:konectar_events/contacts_module/storage_hive/procedure_data/pro_model_hive.dart';
|
||||
|
@ -62,6 +490,7 @@ import 'package:konectar_events/contacts_module/ui_screen/interactionform/model/
|
|||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/model/json_form_data.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/model/save_interaction.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/repository/hive_repository.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/util.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/viewinteractionprovider.dart';
|
||||
import 'package:konectar_events/firebaseexample.dart';
|
||||
import 'package:konectar_events/model/hive_api_constants.dart';
|
||||
|
@ -69,6 +498,7 @@ import 'package:konectar_events/model/myeventsmodel.dart';
|
|||
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||
import 'package:konectar_events/model/sessionnotesmodel.dart';
|
||||
import 'package:konectar_events/model/userdata_model.dart';
|
||||
import 'package:konectar_events/utils/apicall.dart';
|
||||
import 'package:konectar_events/utils/sessionmanager.dart';
|
||||
import 'package:konectar_events/view/home.dart';
|
||||
import 'package:konectar_events/view/login.dart';
|
||||
|
@ -88,43 +518,14 @@ import 'package:shared_preferences/shared_preferences.dart';
|
|||
//import 'openid/openid_io.dart' if (dart.library.html) 'openid_browser.dart';
|
||||
import 'contacts_module/provider_class/award_provider.dart';
|
||||
import 'firebase_options.dart';
|
||||
import 'package:flutter_background_service/flutter_background_service.dart';
|
||||
|
||||
Future main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
final dio = Dio();
|
||||
// startPeriodicCalls();
|
||||
|
||||
// await Firebase.initializeApp(
|
||||
// options: DefaultFirebaseOptions.currentPlatform,
|
||||
// );
|
||||
// final remoteConfig = FirebaseRemoteConfig.instance;
|
||||
// await remoteConfig.setDefaults(const {
|
||||
// "clientstring": "client-A",
|
||||
// });
|
||||
|
||||
// await remoteConfig.setConfigSettings(RemoteConfigSettings(
|
||||
// fetchTimeout: const Duration(seconds: 10),
|
||||
// minimumFetchInterval: const Duration(seconds: 20),
|
||||
// ));
|
||||
// await remoteConfig.fetchAndActivate();
|
||||
// RemoteConfigValue rawData = remoteConfig.getValue("client-A");
|
||||
// print(rawData);
|
||||
// const jsonString =
|
||||
// '{"text": "foo", "value": 1, "status": false, "extra": null}';
|
||||
// var map = jsonDecode(rawData.toString());
|
||||
// String title = await remoteConfig.getString("welcomestring");
|
||||
|
||||
//await execute(InternetConnectionChecker());
|
||||
|
||||
// Create customized instance which can be registered via dependency injection
|
||||
// final InternetConnectionChecker customInstance =
|
||||
// InternetConnectionChecker.createInstance(
|
||||
// checkTimeout: const Duration(milliseconds: 1),
|
||||
// checkInterval: const Duration(milliseconds: 1),
|
||||
// );
|
||||
|
||||
// // Check internet connection with created instance
|
||||
// await execute(customInstance);
|
||||
await Hive.initFlutter();
|
||||
await initializeService();
|
||||
|
||||
Hive.registerAdapter(UserDataAdapter());
|
||||
Hive.registerAdapter(EventsListAdapter());
|
||||
|
@ -147,7 +548,8 @@ Future main() async {
|
|||
Hive.registerAdapter(SaveInteractionFormJsonAdapter());
|
||||
await Hive.openBox<SaveInteraction>('InteractionDataBox');
|
||||
|
||||
await Hive.openBox<InteractionConfigData>('InteractionConfigDataBox');
|
||||
var boxhive =
|
||||
await Hive.openBox<InteractionConfigData>('InteractionConfigDataBox');
|
||||
|
||||
var box = await Hive.openBox('mycontact');
|
||||
var box1 = await Hive.openBox('myfilter');
|
||||
|
@ -156,7 +558,8 @@ Future main() async {
|
|||
|
||||
await Hive.openBox('hcpdata');
|
||||
|
||||
await Hive.openBox<String>('notehive');
|
||||
await Hive.openBox<Note>('notehive');
|
||||
// Hive.registerAdapter(NoteAdapter());
|
||||
|
||||
Hive.registerAdapter(AffiliationAdapter());
|
||||
// await Hive.openBox<Affiliation>('affiliationshive');
|
||||
|
@ -178,6 +581,8 @@ Future main() async {
|
|||
Hive.registerAdapter(SpeAdapter());
|
||||
Hive.registerAdapter(HiveApiConstantsAdapter());
|
||||
|
||||
// Hive.registerAdapter(NoteAdapter());
|
||||
|
||||
await Hive.openBox<UserData>("UserDataBox");
|
||||
await Hive.openBox<EventsList>("EventsListBox");
|
||||
await Hive.openBox<SessionNotesModel>("SessionNotesModelBox");
|
||||
|
@ -185,19 +590,10 @@ Future main() async {
|
|||
await Hive.openBox<HiveApiConstants>("hiveApiConstants");
|
||||
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
// FirebaseMessaging.instance.getToken().then((value) {
|
||||
// String? token = value;
|
||||
// print("token: $token");
|
||||
// });
|
||||
|
||||
usePathUrlStrategy();
|
||||
// client = await getClient();
|
||||
// //credential = await getRedirectResult(client, scopes: scopes);
|
||||
// credential = await authenticate(client, scopes: scopes);
|
||||
// userInfo = await credential!.getUserInfo();
|
||||
//runApp(const MyApp());
|
||||
// activateTimer();
|
||||
|
||||
SharedPreferences.getInstance().then((instance) {
|
||||
//StorageService().sharedPreferencesInstance = instance;
|
||||
bool isloggedIn = instance.getBool('isloggedin') ?? false;
|
||||
|
||||
print("checkhere before:$isloggedIn");
|
||||
|
@ -256,128 +652,174 @@ Future main() async {
|
|||
ChangeNotifierProvider(create: (_) => CertificateProviderK2()),
|
||||
ChangeNotifierProvider(create: (_) => AffiliationsProviderk2()),
|
||||
ChangeNotifierProvider(create: (_) => EventProviderK2()),
|
||||
ChangeNotifierProvider(create: (_) => AddNotesProvider()),
|
||||
|
||||
ChangeNotifierProvider<HiveDataRepository>(
|
||||
create: (_) => HiveDataRepository(
|
||||
Hive.box<InteractionConfigData>('InteractionConfigDataBox'))),
|
||||
],
|
||||
child:
|
||||
// SafeArea(
|
||||
// top: true,
|
||||
// child:
|
||||
MaterialApp(
|
||||
theme: ThemeData(
|
||||
//fontFamily: "SourceSerif",
|
||||
),
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'Dynamic Links Example',
|
||||
initialRoute: '/',
|
||||
routes: <String, WidgetBuilder>{
|
||||
'/': (BuildContext context) => FutureBuilder<bool>(
|
||||
future: SessionManager().isLoggedIn(),
|
||||
builder: (context, snapshot) {
|
||||
print("Data_is : $snapshot");
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const CircularProgressIndicator();
|
||||
} else if (snapshot.hasError) {
|
||||
return Text('Error: ${snapshot.error}');
|
||||
} else {
|
||||
final isLoggedIn = snapshot.data ?? false;
|
||||
print("isLoggedIn_is : $isLoggedIn");
|
||||
print("secret : $secretkey");
|
||||
return isLoggedIn
|
||||
? NavigationHomeScreen()
|
||||
: IntroductionAnimationScreen();
|
||||
}
|
||||
},
|
||||
), //userInfo != null ? const Home() : OpenidScreen(credential: credential,),
|
||||
// '/details': (BuildContext context) => const HomeScreen(),
|
||||
},
|
||||
child: SafeArea(
|
||||
top: true,
|
||||
child: MaterialApp(
|
||||
theme: ThemeData(
|
||||
//fontFamily: "SourceSerif",
|
||||
),
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'Dynamic Links Example',
|
||||
initialRoute: '/',
|
||||
routes: <String, WidgetBuilder>{
|
||||
'/': (BuildContext context) => FutureBuilder<bool>(
|
||||
future: SessionManager().isLoggedIn(),
|
||||
builder: (context, snapshot) {
|
||||
print("Data_is : $snapshot");
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const CircularProgressIndicator();
|
||||
} else if (snapshot.hasError) {
|
||||
return Text('Error: ${snapshot.error}');
|
||||
} else {
|
||||
final isLoggedIn = snapshot.data ?? false;
|
||||
print("isLoggedIn_is : $isLoggedIn");
|
||||
print("secret : $secretkey");
|
||||
return isLoggedIn
|
||||
? IntroductionAnimationScreen()
|
||||
: IntroductionAnimationScreen();
|
||||
}
|
||||
},
|
||||
), //userInfo != null ? const Home() : OpenidScreen(credential: credential,),
|
||||
// '/details': (BuildContext context) => const HomeScreen(),
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
// ),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
@override
|
||||
_MyAppState createState() => _MyAppState();
|
||||
Future<void> initializeService() async {
|
||||
final service = FlutterBackgroundService();
|
||||
|
||||
await service.configure(
|
||||
androidConfiguration: AndroidConfiguration(
|
||||
// this will be executed when app is in foreground or background in separated isolate
|
||||
onStart: onStart,
|
||||
|
||||
// auto start service
|
||||
autoStart: true,
|
||||
isForegroundMode: false,
|
||||
),
|
||||
iosConfiguration: IosConfiguration(
|
||||
// auto start service
|
||||
autoStart: true,
|
||||
|
||||
// this will be executed when app is in foreground in separated isolate
|
||||
onForeground: onStart,
|
||||
|
||||
// you have to enable background fetch capability on xcode project
|
||||
onBackground: onIosBackground,
|
||||
),
|
||||
);
|
||||
await service.startService();
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> {
|
||||
@override
|
||||
void initState() {
|
||||
OverlaySupportEntry entry;
|
||||
Connectivity().onConnectivityChanged.listen((event) {
|
||||
print("CHECK INTERNET");
|
||||
print(event);
|
||||
if (event.toString().contains("ConnectivityResult.wifi")) {
|
||||
entry = showOverlayNotification((context) {
|
||||
return Text("this is a message from simple notification");
|
||||
}, duration: Duration(hours: 1));
|
||||
}
|
||||
@pragma('vm:entry-point')
|
||||
Future<bool> onIosBackground(ServiceInstance service) async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
DartPluginRegistrant.ensureInitialized();
|
||||
|
||||
SharedPreferences preferences = await SharedPreferences.getInstance();
|
||||
await preferences.reload();
|
||||
final log = preferences.getStringList('log') ?? <String>[];
|
||||
log.add(DateTime.now().toIso8601String());
|
||||
await preferences.setStringList('log', log);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@pragma('vm:entry-point')
|
||||
void onStart(ServiceInstance service) async {
|
||||
print("Background service started");
|
||||
|
||||
if (service is AndroidServiceInstance) {
|
||||
// callApiInBackground;
|
||||
service.on('setAsForeground').listen((event) {
|
||||
service.setAsForegroundService();
|
||||
print("Hey Hi i am foground");
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
statusBarIconBrightness: Brightness.dark,
|
||||
statusBarBrightness:
|
||||
!kIsWeb && Platform.isAndroid ? Brightness.dark : Brightness.light,
|
||||
systemNavigationBarColor: Colors.white,
|
||||
systemNavigationBarDividerColor: Colors.transparent,
|
||||
systemNavigationBarIconBrightness: Brightness.dark,
|
||||
));
|
||||
return MaterialApp(
|
||||
title: 'Flutter UI',
|
||||
debugShowCheckedModeBanner: false,
|
||||
// theme: ThemeData(
|
||||
// primarySwatch: Colors.blue,
|
||||
// textTheme: AppTheme.textTheme,
|
||||
// platform: TargetPlatform.iOS,
|
||||
// ),
|
||||
home: NavigationHomeScreen(),
|
||||
service.on('setAsBackground').listen((event) {
|
||||
service.setAsBackgroundService();
|
||||
print("Hey Hi i am background");
|
||||
});
|
||||
}
|
||||
print('NewwwFLUTTER BACKGROUND SERVICE: ${DateTime.now()}');
|
||||
|
||||
service.on('stopService').listen((event) {
|
||||
service.stopSelf();
|
||||
});
|
||||
startPeriodicCalls();
|
||||
}
|
||||
|
||||
Map<String, Timer> _timers = {};
|
||||
|
||||
startPeriodicCalls() {
|
||||
print("pooja");
|
||||
Constants.apiIntervals1.forEach((key, item) {
|
||||
print(
|
||||
"URL_iss: ${item['url']}, InterVal_iss: ${item['intervals']}, HiveName: ${item['hivename']}");
|
||||
|
||||
_timers[item['url']] =
|
||||
Timer.periodic(Duration(minutes: item['intervals']), (timer) async {
|
||||
await fetchApiData(item['url'], item['hivename'], item['hivetype']);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
PostApiCall(url, methodName, sendPostData) async {
|
||||
try {
|
||||
final response = await Dio().post(
|
||||
url,
|
||||
data: sendPostData,
|
||||
options: Options(
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
// TODO: implement createState
|
||||
throw UnimplementedError();
|
||||
if (response.statusCode == 200) {
|
||||
debugPrint("Response_is : ${response.data}");
|
||||
return response;
|
||||
} else {
|
||||
return 'Failed to load data';
|
||||
}
|
||||
} catch (e) {
|
||||
print('Error fetching data123 from $url: $e');
|
||||
}
|
||||
}
|
||||
|
||||
// class App extends StatefulWidget {
|
||||
// @override
|
||||
// _AppState createState() => _AppState();
|
||||
// }
|
||||
Future<void> fetchApiData(String url, String hivename, String hivetype) async {
|
||||
print("Post_Url_iss: ${url}, ${hivename} , ${hivetype}");
|
||||
var box, postdata;
|
||||
|
||||
// class _AppState extends State<App> {
|
||||
// @override
|
||||
// void initState() {
|
||||
// OverlaySupportEntry entry;
|
||||
// Connectivity().onConnectivityChanged.listen((event) {
|
||||
// print(event);
|
||||
// if (event.toString().contains("ConnectivityResult.none")) {
|
||||
// entry = showOverlayNotification((context) {
|
||||
// return Text("this is a message from simple notification");
|
||||
// }, duration: Duration(hours: 1));
|
||||
// }
|
||||
// });
|
||||
// super.initState();
|
||||
// }
|
||||
// var box = Hive.box(hivename);
|
||||
switch (hivename) {
|
||||
case 'InteractionDataBox':
|
||||
box = await Hive.openBox<SaveInteraction>(hivename);
|
||||
final provider = ViewInteractionProvider();
|
||||
final prov = InteractionProvider();
|
||||
postdata = await provider.getAllRecordsforIntervalSync(hivename);
|
||||
postdata.forEach((item) async {
|
||||
PostApiCall(url, "post", prov.formJson(item));
|
||||
});
|
||||
break;
|
||||
default:
|
||||
box = Hive.box<Note>(hivename);
|
||||
postdata = box.values.toList();
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return OverlaySupport(
|
||||
// child: MaterialApp(
|
||||
// title: 'Network Checker App',
|
||||
// debugShowCheckedModeBanner: false,
|
||||
// home: Homepage(),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
print("PostData_isss: $postdata");
|
||||
postdata.forEach((item) async {
|
||||
PostApiCall(url, "post", item);
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,13 @@ class HiveApiConstants {
|
|||
String? method;
|
||||
@HiveField(3)
|
||||
String? module;
|
||||
@HiveField(4)
|
||||
String? hivename;
|
||||
|
||||
HiveApiConstants(
|
||||
{this.functionName, this.interval, this.method, this.module});
|
||||
{this.functionName,
|
||||
this.interval,
|
||||
this.method,
|
||||
this.module,
|
||||
this.hivename});
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:ffi';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
|
|
|
@ -24,6 +24,22 @@ class AppColors {
|
|||
static const Color contentColorCyan = Color(0xFF50E4FF);
|
||||
//background: #F3F3F3;
|
||||
|
||||
static const Color bgcolor = Color(0xFFF2F3F8);
|
||||
static const Color oldbgcolor = Color.fromARGB(255, 222, 237, 247);
|
||||
static const Color blueColor = Color.fromARGB(255, 0, 71, 132);
|
||||
static const Color navcolor = Color(0x1e90ff);
|
||||
static const Color tabbgColor = Color.fromARGB(255, 0, 112, 184);
|
||||
static const Color bgtopic = Color.fromARGB(255, 210, 214, 222);
|
||||
static const Color fonttopic = Color.fromARGB(255, 68, 68, 68);
|
||||
static const Color btnGreenColor = Color.fromARGB(255, 46, 166, 100);
|
||||
static const Color btnBlueColor = Color.fromARGB(255, 0, 102, 204);
|
||||
static const Color homeCardBackgound =
|
||||
Color.fromRGBO(229, 229, 229, 1); //rgba(243, 243, 243, 1)
|
||||
static const Color onboardButtonColor = Color.fromRGBO(3, 126, 238, 1);
|
||||
|
||||
static const Color profilecard = Color.fromARGB(255, 4, 104, 198);
|
||||
static Color cardtext = Colors.transparent;
|
||||
|
||||
List<Color> appcolors = [
|
||||
contentColorYellow,
|
||||
contentColorBlue,
|
||||
|
|
|
@ -3,18 +3,18 @@ import 'package:flutter/material.dart';
|
|||
|
||||
class EventsConstants {
|
||||
//static const Color bgcolor = Color.fromARGB(255, 246, 248, 252);
|
||||
static const Color bgcolor = Color(0xFFF2F3F8);
|
||||
static const Color oldbgcolor = Color.fromARGB(255, 222, 237, 247);
|
||||
static const Color blueColor = Color.fromARGB(255, 0, 71, 132);
|
||||
static const Color navcolor = Color(0x1e90ff);
|
||||
static const Color tabbgColor = Color.fromARGB(255, 0, 112, 184);
|
||||
static const Color bgtopic = Color.fromARGB(255, 210, 214, 222);
|
||||
static const Color fonttopic = Color.fromARGB(255, 68, 68, 68);
|
||||
static const Color btnGreenColor = Color.fromARGB(255, 46, 166, 100);
|
||||
static const Color btnBlueColor = Color.fromARGB(255, 0, 102, 204);
|
||||
static const Color homeCardBackgound =
|
||||
Color.fromRGBO(229, 229, 229, 1); //rgba(243, 243, 243, 1)
|
||||
static const Color onboardButtonColor = Color.fromRGBO(3, 126, 238, 1);
|
||||
// static const Color bgcolor = Color(0xFFF2F3F8);
|
||||
// static const Color oldbgcolor = Color.fromARGB(255, 222, 237, 247);
|
||||
// static const Color blueColor = Color.fromARGB(255, 0, 71, 132);
|
||||
// static const Color navcolor = Color(0x1e90ff);
|
||||
// static const Color tabbgColor = Color.fromARGB(255, 0, 112, 184);
|
||||
// static const Color bgtopic = Color.fromARGB(255, 210, 214, 222);
|
||||
// static const Color fonttopic = Color.fromARGB(255, 68, 68, 68);
|
||||
// static const Color btnGreenColor = Color.fromARGB(255, 46, 166, 100);
|
||||
// static const Color btnBlueColor = Color.fromARGB(255, 0, 102, 204);
|
||||
// static const Color homeCardBackgound =
|
||||
// Color.fromRGBO(229, 229, 229, 1); //rgba(243, 243, 243, 1)
|
||||
// static const Color onboardButtonColor = Color.fromRGBO(3, 126, 238, 1);
|
||||
// static const String domainUrl = "http://192.0.0.2:8007/api/method/";
|
||||
static const String domainUrl = "http://192.168.2.109:8007/api/method/";
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:konectar_events/model/eventsmodel.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
import 'package:konectar_events/utils/util.dart';
|
||||
import 'package:konectar_events/view/hcplist.dart';
|
||||
|
@ -129,7 +130,7 @@ class _EventsDetailTabState extends State<EventsDetailTab> {
|
|||
child: Align(
|
||||
alignment: Alignment.center,
|
||||
child: Container(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
// height: isTablet ? height * 0.50 : height * 0.30,
|
||||
// padding: const EdgeInsets.only(top: 5.0),
|
||||
// width: double.maxFinite,
|
||||
|
@ -280,7 +281,7 @@ class _EventsDetailTabState extends State<EventsDetailTab> {
|
|||
height: 40,
|
||||
child: FloatingActionButton.extended(
|
||||
elevation: 1,
|
||||
backgroundColor: EventsConstants.oldbgcolor,
|
||||
backgroundColor: AppColors.oldbgcolor,
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
isExtended = !isExtended;
|
||||
|
@ -326,7 +327,7 @@ class _EventsDetailTabState extends State<EventsDetailTab> {
|
|||
height: 40,
|
||||
child: FloatingActionButton.extended(
|
||||
elevation: 1,
|
||||
backgroundColor: EventsConstants.oldbgcolor,
|
||||
backgroundColor: AppColors.oldbgcolor,
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
isExtendedInterested = !isExtendedInterested;
|
||||
|
|
|
@ -15,6 +15,7 @@ import 'package:konectar_events/model/events_speakers_k1.dart';
|
|||
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
||||
import 'package:konectar_events/model/eventspeakers.dart';
|
||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
import 'package:konectar_events/utils/dateformater.dart';
|
||||
import 'package:konectar_events/utils/util.dart';
|
||||
|
@ -254,7 +255,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
return Consumer<ViewInteractionProvider>(
|
||||
builder: (BuildContext context, provider, Widget? child) {
|
||||
return Container(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
|
@ -407,11 +408,11 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
//return SafeArea(
|
||||
return Container(
|
||||
child: Scaffold(
|
||||
backgroundColor: EventsConstants.bgcolor,
|
||||
backgroundColor: AppColors.bgcolor,
|
||||
appBar: AppBar(
|
||||
// title: Text(""),
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor: EventsConstants.blueColor,
|
||||
backgroundColor: AppColors.blueColor,
|
||||
centerTitle: false,
|
||||
flexibleSpace: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
@ -451,7 +452,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
style: TextStyle(
|
||||
// decoration: TextDecoration.underline,
|
||||
// decorationColor: Colors.blue,
|
||||
color: EventsConstants.blueColor,
|
||||
color: AppColors.blueColor,
|
||||
|
||||
//fontWeight: FontWeight.bold,
|
||||
fontSize: isTablet ? 22 : 14,
|
||||
|
@ -522,7 +523,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
floatingActionButtonLocation: FloatingActionButtonLocation.miniEndFloat,
|
||||
floatingActionButton: FloatingActionButton(
|
||||
// backgroundColor: const Color.fromARGB(255, 222, 237, 247),
|
||||
backgroundColor: EventsConstants.blueColor,
|
||||
backgroundColor: AppColors.blueColor,
|
||||
tooltip: 'Actions',
|
||||
// heroTag: "floatbtn232342",
|
||||
onPressed: () {
|
||||
|
@ -546,7 +547,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
// child:
|
||||
|
||||
Container(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
// width: MediaQuery.of(context).size.width,
|
||||
// constraints: BoxConstraints(minHeight: 120, maxHeight: 130),
|
||||
//height: 240,
|
||||
|
@ -729,7 +730,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
color: EventsConstants.blueColor,
|
||||
color: AppColors.blueColor,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
buildCardView(
|
||||
|
@ -764,7 +765,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
labelColor: Colors.black,
|
||||
tabAlignment: TabAlignment.fill,
|
||||
indicatorColor: EventsConstants.blueColor,
|
||||
indicatorColor: AppColors.blueColor,
|
||||
unselectedLabelColor: Colors.grey,
|
||||
labelStyle: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
|
@ -814,7 +815,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
visible: isLoading,
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(
|
||||
backgroundColor: EventsConstants.blueColor,
|
||||
backgroundColor: AppColors.blueColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -859,7 +860,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
padding: const EdgeInsets.only(right: 16, top: 8, bottom: 8),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(38.0),
|
||||
),
|
||||
|
@ -926,7 +927,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
Widget getAppBarUI(EventsList eventsList) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: EventsConstants.blueColor,
|
||||
color: AppColors.blueColor,
|
||||
boxShadow: <BoxShadow>[
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.2),
|
||||
|
@ -1397,7 +1398,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
child: FloatingActionButton.extended(
|
||||
elevation: 1,
|
||||
// heroTag: "following45",
|
||||
backgroundColor: EventsConstants.bgcolor,
|
||||
backgroundColor: AppColors.bgcolor,
|
||||
//backgroundColor: Colors.red,
|
||||
onPressed: () async {
|
||||
// String msg = await provider
|
||||
|
@ -1506,7 +1507,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
height: 45,
|
||||
child: FloatingActionButton.extended(
|
||||
elevation: 1,
|
||||
backgroundColor: EventsConstants.bgcolor,
|
||||
backgroundColor: AppColors.bgcolor,
|
||||
onPressed: () async {
|
||||
if (!event.eventUserInterest!) {
|
||||
await provider.addEventsToFavs(event.eventId!);
|
||||
|
@ -1617,7 +1618,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
// :
|
||||
Container(
|
||||
height: MediaQuery.of(context).size.height,
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
padding: EdgeInsets.only(left: 8, right: 8),
|
||||
child: SingleChildScrollView(
|
||||
child: Expanded(
|
||||
|
@ -1739,7 +1740,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
|||
padding: EdgeInsets.only(left: 8),
|
||||
decoration: BoxDecoration(
|
||||
// color: Color.fromARGB(179, 248, 238, 238),
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
|
@ -2089,7 +2090,7 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
|
|||
@override
|
||||
Widget build(
|
||||
BuildContext context, double shrinkOffset, bool overlapsContent) {
|
||||
return Container(color: EventsConstants.tabbgColor, child: _tabBar);
|
||||
return Container(color: AppColors.tabbgColor, child: _tabBar);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -5,6 +5,7 @@ import 'package:flutter/widgets.dart';
|
|||
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
||||
import 'package:konectar_events/model/eventsmodel.dart';
|
||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
import 'package:konectar_events/utils/dateformater.dart';
|
||||
|
@ -73,7 +74,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
|||
return DefaultTabController(
|
||||
length: 4,
|
||||
//child: SafeArea(
|
||||
// appBar: CustomAppBar(title: "", backgroundcolor: EventsConstants.bgcolor),
|
||||
// appBar: CustomAppBar(title: "", backgroundcolor: AppColors.bgcolor),
|
||||
//body:
|
||||
// NestedScrollView(
|
||||
// headerSliverBuilder:
|
||||
|
@ -87,7 +88,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
|||
// floating: false,
|
||||
// pinned: true,
|
||||
// stretch: false,
|
||||
// backgroundColor: EventsConstants.bgcolor,
|
||||
// backgroundColor: AppColors.bgcolor,
|
||||
// flexibleSpace: FlexibleSpaceBar(
|
||||
// centerTitle: false,
|
||||
// expandedTitleScale: 2.4,
|
||||
|
@ -156,11 +157,11 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
|||
//return SafeArea(
|
||||
return Container(
|
||||
child: Scaffold(
|
||||
backgroundColor: EventsConstants.bgcolor,
|
||||
backgroundColor: AppColors.bgcolor,
|
||||
appBar: AppBar(
|
||||
// title: Text(""),
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor: EventsConstants.blueColor,
|
||||
backgroundColor: AppColors.blueColor,
|
||||
centerTitle: false,
|
||||
flexibleSpace: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
@ -200,7 +201,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
|||
style: TextStyle(
|
||||
// decoration: TextDecoration.underline,
|
||||
// decorationColor: Colors.blue,
|
||||
color: EventsConstants.blueColor,
|
||||
color: AppColors.blueColor,
|
||||
|
||||
//fontWeight: FontWeight.bold,
|
||||
fontSize: isTablet ? 22 : 14,
|
||||
|
@ -260,7 +261,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
|||
floatingActionButtonLocation: FloatingActionButtonLocation.miniEndFloat,
|
||||
floatingActionButton: FloatingActionButton(
|
||||
// backgroundColor: const Color.fromARGB(255, 222, 237, 247),
|
||||
backgroundColor: EventsConstants.blueColor,
|
||||
backgroundColor: AppColors.blueColor,
|
||||
tooltip: 'Actions',
|
||||
// heroTag: "floatbtn232342",
|
||||
onPressed: () {
|
||||
|
@ -268,7 +269,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
|||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return Container(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 240,
|
||||
child: Center(
|
||||
|
@ -412,7 +413,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
|||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
color: EventsConstants.blueColor,
|
||||
color: AppColors.blueColor,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
buildCardView(
|
||||
|
@ -447,7 +448,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
|||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
labelColor: Colors.black,
|
||||
tabAlignment: TabAlignment.fill,
|
||||
indicatorColor: EventsConstants.blueColor,
|
||||
indicatorColor: AppColors.blueColor,
|
||||
unselectedLabelColor: Colors.grey,
|
||||
labelStyle: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
|
@ -490,7 +491,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
|||
padding: const EdgeInsets.only(right: 16, top: 8, bottom: 8),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(38.0),
|
||||
),
|
||||
|
@ -557,7 +558,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
|||
Widget getAppBarUI(EventsList eventsList) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: EventsConstants.blueColor,
|
||||
color: AppColors.blueColor,
|
||||
boxShadow: <BoxShadow>[
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.2),
|
||||
|
@ -1015,7 +1016,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
|||
child: FloatingActionButton.extended(
|
||||
elevation: 1,
|
||||
// heroTag: "following45",
|
||||
backgroundColor: EventsConstants.bgcolor,
|
||||
backgroundColor: AppColors.bgcolor,
|
||||
//backgroundColor: Colors.red,
|
||||
onPressed: () async {
|
||||
// String msg = await provider
|
||||
|
@ -1125,7 +1126,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
|||
height: 45,
|
||||
child: FloatingActionButton.extended(
|
||||
elevation: 1,
|
||||
backgroundColor: EventsConstants.bgcolor,
|
||||
backgroundColor: AppColors.bgcolor,
|
||||
onPressed: () async {
|
||||
if (!event.isfav) {
|
||||
event.isfav = !event.isfav;
|
||||
|
@ -1213,7 +1214,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
|||
// :
|
||||
Container(
|
||||
height: MediaQuery.of(context).size.height,
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
padding: EdgeInsets.only(left: 8, right: 8),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(children: [
|
||||
|
@ -1317,7 +1318,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
|||
padding: EdgeInsets.only(left: 8),
|
||||
decoration: BoxDecoration(
|
||||
// color: Color.fromARGB(179, 248, 238, 238),
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
|
@ -1654,7 +1655,7 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
|
|||
@override
|
||||
Widget build(
|
||||
BuildContext context, double shrinkOffset, bool overlapsContent) {
|
||||
return Container(color: EventsConstants.tabbgColor, child: _tabBar);
|
||||
return Container(color: AppColors.tabbgColor, child: _tabBar);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
import 'package:konectar_events/view/eventslist.dart';
|
||||
import 'package:word_cloud/word_cloud_data.dart';
|
||||
|
@ -105,7 +106,7 @@ class _EventsTabState extends State<EventsTab> {
|
|||
top: false,
|
||||
child: Scaffold(
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
backgroundColor: EventsConstants.blueColor,
|
||||
backgroundColor: AppColors.blueColor,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
currentIndex: _selectedIndex,
|
||||
//backgroundColor: Color.fromARGB(255, 35, 79, 150),
|
||||
|
|
|
@ -5,6 +5,7 @@ import 'package:file_picker/file_picker.dart';
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/custombutton.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
import 'package:konectar_events/widgets/customappbar.dart';
|
||||
import 'package:konectar_events/widgets/customtextfield.dart';
|
||||
|
@ -71,7 +72,7 @@ class _HelpDeskScreenState extends State<HelpDeskScreen> {
|
|||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor: EventsConstants.blueColor,
|
||||
backgroundColor: AppColors.blueColor,
|
||||
centerTitle: true,
|
||||
),
|
||||
body: Container(
|
||||
|
@ -152,7 +153,7 @@ class _HelpDeskScreenState extends State<HelpDeskScreen> {
|
|||
),
|
||||
Center(
|
||||
child: CustomButton(
|
||||
backgroundColor: EventsConstants.blueColor,
|
||||
backgroundColor: AppColors.blueColor,
|
||||
onPressed: () => (),
|
||||
title: "Submit",
|
||||
textColor: Colors.white,
|
||||
|
|
|
@ -10,10 +10,12 @@ import 'package:flutter/services.dart';
|
|||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/custom_switch.dart';
|
||||
import 'package:konectar_events/contacts_module/custom_widget/show_alert.dart';
|
||||
import 'package:konectar_events/model/keywords_model.dart';
|
||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||
import 'package:konectar_events/utils/apicall.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
import 'package:konectar_events/utils/dateformater.dart';
|
||||
import 'package:konectar_events/utils/util.dart';
|
||||
|
@ -338,7 +340,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
endDrawer: populateDrawer(provider),
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor: EventsConstants.blueColor,
|
||||
backgroundColor: AppColors.blueColor,
|
||||
centerTitle: true,
|
||||
title: _isSearch
|
||||
? Padding(
|
||||
|
@ -378,7 +380,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
}
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
fillColor: EventsConstants.blueColor,
|
||||
fillColor: AppColors.blueColor,
|
||||
contentPadding: EdgeInsets.symmetric(vertical: 9.0),
|
||||
border: OutlineInputBorder(),
|
||||
hintText: "Search for events...",
|
||||
|
@ -462,7 +464,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
];
|
||||
},
|
||||
body: Container(
|
||||
//color: EventsConstants.bgcolor,
|
||||
//color: AppColors.bgcolor,
|
||||
color: Colors.white,
|
||||
child: buildPaginationListView(context, provider)),
|
||||
),
|
||||
|
@ -485,7 +487,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
child: Container(
|
||||
height: 24,
|
||||
decoration: BoxDecoration(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
boxShadow: <BoxShadow>[
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.2),
|
||||
|
@ -496,7 +498,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
),
|
||||
),
|
||||
Container(
|
||||
//color: EventsConstants.bgcolor,
|
||||
//color: AppColors.bgcolor,
|
||||
color: Colors.white,
|
||||
child: Padding(
|
||||
padding:
|
||||
|
@ -564,31 +566,23 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, right: 2.0),
|
||||
child: CupertinoSwitch(
|
||||
activeColor: Color.fromARGB(255, 0, 71, 132),
|
||||
value: provider.isFavSeleted,
|
||||
onChanged: (value) {
|
||||
|
||||
child: CustomSwitch(
|
||||
activeclor: AppColors.blueColor,
|
||||
switchvalue: provider.isFavSeleted,
|
||||
onchanged: (value) {
|
||||
provider.isFavSeleted = value;
|
||||
if (provider.isFavSeleted) {
|
||||
pagingController.refresh();
|
||||
|
||||
//_pagingController.
|
||||
// _pagingController
|
||||
// .addPageRequestListener((pageKey) {
|
||||
// await _fetchPage(0);
|
||||
// });
|
||||
} else {
|
||||
provider.isFavSeleted = false;
|
||||
provider.isAllSelected = !provider.isAllSelected;
|
||||
pagingController.refresh();
|
||||
// _pagingController
|
||||
// .addPageRequestListener((pageKey) {
|
||||
// await _fetchPage(0);
|
||||
// });
|
||||
}
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
// ),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0, top: 9.0),
|
||||
|
@ -693,7 +687,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
padding: const EdgeInsets.only(right: 12, top: 8, bottom: 8),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(24.0),
|
||||
),
|
||||
|
@ -932,28 +926,20 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
|
||||
populateDrawer(EventsProvider provider) {
|
||||
return Theme(
|
||||
data: Theme.of(context).copyWith(canvasColor: EventsConstants.bgcolor),
|
||||
data: Theme.of(context).copyWith(canvasColor: AppColors.bgcolor),
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * 0.60,
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
child: Drawer(
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.vertical,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
// DrawerHeader(
|
||||
// child: Center(
|
||||
// child: Text('Filters'),
|
||||
// // child: Image.asset("assets/images/lf_logo.png",
|
||||
// // height: 100, width: 100),
|
||||
// ),
|
||||
// ),
|
||||
Container(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
padding: EdgeInsets.only(top: 20, left: 5.0),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: Row(
|
||||
|
@ -976,29 +962,6 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
style: TextStyle(fontSize: 20),
|
||||
),
|
||||
const Spacer(),
|
||||
// Align(
|
||||
// alignment: Alignment.topRight,
|
||||
// child: Container(
|
||||
// height: 30,
|
||||
// child: OutlinedButton(
|
||||
// onPressed: () {
|
||||
|
||||
// },
|
||||
// child: Text(
|
||||
// 'Apply',
|
||||
// style: TextStyle(
|
||||
// // fontFamily: "SourceSerif",
|
||||
// fontSize: 14,
|
||||
// color: Colors.white,
|
||||
// fontWeight: FontWeight.normal),
|
||||
// ),
|
||||
// style: OutlinedButton.styleFrom(
|
||||
// shape: StadiumBorder(),
|
||||
// backgroundColor: Colors.green,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
SizedBox(
|
||||
width: 8.0,
|
||||
),
|
||||
|
@ -1009,39 +972,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
height: 7,
|
||||
color: Colors.black,
|
||||
),
|
||||
// SizedBox(
|
||||
// width: (MediaQuery.of(context).size.width * 0.99) / 2,
|
||||
// child: ListTile(
|
||||
// title: Text('Search Scope'),
|
||||
// subtitle: customAutoCompletedropdown(),
|
||||
// onTap: () {},
|
||||
// ),
|
||||
// ),
|
||||
// StringAutoCompleteTags(
|
||||
// initialTags: [
|
||||
// TagsData(name: "cancer screening ", id: "1"),
|
||||
// TagsData(name: "cosmetic surgery", id: "2"),
|
||||
// TagsData(name: "sleep medicine", id: "3"),
|
||||
// TagsData(name: "ADHD", id: "4"),
|
||||
// ],
|
||||
// hintText: "Enter scope",
|
||||
// ),
|
||||
// Container(
|
||||
// padding: const EdgeInsets.all(4.0),
|
||||
// height: 40,
|
||||
// width: double.infinity,
|
||||
// decoration: BoxDecoration(
|
||||
// border: Border.all(color: Colors.grey),
|
||||
// borderRadius: BorderRadius.circular(8.0)),
|
||||
// child: dropDown(underline: Container())),
|
||||
Wrap(
|
||||
//spacing: 4,
|
||||
// runSpacing: 4,
|
||||
// crossAxisAlignment: WrapCrossAlignment.start,
|
||||
// runAlignment: WrapAlignment.spaceEvenly,
|
||||
// alignment: WrapAlignment.spaceEvenly,
|
||||
// direction: Axis.horizontal,
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: isTablet
|
||||
|
@ -1156,7 +1087,6 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
),
|
||||
],
|
||||
),
|
||||
|
||||
Divider(
|
||||
height: 1,
|
||||
color: Colors.black,
|
||||
|
@ -1527,9 +1457,9 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
},
|
||||
child: Card(
|
||||
//elevation: 4,
|
||||
color: EventsConstants.homeCardBackgound,
|
||||
color: AppColors.homeCardBackgound,
|
||||
//surfaceTintColor: Colors.white,
|
||||
surfaceTintColor: EventsConstants.homeCardBackgound,
|
||||
surfaceTintColor: AppColors.homeCardBackgound,
|
||||
// shadowColor: Constants.bgcolor,
|
||||
child: buildCardView(context, eventsList, provider),
|
||||
),
|
||||
|
@ -1602,7 +1532,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
},
|
||||
child: Card(
|
||||
elevation: 1,
|
||||
shadowColor: EventsConstants.bgcolor,
|
||||
shadowColor: AppColors.bgcolor,
|
||||
child: buildCardView(
|
||||
context, provider.eventList[index], provider)));
|
||||
},
|
||||
|
@ -1628,7 +1558,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
// color: Color.fromARGB(179, 248, 238, 238),
|
||||
|
||||
// color: Colors.white,
|
||||
color: EventsConstants.homeCardBackgound,
|
||||
color: AppColors.homeCardBackgound,
|
||||
borderRadius: BorderRadius.all(Radius.circular(20))),
|
||||
// height: MediaQuery.of(context).size.height * 0.2,
|
||||
// height: 136,
|
||||
|
@ -1659,11 +1589,11 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
text: TextSpan(children: [
|
||||
// WidgetSpan(
|
||||
// child: Icon(Icons.bookmark,
|
||||
// color: EventsConstants.blueColor,
|
||||
// color: AppColors.blueColor,
|
||||
// size: isTablet ? 14 : 18)
|
||||
// // provider.ifOfflineExists(event.eventId!)
|
||||
// // ? Icon(Icons.bookmark,
|
||||
// // color: EventsConstants.blueColor,
|
||||
// // color: AppColors.blueColor,
|
||||
// // size: isTablet ? 14 : 18)
|
||||
// // : SizedBox.shrink(),
|
||||
// ),
|
||||
|
@ -1765,7 +1695,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
text: TextSpan(children: [
|
||||
WidgetSpan(
|
||||
child: Icon(Icons.bookmark,
|
||||
color: EventsConstants.blueColor,
|
||||
color: AppColors.blueColor,
|
||||
size: isTablet ? 14 : 16),
|
||||
),
|
||||
TextSpan(
|
||||
|
@ -1798,9 +1728,8 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
|||
child: FloatingActionButton.extended(
|
||||
elevation: 1,
|
||||
shape: CircleBorder(),
|
||||
backgroundColor:
|
||||
EventsConstants.bgcolor,
|
||||
//backgroundColor: EventsConstants.homeCardBackgound,
|
||||
backgroundColor: AppColors.bgcolor,
|
||||
//backgroundColor: AppColors.homeCardBackgound,
|
||||
onPressed: () async {
|
||||
// event.isfav = !event.isfav;
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import 'package:konectar_events/model/eventsmodel.dart';
|
|||
import 'package:konectar_events/model/keywords_model.dart';
|
||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||
import 'package:konectar_events/utils/apicall.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
import 'package:konectar_events/utils/util.dart';
|
||||
|
||||
|
@ -227,7 +228,7 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
|||
endDrawer: populateDrawer(provider),
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor: EventsConstants.blueColor,
|
||||
backgroundColor: AppColors.blueColor,
|
||||
centerTitle: false,
|
||||
title: _isSearch
|
||||
? Container(
|
||||
|
@ -246,7 +247,7 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
|||
}
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
fillColor: EventsConstants.blueColor,
|
||||
fillColor: AppColors.blueColor,
|
||||
contentPadding: EdgeInsets.symmetric(vertical: 9.0),
|
||||
border: OutlineInputBorder(),
|
||||
hintText: "Search for events...",
|
||||
|
@ -321,7 +322,7 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
|||
];
|
||||
},
|
||||
body: Container(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
child: buildListView(context, provider)),
|
||||
),
|
||||
),
|
||||
|
@ -342,7 +343,7 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
|||
child: Container(
|
||||
height: 24,
|
||||
decoration: BoxDecoration(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
boxShadow: <BoxShadow>[
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.2),
|
||||
|
@ -353,7 +354,7 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
|||
),
|
||||
),
|
||||
Container(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(left: 16, right: 16, top: 8, bottom: 4),
|
||||
|
@ -534,7 +535,7 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
|||
padding: const EdgeInsets.only(right: 12, top: 8, bottom: 8),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
borderRadius: const BorderRadius.all(
|
||||
Radius.circular(24.0),
|
||||
),
|
||||
|
@ -762,10 +763,10 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
|||
|
||||
populateDrawer(EventsOfflineProvider provider) {
|
||||
return Theme(
|
||||
data: Theme.of(context).copyWith(canvasColor: EventsConstants.bgcolor),
|
||||
data: Theme.of(context).copyWith(canvasColor: AppColors.bgcolor),
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * 0.60,
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
child: Drawer(
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.vertical,
|
||||
|
@ -1429,7 +1430,7 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
|||
},
|
||||
child: Card(
|
||||
elevation: 2,
|
||||
shadowColor: EventsConstants.bgcolor,
|
||||
shadowColor: AppColors.bgcolor,
|
||||
child: buildCardView(
|
||||
context, provider.eventList[index], provider)));
|
||||
},
|
||||
|
@ -1561,7 +1562,7 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
|||
child: FloatingActionButton.extended(
|
||||
elevation: 1,
|
||||
shape: CircleBorder(),
|
||||
backgroundColor: EventsConstants.bgcolor,
|
||||
backgroundColor: AppColors.bgcolor,
|
||||
onPressed: () async {
|
||||
// String msg = await provider
|
||||
// .addEventsToFavs(event.eventId!);
|
||||
|
|
|
@ -8,6 +8,7 @@ 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/appcolors.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
import 'package:konectar_events/viewmodel/eventsprovider.dart';
|
||||
import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
|
||||
|
@ -80,7 +81,7 @@ class _EventsInsightsState extends State<EventsInsights> {
|
|||
widgets.add(ScatterItem(widget.kFlutterHashtags[i], i));
|
||||
}
|
||||
return Scaffold(
|
||||
backgroundColor: EventsConstants.bgcolor,
|
||||
backgroundColor: AppColors.bgcolor,
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||
child: SingleChildScrollView(
|
||||
|
@ -135,7 +136,7 @@ class _EventsInsightsState extends State<EventsInsights> {
|
|||
provider.isLoadingInsights
|
||||
? Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: EventsConstants.blueColor,
|
||||
color: AppColors.blueColor,
|
||||
),
|
||||
)
|
||||
: _buildCharts(provider, widgets),
|
||||
|
|
|
@ -9,6 +9,7 @@ import 'package:konectar_events/firebaseexample.dart';
|
|||
import 'package:konectar_events/model/userdata_model.dart';
|
||||
import 'package:konectar_events/model/verify_user_resp.dart';
|
||||
import 'package:konectar_events/utils/apicall.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
import 'package:konectar_events/utils/sessionmanager.dart';
|
||||
import 'package:konectar_events/utils/util.dart';
|
||||
|
@ -140,48 +141,6 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||
|
||||
List<Widget> _buildBody(Orientation orientation, LoginProvider provider) {
|
||||
return [
|
||||
// Expanded(
|
||||
// flex: 1,
|
||||
// child: Container(
|
||||
// width: orientation == Orientation.portrait
|
||||
// ? double.infinity
|
||||
// : MediaQuery.of(context).size.height * 0.45,
|
||||
// decoration: const BoxDecoration(
|
||||
// gradient: LinearGradient(
|
||||
// begin: Alignment.topRight,
|
||||
// end: Alignment.bottomLeft,
|
||||
// colors: [
|
||||
// Color.fromARGB(255, 8, 39, 92),
|
||||
// Color.fromARGB(255, 11, 60, 144),
|
||||
// Color.fromARGB(255, 26, 64, 129),
|
||||
// ],
|
||||
// )),
|
||||
// child: Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// children: [
|
||||
// // SizedBox(
|
||||
// // width: isTablet ? 160 : 80,
|
||||
// // height: isTablet ? 160 : 80,
|
||||
// // child: CircleAvatar(
|
||||
// // backgroundColor: const Color.fromARGB(255, 126, 134, 147),
|
||||
// // child: Icon(
|
||||
// // Icons.person,
|
||||
// // size: isTablet ? 120 : 60,
|
||||
// // ),
|
||||
// // ),
|
||||
// // ),
|
||||
// // const SizedBox(
|
||||
// // height: 20,
|
||||
// // ),
|
||||
// Text(
|
||||
// 'Welcome, you are almost there!',
|
||||
// style: TextStyle(
|
||||
// fontSize: isTablet ? 22 : 18, color: Colors.white),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
|
@ -323,7 +282,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||
),
|
||||
Center(
|
||||
child: CustomButton(
|
||||
backgroundColor: EventsConstants.onboardButtonColor,
|
||||
backgroundColor: AppColors.onboardButtonColor,
|
||||
onPressed: () async {
|
||||
if (textFieldsValidation(provider).isEmpty) {
|
||||
setState(() {
|
||||
|
@ -331,28 +290,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||
provider.loading = true;
|
||||
});
|
||||
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;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:animations/animations.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
|
||||
class CenterNextButton extends StatelessWidget {
|
||||
|
@ -76,7 +77,7 @@ class CenterNextButton extends StatelessWidget {
|
|||
borderRadius: BorderRadius.circular(
|
||||
8 + 32 * (1 - _signUpMoveAnimation.value)),
|
||||
//color: Color(0xff132137),
|
||||
color: EventsConstants.onboardButtonColor,
|
||||
color: AppColors.onboardButtonColor,
|
||||
),
|
||||
child: PageTransitionSwitcher(
|
||||
duration: Duration(milliseconds: 480),
|
||||
|
|
|
@ -6,6 +6,7 @@ import 'package:konectar_events/contacts_module/ui_screen/new_contacts.dart';
|
|||
import 'package:konectar_events/contacts_module/ui_screen/new_editinteraction.dart';
|
||||
import 'package:konectar_events/contacts_module/ui_screen/new_viewinteraction.dart';
|
||||
import 'package:konectar_events/utils/app_theme.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
import 'package:konectar_events/utils/dateformater.dart';
|
||||
import 'package:konectar_events/view/helpdesk.dart';
|
||||
|
@ -48,10 +49,10 @@ class _NavigationHomeScreenState extends State<NavigationHomeScreen> {
|
|||
onDrawerCall: (DrawerIndex drawerIndexdata) async {
|
||||
bool checkContacts = await HiveOperations.checkIfApiExists(
|
||||
EventsConstants.contactsListapi, EventsConstants.moduleName);
|
||||
if (!checkContacts && drawerIndexdata.name == "Contacts") {
|
||||
} else {
|
||||
changeIndex(drawerIndexdata);
|
||||
}
|
||||
// if (!checkContacts && drawerIndexdata.name == "Contacts") {
|
||||
// } else {
|
||||
changeIndex(drawerIndexdata);
|
||||
// }
|
||||
//callback from drawer for replace screen as user need with passing DrawerIndex(Enum index)
|
||||
},
|
||||
screenView: screenView,
|
||||
|
@ -66,7 +67,7 @@ class _NavigationHomeScreenState extends State<NavigationHomeScreen> {
|
|||
return Consumer<ViewInteractionProvider>(
|
||||
builder: (BuildContext context, provider, Widget? child) {
|
||||
return Container(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
|
|
|
@ -26,6 +26,7 @@ import 'package:konectar_events/model/eventsdetailmodel.dart';
|
|||
import 'package:konectar_events/model/eventspeakers.dart';
|
||||
import 'package:konectar_events/model/sessionnotesmodel.dart';
|
||||
import 'package:konectar_events/model/sessionstopics_model.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
import 'package:konectar_events/utils/dateformater.dart';
|
||||
import 'package:konectar_events/utils/util.dart';
|
||||
|
@ -235,11 +236,11 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
return DefaultTabController(
|
||||
length: provider.tabs.length,
|
||||
child: Scaffold(
|
||||
backgroundColor: EventsConstants.bgcolor,
|
||||
backgroundColor: AppColors.bgcolor,
|
||||
appBar: AppBar(
|
||||
// title: Text(""),
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor: EventsConstants.blueColor,
|
||||
backgroundColor: AppColors.blueColor,
|
||||
centerTitle: false,
|
||||
flexibleSpace: FlexibleSpaceBar(
|
||||
background: Padding(
|
||||
|
@ -291,7 +292,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
SliverAppBar(
|
||||
expandedHeight: 280.0,
|
||||
// expandedHeight: MediaQuery.of(context).size.height * 0.25,
|
||||
backgroundColor: EventsConstants.bgcolor,
|
||||
backgroundColor: AppColors.bgcolor,
|
||||
//backgroundColor: Colors.white,
|
||||
automaticallyImplyLeading: false,
|
||||
floating: false,
|
||||
|
@ -325,7 +326,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
tabAlignment: TabAlignment.fill,
|
||||
labelColor: Colors.black,
|
||||
indicatorColor: EventsConstants.blueColor,
|
||||
indicatorColor: AppColors.blueColor,
|
||||
labelStyle: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
|
@ -400,9 +401,9 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
begin: Alignment.bottomCenter,
|
||||
end: Alignment.topCenter,
|
||||
colors: [
|
||||
EventsConstants.blueColor,
|
||||
EventsConstants.blueColor,
|
||||
EventsConstants.blueColor,
|
||||
AppColors.blueColor,
|
||||
AppColors.blueColor,
|
||||
AppColors.blueColor,
|
||||
// const Color.fromARGB(255, 222, 237, 247),
|
||||
// const Color.fromARGB(255, 222, 237, 247),
|
||||
// Color(0xff006df1)
|
||||
|
@ -681,7 +682,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
// sessionList = eventsdetail.sessionName!.split(',');
|
||||
sessionList = widget.sessionNames;
|
||||
return Container(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
@ -819,7 +820,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
height: 40,
|
||||
child:
|
||||
// CustomButton(
|
||||
// backgroundColor: EventsConstants.btnGreenColor,
|
||||
// backgroundColor: AppColors.btnGreenColor,
|
||||
// onPressed: () async {
|
||||
// isLoading = true;
|
||||
|
||||
|
@ -977,7 +978,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
visible: isLoading,
|
||||
child: Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: EventsConstants.blueColor,
|
||||
color: AppColors.blueColor,
|
||||
)),
|
||||
),
|
||||
],
|
||||
|
@ -991,7 +992,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
// padding: EdgeInsets.all(4.0),
|
||||
// child: Text('Cancel',
|
||||
// style: TextStyle(
|
||||
// fontSize: 14, color: EventsConstants.blueColor)),
|
||||
// fontSize: 14, color: AppColors.blueColor)),
|
||||
// ),
|
||||
child: OutlinedButton(
|
||||
onPressed: () {
|
||||
|
@ -1033,7 +1034,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
// ),
|
||||
// child: const Text('Cancel',
|
||||
// style: TextStyle(
|
||||
// fontSize: 14, color: EventsConstants.blueColor)),
|
||||
// fontSize: 14, color: AppColors.blueColor)),
|
||||
// onPressed: () {
|
||||
// enableCancel = false;
|
||||
// notesController.clear();
|
||||
|
@ -1242,7 +1243,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
padding: EdgeInsets.only(left: 8),
|
||||
decoration: BoxDecoration(
|
||||
// color: Color.fromARGB(179, 248, 238, 238),
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
),
|
||||
child: ListView.separated(
|
||||
padding: EdgeInsets.only(top: 10.0, left: 4.0),
|
||||
|
@ -1339,7 +1340,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
// minWidth: MediaQuery.of(context).size.width * 0.34,
|
||||
maxWidth: MediaQuery.of(context).size.width),
|
||||
decoration: BoxDecoration(
|
||||
color: EventsConstants.bgtopic,
|
||||
color: AppColors.bgtopic,
|
||||
border: Border.all(color: Colors.grey),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(10.0),
|
||||
|
@ -1358,7 +1359,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
|
||||
style: TextStyle(
|
||||
overflow: TextOverflow.clip,
|
||||
color: EventsConstants.fonttopic,
|
||||
color: AppColors.fonttopic,
|
||||
fontSize: isTablet ? 16 : 14),
|
||||
),
|
||||
);
|
||||
|
@ -1371,7 +1372,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
|||
return Consumer<ViewInteractionProvider>(
|
||||
builder: (BuildContext context, provider, Widget? child) {
|
||||
return Container(
|
||||
color: EventsConstants.bgcolor,
|
||||
color: AppColors.bgcolor,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
|
@ -1549,8 +1550,8 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
|
|||
// end: Alignment.topCenter,
|
||||
// colors: [
|
||||
// // Constants.blueColor,
|
||||
// EventsConstants.tabbgColor,
|
||||
// EventsConstants.blueColor,
|
||||
// AppColors.tabbgColor,
|
||||
// AppColors.blueColor,
|
||||
// // Constants.tabbgColor,
|
||||
// // const Color.fromARGB(255, 222, 237, 247),
|
||||
// // const Color.fromARGB(255, 222, 237, 247),
|
||||
|
@ -1651,9 +1652,9 @@ class _TopPortion extends StatelessWidget {
|
|||
begin: Alignment.bottomCenter,
|
||||
end: Alignment.topCenter,
|
||||
colors: [
|
||||
EventsConstants.blueColor,
|
||||
EventsConstants.blueColor,
|
||||
EventsConstants.blueColor,
|
||||
AppColors.blueColor,
|
||||
AppColors.blueColor,
|
||||
AppColors.blueColor,
|
||||
// const Color.fromARGB(255, 222, 237, 247),
|
||||
// const Color.fromARGB(255, 222, 237, 247),
|
||||
// Color(0xff006df1)
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'package:flutter/cupertino.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_scatter/flutter_scatter.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
import 'package:konectar_events/utils/util.dart';
|
||||
import 'package:konectar_events/widgets/customappbar.dart';
|
||||
|
@ -36,7 +37,7 @@ class _SocialMediaState extends State<SocialMedia> {
|
|||
final screenSize = MediaQuery.of(context).size;
|
||||
final ratio = screenSize.width / (screenSize.height / 2);
|
||||
return Scaffold(
|
||||
backgroundColor: EventsConstants.bgcolor,
|
||||
backgroundColor: AppColors.bgcolor,
|
||||
// appBar: CustomAppBar(
|
||||
// title: "Social Media",
|
||||
// fontColor: Colors.black,
|
||||
|
|
|
@ -6,7 +6,8 @@ class HiveOperations {
|
|||
late Box<HiveApiConstants> hiveApiConstantsBox;
|
||||
hiveApiConstantsBox =
|
||||
await Hive.openBox<HiveApiConstants>('hiveApiConstants');
|
||||
|
||||
print("DataAffing");
|
||||
// hiveApiConstantsBox.clear();
|
||||
hiveApiConstantsBox.addAll(hiveList);
|
||||
}
|
||||
|
||||
|
@ -16,6 +17,8 @@ class HiveOperations {
|
|||
await Hive.openBox<HiveApiConstants>('hiveApiConstants');
|
||||
|
||||
List<HiveApiConstants> list = hiveApiConstantsBox.values.toList();
|
||||
|
||||
print("Show/HideApiList: $list");
|
||||
return list.indexWhere(
|
||||
(element) =>
|
||||
element.functionName == api && element.module == moduleName,
|
||||
|
|
|
@ -107,6 +107,12 @@ class LoginProvider extends ChangeNotifier {
|
|||
interval: 0,
|
||||
method: "POST",
|
||||
module: "eventapis"),
|
||||
|
||||
HiveApiConstants(
|
||||
functionName: "ContactList",
|
||||
interval: 0,
|
||||
method: "POST",
|
||||
module: "contactapis"),
|
||||
// HiveApiConstants(functionName: "contactslistapi", interval: 0),
|
||||
];
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
|
||||
class ChartLine extends StatelessWidget {
|
||||
|
@ -47,7 +48,7 @@ class ChartLine extends StatelessWidget {
|
|||
),
|
||||
Container(
|
||||
//constraints: BoxConstraints(maxWidth: lineWidget),
|
||||
color: EventsConstants.blueColor,
|
||||
color: AppColors.blueColor,
|
||||
height: 40,
|
||||
width: lineWidget,
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
|
|
|
@ -5,6 +5,8 @@ import 'package:konectar_events/utils/constants.dart';
|
|||
import 'package:konectar_events/utils/sessionmanager.dart';
|
||||
import 'package:konectar_events/view/login.dart';
|
||||
import 'package:konectar_events/viewmodel/hive_repository.dart';
|
||||
import 'package:konectar_events/viewmodel/loginprovider.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
class HomeDrawer extends StatefulWidget {
|
||||
|
@ -42,76 +44,149 @@ class _HomeDrawerState extends State<HomeDrawer> {
|
|||
}
|
||||
|
||||
void setDrawerListArray() async {
|
||||
print("HiiisetDrawerListArray");
|
||||
bool checkContacts = await HiveOperations.checkIfApiExists(
|
||||
EventsConstants.contactsListapi, EventsConstants.moduleName);
|
||||
if (!checkContacts) {
|
||||
drawerList = <DrawerList>[
|
||||
DrawerList(
|
||||
index: DrawerIndex.HOME,
|
||||
labelName: 'Events',
|
||||
icon: Icon(Icons.event),
|
||||
),
|
||||
print("CheckContacts_123$checkContacts");
|
||||
// if (!checkContacts) {
|
||||
// drawerList = <DrawerList>[
|
||||
// DrawerList(
|
||||
// index: DrawerIndex.HOME,
|
||||
// labelName: 'Events',
|
||||
// icon: Icon(Icons.event),
|
||||
// ),
|
||||
|
||||
DrawerList(
|
||||
index: DrawerIndex.FeedBack,
|
||||
labelName: 'HelpDesk',
|
||||
icon: Icon(Icons.help),
|
||||
),
|
||||
DrawerList(
|
||||
index: DrawerIndex.Invite,
|
||||
labelName: 'Medical Insight',
|
||||
icon: Icon(Icons.group),
|
||||
),
|
||||
// DrawerList(
|
||||
// index: DrawerIndex.Share,
|
||||
// labelName: 'Rate the app',
|
||||
// icon: Icon(Icons.share),
|
||||
// ),
|
||||
// DrawerList(
|
||||
// index: DrawerIndex.About,
|
||||
// labelName: 'About Us',
|
||||
// icon: Icon(Icons.info),
|
||||
// ),
|
||||
];
|
||||
} else {
|
||||
drawerList = <DrawerList>[
|
||||
DrawerList(
|
||||
index: DrawerIndex.Contacts,
|
||||
labelName: 'Contacts',
|
||||
icon: Icon(Icons.account_circle),
|
||||
// isAssetsImage: true,
|
||||
// imageName: 'assets/images/supportIcon.png',
|
||||
),
|
||||
DrawerList(
|
||||
index: DrawerIndex.HOME,
|
||||
labelName: 'Events',
|
||||
icon: Icon(Icons.event),
|
||||
),
|
||||
// DrawerList(
|
||||
// index: DrawerIndex.FeedBack,
|
||||
// labelName: 'HelpDesk',
|
||||
// icon: Icon(Icons.help),
|
||||
// ),
|
||||
// DrawerList(
|
||||
// index: DrawerIndex.Invite,
|
||||
// labelName: 'Medical Insight',
|
||||
// icon: Icon(Icons.group),
|
||||
// ),
|
||||
// // DrawerList(
|
||||
// // index: DrawerIndex.Share,
|
||||
// // labelName: 'Rate the app',
|
||||
// // icon: Icon(Icons.share),
|
||||
// // ),
|
||||
// // DrawerList(
|
||||
// // index: DrawerIndex.About,
|
||||
// // labelName: 'About Us',
|
||||
// // icon: Icon(Icons.info),
|
||||
// // ),
|
||||
// ];
|
||||
// } else {
|
||||
drawerList = <DrawerList>[
|
||||
DrawerList(
|
||||
index: DrawerIndex.Contacts,
|
||||
labelName: 'Contacts',
|
||||
icon: Icon(Icons.account_circle),
|
||||
// isAssetsImage: true,
|
||||
// imageName: 'assets/images/supportIcon.png',
|
||||
),
|
||||
DrawerList(
|
||||
index: DrawerIndex.HOME,
|
||||
labelName: 'Events',
|
||||
icon: Icon(Icons.event),
|
||||
),
|
||||
|
||||
DrawerList(
|
||||
index: DrawerIndex.FeedBack,
|
||||
labelName: 'HelpDesk',
|
||||
icon: Icon(Icons.help),
|
||||
),
|
||||
DrawerList(
|
||||
index: DrawerIndex.Invite,
|
||||
labelName: 'Medical Insight',
|
||||
icon: Icon(Icons.group),
|
||||
),
|
||||
// DrawerList(
|
||||
// index: DrawerIndex.Share,
|
||||
// labelName: 'Rate the app',
|
||||
// icon: Icon(Icons.share),
|
||||
// ),
|
||||
// DrawerList(
|
||||
// index: DrawerIndex.About,
|
||||
// labelName: 'About Us',
|
||||
// icon: Icon(Icons.info),
|
||||
// ),
|
||||
];
|
||||
}
|
||||
DrawerList(
|
||||
index: DrawerIndex.FeedBack,
|
||||
labelName: 'HelpDesk',
|
||||
icon: Icon(Icons.help),
|
||||
),
|
||||
DrawerList(
|
||||
index: DrawerIndex.Invite,
|
||||
labelName: 'Medical Insight',
|
||||
icon: Icon(Icons.group),
|
||||
),
|
||||
// DrawerList(
|
||||
// index: DrawerIndex.Share,
|
||||
// labelName: 'Rate the app',
|
||||
// icon: Icon(Icons.share),
|
||||
// ),
|
||||
// DrawerList(
|
||||
// index: DrawerIndex.About,
|
||||
// labelName: 'About Us',
|
||||
// icon: Icon(Icons.info),
|
||||
// ),
|
||||
];
|
||||
// }
|
||||
}
|
||||
|
||||
// void setDrawerListArray() async {
|
||||
// bool checkContacts = await HiveOperations.checkIfApiExists(
|
||||
// EventsConstants.contactsListapi, EventsConstants.moduleName);
|
||||
// // if (!checkContacts) {
|
||||
// // drawerList = <DrawerList>[
|
||||
// // DrawerList(
|
||||
// // index: DrawerIndex.HOME,
|
||||
// // labelName: 'Events',
|
||||
// // icon: Icon(Icons.event),
|
||||
// // ),
|
||||
|
||||
// // DrawerList(
|
||||
// // index: DrawerIndex.FeedBack,
|
||||
// // labelName: 'HelpDesk',
|
||||
// // icon: Icon(Icons.help),
|
||||
// // ),
|
||||
// // DrawerList(
|
||||
// // index: DrawerIndex.Invite,
|
||||
// // labelName: 'Medical Insight',
|
||||
// // icon: Icon(Icons.group),
|
||||
// // ),
|
||||
// // // DrawerList(
|
||||
// // // index: DrawerIndex.Share,
|
||||
// // // labelName: 'Rate the app',
|
||||
// // // icon: Icon(Icons.share),
|
||||
// // // ),
|
||||
// // // DrawerList(
|
||||
// // // index: DrawerIndex.About,
|
||||
// // // labelName: 'About Us',
|
||||
// // // icon: Icon(Icons.info),
|
||||
// // // ),
|
||||
// // ];
|
||||
// // } else {
|
||||
// drawerList = <DrawerList>[
|
||||
// DrawerList(
|
||||
// index: DrawerIndex.Contacts,
|
||||
// labelName: 'Contacts',
|
||||
// icon: Icon(Icons.account_circle),
|
||||
// // isAssetsImage: true,
|
||||
// // imageName: 'assets/images/supportIcon.png',
|
||||
// ),
|
||||
// DrawerList(
|
||||
// index: DrawerIndex.HOME,
|
||||
// labelName: 'Events',
|
||||
// icon: Icon(Icons.event),
|
||||
// ),
|
||||
|
||||
// DrawerList(
|
||||
// index: DrawerIndex.FeedBack,
|
||||
// labelName: 'HelpDesk',
|
||||
// icon: Icon(Icons.help),
|
||||
// ),
|
||||
// DrawerList(
|
||||
// index: DrawerIndex.Invite,
|
||||
// labelName: 'Medical Insight',
|
||||
// icon: Icon(Icons.group),
|
||||
// ),
|
||||
// // DrawerList(
|
||||
// // index: DrawerIndex.Share,
|
||||
// // labelName: 'Rate the app',
|
||||
// // icon: Icon(Icons.share),
|
||||
// // ),
|
||||
// // DrawerList(
|
||||
// // index: DrawerIndex.About,
|
||||
// // labelName: 'About Us',
|
||||
// // icon: Icon(Icons.info),
|
||||
// // ),
|
||||
// ];
|
||||
// // }
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var brightness = MediaQuery.of(context).platformBrightness;
|
||||
|
@ -243,6 +318,8 @@ class _HomeDrawerState extends State<HomeDrawer> {
|
|||
color: Colors.red,
|
||||
),
|
||||
onTap: () {
|
||||
// Provider.of<LoginProvider>(context, listen: false)
|
||||
// .saveApiData();
|
||||
onTapped();
|
||||
},
|
||||
),
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:konectar_events/utils/appcolors.dart';
|
||||
import 'package:konectar_events/utils/constants.dart';
|
||||
|
||||
class SnackBarWidget {
|
||||
|
@ -9,9 +10,8 @@ class SnackBarWidget {
|
|||
msg,
|
||||
style: TextStyle(color: Colors.black),
|
||||
),
|
||||
backgroundColor: error
|
||||
? Color.fromARGB(255, 235, 110, 76)
|
||||
: EventsConstants.oldbgcolor,
|
||||
backgroundColor:
|
||||
error ? Color.fromARGB(255, 235, 110, 76) : AppColors.oldbgcolor,
|
||||
duration: error ? Durations.long3 : Durations.long1,
|
||||
);
|
||||
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
||||
|
|
62
pubspec.lock
62
pubspec.lock
|
@ -253,10 +253,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
|
||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.19.0"
|
||||
version: "1.18.0"
|
||||
connectivity_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -534,6 +534,38 @@ packages:
|
|||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_background_service:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_background_service
|
||||
sha256: d32f078ec57647c9cfd6e1a8da9297f7d8f021d4dcc204a35aaad2cdbfe255f0
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.10"
|
||||
flutter_background_service_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_background_service_android
|
||||
sha256: "39da42dddf877beeef82bc2583130d8bedb4d0765e99ca9e7b4a32e8c6abd239"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.2.7"
|
||||
flutter_background_service_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_background_service_ios
|
||||
sha256: "6037ffd45c4d019dab0975c7feb1d31012dd697e25edc05505a4a9b0c7dc9fba"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.3"
|
||||
flutter_background_service_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_background_service_platform_interface
|
||||
sha256: ca74aa95789a8304f4d3f57f07ba404faa86bed6e415f83e8edea6ad8b904a41
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.1.2"
|
||||
flutter_cache_manager:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -860,18 +892,18 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker
|
||||
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
|
||||
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.0.7"
|
||||
version: "10.0.5"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
|
||||
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.8"
|
||||
version: "3.0.5"
|
||||
leak_tracker_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1308,7 +1340,7 @@ packages:
|
|||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
version: "0.0.99"
|
||||
sliver_tools:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1369,10 +1401,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
|
||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.12.0"
|
||||
version: "1.11.1"
|
||||
state_notifier:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1401,10 +1433,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
|
||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
version: "1.2.0"
|
||||
syncfusion_flutter_charts:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -1457,10 +1489,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
|
||||
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.3"
|
||||
version: "0.7.2"
|
||||
textfield_tags:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
@ -1609,10 +1641,10 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
|
||||
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "14.3.0"
|
||||
version: "14.2.5"
|
||||
watcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -96,6 +96,8 @@ dependencies:
|
|||
flutter_svg_provider: ^1.0.7
|
||||
zoom_widget: ^2.0.1
|
||||
http: ^1.2.2
|
||||
flutter_background_service: ^5.0.10
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
|
||||
|
|
Loading…
Reference in New Issue