constants,contact module updated
This commit is contained in:
parent
5c908de83d
commit
b636247585
|
@ -1,4 +1,11 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<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">
|
<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">
|
<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
|
<!-- 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';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
class Constants {
|
class Constants {
|
||||||
static Color k2color = 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 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 cardtext = Colors.transparent;
|
||||||
static Color cardtextdark = Colors.transparent;
|
|
||||||
|
|
||||||
static const Color bgcolor = Color(0xFFF2F3F8);
|
// static Color cardtextdark = Colors.transparent;
|
||||||
static Color bgcolor2 = const Color.fromARGB(255, 0, 112, 184);
|
|
||||||
|
|
||||||
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 =
|
static final Future<String> response =
|
||||||
rootBundle.loadString('assets/section.json');
|
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";
|
// 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 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 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/constants.dart';
|
||||||
import 'package:konectar_events/contacts_module/custom_widget/text.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';
|
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_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_pno_k2.dart';
|
||||||
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_training_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 {
|
class CustomExpansionTile<T> extends StatefulWidget {
|
||||||
final String title;
|
final String title;
|
||||||
final List<T> itemList;
|
final List<T>? itemList;
|
||||||
final String buttonText;
|
final String buttonText;
|
||||||
final String field1;
|
final String field1;
|
||||||
final String field2;
|
final String field2;
|
||||||
|
bool? noexpand;
|
||||||
|
final VoidCallback? onButtonPressed; // Add this parameter for button callback
|
||||||
|
|
||||||
final Function(T) onItemSelected;
|
final Function(T) onItemSelected;
|
||||||
|
|
||||||
const CustomExpansionTile({
|
CustomExpansionTile({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.title,
|
required this.title,
|
||||||
required this.itemList,
|
this.itemList,
|
||||||
required this.buttonText,
|
required this.buttonText,
|
||||||
required this.onItemSelected,
|
required this.onItemSelected,
|
||||||
required this.field1,
|
required this.field1,
|
||||||
required this.field2,
|
required this.field2,
|
||||||
|
this.noexpand,
|
||||||
|
this.onButtonPressed, // Initialize it
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -37,6 +43,8 @@ class CustomExpansionTile<T> extends StatefulWidget {
|
||||||
class _CustomExpansionTileState<T> extends State<CustomExpansionTile<T>> {
|
class _CustomExpansionTileState<T> extends State<CustomExpansionTile<T>> {
|
||||||
bool _isExpanded = false;
|
bool _isExpanded = false;
|
||||||
|
|
||||||
|
//var noexpand;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
print("Chekingg_Field_one: ${widget.field1}");
|
print("Chekingg_Field_one: ${widget.field1}");
|
||||||
|
@ -51,9 +59,9 @@ class _CustomExpansionTileState<T> extends State<CustomExpansionTile<T>> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
onExpansionChanged: (bool expanded) {
|
onExpansionChanged: (bool expanded) {
|
||||||
|
@ -78,7 +86,7 @@ class _CustomExpansionTileState<T> extends State<CustomExpansionTile<T>> {
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8.0),
|
const SizedBox(width: 8.0),
|
||||||
Text1(
|
Text1(
|
||||||
title: "(${widget.itemList.length})",
|
title: "(${widget.itemList!.length})",
|
||||||
txtcolor: Colors.black,
|
txtcolor: Colors.black,
|
||||||
fontweight: FontWeight.normal,
|
fontweight: FontWeight.normal,
|
||||||
txtfont: 16.0,
|
txtfont: 16.0,
|
||||||
|
@ -86,7 +94,9 @@ class _CustomExpansionTileState<T> extends State<CustomExpansionTile<T>> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
children: [
|
children: [
|
||||||
Scrollbar(
|
Visibility(
|
||||||
|
visible: widget.noexpand!,
|
||||||
|
child: Scrollbar(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
@ -115,13 +125,13 @@ class _CustomExpansionTileState<T> extends State<CustomExpansionTile<T>> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
rows: List.generate(widget.itemList.take(2).length,
|
rows: List.generate(widget.itemList!.take(2).length,
|
||||||
(index) {
|
(index) {
|
||||||
final item = widget.itemList[index];
|
final item = widget.itemList![index];
|
||||||
|
|
||||||
return DataRow(
|
return DataRow(
|
||||||
onSelectChanged: (value) {
|
onSelectChanged: (value) {
|
||||||
widget.onItemSelected(widget.itemList[index]);
|
widget.onItemSelected(widget.itemList![index]);
|
||||||
},
|
},
|
||||||
cells: [
|
cells: [
|
||||||
DataCell(getdatacel1(item)),
|
DataCell(getdatacel1(item)),
|
||||||
|
@ -135,19 +145,20 @@ class _CustomExpansionTileState<T> extends State<CustomExpansionTile<T>> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: widget.noexpand!,
|
||||||
|
child: Container(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: OutlinedButton(
|
child: OutlinedButton(
|
||||||
onPressed: () {
|
onPressed: widget.onButtonPressed,
|
||||||
// Handle the button action here
|
|
||||||
},
|
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.buttonText,
|
widget.buttonText,
|
||||||
style: TextStyle(color: Constants.k2color),
|
style: TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -158,6 +169,7 @@ class _CustomExpansionTileState<T> extends State<CustomExpansionTile<T>> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -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/model_class/k2_api_model/kol_aff_k2.dart';
|
||||||
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
|
|
||||||
class AffiliationsProviderk2 extends ChangeNotifier {
|
class AffiliationsProviderk2 extends ChangeNotifier {
|
||||||
final affapi = CallK2api();
|
final affapi = CallK2api();
|
||||||
|
@ -26,6 +26,8 @@ class AffiliationsProviderk2 extends ChangeNotifier {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get hasData => affiliations1.isNotEmpty;
|
||||||
|
|
||||||
getAllAffiliationsdata() async {
|
getAllAffiliationsdata() async {
|
||||||
print("Affiliations_is: ");
|
print("Affiliations_is: ");
|
||||||
final affdata = await affapi.getallaffiliationsdata();
|
final affdata = await affapi.getallaffiliationsdata();
|
||||||
|
|
|
@ -14,4 +14,6 @@ class AwardProviderK2 extends ChangeNotifier {
|
||||||
awalist = email_result!;
|
awalist = email_result!;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get hasData => awalist.isNotEmpty;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,4 +14,6 @@ class CertificateProviderK2 extends ChangeNotifier {
|
||||||
cerlist = email_result!;
|
cerlist = email_result!;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get hasData => cerlist.isNotEmpty;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,4 +14,6 @@ class EducationProviderK2 extends ChangeNotifier {
|
||||||
edulist = email_result!;
|
edulist = email_result!;
|
||||||
notifyListeners();
|
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/model_class/k2_api_model/kol_email_k2.dart';
|
||||||
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_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 {
|
class EmailProviderK2 extends ChangeNotifier {
|
||||||
final apicall = CallK2api();
|
final apicall = CallK2api();
|
||||||
|
@ -14,4 +15,11 @@ class EmailProviderK2 extends ChangeNotifier {
|
||||||
emaillist = email_result!;
|
emaillist = email_result!;
|
||||||
notifyListeners();
|
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/model_class/k2_api_model/kol_event_k2.dart';
|
||||||
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_k2.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
|
|
||||||
class EventProviderK2 extends ChangeNotifier {
|
class EventProviderK2 extends ChangeNotifier {
|
||||||
final apicall = CallK2api();
|
final apicall = CallK2api();
|
||||||
|
|
||||||
List<EventList> eventlist = [];
|
List<EventList> eventlist = [];
|
||||||
|
List<EventList> eventlistpagination = [];
|
||||||
|
|
||||||
|
bool _isLoading = false;
|
||||||
|
bool _hasMore = true;
|
||||||
|
|
||||||
|
int _page = 1;
|
||||||
|
final int _limit = 10;
|
||||||
|
|
||||||
List get EventsList => eventlist;
|
List get EventsList => eventlist;
|
||||||
|
|
||||||
|
@ -13,17 +20,91 @@ class EventProviderK2 extends ChangeNotifier {
|
||||||
|
|
||||||
List get allEventsList => alleventlist;
|
List get allEventsList => alleventlist;
|
||||||
|
|
||||||
|
List get eventsListpagination => eventlistpagination;
|
||||||
|
|
||||||
|
bool get isLoading => _isLoading;
|
||||||
|
bool get hasMore => _hasMore;
|
||||||
|
|
||||||
geteventdata(text) async {
|
geteventdata(text) async {
|
||||||
|
if (_isLoading || !_hasMore) return;
|
||||||
|
|
||||||
|
try {
|
||||||
final events = await apicall.geteventsdata(text);
|
final events = await apicall.geteventsdata(text);
|
||||||
|
|
||||||
eventlist = events!;
|
eventlist = events!;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get hasData => eventlist.isNotEmpty;
|
||||||
|
|
||||||
allgeteventdata() async {
|
allgeteventdata() async {
|
||||||
final events = await apicall.allgeteventsdata();
|
final events = await apicall.allgeteventsdata();
|
||||||
|
|
||||||
alleventlist = events;
|
alleventlist = events;
|
||||||
notifyListeners();
|
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: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 {
|
class LocationKolProvider extends ChangeNotifier {
|
||||||
final apicall = CallK2api();
|
final apicall = CallK2api();
|
||||||
|
@ -12,5 +13,40 @@ class LocationKolProvider extends ChangeNotifier {
|
||||||
final publication_result = await apicall.getlocationsdata(text);
|
final publication_result = await apicall.getlocationsdata(text);
|
||||||
loclist = publication_result;
|
loclist = publication_result;
|
||||||
notifyListeners();
|
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/model_class/k2_api_model/kol_pno_k2.dart';
|
||||||
import 'package:konectar_events/contacts_module/service.dart/k2_service/Apicall_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 {
|
class PhonenoProviderK2 extends ChangeNotifier {
|
||||||
final apicall = CallK2api();
|
final apicall = CallK2api();
|
||||||
|
@ -14,4 +15,13 @@ class PhonenoProviderK2 extends ChangeNotifier {
|
||||||
phonelist = phone_result;
|
phonelist = phone_result;
|
||||||
notifyListeners();
|
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!;
|
tralist = email_result!;
|
||||||
notifyListeners();
|
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 'dart:convert';
|
||||||
|
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:konectar_events/contacts_module/constants.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/affiliations.dart';
|
||||||
import 'package:konectar_events/contacts_module/model_class/awards_model.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();
|
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:discover_module/storage_hive/email_data/email_model_hive.dart';
|
||||||
// import 'package:konectar_events/storage_hive/loc_data/location_model_hive.dart';
|
// import 'package:discover_module/storage_hive/loc_data/location_model_hive.dart';
|
||||||
// import 'package:konectar_events/storage_hive/pno_data/pno_model_hive.dart';
|
// import 'package:discover_module/storage_hive/pno_data/pno_model_hive.dart';
|
||||||
import 'package:konectar_events/contacts_module/storage_hive/email_data/email_model_hive.dart';
|
|
||||||
import 'package:hive_flutter/hive_flutter.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 {
|
addEmail(List emaillist) async {
|
||||||
// static final apihcpdata = Hive.box("hcpdata");
|
// static final apihcpdata = Hive.box("hcpdata");
|
||||||
|
@ -27,25 +27,45 @@ addEmail(List emaillist) async {
|
||||||
|
|
||||||
for (var email in emails) {
|
for (var email in emails) {
|
||||||
print("Storing_Affff: ${email.emailType}");
|
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 {
|
// await box.put(await getNextAutoIncrementValue(), doctor);
|
||||||
// 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
|
|
||||||
// }
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
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 {
|
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');
|
var box = await Hive.openBox<Email>('emailhive');
|
||||||
print('Retrive Doctor}');
|
print('Retrive Doctor}');
|
||||||
|
|
||||||
|
@ -58,3 +78,24 @@ retrieveidemails(int id) async {
|
||||||
}
|
}
|
||||||
return dataemail;
|
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:discover_module/storage_hive/loc_data/location_model_hive.dart';
|
||||||
import 'package:konectar_events/contacts_module/storage_hive/loc_data/location_model_hive.dart';
|
|
||||||
import 'package:hive_flutter/hive_flutter.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 {
|
addLoc(List loclist) async {
|
||||||
|
print("Trying to store the data : ${loclist}");
|
||||||
// static final apihcpdata = Hive.box("hcpdata");
|
// static final apihcpdata = Hive.box("hcpdata");
|
||||||
|
|
||||||
var box = await Hive.openBox<Location>('lochive');
|
var box = await Hive.openBox<Location>('lochive');
|
||||||
|
@ -14,8 +15,8 @@ addLoc(List loclist) async {
|
||||||
// Convert JSON list to List<Affiliation>
|
// Convert JSON list to List<Affiliation>
|
||||||
List<Location> locations = loclist.map((json) {
|
List<Location> locations = loclist.map((json) {
|
||||||
return Location(
|
return Location(
|
||||||
id: json.id,
|
id: json.id.toString(),
|
||||||
userId: json.userId,
|
userId: json.userId.toString(),
|
||||||
institution: json.institution ?? '',
|
institution: json.institution ?? '',
|
||||||
address: json.address ?? '',
|
address: json.address ?? '',
|
||||||
city: json.city ?? '',
|
city: json.city ?? '',
|
||||||
|
@ -27,11 +28,30 @@ addLoc(List loclist) async {
|
||||||
print("Publicattionnsss_isss: ${locations}");
|
print("Publicattionnsss_isss: ${locations}");
|
||||||
|
|
||||||
for (var loc in 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(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 {
|
// Future<void> retrievePublications() async {
|
||||||
// var box = await Hive.openBox<Location>('pubhive');
|
// var box = await Hive.openBox<Location>('pubhive');
|
||||||
// print('Retrive Doctor}');
|
// print('Retrive Doctor}');
|
||||||
|
@ -48,14 +68,56 @@ addLoc(List loclist) async {
|
||||||
|
|
||||||
retrieveidlocations(int id) async {
|
retrieveidlocations(int id) async {
|
||||||
var box = await Hive.openBox<Location>('lochive');
|
var box = await Hive.openBox<Location>('lochive');
|
||||||
print('Retrive Doctor}');
|
print('Retrive Doctor_Locationss : ${box.get}}');
|
||||||
|
|
||||||
var locations = box.get(id);
|
//var locations = box.get(id);
|
||||||
print('Retrive Doctor locations ${locations}}');
|
print('Retrive Doctor locations ${box.values.toList()}');
|
||||||
|
//print('Retrive Doctor locations1233 ${locations}}');
|
||||||
|
print('Retrive Doctor locationsid ${id}}');
|
||||||
|
|
||||||
List<Location> dataloc = [];
|
// List<Location> dataloc = [];
|
||||||
if (locations != null) {
|
// if (locations != null) {
|
||||||
dataloc.add(locations); // Add to the list if not null
|
// dataloc.add(locations); // Add to the list if not null
|
||||||
}
|
// }
|
||||||
return dataloc;
|
// 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)
|
@HiveType(typeId: 36)
|
||||||
class Location extends HiveObject {
|
class Location extends HiveObject {
|
||||||
@HiveField(0)
|
@HiveField(0)
|
||||||
final int id;
|
final String? id;
|
||||||
|
|
||||||
@HiveField(1)
|
@HiveField(1)
|
||||||
final int userId;
|
final String? userId;
|
||||||
|
|
||||||
@HiveField(2)
|
@HiveField(2)
|
||||||
final String? institution;
|
final String? institution;
|
||||||
|
|
|
@ -17,8 +17,8 @@ class LocationAdapter extends TypeAdapter<Location> {
|
||||||
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||||
};
|
};
|
||||||
return Location(
|
return Location(
|
||||||
id: fields[0] as int,
|
id: fields[0] as String?,
|
||||||
userId: fields[1] as int,
|
userId: fields[1] as String?,
|
||||||
institution: fields[2] as String?,
|
institution: fields[2] as String?,
|
||||||
address: fields[3] as String?,
|
address: fields[3] as String?,
|
||||||
city: fields[4] 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/note_data/note_model_hive.dart';
|
||||||
// import 'package:discover_module/storage_hive/patent_data/patent_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: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 {
|
addNote(String text) async {
|
||||||
// var box = await Hive.openBox<String>('notehive');
|
|
||||||
|
|
||||||
print("Text_issss: $text");
|
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');
|
//var box = await Hive.openBox<String>('notehive');
|
||||||
print("SavedNotesssL : ${box.values.toList()}");
|
print("SavedNotesssL : ${box.values.toList()}");
|
||||||
|
//box.clear();
|
||||||
return box.values.toList();
|
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)
|
@HiveType(typeId: 47)
|
||||||
class Note extends HiveObject {
|
class Note extends HiveObject {
|
||||||
@HiveField(0)
|
@HiveField(0)
|
||||||
final int id;
|
final int? id;
|
||||||
|
|
||||||
@HiveField(1)
|
@HiveField(1)
|
||||||
final String? note;
|
final String? note;
|
||||||
|
|
||||||
Note({
|
Note({
|
||||||
required this.id,
|
this.id,
|
||||||
this.note,
|
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(),
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||||
};
|
};
|
||||||
return Note(
|
return Note(
|
||||||
id: fields[0] as int,
|
id: fields[0] as int?,
|
||||||
note: fields[1] as String?,
|
note: fields[1] as String?,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// import 'package:konectar_events/storage_hive/loc_data/location_model_hive.dart';
|
// import 'package:discover_module/storage_hive/loc_data/location_model_hive.dart';
|
||||||
// import 'package:konectar_events/storage_hive/pno_data/pno_model_hive.dart';
|
// import 'package:discover_module/storage_hive/pno_data/pno_model_hive.dart';
|
||||||
import 'package:konectar_events/contacts_module/storage_hive/pno_data/pno_model_hive.dart';
|
|
||||||
import 'package:hive_flutter/hive_flutter.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 {
|
addPno(List pnolist) async {
|
||||||
// static final apihcpdata = Hive.box("hcpdata");
|
// static final apihcpdata = Hive.box("hcpdata");
|
||||||
|
@ -27,10 +27,28 @@ addPno(List pnolist) async {
|
||||||
|
|
||||||
for (var pno in pnonos) {
|
for (var pno in pnonos) {
|
||||||
print("Storing_Affff: ${pno.phoneNumber}");
|
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 {
|
// Future<void> retrievePublications() async {
|
||||||
// var box = await Hive.openBox<Location>('pubhive');
|
// var box = await Hive.openBox<Location>('pubhive');
|
||||||
// print('Retrive Doctor}');
|
// print('Retrive Doctor}');
|
||||||
|
@ -49,12 +67,43 @@ retrieveidpnos(int id) async {
|
||||||
var box = await Hive.openBox<PhoneNo>('pnohive');
|
var box = await Hive.openBox<PhoneNo>('pnohive');
|
||||||
print('Retrive Doctor}');
|
print('Retrive Doctor}');
|
||||||
|
|
||||||
var pnos = box.get(id);
|
// var pnos = box.get(id);
|
||||||
print('Retrive Doctor locations ${pnos}}');
|
// print('Retrive Doctor locations ${pnos}}');
|
||||||
|
|
||||||
List<PhoneNo> datapno = [];
|
// List<PhoneNo> datapno = [];
|
||||||
if (pnos != null) {
|
// if (pnos != null) {
|
||||||
datapno.add(pnos); // Add to the list if not null
|
// datapno.add(pnos); // Add to the list if not null
|
||||||
}
|
// }
|
||||||
return datapno;
|
// 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)
|
@HiveType(typeId: 37)
|
||||||
class PhoneNo extends HiveObject {
|
class PhoneNo extends HiveObject {
|
||||||
@HiveField(0)
|
@HiveField(0)
|
||||||
final int id;
|
final String? id;
|
||||||
|
|
||||||
@HiveField(1)
|
@HiveField(1)
|
||||||
final int userId;
|
final String? userId;
|
||||||
|
|
||||||
@HiveField(2)
|
@HiveField(2)
|
||||||
final String? phoneType;
|
final String? phoneType;
|
||||||
|
|
|
@ -17,8 +17,8 @@ class PhoneNoAdapter extends TypeAdapter<PhoneNo> {
|
||||||
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||||
};
|
};
|
||||||
return PhoneNo(
|
return PhoneNo(
|
||||||
id: fields[0] as int,
|
id: fields[0] as String?,
|
||||||
userId: fields[1] as int,
|
userId: fields[1] as String?,
|
||||||
phoneType: fields[2] as String?,
|
phoneType: fields[2] as String?,
|
||||||
locations: fields[3] as String?,
|
locations: fields[3] as String?,
|
||||||
phoneNumber: fields[4] 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:konectar_events/contacts_module/ui_screen/trials_show_more.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class Activities extends StatefulWidget {
|
class Activities extends StatefulWidget {
|
||||||
|
@ -125,7 +126,7 @@ class _ActivitiesState extends State<Activities> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
|
@ -136,7 +137,7 @@ class _ActivitiesState extends State<Activities> {
|
||||||
_isExpanded = expanded;
|
_isExpanded = expanded;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
trailing: Icon(
|
trailing: Icon(
|
||||||
_isExpanded
|
_isExpanded
|
||||||
? Icons.keyboard_arrow_up
|
? Icons.keyboard_arrow_up
|
||||||
|
@ -250,7 +251,8 @@ class _ActivitiesState extends State<Activities> {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'Show More',
|
||||||
style: TextStyle(color: Constants.k2color),
|
style:
|
||||||
|
TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -278,7 +280,7 @@ class _ActivitiesState extends State<Activities> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
|
@ -289,7 +291,7 @@ class _ActivitiesState extends State<Activities> {
|
||||||
_isExpanded = expanded;
|
_isExpanded = expanded;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
trailing: Icon(
|
trailing: Icon(
|
||||||
_isExpanded
|
_isExpanded
|
||||||
? Icons.keyboard_arrow_up
|
? Icons.keyboard_arrow_up
|
||||||
|
@ -412,7 +414,8 @@ class _ActivitiesState extends State<Activities> {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'Show More',
|
||||||
style: TextStyle(color: Constants.k2color),
|
style:
|
||||||
|
TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -440,7 +443,7 @@ class _ActivitiesState extends State<Activities> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
|
@ -449,7 +452,7 @@ class _ActivitiesState extends State<Activities> {
|
||||||
_isExpanded = expanded;
|
_isExpanded = expanded;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
trailing: Icon(
|
trailing: Icon(
|
||||||
_isExpanded
|
_isExpanded
|
||||||
? Icons.keyboard_arrow_up
|
? Icons.keyboard_arrow_up
|
||||||
|
@ -568,7 +571,8 @@ class _ActivitiesState extends State<Activities> {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'Show More',
|
||||||
style: TextStyle(color: Constants.k2color),
|
style:
|
||||||
|
TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -596,7 +600,7 @@ class _ActivitiesState extends State<Activities> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
|
@ -605,7 +609,7 @@ class _ActivitiesState extends State<Activities> {
|
||||||
_isExpanded = expanded;
|
_isExpanded = expanded;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
trailing: Icon(
|
trailing: Icon(
|
||||||
_isExpanded
|
_isExpanded
|
||||||
? Icons.keyboard_arrow_up
|
? Icons.keyboard_arrow_up
|
||||||
|
@ -727,7 +731,8 @@ class _ActivitiesState extends State<Activities> {
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'Show More',
|
||||||
style: TextStyle(color: Constants.k2color),
|
style:
|
||||||
|
TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,23 +1,37 @@
|
||||||
// import 'package:konectar_events/constants.dart';
|
// import 'package:discover_module/constants.dart';
|
||||||
// import 'package:konectar_events/custom_widget/text.dart';
|
// import 'package:discover_module/custom_widget/text.dart';
|
||||||
// import 'package:konectar_events/hive_fun.dart';
|
// import 'package:discover_module/hive_fun.dart';
|
||||||
// import 'package:konectar_events/provider_class/hcp%20_provider.dart';
|
// import 'package:discover_module/provider_class/hcp%20_provider.dart';
|
||||||
// import 'package:konectar_events/ui_screen/new_contacts.dart';
|
// import 'package:discover_module/ui_screen/new_contacts.dart';
|
||||||
// import 'package:konectar_events/ui_screen/saved_profiles/saved_contact.dart';
|
// import 'package:discover_module/ui_screen/saved_profiles/saved_contact.dart';
|
||||||
|
|
||||||
|
// import 'package:discover_module/contacts_module/constants.dart';
|
||||||
|
// import 'package:discover_module/contacts_module/custom_widget/text.dart';
|
||||||
|
// import 'package:discover_module/contacts_module/hive_fun.dart';
|
||||||
|
// import 'package:discover_module/contacts_module/provider_class/hcp%20_provider.dart';
|
||||||
|
// import 'package:discover_module/contacts_module/storage_hive/savefilter/save_filter.dart';
|
||||||
|
// import 'package:discover_module/contacts_module/ui_screen/new_contacts.dart';
|
||||||
|
// import 'package:discover_module/contacts_module/ui_screen/saved_profiles/saved_contact.dart';
|
||||||
|
import 'package:dropdown_button2/dropdown_button2.dart';
|
||||||
|
import 'package:dropdownfield2/dropdownfield2.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:konectar_events/contacts_module/constants.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/custom_widget/text.dart';
|
||||||
import 'package:konectar_events/contacts_module/hive_fun.dart';
|
import 'package:konectar_events/contacts_module/hive_fun.dart';
|
||||||
import 'package:konectar_events/contacts_module/provider_class/hcp%20_provider.dart';
|
import 'package:konectar_events/contacts_module/provider_class/hcp%20_provider.dart';
|
||||||
|
import 'package:konectar_events/contacts_module/storage_hive/savefilter/save_filter.dart';
|
||||||
import 'package:konectar_events/contacts_module/ui_screen/new_contacts.dart';
|
import 'package:konectar_events/contacts_module/ui_screen/new_contacts.dart';
|
||||||
import 'package:konectar_events/contacts_module/ui_screen/saved_profiles/saved_contact.dart';
|
import 'package:konectar_events/contacts_module/ui_screen/saved_profiles/saved_contact.dart';
|
||||||
import 'package:dropdown_button2/dropdown_button2.dart';
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:dropdownfield2/dropdownfield2.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class FilterDrawer extends StatefulWidget {
|
class FilterDrawer extends StatefulWidget {
|
||||||
FilterDrawer(this.switchValue, this.searchController);
|
FilterDrawer(this.switchValue, this.searchController,
|
||||||
|
{required this.onValueChanged, required this.onValueMultiChanged});
|
||||||
bool switchValue;
|
bool switchValue;
|
||||||
|
final Function(String) onValueChanged;
|
||||||
|
final Function(String) onValueMultiChanged;
|
||||||
|
|
||||||
TextEditingController searchController = TextEditingController();
|
TextEditingController searchController = TextEditingController();
|
||||||
@override
|
@override
|
||||||
State<FilterDrawer> createState() => _FilterDrawerState();
|
State<FilterDrawer> createState() => _FilterDrawerState();
|
||||||
|
@ -37,12 +51,58 @@ class _FilterDrawerState extends State<FilterDrawer> {
|
||||||
'Event',
|
'Event',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
var selectedtypevalue;
|
||||||
|
|
||||||
|
List filtersdata = [];
|
||||||
|
|
||||||
|
// List savefiltersdata = [];
|
||||||
|
List<Map<String, String>> savefiltersdata = [];
|
||||||
|
|
||||||
|
List<Map<String, String>> filtersdataarray = [];
|
||||||
|
|
||||||
|
List multidatalist = [];
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
// TODO: implement initState
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
getFilterss();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> getFilterss() async {
|
||||||
|
// var filters = await getAllFilters();
|
||||||
|
var filters = await getFilters();
|
||||||
|
|
||||||
|
print("Filterdataaaa_iss: $filters, ${filters.length}");
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
// filtersdataarray.clear();
|
||||||
|
filtersdata = filters;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> getFilterss123(List<Map<String, String>> savefiltersdata) async {
|
||||||
|
print("filtersdataarray_isss: ${filtersdataarray}");
|
||||||
|
// if (filtersdataarray.isNotEmpty) {
|
||||||
|
// filtersdataarray.clear();
|
||||||
|
// }
|
||||||
|
setState(() {
|
||||||
|
// filtersdataarray.clear();
|
||||||
|
filtersdataarray = savefiltersdata;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final dropdownProvider =
|
final dropdownProvider =
|
||||||
Provider.of<hcpProvider>(context); // Adjust to your provider
|
Provider.of<hcpProvider>(context); // Adjust to your provider
|
||||||
|
|
||||||
return Drawer(
|
return Drawer(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Flexible(
|
||||||
|
flex: 2,
|
||||||
child: ValueListenableBuilder<List<String>>(
|
child: ValueListenableBuilder<List<String>>(
|
||||||
valueListenable: ddlist,
|
valueListenable: ddlist,
|
||||||
builder: (context, value, child) {
|
builder: (context, value, child) {
|
||||||
|
@ -85,7 +145,7 @@ class _FilterDrawerState extends State<FilterDrawer> {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Reset Filter',
|
'Reset Filter',
|
||||||
style: TextStyle(color: Constants.k2color),
|
style: TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -124,7 +184,7 @@ class _FilterDrawerState extends State<FilterDrawer> {
|
||||||
onChanged: (String? newValue) {
|
onChanged: (String? newValue) {
|
||||||
setState(() {
|
setState(() {
|
||||||
selectedType = newValue;
|
selectedType = newValue;
|
||||||
optionsData();
|
optionsData(selectedType);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
buttonStyleData: const ButtonStyleData(
|
buttonStyleData: const ButtonStyleData(
|
||||||
|
@ -146,12 +206,6 @@ class _FilterDrawerState extends State<FilterDrawer> {
|
||||||
searchInnerWidgetHeight: 50,
|
searchInnerWidgetHeight: 50,
|
||||||
searchInnerWidget: Container(
|
searchInnerWidget: Container(
|
||||||
height: 50,
|
height: 50,
|
||||||
// padding: const EdgeInsets.only(
|
|
||||||
// top: 8,
|
|
||||||
// bottom: 4,
|
|
||||||
// right: 8,
|
|
||||||
// left: 8,
|
|
||||||
// ),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
expands: true,
|
expands: true,
|
||||||
maxLines: null,
|
maxLines: null,
|
||||||
|
@ -199,18 +253,22 @@ class _FilterDrawerState extends State<FilterDrawer> {
|
||||||
child: DropDownField(
|
child: DropDownField(
|
||||||
hintText: 'Select an option',
|
hintText: 'Select an option',
|
||||||
items: value,
|
items: value,
|
||||||
onValueChanged: (newValue) {
|
onValueChanged: (newValue) async {
|
||||||
// setState(() {
|
widget.onValueChanged(newValue);
|
||||||
selectedValue = newValue;
|
|
||||||
|
|
||||||
searchController.text = selectedValue;
|
setState(() {
|
||||||
|
selectedtypevalue = newValue;
|
||||||
|
});
|
||||||
|
|
||||||
Navigator.push(
|
// await AddFilterstoSave(
|
||||||
context,
|
// selectedtypevalue, selectedType);
|
||||||
MaterialPageRoute(
|
// getFilterss();
|
||||||
builder: (context) => Contacts1()),
|
|
||||||
).then((value) => setState(() {}));
|
print(
|
||||||
// });
|
"checkingFilterss: ${newValue}, ${selectedType}");
|
||||||
|
// Navigator.pop(context); // Close the drawers
|
||||||
|
|
||||||
|
SaveFilter(newValue, selectedType);
|
||||||
},
|
},
|
||||||
value: selectedValue,
|
value: selectedValue,
|
||||||
),
|
),
|
||||||
|
@ -224,6 +282,8 @@ class _FilterDrawerState extends State<FilterDrawer> {
|
||||||
children: [
|
children: [
|
||||||
OutlinedButton(
|
OutlinedButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
// getAllFilters();
|
||||||
|
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
|
@ -239,7 +299,50 @@ class _FilterDrawerState extends State<FilterDrawer> {
|
||||||
),
|
),
|
||||||
child: Text1(
|
child: Text1(
|
||||||
title: 'Saved Profiles123',
|
title: 'Saved Profiles123',
|
||||||
txtcolor: Constants.k2color,
|
txtcolor: AppColors.blueColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
ListTile(
|
||||||
|
title: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
OutlinedButton(
|
||||||
|
onPressed: () async {
|
||||||
|
// Navigator.push(
|
||||||
|
// context,
|
||||||
|
// MaterialPageRoute(
|
||||||
|
// builder: (context) =>
|
||||||
|
// const SavedContacts1()));
|
||||||
|
print("refresh done 111");
|
||||||
|
print(
|
||||||
|
"NewValueee: $selectedtypevalue $selectedType");
|
||||||
|
|
||||||
|
// savefiltersdata.add(selectedtypevalue,selectedType);
|
||||||
|
savefiltersdata.add({
|
||||||
|
'filerType': selectedType!,
|
||||||
|
'typeValue': selectedtypevalue
|
||||||
|
});
|
||||||
|
|
||||||
|
print("savefiltersdata_isss: ${savefiltersdata}");
|
||||||
|
|
||||||
|
getFilterss123(savefiltersdata);
|
||||||
|
|
||||||
|
// await AddFilterstoSave(
|
||||||
|
// selectedtypevalue, selectedType);
|
||||||
|
// getFilterss();
|
||||||
|
},
|
||||||
|
style: OutlinedButton.styleFrom(
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Text1(
|
||||||
|
title: 'Save Filters',
|
||||||
|
txtcolor: AppColors.blueColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -247,10 +350,121 @@ class _FilterDrawerState extends State<FilterDrawer> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}));
|
}),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: ListView.builder(
|
||||||
|
itemCount: filtersdataarray.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
var data = filtersdataarray[index];
|
||||||
|
|
||||||
|
print("Checkinh12344: $data");
|
||||||
|
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
print("clicked_array_isss: ${filtersdataarray}");
|
||||||
|
// print("clicked_array_isss: ${filtersdataarray["typeValue"]}");
|
||||||
|
|
||||||
|
for (var data in filtersdataarray) {
|
||||||
|
print("Clickedddd_daataa_issss: ${data["typeValue"]}");
|
||||||
|
|
||||||
|
multidatalist.add(data["typeValue"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
optionsData() async {
|
print("AfterLoop: ${multidatalist}");
|
||||||
|
|
||||||
|
String namesString = multidatalist.join(', ');
|
||||||
|
|
||||||
|
print("pooja : ${namesString}");
|
||||||
|
/////////////////////////////////////
|
||||||
|
|
||||||
|
widget.onValueMultiChanged(namesString);
|
||||||
|
|
||||||
|
// setState(() {
|
||||||
|
// selectedtypevalue = filtersdataarray;
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Text1(
|
||||||
|
title:
|
||||||
|
"${data["filerType"]!} : ${data["typeValue"]!}"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
// ListTile(
|
||||||
|
// title: Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
// children: [
|
||||||
|
// OutlinedButton(
|
||||||
|
// onPressed: () async {
|
||||||
|
// // await AddFilterstoSave(selectedtypevalue, selectedType);
|
||||||
|
|
||||||
|
// // await AddFilterstoSave(selectedtypevalue, selectedType);
|
||||||
|
|
||||||
|
// print("lengthhhh: ${filtersdataarray.length}");
|
||||||
|
|
||||||
|
// // for (int i = 0; i < filtersdataarray.length; i++) {
|
||||||
|
// // print(
|
||||||
|
// // "filtersdataarray: ${filtersdataarray[i]["typeValue"]}");
|
||||||
|
|
||||||
|
// await AddFilterstoSaveListttnew(filtersdataarray);
|
||||||
|
// // }
|
||||||
|
// // await AddFilterstoSaveList(filtersdataarray);
|
||||||
|
|
||||||
|
// getFilterss();
|
||||||
|
|
||||||
|
// // setState(() {
|
||||||
|
|
||||||
|
// // });
|
||||||
|
|
||||||
|
// // })
|
||||||
|
// },
|
||||||
|
// style: OutlinedButton.styleFrom(
|
||||||
|
// shape: RoundedRectangleBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(12),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// child: Text1(
|
||||||
|
// title: 'New Save Filters',
|
||||||
|
// txtcolor: Constants.k2color,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// child: ListView.builder(
|
||||||
|
// itemCount: filtersdata.length,
|
||||||
|
// itemBuilder: (context, index) {
|
||||||
|
// var data = filtersdata[index];
|
||||||
|
|
||||||
|
// print("Filterssss_dataa_issss1233Hiiiii");
|
||||||
|
|
||||||
|
// print("Filterssss_dataa_issss1233: ${data})}");
|
||||||
|
|
||||||
|
// return GestureDetector(
|
||||||
|
// onTap: () {
|
||||||
|
// print("Clicked_the_data $index");
|
||||||
|
// },
|
||||||
|
// child: Column(
|
||||||
|
// children: [
|
||||||
|
// Text1(title: data.toString()),
|
||||||
|
|
||||||
|
// // Text1(title: data.filerType),
|
||||||
|
// // Text1(title: data.typeValue),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }),
|
||||||
|
// )
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
optionsData(String? selectedType) async {
|
||||||
print("hiiiiiiiii");
|
print("hiiiiiiiii");
|
||||||
if (selectedType == "Profile Type") {
|
if (selectedType == "Profile Type") {
|
||||||
print("PPPP11");
|
print("PPPP11");
|
||||||
|
@ -311,4 +525,447 @@ class _FilterDrawerState extends State<FilterDrawer> {
|
||||||
ddlist.value = offlinenamelist;
|
ddlist.value = offlinenamelist;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SaveFilter(newValue, String? selectedType) {
|
||||||
|
print("NewValueee: $newValue $selectedType");
|
||||||
|
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: ListTile(title: Text("hiii")),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// // import 'package:discover_module/constants.dart';
|
||||||
|
// // import 'package:discover_module/custom_widget/text.dart';
|
||||||
|
// // import 'package:discover_module/hive_fun.dart';
|
||||||
|
// // import 'package:discover_module/provider_class/hcp%20_provider.dart';
|
||||||
|
// // import 'package:discover_module/ui_screen/new_contacts.dart';
|
||||||
|
// // import 'package:discover_module/ui_screen/saved_profiles/saved_contact.dart';
|
||||||
|
// import 'package:discover_module/contacts_module/constants.dart';
|
||||||
|
// import 'package:discover_module/contacts_module/custom_widget/text.dart';
|
||||||
|
// import 'package:discover_module/contacts_module/hive_fun.dart';
|
||||||
|
// import 'package:discover_module/contacts_module/provider_class/hcp%20_provider.dart';
|
||||||
|
// import 'package:discover_module/contacts_module/storage_hive/savefilter/save_filter.dart';
|
||||||
|
// import 'package:discover_module/contacts_module/ui_screen/new_contacts.dart';
|
||||||
|
// import 'package:discover_module/contacts_module/ui_screen/saved_profiles/saved_contact.dart';
|
||||||
|
// import 'package:dropdown_button2/dropdown_button2.dart';
|
||||||
|
// import 'package:dropdownfield2/dropdownfield2.dart';
|
||||||
|
// import 'package:flutter/material.dart';
|
||||||
|
// import 'package:provider/provider.dart';
|
||||||
|
|
||||||
|
// class FilterDrawer extends StatefulWidget {
|
||||||
|
// FilterDrawer(this.switchValue, this.searchController,
|
||||||
|
// {required this.onValueChanged});
|
||||||
|
// bool switchValue;
|
||||||
|
// final Function(String) onValueChanged;
|
||||||
|
|
||||||
|
// TextEditingController searchController = TextEditingController();
|
||||||
|
// @override
|
||||||
|
// State<FilterDrawer> createState() => _FilterDrawerState();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// class _FilterDrawerState extends State<FilterDrawer> {
|
||||||
|
// var items = [
|
||||||
|
// 'Profile Type',
|
||||||
|
// 'HCP Name',
|
||||||
|
// 'Speciality',
|
||||||
|
// 'Country',
|
||||||
|
// 'Region',
|
||||||
|
// 'State',
|
||||||
|
// 'City',
|
||||||
|
// 'List',
|
||||||
|
// 'Organization',
|
||||||
|
// 'Event',
|
||||||
|
// ];
|
||||||
|
|
||||||
|
// var selectedtypevalue;
|
||||||
|
|
||||||
|
// List filtersdata = [];
|
||||||
|
|
||||||
|
// @override
|
||||||
|
// void initState() {
|
||||||
|
// // TODO: implement initState
|
||||||
|
// super.initState();
|
||||||
|
|
||||||
|
// getFilterss();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Future<void> getFilterss() async {
|
||||||
|
// var filters = await getAllFilters();
|
||||||
|
// print("Filterdataaaa_iss: $filters, ${filters.length}");
|
||||||
|
|
||||||
|
// setState(() {
|
||||||
|
// filtersdata = filters;
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// @override
|
||||||
|
// Widget build(BuildContext context) {
|
||||||
|
// final dropdownProvider =
|
||||||
|
// Provider.of<hcpProvider>(context); // Adjust to your provider
|
||||||
|
|
||||||
|
// return Drawer(
|
||||||
|
// child: Column(
|
||||||
|
// children: [
|
||||||
|
// Expanded(
|
||||||
|
// child: ValueListenableBuilder<List<String>>(
|
||||||
|
// valueListenable: ddlist,
|
||||||
|
// builder: (context, value, child) {
|
||||||
|
// return ListView(
|
||||||
|
// children: <Widget>[
|
||||||
|
// // DrawerHeader removed
|
||||||
|
// ListTile(
|
||||||
|
// title: Padding(
|
||||||
|
// padding: const EdgeInsets.all(8.0),
|
||||||
|
// child: Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
// children: [
|
||||||
|
// const Icon(
|
||||||
|
// Icons.sort,
|
||||||
|
// size: 30.0,
|
||||||
|
// ),
|
||||||
|
// const Text(
|
||||||
|
// "Filters",
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 18.0, fontWeight: FontWeight.bold),
|
||||||
|
// ),
|
||||||
|
// GestureDetector(
|
||||||
|
// onTap: () {
|
||||||
|
// Navigator.pop(context);
|
||||||
|
// // print("hiii");
|
||||||
|
// },
|
||||||
|
// child: const Icon(Icons.cancel))
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
|
||||||
|
// ListTile(
|
||||||
|
// title: Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
// children: [
|
||||||
|
// OutlinedButton(
|
||||||
|
// onPressed: () {
|
||||||
|
// setState(() {});
|
||||||
|
// },
|
||||||
|
// child: Text(
|
||||||
|
// 'Reset Filter',
|
||||||
|
// style: TextStyle(color: Constants.k2color),
|
||||||
|
// ),
|
||||||
|
// style: OutlinedButton.styleFrom(
|
||||||
|
// shape: RoundedRectangleBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(12),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
|
||||||
|
// ListTile(
|
||||||
|
// title: DropdownButtonHideUnderline(
|
||||||
|
// child: DropdownButtonFormField2<String>(
|
||||||
|
// hint: Text("Select the Type"),
|
||||||
|
// decoration: InputDecoration(
|
||||||
|
// // Add Horizontal padding using menuItemStyleData.padding so it matches
|
||||||
|
// // the menu padding when button's width is not specified.
|
||||||
|
// isDense: true,
|
||||||
|
// contentPadding:
|
||||||
|
// const EdgeInsets.symmetric(vertical: 9),
|
||||||
|
|
||||||
|
// border: OutlineInputBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(10.0),
|
||||||
|
// ),
|
||||||
|
// // Add more decoration..
|
||||||
|
// ),
|
||||||
|
// isExpanded: true,
|
||||||
|
// value: selectedType,
|
||||||
|
// items: items.map((String item) {
|
||||||
|
// return DropdownMenuItem<String>(
|
||||||
|
// value: item,
|
||||||
|
// child: Text(item),
|
||||||
|
// );
|
||||||
|
// }).toList(),
|
||||||
|
// onChanged: (String? newValue) {
|
||||||
|
// setState(() {
|
||||||
|
// selectedType = newValue;
|
||||||
|
// optionsData(selectedType);
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// buttonStyleData: const ButtonStyleData(
|
||||||
|
// padding: EdgeInsets.symmetric(horizontal: 16),
|
||||||
|
// height: 50,
|
||||||
|
// width: 200,
|
||||||
|
// ),
|
||||||
|
// dropdownStyleData: DropdownStyleData(
|
||||||
|
// maxHeight: 200,
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// borderRadius: BorderRadius.circular(14),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// menuItemStyleData: const MenuItemStyleData(
|
||||||
|
// height: 40,
|
||||||
|
// ),
|
||||||
|
// dropdownSearchData: DropdownSearchData(
|
||||||
|
// searchController: textEditingController,
|
||||||
|
// searchInnerWidgetHeight: 50,
|
||||||
|
// searchInnerWidget: Container(
|
||||||
|
// height: 50,
|
||||||
|
// child: TextFormField(
|
||||||
|
// expands: true,
|
||||||
|
// maxLines: null,
|
||||||
|
// controller: textEditingController,
|
||||||
|
// decoration: InputDecoration(
|
||||||
|
// isDense: true,
|
||||||
|
// contentPadding: const EdgeInsets.symmetric(
|
||||||
|
// horizontal: 10,
|
||||||
|
// vertical: 18,
|
||||||
|
// ),
|
||||||
|
// hintText: 'Search for an item...',
|
||||||
|
// hintStyle: const TextStyle(fontSize: 12),
|
||||||
|
// border: OutlineInputBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(10.0),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// searchMatchFn: (item, searchValue) {
|
||||||
|
// final itemString =
|
||||||
|
// item.value.toString().toLowerCase();
|
||||||
|
// final searchString = searchValue.toLowerCase();
|
||||||
|
// return itemString.contains(searchString);
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
// onMenuStateChange: (isOpen) {
|
||||||
|
// if (!isOpen) {
|
||||||
|
// textEditingController.clear();
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// iconStyleData: IconStyleData(
|
||||||
|
// icon: Icon(Icons.arrow_drop_down),
|
||||||
|
// iconSize: 20,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ListTile(
|
||||||
|
// title: Container(
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// border: Border.all(color: Colors.black),
|
||||||
|
// borderRadius: BorderRadius.circular(10)),
|
||||||
|
// child: Padding(
|
||||||
|
// padding: const EdgeInsets.all(3.5),
|
||||||
|
// child: DropDownField(
|
||||||
|
// hintText: 'Select an option',
|
||||||
|
// items: value,
|
||||||
|
// onValueChanged: (newValue) {
|
||||||
|
// widget.onValueChanged(newValue);
|
||||||
|
|
||||||
|
// setState(() {
|
||||||
|
// selectedtypevalue = newValue;
|
||||||
|
// });
|
||||||
|
|
||||||
|
// print(
|
||||||
|
// "checkingFilterss: ${newValue}, ${selectedType}");
|
||||||
|
// // Navigator.pop(context); // Close the drawers
|
||||||
|
|
||||||
|
// SaveFilter(newValue, selectedType);
|
||||||
|
// },
|
||||||
|
// value: selectedValue,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
|
||||||
|
// ListTile(
|
||||||
|
// title: Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
// children: [
|
||||||
|
// OutlinedButton(
|
||||||
|
// onPressed: () {
|
||||||
|
// // getAllFilters();
|
||||||
|
|
||||||
|
// Navigator.push(
|
||||||
|
// context,
|
||||||
|
// MaterialPageRoute(
|
||||||
|
// builder: (context) =>
|
||||||
|
// const SavedContacts1()));
|
||||||
|
// print("refresh done 111");
|
||||||
|
// // })
|
||||||
|
// },
|
||||||
|
// style: OutlinedButton.styleFrom(
|
||||||
|
// shape: RoundedRectangleBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(12),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// child: Text1(
|
||||||
|
// title: 'Saved Profiles123',
|
||||||
|
// txtcolor: Constants.k2color,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
|
||||||
|
// ListTile(
|
||||||
|
// title: Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
// children: [
|
||||||
|
// OutlinedButton(
|
||||||
|
// onPressed: () async {
|
||||||
|
// // Navigator.push(
|
||||||
|
// // context,
|
||||||
|
// // MaterialPageRoute(
|
||||||
|
// // builder: (context) =>
|
||||||
|
// // const SavedContacts1()));
|
||||||
|
// print("refresh done 111");
|
||||||
|
// print(
|
||||||
|
// "NewValueee: $selectedtypevalue $selectedType");
|
||||||
|
|
||||||
|
// await AddFilterstoSave(
|
||||||
|
// selectedtypevalue, selectedType);
|
||||||
|
// getFilterss();
|
||||||
|
|
||||||
|
// // setState(() {
|
||||||
|
|
||||||
|
// // });
|
||||||
|
|
||||||
|
// // })
|
||||||
|
// },
|
||||||
|
// style: OutlinedButton.styleFrom(
|
||||||
|
// shape: RoundedRectangleBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(12),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// child: Text1(
|
||||||
|
// title: 'Save Filters',
|
||||||
|
// txtcolor: Constants.k2color,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
|
// }),
|
||||||
|
// ),
|
||||||
|
// Expanded(
|
||||||
|
// child: ListView.builder(
|
||||||
|
// itemCount: filtersdata.length,
|
||||||
|
// itemBuilder: (context, index) {
|
||||||
|
// var data = filtersdata[index];
|
||||||
|
|
||||||
|
// print("Filterssss_dataa_issss: $data");
|
||||||
|
|
||||||
|
// return Column(
|
||||||
|
// children: [
|
||||||
|
// Text1(title: data.filerType),
|
||||||
|
// Text1(title: data.filterValue),
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
|
// }),
|
||||||
|
// )
|
||||||
|
// ],
|
||||||
|
// ));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// optionsData(String? selectedType) async {
|
||||||
|
// print("hiiiiiiiii");
|
||||||
|
// if (selectedType == "Profile Type") {
|
||||||
|
// print("PPPP11");
|
||||||
|
// setState(() {
|
||||||
|
// ddlist.value = [
|
||||||
|
// "All Profile",
|
||||||
|
// 'Full Profile',
|
||||||
|
// 'Basic Profile',
|
||||||
|
// ];
|
||||||
|
// });
|
||||||
|
// } else if (selectedType == "HCP Name") {
|
||||||
|
// print("FilterHcpNameeeNeww");
|
||||||
|
// fetchhcpname(selectedType);
|
||||||
|
// } else if (selectedType == "Speciality") {
|
||||||
|
// fetchhcpname(selectedType);
|
||||||
|
// } else if (selectedType == "Country") {
|
||||||
|
// print("kkk");
|
||||||
|
// setState(() {
|
||||||
|
// ddlist.value = [
|
||||||
|
// "United States",
|
||||||
|
// "United States",
|
||||||
|
// "United States",
|
||||||
|
// ];
|
||||||
|
// });
|
||||||
|
// } else if (selectedType == "State") {
|
||||||
|
// print("kkk");
|
||||||
|
// setState(() {
|
||||||
|
// ddlist.value = [
|
||||||
|
// "Karnataka",
|
||||||
|
// 'Karnataka',
|
||||||
|
// 'Karnataka',
|
||||||
|
// ];
|
||||||
|
// });
|
||||||
|
// } else if (selectedType == "City") {
|
||||||
|
// print("kkk");
|
||||||
|
// setState(() {
|
||||||
|
// ddlist.value = [
|
||||||
|
// "Hubli",
|
||||||
|
// 'Hubli',
|
||||||
|
// 'Hubli',
|
||||||
|
// ];
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Future<void> fetchhcpname([String? selectedType]) async {
|
||||||
|
// print("selectedTypeselectedType: ${selectedType}, ${widget.switchValue}");
|
||||||
|
// var hcpDataProvider1 = Provider.of<hcpProvider>(context, listen: false);
|
||||||
|
|
||||||
|
// if (widget.switchValue == false) {
|
||||||
|
// List<String> namelist =
|
||||||
|
// await hcpDataProvider1.gethcpNamefilter(selectedType);
|
||||||
|
// ddlist.value = namelist;
|
||||||
|
// setState(() {});
|
||||||
|
// } else {
|
||||||
|
// List<String> offlinenamelist =
|
||||||
|
// await HiveFunctions.getAllhcpdata(selectedType);
|
||||||
|
// ddlist.value = offlinenamelist;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// SaveFilter(newValue, String? selectedType) {
|
||||||
|
// print("NewValueee: $newValue $selectedType");
|
||||||
|
|
||||||
|
// return Padding(
|
||||||
|
// padding: const EdgeInsets.all(8.0),
|
||||||
|
// child: ListTile(title: Text("hiii")),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
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/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:dropdown_button2/dropdown_button2.dart';
|
import 'package:dropdown_button2/dropdown_button2.dart';
|
||||||
|
@ -155,11 +156,11 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
|
||||||
// shape: RoundedRectangleBorder(
|
// shape: RoundedRectangleBorder(
|
||||||
// borderRadius: BorderRadius.circular(0.0),
|
// borderRadius: BorderRadius.circular(0.0),
|
||||||
// ),
|
// ),
|
||||||
color: Constants.k2color,
|
color: AppColors.blueColor,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
// backgroundColor: Colors.white,
|
// backgroundColor: Colors.white,
|
||||||
backgroundColor: Constants.k2color,
|
backgroundColor: AppColors.blueColor,
|
||||||
|
|
||||||
// collapsedBackgroundColor: Color(0xFF2b9af3),
|
// collapsedBackgroundColor: Color(0xFF2b9af3),
|
||||||
initiallyExpanded: true,
|
initiallyExpanded: true,
|
||||||
|
@ -172,7 +173,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen> {
|
||||||
padding: const EdgeInsets.all(0.0),
|
padding: const EdgeInsets.all(0.0),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
// color: Color(0xFF2b9af3),
|
// color: Color(0xFF2b9af3),
|
||||||
color: Constants.k2color),
|
color: AppColors.blueColor),
|
||||||
child: Text(
|
child: Text(
|
||||||
item.sectionName,
|
item.sectionName,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
|
|
@ -25,6 +25,7 @@ import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import 'package:popover/popover.dart';
|
import 'package:popover/popover.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
@ -131,10 +132,10 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
elevation: 5,
|
elevation: 5,
|
||||||
color: Constants.k2color,
|
color: AppColors.blueColor,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
backgroundColor: Constants.k2color,
|
backgroundColor: AppColors.blueColor,
|
||||||
onExpansionChanged: (bool expanded) {
|
onExpansionChanged: (bool expanded) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_isExpanded = expanded;
|
_isExpanded = expanded;
|
||||||
|
@ -156,7 +157,7 @@ class _InteractionScreenState extends State<InteractionScreen> {
|
||||||
padding: const EdgeInsets.all(0.0),
|
padding: const EdgeInsets.all(0.0),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
// color: Color(0xFF2b9af3),
|
// color: Color(0xFF2b9af3),
|
||||||
color: Constants.k2color,
|
color: AppColors.blueColor,
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
item.sectionName,
|
item.sectionName,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -68,6 +68,22 @@ Future<String> formJsonForSync() async {
|
||||||
return jsonstr;
|
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 {
|
Future<bool> checkRecordsAvailable() async {
|
||||||
final provider = ViewInteractionProvider();
|
final provider = ViewInteractionProvider();
|
||||||
List<SaveInteraction> savedList = await provider.getAllRecords();
|
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/custombutton.dart';
|
||||||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/responsive_ext.dart';
|
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/responsive_ext.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
// ignore: must_be_immutable
|
// ignore: must_be_immutable
|
||||||
|
@ -91,7 +92,7 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen> {
|
||||||
var item = provider.interactionReponseList[index];
|
var item = provider.interactionReponseList[index];
|
||||||
sectionList = item.sectionList;
|
sectionList = item.sectionList;
|
||||||
return Container(
|
return Container(
|
||||||
color: Constants.k2color,
|
color: AppColors.blueColor,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
initiallyExpanded: true,
|
initiallyExpanded: true,
|
||||||
title: Stack(
|
title: Stack(
|
||||||
|
@ -103,7 +104,7 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen> {
|
||||||
padding: const EdgeInsets.all(0.0),
|
padding: const EdgeInsets.all(0.0),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
// color: Color(0xFF2b9af3),
|
// color: Color(0xFF2b9af3),
|
||||||
color: Constants.k2color,
|
color: AppColors.blueColor,
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
item.sectionName,
|
item.sectionName,
|
||||||
|
|
|
@ -64,11 +64,11 @@ class ViewInteractionProvider extends ChangeNotifier {
|
||||||
Future<void> getRecords(String formname, {String? hcp}) async {
|
Future<void> getRecords(String formname, {String? hcp}) async {
|
||||||
var box = await Hive.openBox<SaveInteraction>('InteractionDataBox');
|
var box = await Hive.openBox<SaveInteraction>('InteractionDataBox');
|
||||||
savedList = box.values.toList();
|
savedList = box.values.toList();
|
||||||
savedList = savedList
|
// savedList = savedList
|
||||||
.where((element) => element.form == formname && element.hcp != null
|
// .where((element) => element.form == formname && element.hcp != null
|
||||||
? element.hcp == hcp
|
// ? element.hcp == hcp
|
||||||
: element.form == formname)
|
// : element.form == formname)
|
||||||
.toList();
|
// .toList();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,6 +79,14 @@ class ViewInteractionProvider extends ChangeNotifier {
|
||||||
return savedList;
|
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 {
|
init(int index) async {
|
||||||
// _hiveprovider = HiveDataRepository(
|
// _hiveprovider = HiveDataRepository(
|
||||||
// Hive.box<InteractionConfigData>('InteractionConfigDataBox'));
|
// Hive.box<InteractionConfigData>('InteractionConfigDataBox'));
|
||||||
|
|
|
@ -34,7 +34,7 @@ class CustomButton extends StatelessWidget {
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
MaterialStateColor.resolveWith((states) => backgroundColor),
|
MaterialStateColor.resolveWith((states) => backgroundColor),
|
||||||
shape: RoundedRectangleBorder(
|
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:discover_module/ui_screen/trials_show_more.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class ActivitiesK2 extends StatefulWidget {
|
class ActivitiesK2 extends StatefulWidget {
|
||||||
|
@ -146,7 +147,7 @@ class _ActivitiesState extends State<ActivitiesK2> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
|
@ -157,7 +158,7 @@ class _ActivitiesState extends State<ActivitiesK2> {
|
||||||
_isExpanded = expanded;
|
_isExpanded = expanded;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
trailing: Icon(
|
trailing: Icon(
|
||||||
_isExpanded
|
_isExpanded
|
||||||
? Icons.keyboard_arrow_up
|
? Icons.keyboard_arrow_up
|
||||||
|
@ -280,7 +281,8 @@ class _ActivitiesState extends State<ActivitiesK2> {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'Show More',
|
||||||
style: TextStyle(color: Constants.k2color),
|
style:
|
||||||
|
TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -329,7 +331,7 @@ class _ActivitiesState extends State<ActivitiesK2> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
|
@ -338,7 +340,7 @@ class _ActivitiesState extends State<ActivitiesK2> {
|
||||||
_isExpanded = expanded;
|
_isExpanded = expanded;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
trailing: Icon(
|
trailing: Icon(
|
||||||
_isExpanded
|
_isExpanded
|
||||||
? Icons.keyboard_arrow_up
|
? Icons.keyboard_arrow_up
|
||||||
|
@ -460,7 +462,8 @@ class _ActivitiesState extends State<ActivitiesK2> {
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'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/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
||||||
|
@ -232,7 +233,7 @@ class _Contactsk2State extends State<Contactsk2> {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
fillColor: Constants.k2color,
|
fillColor: AppColors.blueColor,
|
||||||
contentPadding: EdgeInsets.symmetric(vertical: 9.0),
|
contentPadding: EdgeInsets.symmetric(vertical: 9.0),
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
hintText: "Search",
|
hintText: "Search",
|
||||||
|
@ -1062,7 +1063,7 @@ class _Contactsk2State extends State<Contactsk2> {
|
||||||
Text(
|
Text(
|
||||||
'Cancel',
|
'Cancel',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Constants.k2color),
|
color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -1126,7 +1127,7 @@ class _Contactsk2State extends State<Contactsk2> {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Reset Filter',
|
'Reset Filter',
|
||||||
style: TextStyle(color: Constants.k2color),
|
style: TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -1276,7 +1277,7 @@ class _Contactsk2State extends State<Contactsk2> {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Saved Profiles123',
|
'Saved Profiles123',
|
||||||
style: TextStyle(color: Constants.k2color),
|
style: TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
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/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_Certificate_k2.dart';
|
||||||
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_awards_k2.dart';
|
import 'package:konectar_events/contacts_module/model_class/k2_api_model/kol_awards_k2.dart';
|
||||||
|
@ -14,195 +15,208 @@ 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_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_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/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/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/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/pno_data/crud_pno.dart';
|
||||||
import 'package:konectar_events/contacts_module/storage_hive/traning_data/crud_training.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/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/contacts_module/ui_screen/show_morek2/location_showmorek2.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:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class LocationK2Tab extends StatefulWidget {
|
class LocationK2Tab extends StatefulWidget {
|
||||||
// const LocationTab({super.key});
|
const LocationK2Tab(
|
||||||
LocationK2Tab({required this.text, this.offline, Key? key}) : super(key: key);
|
{required this.text, this.offline, super.key, this.offlineMode});
|
||||||
|
|
||||||
final int text;
|
final int text;
|
||||||
int? offline;
|
final int? offline;
|
||||||
|
final bool? offlineMode;
|
||||||
@override
|
@override
|
||||||
State<LocationK2Tab> createState() => _LocationK2TabState();
|
State<LocationK2Tab> createState() => _LocationK2TabState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _LocationK2TabState extends State<LocationK2Tab> {
|
class _LocationK2TabState extends State<LocationK2Tab> {
|
||||||
List locationList = [];
|
bool isDataLoaded = false;
|
||||||
List pno = [];
|
|
||||||
List emailid = [];
|
|
||||||
|
|
||||||
List training = [];
|
List locationList = [];
|
||||||
List education = [];
|
|
||||||
List award = [];
|
List phonenolist = [];
|
||||||
List certificate = [];
|
|
||||||
|
List mailList = [];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
// TODO: implement initState
|
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
print("I_aminitstate");
|
||||||
|
|
||||||
|
if (!isDataLoaded) {
|
||||||
getAffiliations();
|
getAffiliations();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> getAffiliations() async {
|
Future<void> getAffiliations() async {
|
||||||
// ignore: prefer_typing_uninitialized_variables
|
final locationProvider =
|
||||||
var loclist, phoneno, emailno1, edu1, awa1, cer1, training1;
|
Provider.of<LocationKolProvider>(context, listen: false);
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
Future<void> _loadData(
|
||||||
|
bool hasData,
|
||||||
|
Function fetchDataOffline,
|
||||||
|
Function fetchDataOnline,
|
||||||
|
dynamic setStateCallback,
|
||||||
|
) async {
|
||||||
|
if (!hasData) {
|
||||||
if (widget.offline == 1) {
|
if (widget.offline == 1) {
|
||||||
loclist = await retrieveidlocations(widget.text);
|
print("Offline mode: ${widget.offline}");
|
||||||
print("Saved_Checkingloclist: $loclist");
|
var data = await fetchDataOffline(widget.text);
|
||||||
|
print("Retrieved data: $data");
|
||||||
|
setState(() => setStateCallback(data));
|
||||||
} else {
|
} else {
|
||||||
var location = Provider.of<LocationKolProvider>(context, listen: false);
|
await fetchDataOnline(widget.text);
|
||||||
await location.locationinfo(widget.text);
|
}
|
||||||
loclist = location.locationlist;
|
}
|
||||||
|
|
||||||
setState(() {
|
|
||||||
locationList = loclist;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Location data fetch logic
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
if (widget.offline == 1) {
|
await _loadData(
|
||||||
phoneno = await retrieveidpnos(widget.text);
|
locationProvider.hasData,
|
||||||
print("Saved_Checkingloclist: $loclist");
|
retrieveidlocations,
|
||||||
} else {
|
locationProvider.locationinfo,
|
||||||
var phone = Provider.of<PhonenoProviderK2>(context, listen: false);
|
(data) => locationList = data,
|
||||||
await phone.phonek2info(widget.text);
|
);
|
||||||
phoneno = phone.phonenolist;
|
|
||||||
}
|
|
||||||
setState(() {
|
|
||||||
pno = phoneno;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Phone number data fetch logic
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
if (widget.offline == 1) {
|
await _loadData(
|
||||||
emailno1 = await retrieveidemails(widget.text);
|
pnoProvider.hasData,
|
||||||
print("Saved_CheckingloclistEmailll: $emailno1");
|
retrieveidpnos,
|
||||||
} else {
|
pnoProvider.phonek2info,
|
||||||
var email = Provider.of<EmailProviderK2>(context, listen: false);
|
(data) => phonenolist = data,
|
||||||
await email.emailinfo(widget.text);
|
);
|
||||||
emailno1 = email.emailkollist;
|
|
||||||
print("Saved_CheckingloclistEmailll123: $emailno1");
|
|
||||||
}
|
|
||||||
|
|
||||||
setState(() {
|
|
||||||
emailid = emailno1;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Email data fetch logic
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
if (widget.offline == 1) {
|
await _loadData(
|
||||||
training1 = await retrieveidtri(widget.text);
|
emailProvider.hasData,
|
||||||
print("Saved_CheckingloclistEmailll: $emailno1");
|
retrieveidemails,
|
||||||
} else {
|
emailProvider.emailinfo,
|
||||||
var trai = Provider.of<TrainigProviderK2>(context, listen: false);
|
(data) => mailList = data,
|
||||||
await trai.traininginfo(widget.text);
|
);
|
||||||
training1 = trai.traininglist;
|
|
||||||
}
|
|
||||||
|
|
||||||
setState(() {
|
|
||||||
training = training1;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Training data fetch logic
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
if (widget.offline == 1) {
|
await _loadData(
|
||||||
edu1 = await retrieveidedus(widget.text);
|
trainingProvider.hasData,
|
||||||
print("Saved_CheckingloclistEdu: $edu1");
|
retrieveidtri,
|
||||||
} else {
|
trainingProvider.traininginfo,
|
||||||
var edu = Provider.of<EducationProviderK2>(context, listen: false);
|
(data) => {}, // Handle training data if needed
|
||||||
await edu.eduinfo(widget.text);
|
);
|
||||||
edu1 = edu.educationlist;
|
|
||||||
print("Saved_CheckingloclistEdu123: $edu1");
|
|
||||||
}
|
|
||||||
|
|
||||||
setState(() {
|
|
||||||
education = edu1;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Education data fetch logic
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
if (widget.offline == 1) {
|
await _loadData(
|
||||||
awa1 = await retrieveidawa(widget.text);
|
educationProvider.hasData,
|
||||||
print("Saved_CheckingloclistEdu: $edu1");
|
retrieveidtri,
|
||||||
} else {
|
educationProvider.eduinfo,
|
||||||
var awa = Provider.of<AwardProviderK2>(context, listen: false);
|
(data) => {}, // Handle education data if needed
|
||||||
await awa.awainfo(widget.text);
|
);
|
||||||
awa1 = awa.awardlist;
|
|
||||||
}
|
|
||||||
setState(() {
|
|
||||||
award = awa1;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Awards data fetch logic
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
if (widget.offline == 1) {
|
await _loadData(
|
||||||
cer1 = await retrieveidcer(widget.text);
|
awardsProvider.hasData,
|
||||||
print("Saved_CheckingloclistEdu: $edu1");
|
retrieveidtri,
|
||||||
} else {
|
awardsProvider.awainfo,
|
||||||
var cer = Provider.of<CertificateProviderK2>(context, listen: false);
|
(data) => {}, // Handle awards data if needed
|
||||||
await cer.certificateinfo(widget.text);
|
);
|
||||||
cer1 = cer.certificatelist;
|
}
|
||||||
|
|
||||||
|
// Certificate data fetch logic
|
||||||
|
if (mounted) {
|
||||||
|
await _loadData(
|
||||||
|
certificateProvider.hasData,
|
||||||
|
retrieveidtri,
|
||||||
|
certificateProvider.certificateinfo,
|
||||||
|
(data) => {}, // Handle certificate data if needed
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
certificate = cer1;
|
isDataLoaded = true; // Mark data as loaded
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
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(
|
return Center(
|
||||||
child: ListView(children: [
|
child: ListView(
|
||||||
locationList.length != 0
|
children: [
|
||||||
? CustomExpansionTile<Data>(
|
locationProvider.hasData
|
||||||
|
? CardCustomExpansionTile<Data>(
|
||||||
title: "Locations",
|
title: "Locations",
|
||||||
itemList: locationList.cast<Data>(),
|
itemList: locationProvider.locationlist.cast<Data>(),
|
||||||
buttonText: 'Show More',
|
buttonText: 'Show More',
|
||||||
field1: 'Institutation',
|
field1: 'Institutation',
|
||||||
field2: 'Address',
|
field2: 'Address',
|
||||||
|
noexpand: widget.offlineMode == null ? true : false,
|
||||||
onItemSelected: (Data selectedPhoneNumber) {
|
onItemSelected: (Data selectedPhoneNumber) {
|
||||||
List<Map<String, dynamic>> keyValue = [
|
List<Map<String, dynamic>> keyValue = [
|
||||||
{
|
{
|
||||||
"Address": selectedPhoneNumber.address1,
|
"Address": selectedPhoneNumber.address1,
|
||||||
"Postal Code": selectedPhoneNumber.postalCode,
|
"Postal Code": selectedPhoneNumber.postalCode,
|
||||||
"Primary": selectedPhoneNumber.formattedIsPrimary,
|
"Primary": selectedPhoneNumber.formattedIsPrimary,
|
||||||
"organization Name": selectedPhoneNumber.organizationName,
|
"organization Name":
|
||||||
|
selectedPhoneNumber.organizationName,
|
||||||
"Country Name": selectedPhoneNumber.countryName,
|
"Country Name": selectedPhoneNumber.countryName,
|
||||||
"State Name": selectedPhoneNumber.stateName,
|
"State Name": selectedPhoneNumber.stateName,
|
||||||
"City Name": selectedPhoneNumber.cityName,
|
"City Name": selectedPhoneNumber.cityName,
|
||||||
|
@ -211,36 +225,79 @@ class _LocationK2TabState extends State<LocationK2Tab> {
|
||||||
|
|
||||||
modelbsheet(keyValue);
|
modelbsheet(keyValue);
|
||||||
},
|
},
|
||||||
|
// onButtonPressed: () {
|
||||||
|
// print("Show More button clicked");
|
||||||
|
// },
|
||||||
|
onButtonPressed: () {
|
||||||
|
Navigator.push(context,
|
||||||
|
MaterialPageRoute(builder: (_) => Lock2ShowMore()));
|
||||||
|
},
|
||||||
)
|
)
|
||||||
: Container(),
|
:
|
||||||
pno.length != 0
|
// widget.offlineMode != null
|
||||||
? CustomExpansionTile<DataPhno>(
|
// ?
|
||||||
title: "Phone Numbers",
|
CustomExpansionTile<Data>(
|
||||||
itemList: pno.cast<DataPhno>(),
|
title: "Locations1",
|
||||||
|
// itemList: locationList.cast<Data>(),
|
||||||
|
itemList: dataList,
|
||||||
buttonText: 'Show More',
|
buttonText: 'Show More',
|
||||||
field1: 'Phone Type',
|
field1: 'Institutation',
|
||||||
field2: 'Phone No',
|
field2: 'Address',
|
||||||
|
noexpand: widget.offlineMode == null ? true : false,
|
||||||
|
onItemSelected: (Data selectedPhoneNumber) {},
|
||||||
|
),
|
||||||
|
|
||||||
|
//: 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) {
|
onItemSelected: (DataPhno selectedPhoneNumber) {
|
||||||
List<Map<String, dynamic>> keyValue = [
|
List<Map<String, dynamic>> keyValue = [
|
||||||
{
|
{
|
||||||
"Phone Number": selectedPhoneNumber.number,
|
"Phone Number": selectedPhoneNumber.number,
|
||||||
"Phone Type": selectedPhoneNumber.phoneTypeName,
|
"Phone Type": selectedPhoneNumber.phoneTypeName,
|
||||||
"Primary": selectedPhoneNumber.formattedIsPrimary,
|
"Primary": selectedPhoneNumber.formattedIsPrimary,
|
||||||
"organization Name": selectedPhoneNumber.organizationName,
|
"organization Name":
|
||||||
|
selectedPhoneNumber.organizationName,
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
modelbsheet(keyValue);
|
modelbsheet(keyValue);
|
||||||
},
|
},
|
||||||
|
onButtonPressed: () {
|
||||||
|
print("Show More button clicked");
|
||||||
|
},
|
||||||
)
|
)
|
||||||
: Container(),
|
:
|
||||||
emailid.length != 0
|
// widget.offlineMode != null
|
||||||
? CustomExpansionTile<EmailData>(
|
// ?
|
||||||
|
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",
|
title: "Emails",
|
||||||
itemList: emailid.cast<EmailData>(),
|
itemList: emailProvider.emailkollist.cast<EmailData>(),
|
||||||
buttonText: 'Show More',
|
buttonText: 'Show More',
|
||||||
field1: 'Email Type',
|
field1: 'Email Type',
|
||||||
field2: 'Email',
|
field2: 'Email',
|
||||||
|
noexpand: widget.offlineMode == null ? true : false,
|
||||||
onItemSelected: (EmailData selectedPhoneNumber) {
|
onItemSelected: (EmailData selectedPhoneNumber) {
|
||||||
List<Map<String, dynamic>> keyValue = [
|
List<Map<String, dynamic>> keyValue = [
|
||||||
{
|
{
|
||||||
|
@ -251,15 +308,30 @@ class _LocationK2TabState extends State<LocationK2Tab> {
|
||||||
|
|
||||||
modelbsheet(keyValue);
|
modelbsheet(keyValue);
|
||||||
},
|
},
|
||||||
|
onButtonPressed: () {
|
||||||
|
print("Show More button clicked");
|
||||||
|
},
|
||||||
)
|
)
|
||||||
: Container(),
|
: CustomExpansionTile<EmailData>(
|
||||||
training.length != 0
|
title: "Emails",
|
||||||
? CustomExpansionTile<TrainingList>(
|
//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",
|
title: "Trainings",
|
||||||
itemList: training.cast<TrainingList>(),
|
itemList: trainingProvider.traininglist.cast<TrainingList>(),
|
||||||
buttonText: 'Show More',
|
buttonText: 'Show More',
|
||||||
field1: 'Education Type',
|
field1: 'Education Type',
|
||||||
field2: 'Institution Name',
|
field2: 'Institution Name',
|
||||||
|
noexpand: widget.offlineMode == null ? true : false,
|
||||||
onItemSelected: (TrainingList selectedPhoneNumber) {
|
onItemSelected: (TrainingList selectedPhoneNumber) {
|
||||||
List<Map<String, dynamic>> keyValue = [
|
List<Map<String, dynamic>> keyValue = [
|
||||||
{
|
{
|
||||||
|
@ -273,14 +345,26 @@ class _LocationK2TabState extends State<LocationK2Tab> {
|
||||||
modelbsheet(keyValue);
|
modelbsheet(keyValue);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: Container(),
|
: widget.offlineMode != null
|
||||||
education.length != 0
|
? CustomExpansionTile<TrainingList>(
|
||||||
? CustomExpansionTile<EducationList>(
|
title: "Trainings",
|
||||||
title: "Education",
|
// itemList: trainingProvider.traininglist.cast<TrainingList>(),
|
||||||
itemList: education.cast<EducationList>(),
|
|
||||||
buttonText: 'Show More',
|
buttonText: 'Show More',
|
||||||
field1: 'Education Type',
|
field1: 'Education Type',
|
||||||
field2: 'Institution Name',
|
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) {
|
onItemSelected: (EducationList selectedPhoneNumber) {
|
||||||
List<Map<String, dynamic>> keyValue = [
|
List<Map<String, dynamic>> keyValue = [
|
||||||
{
|
{
|
||||||
|
@ -294,14 +378,25 @@ class _LocationK2TabState extends State<LocationK2Tab> {
|
||||||
modelbsheet(keyValue);
|
modelbsheet(keyValue);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: Container(),
|
: widget.offlineMode != null
|
||||||
award.length != 0
|
? CustomExpansionTile<EducationList>(
|
||||||
? CustomExpansionTile<AwardsList>(
|
title: "Education",
|
||||||
title: "Awards",
|
// itemList: trainingProvider.traininglist.cast<TrainingList>(),
|
||||||
itemList: award.cast<AwardsList>(),
|
|
||||||
buttonText: 'Show More',
|
buttonText: 'Show More',
|
||||||
field1: 'Education Type',
|
field1: 'Education Type',
|
||||||
field2: 'Institution Name',
|
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) {
|
onItemSelected: (AwardsList selectedPhoneNumber) {
|
||||||
List<Map<String, dynamic>> keyValue = [
|
List<Map<String, dynamic>> keyValue = [
|
||||||
{
|
{
|
||||||
|
@ -313,14 +408,25 @@ class _LocationK2TabState extends State<LocationK2Tab> {
|
||||||
modelbsheet(keyValue);
|
modelbsheet(keyValue);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: Container(),
|
: widget.offlineMode != null
|
||||||
certificate.length != 0
|
? CustomExpansionTile<AwardsList>(
|
||||||
? CustomExpansionTile<CertificateList>(
|
title: "Awards",
|
||||||
title: "Certificates",
|
// itemList: trainingProvider.traininglist.cast<TrainingList>(),
|
||||||
itemList: certificate.cast<CertificateList>(),
|
|
||||||
buttonText: 'Show More',
|
buttonText: 'Show More',
|
||||||
field1: 'Education Type',
|
field1: 'Education Type',
|
||||||
field2: 'Institution Name',
|
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) {
|
onItemSelected: (CertificateList selectedPhoneNumber) {
|
||||||
List<Map<String, dynamic>> keyValue = [
|
List<Map<String, dynamic>> keyValue = [
|
||||||
{
|
{
|
||||||
|
@ -333,8 +439,19 @@ class _LocationK2TabState extends State<LocationK2Tab> {
|
||||||
modelbsheet(keyValue);
|
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(),
|
: 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:konectar_events/contacts_module/ui_screen/training_showmore.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class LocationTab extends StatefulWidget {
|
class LocationTab extends StatefulWidget {
|
||||||
|
@ -188,9 +189,9 @@ class _LocationTabState extends State<LocationTab> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
// backgroundColor: Colors.white,
|
// backgroundColor: Colors.white,
|
||||||
|
@ -310,8 +311,8 @@ class _LocationTabState extends State<LocationTab> {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'Show More',
|
||||||
style:
|
style: TextStyle(
|
||||||
TextStyle(color: Constants.k2color),
|
color: AppColors.contentColorWhite),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -341,9 +342,9 @@ class _LocationTabState extends State<LocationTab> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
// backgroundColor: Colors.white,
|
// backgroundColor: Colors.white,
|
||||||
|
@ -461,8 +462,8 @@ class _LocationTabState extends State<LocationTab> {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'Show More',
|
||||||
style:
|
style: TextStyle(
|
||||||
TextStyle(color: Constants.k2color),
|
color: AppColors.contentColorWhite),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -492,9 +493,9 @@ class _LocationTabState extends State<LocationTab> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
// backgroundColor: Colors.white,
|
// backgroundColor: Colors.white,
|
||||||
|
@ -615,7 +616,7 @@ class _LocationTabState extends State<LocationTab> {
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'Show More',
|
||||||
style:
|
style:
|
||||||
TextStyle(color: Constants.k2color),
|
TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -645,9 +646,9 @@ class _LocationTabState extends State<LocationTab> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
// backgroundColor: Colors.white,
|
// backgroundColor: Colors.white,
|
||||||
|
@ -770,7 +771,7 @@ class _LocationTabState extends State<LocationTab> {
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'Show More',
|
||||||
style:
|
style:
|
||||||
TextStyle(color: Constants.k2color),
|
TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -799,9 +800,9 @@ class _LocationTabState extends State<LocationTab> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
// backgroundColor: Colors.white,
|
// backgroundColor: Colors.white,
|
||||||
|
@ -920,7 +921,7 @@ class _LocationTabState extends State<LocationTab> {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'Show More',
|
||||||
style: TextStyle(color: Constants.k2color),
|
style: TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -948,9 +949,9 @@ class _LocationTabState extends State<LocationTab> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
// backgroundColor: Colors.white,
|
// backgroundColor: Colors.white,
|
||||||
|
@ -1073,7 +1074,7 @@ class _LocationTabState extends State<LocationTab> {
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'Show More',
|
||||||
style:
|
style:
|
||||||
TextStyle(color: Constants.k2color),
|
TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -1102,9 +1103,9 @@ class _LocationTabState extends State<LocationTab> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
// backgroundColor: Colors.white,
|
// backgroundColor: Colors.white,
|
||||||
|
@ -1228,7 +1229,7 @@ class _LocationTabState extends State<LocationTab> {
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'Show More',
|
||||||
style:
|
style:
|
||||||
TextStyle(color: Constants.k2color),
|
TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
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/provider_class/medicalinsightprovider.dart';
|
||||||
import 'package:konectar_events/contacts_module/ui_screen/view_insight.dart';
|
import 'package:konectar_events/contacts_module/ui_screen/view_insight.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class MedicalInsight1 extends StatefulWidget {
|
class MedicalInsight1 extends StatefulWidget {
|
||||||
|
@ -150,7 +151,7 @@ class _MedicalInsightState extends State<MedicalInsight1> {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
fillColor: Constants.k2color,
|
fillColor: AppColors.blueColor,
|
||||||
contentPadding: const EdgeInsets.symmetric(vertical: 9.0),
|
contentPadding: const EdgeInsets.symmetric(vertical: 9.0),
|
||||||
border: const OutlineInputBorder(
|
border: const OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
|
|
|
@ -1,62 +1,27 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
|
||||||
import 'package:connectivity_plus/connectivity_plus.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/custom_widget/text.dart';
|
||||||
import 'package:konectar_events/contacts_module/hive_fun.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/hcp%20_provider.dart';
|
||||||
import 'package:konectar_events/contacts_module/provider_class/location_provider.dart';
|
import 'package:konectar_events/contacts_module/provider_class/k2_provider/profile_storage.dart';
|
||||||
import 'package:konectar_events/contacts_module/provider_class/nih_provider.dart';
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:konectar_events/contacts_module/provider_class/patent_provider.dart';
|
import 'package:konectar_events/utils/util.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:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:flutter/services.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>>([]);
|
final ValueNotifier<List<String>> ddlist = ValueNotifier<List<String>>([]);
|
||||||
String selectedValue = '';
|
String selectedValue = '';
|
||||||
|
|
||||||
String? selectedType;
|
String? selectedType;
|
||||||
final TextEditingController searchController = TextEditingController();
|
final TextEditingController searchController = TextEditingController();
|
||||||
|
|
||||||
|
@ -87,7 +52,6 @@ class _Contacts1State extends State<Contacts1> {
|
||||||
bool longpressmy = false;
|
bool longpressmy = false;
|
||||||
|
|
||||||
late List<dynamic> hcpdataList;
|
late List<dynamic> hcpdataList;
|
||||||
// ignore: prefer_typing_uninitialized_variables
|
|
||||||
|
|
||||||
var hcpDataProvider1;
|
var hcpDataProvider1;
|
||||||
|
|
||||||
|
@ -95,6 +59,10 @@ class _Contacts1State extends State<Contacts1> {
|
||||||
final Connectivity _connectivity = Connectivity();
|
final Connectivity _connectivity = Connectivity();
|
||||||
late StreamSubscription<List<ConnectivityResult>> _connectivitySubscription;
|
late StreamSubscription<List<ConnectivityResult>> _connectivitySubscription;
|
||||||
|
|
||||||
|
bool offMode = false;
|
||||||
|
|
||||||
|
List<Map<String, String>> filterList = [];
|
||||||
|
|
||||||
get developer => null;
|
get developer => null;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -106,6 +74,7 @@ class _Contacts1State extends State<Contacts1> {
|
||||||
|
|
||||||
_connectivitySubscription =
|
_connectivitySubscription =
|
||||||
_connectivity.onConnectivityChanged.listen(_updateConnectionStatus);
|
_connectivity.onConnectivityChanged.listen(_updateConnectionStatus);
|
||||||
|
|
||||||
hcpList();
|
hcpList();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -119,19 +88,41 @@ class _Contacts1State extends State<Contacts1> {
|
||||||
hcpdataList = hcplist;
|
hcpdataList = hcplist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _onSwitchChanged(bool value) {
|
||||||
|
setState(() {
|
||||||
|
_switchValue = value; // Update the switch value
|
||||||
|
});
|
||||||
|
print("Switch value: $_switchValue"); // Optional: Log the switch value
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setSystemUIOverlayStyle(
|
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(
|
return SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
key: _scaffoldKey, // Assign the key to the Scaffold
|
key: _scaffoldKey, // Assign the key to the Scaffold
|
||||||
|
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
backgroundColor: AppColors.blueColor,
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
centerTitle: true,
|
|
||||||
backgroundColor: EventsConstants.blueColor,
|
|
||||||
title: isSearchClickd
|
title: isSearchClickd
|
||||||
? Container(
|
? Container(
|
||||||
height: 40,
|
height: 40,
|
||||||
|
@ -141,24 +132,31 @@ class _Contacts1State extends State<Contacts1> {
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: searchController,
|
controller: searchController,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
setState(() {});
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
setState(() {
|
||||||
|
selectedValue = value;
|
||||||
|
searchController.text = selectedValue;
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
fillColor: Constants.k2color,
|
fillColor: AppColors.blueColor,
|
||||||
contentPadding: EdgeInsets.symmetric(vertical: 9.0),
|
contentPadding: EdgeInsets.symmetric(vertical: 9.0),
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
hintText: "Search",
|
hintText: "Search",
|
||||||
// labelText: ' Search',
|
// labelText: ' Search',
|
||||||
prefixIcon: Icon(
|
prefixIcon: Icon(
|
||||||
|
color: AppColors.contentColorWhite,
|
||||||
Icons.search,
|
Icons.search,
|
||||||
color: Colors.white,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Text1(
|
: Center(
|
||||||
|
child: Text1(
|
||||||
title: "Contacts",
|
title: "Contacts",
|
||||||
txtcolor: Colors.white,
|
txtcolor: AppColors.contentColorWhite,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
|
@ -172,15 +170,14 @@ class _Contacts1State extends State<Contacts1> {
|
||||||
},
|
},
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
isSearchClickd ? Icons.close : Icons.search,
|
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>(
|
body: Consumer<hcpProvider>(
|
||||||
builder: (context, hcpProvider, child) {
|
builder: (context, hcpProvider, child) {
|
||||||
print("_selectedValueConsumerConsumer_isss: $selectedValue");
|
print("_selectedValueConsumerConsumer_isss: $selectedValue");
|
||||||
|
@ -199,81 +196,16 @@ class _Contacts1State extends State<Contacts1> {
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
_offlineBanner(),
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
headerRow(),
|
||||||
children: [
|
const CustomSizedBox(
|
||||||
Wrap(
|
height: 5.0,
|
||||||
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,
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: 5,
|
|
||||||
),
|
|
||||||
// !_switchValue
|
|
||||||
// ? hcpContactlistview(displayedHCPList)
|
|
||||||
// : hcpContactlistview(myContactHCPList),
|
|
||||||
// contactsBottomdailog()
|
|
||||||
!_switchValue
|
!_switchValue
|
||||||
? _connectionStatus[0]
|
? _connectionStatus[0]
|
||||||
.toString()
|
.toString()
|
||||||
.contains("ConnectivityResult.none")
|
.contains("ConnectivityResult.none")
|
||||||
? hcpContactlistview(myContactHCPList)
|
? hcpContactlistview(myContactHCPList, offMode)
|
||||||
: hcpContactlistview(displayedHCPList)
|
: hcpContactlistview(displayedHCPList)
|
||||||
: hcpContactlistview(myContactHCPList),
|
: hcpContactlistview(myContactHCPList),
|
||||||
contactsBottomdailog()
|
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(
|
Map<String, dynamic> findRecordById(
|
||||||
List displayedHCPList, String selectedIndic) {
|
List displayedHCPList, String selectedIndic) {
|
||||||
// print(
|
// print(
|
||||||
|
@ -327,7 +225,7 @@ class _Contacts1State extends State<Contacts1> {
|
||||||
.firstWhere((element) => element['id'] == int.parse(selectedIndic));
|
.firstWhere((element) => element['id'] == int.parse(selectedIndic));
|
||||||
}
|
}
|
||||||
|
|
||||||
hcpContactlistview(List HCPList) {
|
hcpContactlistview(List HCPList, [offMode]) {
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
itemCount: HCPList.length,
|
itemCount: HCPList.length,
|
||||||
|
@ -337,8 +235,11 @@ class _Contacts1State extends State<Contacts1> {
|
||||||
print("CheckinggggImage_path: ${data['img_path']}");
|
print("CheckinggggImage_path: ${data['img_path']}");
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
|
||||||
|
child: ListTile(
|
||||||
onLongPress: () {
|
onLongPress: () {
|
||||||
print("LongPresss");
|
print("LongPresss");
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -346,50 +247,43 @@ class _Contacts1State extends State<Contacts1> {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
print("Check_data11 = ${data}");
|
print("Check_data11 = ${offMode}");
|
||||||
|
|
||||||
Navigator.push(
|
offMode != null
|
||||||
|
? Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) =>
|
||||||
|
NewProfile1(text: data, offlinemode: offMode),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => NewProfile1(text: data),
|
builder: (context) => NewProfile1(text: data),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
leading: data["img_path"] == ""
|
leading: CustomProfile(
|
||||||
? ProfilePicture(
|
imgstring: data["img_path"],
|
||||||
name: data["First Name"],
|
fontsize: 12.0,
|
||||||
radius: 30,
|
radius: 30,
|
||||||
fontsize: 12,
|
name: data["First Name"],
|
||||||
)
|
|
||||||
: 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,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
trailing: Visibility(
|
trailing: Visibility(
|
||||||
visible: longpress,
|
visible: longpress,
|
||||||
child: !_switchValue
|
child: !_switchValue
|
||||||
? Checkbox(
|
? Checkbox(
|
||||||
value:
|
value: _selectedIndices
|
||||||
_selectedIndices.contains(data["id"].toString()),
|
.contains(data["id"].toString()),
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
if (value!) {
|
if (value!) {
|
||||||
print("Datata_issss_iddd: ${data["id"]}");
|
print("Datata_issss_iddd: ${data["id"]}");
|
||||||
_selectedIndices.add(data["id"].toString());
|
_selectedIndices.add(data["id"].toString());
|
||||||
} else {
|
} else {
|
||||||
_selectedIndices.remove(data["id"].toString());
|
_selectedIndices
|
||||||
|
.remove(data["id"].toString());
|
||||||
}
|
}
|
||||||
print("id_total123: ${_selectedIndices}");
|
print("id_total123: ${_selectedIndices}");
|
||||||
});
|
});
|
||||||
|
@ -408,9 +302,9 @@ class _Contacts1State extends State<Contacts1> {
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
title: Text1(
|
title: Text1(
|
||||||
title: data['name'],
|
title: "Dr. " + data['name'],
|
||||||
fontweight: FontWeight.bold,
|
fontweight: FontWeight.bold,
|
||||||
txtfont: isTablet ? 22 : 16,
|
txtfont: isTablet ? 22 : 15,
|
||||||
),
|
),
|
||||||
subtitle: Column(
|
subtitle: Column(
|
||||||
children: [
|
children: [
|
||||||
|
@ -420,55 +314,35 @@ class _Contacts1State extends State<Contacts1> {
|
||||||
child: Text1(
|
child: Text1(
|
||||||
title: data["speciality"] ?? data['spl'],
|
title: data["speciality"] ?? data['spl'],
|
||||||
fontweight: FontWeight.normal,
|
fontweight: FontWeight.normal,
|
||||||
txtfont: isTablet ? 20 : 14,
|
txtcolor: Colors.black,
|
||||||
|
txtfont: isTablet ? 20 : 13,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
const CustomSizedBox(
|
||||||
children: [
|
height: 10.0,
|
||||||
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(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Expanded(
|
||||||
padding: EdgeInsets.only(left: 10.0),
|
|
||||||
child: Text1(
|
child: Text1(
|
||||||
title: "Added by Pooja k",
|
title: "Added by Pooja k on 01/07/2023",
|
||||||
fontweight: FontWeight.normal,
|
fontweight: FontWeight.normal,
|
||||||
txtfont: 14,
|
txtfont: 12,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(right: 10.0),
|
|
||||||
child: Text1(
|
|
||||||
title: "Added on 01/07/2023",
|
|
||||||
fontweight: FontWeight.normal,
|
|
||||||
txtfont: 14,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Divider(),
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Padding(
|
||||||
|
padding: EdgeInsets.only(left: 20.0, right: 20.0),
|
||||||
|
child: 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() {
|
contactsBottomdailog() {
|
||||||
return Align(
|
return Align(
|
||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
child: longpress
|
child: longpress
|
||||||
? Container(
|
? CustomLongPressContainer(
|
||||||
color: const Color.fromARGB(255, 251, 242, 242),
|
switchValue: _switchValue,
|
||||||
width: MediaQuery.of(context).size.width,
|
selectedIndices: _selectedIndices,
|
||||||
height: 200.0,
|
selectedRemoveIndices: _selectedremoveIndices,
|
||||||
child: Column(
|
onAddToContacts: _onAddToContacts,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
onRemoveFromContacts: _onRemoveFromContacts,
|
||||||
children: [
|
onDownload: _onDownload,
|
||||||
!_switchValue
|
onCancel: _onCancel,
|
||||||
? GestureDetector(
|
onSaveOffline: _onSaveOffline,
|
||||||
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),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
: Container(),
|
: Container(),
|
||||||
);
|
);
|
||||||
|
@ -702,9 +378,6 @@ class _Contacts1State extends State<Contacts1> {
|
||||||
return;
|
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) {
|
if (!mounted) {
|
||||||
return Future.value(null);
|
return Future.value(null);
|
||||||
}
|
}
|
||||||
|
@ -715,8 +388,160 @@ class _Contacts1State extends State<Contacts1> {
|
||||||
Future<void> _updateConnectionStatus(List<ConnectivityResult> result) async {
|
Future<void> _updateConnectionStatus(List<ConnectivityResult> result) async {
|
||||||
setState(() {
|
setState(() {
|
||||||
_connectionStatus = result;
|
_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
|
// ignore: avoid_print
|
||||||
print('Connectivity changed: $_connectionStatus');
|
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/services.dart';
|
||||||
import 'package:flutter_carousel_widget/flutter_carousel_widget.dart';
|
import 'package:flutter_carousel_widget/flutter_carousel_widget.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:dropdown_button2/dropdown_button2.dart';
|
import 'package:dropdown_button2/dropdown_button2.dart';
|
||||||
|
@ -60,7 +61,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
String? fileName;
|
String? fileName;
|
||||||
final TextEditingController textEditingController = TextEditingController();
|
final TextEditingController textEditingController = TextEditingController();
|
||||||
|
|
||||||
final FlutterCarouselController _controller = FlutterCarouselController();
|
//final CarouselController _controller = CarouselController();
|
||||||
|
|
||||||
int _currentPage = 0;
|
int _currentPage = 0;
|
||||||
late int _totalPages =
|
late int _totalPages =
|
||||||
|
@ -122,7 +123,7 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Constants.k2color,
|
backgroundColor: AppColors.blueColor,
|
||||||
title: Text(
|
title: Text(
|
||||||
widget.saveInteraction.id,
|
widget.saveInteraction.id,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
@ -146,295 +147,295 @@ class _EditInteractionScreenState extends State<EditInteractionScreen1> {
|
||||||
body: Column(
|
body: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
// Expanded(
|
||||||
// child: ListView.builder(
|
// // child: ListView.builder(
|
||||||
// itemCount: provider.interactionReponseList.length,
|
// // itemCount: provider.interactionReponseList.length,
|
||||||
// padding: EdgeInsets.zero,
|
// // padding: EdgeInsets.zero,
|
||||||
// cacheExtent: double.parse(
|
// // cacheExtent: double.parse(
|
||||||
// provider.interactionReponseList.length.toString()),
|
// // provider.interactionReponseList.length.toString()),
|
||||||
// itemBuilder: (context, index) {
|
// // itemBuilder: (context, index) {
|
||||||
// var item = provider.interactionReponseList[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,
|
||||||
|
|
||||||
|
// 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;
|
// sectionList = item.sectionList;
|
||||||
child: FlutterCarousel(
|
// print("Item_sectionListt11: ${item.sectionName}");
|
||||||
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,
|
|
||||||
|
|
||||||
height: MediaQuery.of(context)
|
// print("Item_sectionListt: ${item.sectionList}");
|
||||||
.size
|
// return ListView(
|
||||||
.height, // Adjust as needed
|
// children: [
|
||||||
// aspectRatio: 16 / 9, // Optional aspect ratio adjustment
|
// Padding(
|
||||||
//viewportFraction: 0.9,
|
// padding: const EdgeInsets.all(10.0),
|
||||||
viewportFraction: 1.0,
|
// child: Text(
|
||||||
|
// item.sectionName,
|
||||||
initialPage: 0,
|
// textAlign: TextAlign.center,
|
||||||
enableInfiniteScroll: false,
|
// style: const TextStyle(
|
||||||
reverse: false,
|
// color: Colors.black,
|
||||||
autoPlay: false,
|
// fontWeight: FontWeight.normal,
|
||||||
autoPlayInterval: Duration(seconds: 3),
|
// fontSize: 18.0),
|
||||||
autoPlayAnimationDuration:
|
// ),
|
||||||
Duration(milliseconds: 800),
|
// ),
|
||||||
autoPlayCurve: Curves.fastOutSlowIn,
|
// Container(
|
||||||
enlargeCenterPage: false,
|
// color: Colors.white,
|
||||||
disableCenter: false,
|
// child: Padding(
|
||||||
showIndicator: true,
|
// padding: const EdgeInsets.only(top: 0.0),
|
||||||
scrollDirection: Axis.horizontal,
|
// child: Column(
|
||||||
|
// crossAxisAlignment:
|
||||||
slideIndicator: CircularWaveSlideIndicator(
|
// CrossAxisAlignment.center,
|
||||||
slideIndicatorOptions: SlideIndicatorOptions(
|
// children: [
|
||||||
alignment: Alignment.bottomCenter,
|
// GridView.count(
|
||||||
currentIndicatorColor: Constants.k2color,
|
// physics:
|
||||||
indicatorBackgroundColor: Colors.grey),
|
// const NeverScrollableScrollPhysics(),
|
||||||
),
|
// // crossAxisCount:
|
||||||
),
|
// // context.responsive<int>(
|
||||||
items: provider.interactionReponseList.map((item) {
|
// // 1,
|
||||||
sectionList = item.sectionList;
|
// // sm: 1, // small
|
||||||
print("Item_sectionListt11: ${item.sectionName}");
|
// // md: 1, // medium
|
||||||
|
// // lg: sectionList.length == 1
|
||||||
print("Item_sectionListt: ${item.sectionList}");
|
// // ? 1
|
||||||
return ListView(
|
// // : 4, // large
|
||||||
children: [
|
// // xl: 3, // extra large screen
|
||||||
Padding(
|
// // ),
|
||||||
padding: const EdgeInsets.all(10.0),
|
// crossAxisCount: context.responsive<int>(
|
||||||
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,
|
// 1,
|
||||||
// sm: 1, // small
|
// sm: 1, // small
|
||||||
// md: 1, // medium
|
// md: 2, // medium
|
||||||
// lg: sectionList.length == 1
|
// lg: sectionList.length == 1
|
||||||
// ? 1
|
// ? 1
|
||||||
// : 4, // large
|
// : 3, // large
|
||||||
// xl: 3, // extra large screen
|
// xl: 3, // extra large screen
|
||||||
// ),
|
// ),
|
||||||
crossAxisCount: context.responsive<int>(
|
// mainAxisSpacing:
|
||||||
1,
|
// sectionList.length == 1 || !isTablet
|
||||||
sm: 1, // small
|
// ? 1
|
||||||
md: 2, // medium
|
// : 3.5,
|
||||||
lg: sectionList.length == 1
|
// shrinkWrap: true,
|
||||||
? 1
|
// padding: EdgeInsets.zero,
|
||||||
: 3, // large
|
|
||||||
xl: 3, // extra large screen
|
|
||||||
),
|
|
||||||
mainAxisSpacing:
|
|
||||||
sectionList.length == 1 || !isTablet
|
|
||||||
? 1
|
|
||||||
: 3.5,
|
|
||||||
shrinkWrap: true,
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
|
|
||||||
childAspectRatio:
|
// childAspectRatio:
|
||||||
sectionList.length == 1
|
// sectionList.length == 1
|
||||||
? orientation ==
|
// ? orientation ==
|
||||||
Orientation.landscape
|
// Orientation.landscape
|
||||||
? 10
|
// ? 10
|
||||||
: 4.8
|
// : 4.8
|
||||||
: isTablet
|
// : isTablet
|
||||||
? 2.8
|
// ? 2.8
|
||||||
: 4.5,
|
// : 4.5,
|
||||||
children: List.generate(
|
// children: List.generate(
|
||||||
sectionList.length,
|
// sectionList.length,
|
||||||
(i) {
|
// (i) {
|
||||||
// print(sectionList);
|
// // print(sectionList);
|
||||||
SectionList sectionItem =
|
// SectionList sectionItem =
|
||||||
sectionList[i];
|
// sectionList[i];
|
||||||
dropdownvalue = sectionItem
|
// dropdownvalue = sectionItem
|
||||||
.widget ==
|
// .widget ==
|
||||||
InteractionWidget.DROPDOWN
|
// InteractionWidget.DROPDOWN
|
||||||
? sectionItem.value ?? "Select"
|
// ? sectionItem.value ?? "Select"
|
||||||
: ' ';
|
// : ' ';
|
||||||
List<InputClass> list = sectionItem
|
// List<InputClass> list = sectionItem
|
||||||
.widget ==
|
// .widget ==
|
||||||
InteractionWidget
|
// InteractionWidget
|
||||||
.DROPDOWN ||
|
// .DROPDOWN ||
|
||||||
sectionItem.widget ==
|
// sectionItem.widget ==
|
||||||
InteractionWidget
|
// InteractionWidget
|
||||||
.AUTOCOMPLETE ||
|
// .AUTOCOMPLETE ||
|
||||||
sectionItem.widget ==
|
// sectionItem.widget ==
|
||||||
InteractionWidget
|
// InteractionWidget
|
||||||
.MULTISELECT
|
// .MULTISELECT
|
||||||
? provider.getData2(sectionItem)
|
// ? provider.getData2(sectionItem)
|
||||||
: [];
|
// : [];
|
||||||
provider.checkboxlist = sectionItem
|
// provider.checkboxlist = sectionItem
|
||||||
.widget ==
|
// .widget ==
|
||||||
InteractionWidget.CHECKBOX
|
// InteractionWidget.CHECKBOX
|
||||||
? provider.getData2(sectionItem)
|
// ? provider.getData2(sectionItem)
|
||||||
: [];
|
// : [];
|
||||||
|
|
||||||
return Column(
|
// return Column(
|
||||||
crossAxisAlignment:
|
// crossAxisAlignment:
|
||||||
CrossAxisAlignment.start,
|
// CrossAxisAlignment.start,
|
||||||
children: [
|
// children: [
|
||||||
sectionItem.widget ==
|
// sectionItem.widget ==
|
||||||
InteractionWidget
|
// InteractionWidget
|
||||||
.BUTTON &&
|
// .BUTTON &&
|
||||||
sectionItem.input ==
|
// sectionItem.input ==
|
||||||
'add'
|
// 'add'
|
||||||
? const SizedBox.shrink()
|
// ? const SizedBox.shrink()
|
||||||
: Padding(
|
// : Padding(
|
||||||
padding:
|
// padding:
|
||||||
const EdgeInsets
|
// const EdgeInsets
|
||||||
.only(
|
// .only(
|
||||||
left: 8.0,
|
// left: 8.0,
|
||||||
right: 8.0),
|
// right: 8.0),
|
||||||
|
// // child: Text(
|
||||||
|
// // '${sectionItem.name}:*',
|
||||||
|
// // style: TextStyle(
|
||||||
|
// // color: Colors
|
||||||
|
// // .orange
|
||||||
|
// // .shade800,
|
||||||
|
// // fontSize:
|
||||||
|
// // isTablet
|
||||||
|
// // ? 18
|
||||||
|
// // : 12,
|
||||||
|
// // ),
|
||||||
|
// // ),
|
||||||
// child: Text(
|
// child: Text(
|
||||||
// '${sectionItem.name}:*',
|
// sectionItem.isRequired
|
||||||
|
// ? '${sectionItem.name}:*'
|
||||||
|
// : '${sectionItem.name}:',
|
||||||
// style: TextStyle(
|
// style: TextStyle(
|
||||||
// color: Colors
|
// color: Colors.orange
|
||||||
// .orange
|
|
||||||
// .shade800,
|
// .shade800,
|
||||||
// fontSize:
|
// fontSize: 18.0,
|
||||||
// isTablet
|
// // fontSize: isTablet
|
||||||
// ? 18
|
// // ? 18
|
||||||
// : 12,
|
// // : 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(
|
// // SizedBox(
|
||||||
sectionItem: sectionItem,
|
// // height:
|
||||||
item: item,
|
// // isTablet ? 15 : 5,
|
||||||
provider: provider,
|
// // ),
|
||||||
list: list,
|
// returnWidget(
|
||||||
gridIndex: i,
|
// sectionItem: sectionItem,
|
||||||
listIndex: 0,
|
// item: item,
|
||||||
widgetData:
|
// provider: provider,
|
||||||
sectionItem.widget!,
|
// list: list,
|
||||||
multiple: false),
|
// gridIndex: i,
|
||||||
// SizedBox(
|
// listIndex: 0,
|
||||||
// height: isTablet ? 15 : 5,
|
// 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(),
|
||||||
// ),
|
// ),
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// 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(),
|
// const Spacer(),
|
||||||
// saveActions(provider),
|
// saveActions(provider),
|
||||||
|
|
||||||
Padding(
|
// Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 8.0),
|
// padding: const EdgeInsets.only(bottom: 8.0),
|
||||||
child: Align(
|
// child: Align(
|
||||||
alignment: Alignment.bottomCenter,
|
// alignment: Alignment.bottomCenter,
|
||||||
child: Row(
|
// child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
// children: [
|
||||||
Flexible(
|
// Flexible(
|
||||||
child: OutlinedButton(
|
// child: OutlinedButton(
|
||||||
style: OutlinedButton.styleFrom(
|
// style: OutlinedButton.styleFrom(
|
||||||
shape: CircleBorder()),
|
// shape: CircleBorder()),
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
//if (_currentPageIndex > _totalPages - 1)
|
// //if (_currentPageIndex > _totalPages - 1)
|
||||||
_controller.previousPage();
|
// _controller.previousPage();
|
||||||
},
|
// },
|
||||||
child: Padding(
|
// child: Padding(
|
||||||
padding: EdgeInsets.all(8.0),
|
// padding: EdgeInsets.all(8.0),
|
||||||
child: Icon(
|
// child: Icon(
|
||||||
Icons.arrow_back,
|
// Icons.arrow_back,
|
||||||
color: Constants.k2color,
|
// color: Constants.k2color,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Flexible(
|
// Flexible(
|
||||||
child: OutlinedButton(
|
// child: OutlinedButton(
|
||||||
style: OutlinedButton.styleFrom(
|
// style: OutlinedButton.styleFrom(
|
||||||
shape: CircleBorder()),
|
// shape: CircleBorder()),
|
||||||
|
// // onPressed: () {
|
||||||
|
// // _controller.nextPage(
|
||||||
|
// // duration: Duration(milliseconds: 300),
|
||||||
|
// // curve: Curves.ease,
|
||||||
|
// // );
|
||||||
|
// // },
|
||||||
// onPressed: () {
|
// onPressed: () {
|
||||||
// _controller.nextPage(
|
// _controller.nextPage(
|
||||||
// duration: Duration(milliseconds: 300),
|
// duration: Duration(milliseconds: 300),
|
||||||
// curve: Curves.ease,
|
// curve: Curves.ease,
|
||||||
// );
|
// );
|
||||||
// },
|
// },
|
||||||
onPressed: () {
|
// child: Padding(
|
||||||
_controller.nextPage(
|
// padding: EdgeInsets.all(8.0),
|
||||||
duration: Duration(milliseconds: 300),
|
// child: Icon(
|
||||||
curve: Curves.ease,
|
// Icons.arrow_forward,
|
||||||
);
|
// color: Constants.k2color,
|
||||||
},
|
// ),
|
||||||
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/custombutton.dart';
|
||||||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/responsive_ext.dart';
|
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/responsive_ext.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
// ignore: must_be_immutable
|
// ignore: must_be_immutable
|
||||||
|
@ -63,7 +64,7 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen1> {
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
//resizeToAvoidBottomInset: false,
|
//resizeToAvoidBottomInset: false,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Constants.k2color,
|
backgroundColor: AppColors.blueColor,
|
||||||
title: Text(
|
title: Text(
|
||||||
widget.saveInteraction.id,
|
widget.saveInteraction.id,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
@ -216,8 +217,8 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen1> {
|
||||||
: Text(
|
: Text(
|
||||||
'${sectionItem.name}:*',
|
'${sectionItem.name}:*',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Constants
|
color: AppColors
|
||||||
.k2color,
|
.blueColor,
|
||||||
fontSize:
|
fontSize:
|
||||||
isTablet
|
isTablet
|
||||||
? 18
|
? 18
|
||||||
|
@ -492,7 +493,7 @@ class _ViewInteractionScreenState extends State<ViewInteractionScreen1> {
|
||||||
: Text(
|
: Text(
|
||||||
'${sectionItem.name}:*',
|
'${sectionItem.name}:*',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Constants.k2color,
|
color: AppColors.blueColor,
|
||||||
fontSize: isTablet ? 18 : 12,
|
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:konectar_events/contacts_module/ui_screen/trials_show_more.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class SavedActivities extends StatefulWidget {
|
class SavedActivities extends StatefulWidget {
|
||||||
|
@ -121,7 +122,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
|
@ -132,7 +133,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
||||||
_isExpanded = expanded;
|
_isExpanded = expanded;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
trailing: Icon(
|
trailing: Icon(
|
||||||
_isExpanded
|
_isExpanded
|
||||||
? Icons.keyboard_arrow_up
|
? Icons.keyboard_arrow_up
|
||||||
|
@ -246,7 +247,8 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'Show More',
|
||||||
style: TextStyle(color: Constants.k2color),
|
style:
|
||||||
|
TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -274,7 +276,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
|
@ -285,7 +287,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
||||||
_isExpanded = expanded;
|
_isExpanded = expanded;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
trailing: Icon(
|
trailing: Icon(
|
||||||
_isExpanded
|
_isExpanded
|
||||||
? Icons.keyboard_arrow_up
|
? Icons.keyboard_arrow_up
|
||||||
|
@ -408,7 +410,8 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'Show More',
|
||||||
style: TextStyle(color: Constants.k2color),
|
style:
|
||||||
|
TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -436,7 +439,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
|
@ -445,7 +448,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
||||||
_isExpanded = expanded;
|
_isExpanded = expanded;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
trailing: Icon(
|
trailing: Icon(
|
||||||
_isExpanded
|
_isExpanded
|
||||||
? Icons.keyboard_arrow_up
|
? Icons.keyboard_arrow_up
|
||||||
|
@ -564,7 +567,8 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'Show More',
|
||||||
style: TextStyle(color: Constants.k2color),
|
style:
|
||||||
|
TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -592,7 +596,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
initiallyExpanded: false,
|
initiallyExpanded: false,
|
||||||
maintainState: true,
|
maintainState: true,
|
||||||
|
@ -601,7 +605,7 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
||||||
_isExpanded = expanded;
|
_isExpanded = expanded;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
trailing: Icon(
|
trailing: Icon(
|
||||||
_isExpanded
|
_isExpanded
|
||||||
? Icons.keyboard_arrow_up
|
? Icons.keyboard_arrow_up
|
||||||
|
@ -723,7 +727,8 @@ class _SavedActivitiesState extends State<SavedActivities> {
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Show More',
|
'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/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
||||||
|
@ -208,7 +209,7 @@ class SavedContacts1State extends State<SavedContacts1> {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
fillColor: Constants.k2color,
|
fillColor: AppColors.blueColor,
|
||||||
contentPadding: EdgeInsets.symmetric(vertical: 9.0),
|
contentPadding: EdgeInsets.symmetric(vertical: 9.0),
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
hintText: "Search",
|
hintText: "Search",
|
||||||
|
@ -1030,7 +1031,7 @@ class SavedContacts1State extends State<SavedContacts1> {
|
||||||
Text(
|
Text(
|
||||||
'Cancel',
|
'Cancel',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Constants.k2color),
|
color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -1094,7 +1095,7 @@ class SavedContacts1State extends State<SavedContacts1> {
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Reset Filter',
|
'Reset Filter',
|
||||||
style: TextStyle(color: Constants.k2color),
|
style: TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
|
|
@ -32,6 +32,7 @@ import 'package:flutter/painting.dart';
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
@ -127,7 +128,7 @@ class SavedNewProfile1State extends State<SavedNewProfile1>
|
||||||
Widget headerview(BuildContext context) {
|
Widget headerview(BuildContext context) {
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Constants.bgcolor,
|
backgroundColor: AppColors.bgcolor,
|
||||||
// appBar: AppBar(),
|
// appBar: AppBar(),
|
||||||
body: Stack(
|
body: Stack(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
@ -171,8 +172,8 @@ class SavedNewProfile1State extends State<SavedNewProfile1>
|
||||||
end: Alignment.topCenter,
|
end: Alignment.topCenter,
|
||||||
colors: [
|
colors: [
|
||||||
// Constants.blueColor,
|
// Constants.blueColor,
|
||||||
Constants.tabbgColor,
|
AppColors.tabbgColor,
|
||||||
Constants.k2color,
|
AppColors.blueColor,
|
||||||
// Constants.tabbgColor,
|
// Constants.tabbgColor,
|
||||||
// const Color.fromARGB(255, 222, 237, 247),
|
// const Color.fromARGB(255, 222, 237, 247),
|
||||||
// const Color.fromARGB(255, 222, 237, 247),
|
// const Color.fromARGB(255, 222, 237, 247),
|
||||||
|
@ -294,7 +295,7 @@ class SavedNewProfile1State extends State<SavedNewProfile1>
|
||||||
width:
|
width:
|
||||||
MediaQuery.of(context).size.width, // Adjust width as needed
|
MediaQuery.of(context).size.width, // Adjust width as needed
|
||||||
height: 110, // Adjust height as needed
|
height: 110, // Adjust height as needed
|
||||||
decoration: BoxDecoration(color: Constants.k2color),
|
decoration: BoxDecoration(color: AppColors.blueColor),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
@ -617,7 +618,7 @@ class SavedNewProfile1State extends State<SavedNewProfile1>
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(0.0),
|
borderRadius: BorderRadius.circular(0.0),
|
||||||
),
|
),
|
||||||
color: Constants.k2color11,
|
color: AppColors.contentColorWhite,
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
// collapsedBackgroundColor: Color(0xFF2b9af3),
|
// collapsedBackgroundColor: Color(0xFF2b9af3),
|
||||||
onExpansionChanged: (bool expanded) {
|
onExpansionChanged: (bool expanded) {
|
||||||
|
@ -625,7 +626,7 @@ class SavedNewProfile1State extends State<SavedNewProfile1>
|
||||||
_isExpanded = expanded;
|
_isExpanded = expanded;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
backgroundColor: Constants.k2color11,
|
backgroundColor: AppColors.contentColorWhite,
|
||||||
trailing: Icon(
|
trailing: Icon(
|
||||||
_isExpanded
|
_isExpanded
|
||||||
? Icons.keyboard_arrow_up
|
? Icons.keyboard_arrow_up
|
||||||
|
@ -679,7 +680,7 @@ class SavedNewProfile1State extends State<SavedNewProfile1>
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Save',
|
'Save',
|
||||||
style: TextStyle(color: Constants.k2color),
|
style: TextStyle(color: AppColors.blueColor),
|
||||||
),
|
),
|
||||||
style: OutlinedButton.styleFrom(
|
style: OutlinedButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
@ -702,7 +703,7 @@ class SavedNewProfile1State extends State<SavedNewProfile1>
|
||||||
final note =
|
final note =
|
||||||
getText()[index]; // Get note at current index
|
getText()[index]; // Get note at current index
|
||||||
return ListTile(
|
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() {
|
Widget getAppBarUI() {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Constants.k2color,
|
color: AppColors.blueColor,
|
||||||
boxShadow: <BoxShadow>[
|
boxShadow: <BoxShadow>[
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.grey.withOpacity(0.2),
|
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:konectar_events/contacts_module/constants.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
|
|
||||||
class MyWidget22 extends StatefulWidget {
|
class MyWidget22 extends StatefulWidget {
|
||||||
const MyWidget22({super.key});
|
const MyWidget22({super.key});
|
||||||
|
@ -30,7 +31,7 @@ class _MyWidget22State extends State<MyWidget22> {
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.edit,
|
Icons.edit,
|
||||||
color: Constants.k2color,
|
color: AppColors.blueColor,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
690
lib/main.dart
690
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:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
|
@ -12,6 +436,7 @@ import 'package:flutter/services.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
import 'package:hive_flutter/hive_flutter.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/affiliationsprovider.dart';
|
||||||
import 'package:konectar_events/contacts_module/provider_class/certificate_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/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/engagement_provider.dart';
|
||||||
import 'package:konectar_events/contacts_module/provider_class/events_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/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_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_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_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/speaker_provider.dart';
|
||||||
import 'package:konectar_events/contacts_module/provider_class/training_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/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/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/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/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/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/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/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/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/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/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/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/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/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/contacts_module/ui_screen/interactionform/viewinteractionprovider.dart';
|
||||||
import 'package:konectar_events/firebaseexample.dart';
|
import 'package:konectar_events/firebaseexample.dart';
|
||||||
import 'package:konectar_events/model/hive_api_constants.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/neweventsmodel.dart';
|
||||||
import 'package:konectar_events/model/sessionnotesmodel.dart';
|
import 'package:konectar_events/model/sessionnotesmodel.dart';
|
||||||
import 'package:konectar_events/model/userdata_model.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/utils/sessionmanager.dart';
|
||||||
import 'package:konectar_events/view/home.dart';
|
import 'package:konectar_events/view/home.dart';
|
||||||
import 'package:konectar_events/view/login.dart';
|
import 'package:konectar_events/view/login.dart';
|
||||||
|
@ -88,43 +518,14 @@ import 'package:shared_preferences/shared_preferences.dart';
|
||||||
//import 'openid/openid_io.dart' if (dart.library.html) 'openid_browser.dart';
|
//import 'openid/openid_io.dart' if (dart.library.html) 'openid_browser.dart';
|
||||||
import 'contacts_module/provider_class/award_provider.dart';
|
import 'contacts_module/provider_class/award_provider.dart';
|
||||||
import 'firebase_options.dart';
|
import 'firebase_options.dart';
|
||||||
|
import 'package:flutter_background_service/flutter_background_service.dart';
|
||||||
|
|
||||||
Future main() async {
|
Future main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
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 Hive.initFlutter();
|
||||||
|
await initializeService();
|
||||||
|
|
||||||
Hive.registerAdapter(UserDataAdapter());
|
Hive.registerAdapter(UserDataAdapter());
|
||||||
Hive.registerAdapter(EventsListAdapter());
|
Hive.registerAdapter(EventsListAdapter());
|
||||||
|
@ -147,6 +548,7 @@ Future main() async {
|
||||||
Hive.registerAdapter(SaveInteractionFormJsonAdapter());
|
Hive.registerAdapter(SaveInteractionFormJsonAdapter());
|
||||||
await Hive.openBox<SaveInteraction>('InteractionDataBox');
|
await Hive.openBox<SaveInteraction>('InteractionDataBox');
|
||||||
|
|
||||||
|
var boxhive =
|
||||||
await Hive.openBox<InteractionConfigData>('InteractionConfigDataBox');
|
await Hive.openBox<InteractionConfigData>('InteractionConfigDataBox');
|
||||||
|
|
||||||
var box = await Hive.openBox('mycontact');
|
var box = await Hive.openBox('mycontact');
|
||||||
|
@ -156,7 +558,8 @@ Future main() async {
|
||||||
|
|
||||||
await Hive.openBox('hcpdata');
|
await Hive.openBox('hcpdata');
|
||||||
|
|
||||||
await Hive.openBox<String>('notehive');
|
await Hive.openBox<Note>('notehive');
|
||||||
|
// Hive.registerAdapter(NoteAdapter());
|
||||||
|
|
||||||
Hive.registerAdapter(AffiliationAdapter());
|
Hive.registerAdapter(AffiliationAdapter());
|
||||||
// await Hive.openBox<Affiliation>('affiliationshive');
|
// await Hive.openBox<Affiliation>('affiliationshive');
|
||||||
|
@ -178,6 +581,8 @@ Future main() async {
|
||||||
Hive.registerAdapter(SpeAdapter());
|
Hive.registerAdapter(SpeAdapter());
|
||||||
Hive.registerAdapter(HiveApiConstantsAdapter());
|
Hive.registerAdapter(HiveApiConstantsAdapter());
|
||||||
|
|
||||||
|
// Hive.registerAdapter(NoteAdapter());
|
||||||
|
|
||||||
await Hive.openBox<UserData>("UserDataBox");
|
await Hive.openBox<UserData>("UserDataBox");
|
||||||
await Hive.openBox<EventsList>("EventsListBox");
|
await Hive.openBox<EventsList>("EventsListBox");
|
||||||
await Hive.openBox<SessionNotesModel>("SessionNotesModelBox");
|
await Hive.openBox<SessionNotesModel>("SessionNotesModelBox");
|
||||||
|
@ -185,19 +590,10 @@ Future main() async {
|
||||||
await Hive.openBox<HiveApiConstants>("hiveApiConstants");
|
await Hive.openBox<HiveApiConstants>("hiveApiConstants");
|
||||||
|
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
// FirebaseMessaging.instance.getToken().then((value) {
|
|
||||||
// String? token = value;
|
|
||||||
// print("token: $token");
|
|
||||||
// });
|
|
||||||
usePathUrlStrategy();
|
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) {
|
SharedPreferences.getInstance().then((instance) {
|
||||||
//StorageService().sharedPreferencesInstance = instance;
|
|
||||||
bool isloggedIn = instance.getBool('isloggedin') ?? false;
|
bool isloggedIn = instance.getBool('isloggedin') ?? false;
|
||||||
|
|
||||||
print("checkhere before:$isloggedIn");
|
print("checkhere before:$isloggedIn");
|
||||||
|
@ -256,15 +652,15 @@ Future main() async {
|
||||||
ChangeNotifierProvider(create: (_) => CertificateProviderK2()),
|
ChangeNotifierProvider(create: (_) => CertificateProviderK2()),
|
||||||
ChangeNotifierProvider(create: (_) => AffiliationsProviderk2()),
|
ChangeNotifierProvider(create: (_) => AffiliationsProviderk2()),
|
||||||
ChangeNotifierProvider(create: (_) => EventProviderK2()),
|
ChangeNotifierProvider(create: (_) => EventProviderK2()),
|
||||||
|
ChangeNotifierProvider(create: (_) => AddNotesProvider()),
|
||||||
|
|
||||||
ChangeNotifierProvider<HiveDataRepository>(
|
ChangeNotifierProvider<HiveDataRepository>(
|
||||||
create: (_) => HiveDataRepository(
|
create: (_) => HiveDataRepository(
|
||||||
Hive.box<InteractionConfigData>('InteractionConfigDataBox'))),
|
Hive.box<InteractionConfigData>('InteractionConfigDataBox'))),
|
||||||
],
|
],
|
||||||
child:
|
child: SafeArea(
|
||||||
// SafeArea(
|
top: true,
|
||||||
// top: true,
|
child: MaterialApp(
|
||||||
// child:
|
|
||||||
MaterialApp(
|
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
//fontFamily: "SourceSerif",
|
//fontFamily: "SourceSerif",
|
||||||
),
|
),
|
||||||
|
@ -285,7 +681,7 @@ Future main() async {
|
||||||
print("isLoggedIn_is : $isLoggedIn");
|
print("isLoggedIn_is : $isLoggedIn");
|
||||||
print("secret : $secretkey");
|
print("secret : $secretkey");
|
||||||
return isLoggedIn
|
return isLoggedIn
|
||||||
? NavigationHomeScreen()
|
? IntroductionAnimationScreen()
|
||||||
: IntroductionAnimationScreen();
|
: IntroductionAnimationScreen();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -294,90 +690,136 @@ Future main() async {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// ),
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyApp extends StatefulWidget {
|
Future<void> initializeService() async {
|
||||||
@override
|
final service = FlutterBackgroundService();
|
||||||
_MyAppState createState() => _MyAppState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _MyAppState extends State<MyApp> {
|
await service.configure(
|
||||||
@override
|
androidConfiguration: AndroidConfiguration(
|
||||||
void initState() {
|
// this will be executed when app is in foreground or background in separated isolate
|
||||||
OverlaySupportEntry entry;
|
onStart: onStart,
|
||||||
Connectivity().onConnectivityChanged.listen((event) {
|
|
||||||
print("CHECK INTERNET");
|
|
||||||
print(event);
|
|
||||||
if (event.toString().contains("ConnectivityResult.wifi")) {
|
|
||||||
entry = showOverlayNotification((context) {
|
|
||||||
return Text("this is a message from simple notification");
|
|
||||||
}, duration: Duration(hours: 1));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
// auto start service
|
||||||
Widget build(BuildContext context) {
|
autoStart: true,
|
||||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
isForegroundMode: false,
|
||||||
statusBarColor: Colors.transparent,
|
),
|
||||||
statusBarIconBrightness: Brightness.dark,
|
iosConfiguration: IosConfiguration(
|
||||||
statusBarBrightness:
|
// auto start service
|
||||||
!kIsWeb && Platform.isAndroid ? Brightness.dark : Brightness.light,
|
autoStart: true,
|
||||||
systemNavigationBarColor: Colors.white,
|
|
||||||
systemNavigationBarDividerColor: Colors.transparent,
|
// this will be executed when app is in foreground in separated isolate
|
||||||
systemNavigationBarIconBrightness: Brightness.dark,
|
onForeground: onStart,
|
||||||
));
|
|
||||||
return MaterialApp(
|
// you have to enable background fetch capability on xcode project
|
||||||
title: 'Flutter UI',
|
onBackground: onIosBackground,
|
||||||
debugShowCheckedModeBanner: false,
|
),
|
||||||
// theme: ThemeData(
|
|
||||||
// primarySwatch: Colors.blue,
|
|
||||||
// textTheme: AppTheme.textTheme,
|
|
||||||
// platform: TargetPlatform.iOS,
|
|
||||||
// ),
|
|
||||||
home: NavigationHomeScreen(),
|
|
||||||
);
|
);
|
||||||
}
|
await service.startService();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@pragma('vm:entry-point')
|
||||||
State<StatefulWidget> createState() {
|
Future<bool> onIosBackground(ServiceInstance service) async {
|
||||||
// TODO: implement createState
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
throw UnimplementedError();
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
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',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
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 {
|
Future<void> fetchApiData(String url, String hivename, String hivetype) async {
|
||||||
// @override
|
print("Post_Url_iss: ${url}, ${hivename} , ${hivetype}");
|
||||||
// _AppState createState() => _AppState();
|
var box, postdata;
|
||||||
// }
|
|
||||||
|
|
||||||
// class _AppState extends State<App> {
|
// var box = Hive.box(hivename);
|
||||||
// @override
|
switch (hivename) {
|
||||||
// void initState() {
|
case 'InteractionDataBox':
|
||||||
// OverlaySupportEntry entry;
|
box = await Hive.openBox<SaveInteraction>(hivename);
|
||||||
// Connectivity().onConnectivityChanged.listen((event) {
|
final provider = ViewInteractionProvider();
|
||||||
// print(event);
|
final prov = InteractionProvider();
|
||||||
// if (event.toString().contains("ConnectivityResult.none")) {
|
postdata = await provider.getAllRecordsforIntervalSync(hivename);
|
||||||
// entry = showOverlayNotification((context) {
|
postdata.forEach((item) async {
|
||||||
// return Text("this is a message from simple notification");
|
PostApiCall(url, "post", prov.formJson(item));
|
||||||
// }, duration: Duration(hours: 1));
|
});
|
||||||
// }
|
break;
|
||||||
// });
|
default:
|
||||||
// super.initState();
|
box = Hive.box<Note>(hivename);
|
||||||
// }
|
postdata = box.values.toList();
|
||||||
|
|
||||||
// @override
|
print("PostData_isss: $postdata");
|
||||||
// Widget build(BuildContext context) {
|
postdata.forEach((item) async {
|
||||||
// return OverlaySupport(
|
PostApiCall(url, "post", item);
|
||||||
// child: MaterialApp(
|
});
|
||||||
// title: 'Network Checker App',
|
break;
|
||||||
// debugShowCheckedModeBanner: false,
|
}
|
||||||
// home: Homepage(),
|
}
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
|
@ -12,7 +12,13 @@ class HiveApiConstants {
|
||||||
String? method;
|
String? method;
|
||||||
@HiveField(3)
|
@HiveField(3)
|
||||||
String? module;
|
String? module;
|
||||||
|
@HiveField(4)
|
||||||
|
String? hivename;
|
||||||
|
|
||||||
HiveApiConstants(
|
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:convert';
|
||||||
import 'dart:ffi';
|
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
|
|
|
@ -24,6 +24,22 @@ class AppColors {
|
||||||
static const Color contentColorCyan = Color(0xFF50E4FF);
|
static const Color contentColorCyan = Color(0xFF50E4FF);
|
||||||
//background: #F3F3F3;
|
//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 = [
|
List<Color> appcolors = [
|
||||||
contentColorYellow,
|
contentColorYellow,
|
||||||
contentColorBlue,
|
contentColorBlue,
|
||||||
|
|
|
@ -3,18 +3,18 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class EventsConstants {
|
class EventsConstants {
|
||||||
//static const Color bgcolor = Color.fromARGB(255, 246, 248, 252);
|
//static const Color bgcolor = Color.fromARGB(255, 246, 248, 252);
|
||||||
static const Color bgcolor = Color(0xFFF2F3F8);
|
// static const Color bgcolor = Color(0xFFF2F3F8);
|
||||||
static const Color oldbgcolor = Color.fromARGB(255, 222, 237, 247);
|
// static const Color oldbgcolor = Color.fromARGB(255, 222, 237, 247);
|
||||||
static const Color blueColor = Color.fromARGB(255, 0, 71, 132);
|
// static const Color blueColor = Color.fromARGB(255, 0, 71, 132);
|
||||||
static const Color navcolor = Color(0x1e90ff);
|
// static const Color navcolor = Color(0x1e90ff);
|
||||||
static const Color tabbgColor = Color.fromARGB(255, 0, 112, 184);
|
// static const Color tabbgColor = Color.fromARGB(255, 0, 112, 184);
|
||||||
static const Color bgtopic = Color.fromARGB(255, 210, 214, 222);
|
// static const Color bgtopic = Color.fromARGB(255, 210, 214, 222);
|
||||||
static const Color fonttopic = Color.fromARGB(255, 68, 68, 68);
|
// static const Color fonttopic = Color.fromARGB(255, 68, 68, 68);
|
||||||
static const Color btnGreenColor = Color.fromARGB(255, 46, 166, 100);
|
// static const Color btnGreenColor = Color.fromARGB(255, 46, 166, 100);
|
||||||
static const Color btnBlueColor = Color.fromARGB(255, 0, 102, 204);
|
// static const Color btnBlueColor = Color.fromARGB(255, 0, 102, 204);
|
||||||
static const Color homeCardBackgound =
|
// static const Color homeCardBackgound =
|
||||||
Color.fromRGBO(229, 229, 229, 1); //rgba(243, 243, 243, 1)
|
// Color.fromRGBO(229, 229, 229, 1); //rgba(243, 243, 243, 1)
|
||||||
static const Color onboardButtonColor = Color.fromRGBO(3, 126, 238, 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.0.0.2:8007/api/method/";
|
||||||
static const String domainUrl = "http://192.168.2.109:8007/api/method/";
|
static const String domainUrl = "http://192.168.2.109:8007/api/method/";
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:konectar_events/model/eventsmodel.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/constants.dart';
|
||||||
import 'package:konectar_events/utils/util.dart';
|
import 'package:konectar_events/utils/util.dart';
|
||||||
import 'package:konectar_events/view/hcplist.dart';
|
import 'package:konectar_events/view/hcplist.dart';
|
||||||
|
@ -129,7 +130,7 @@ class _EventsDetailTabState extends State<EventsDetailTab> {
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Container(
|
child: Container(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
// height: isTablet ? height * 0.50 : height * 0.30,
|
// height: isTablet ? height * 0.50 : height * 0.30,
|
||||||
// padding: const EdgeInsets.only(top: 5.0),
|
// padding: const EdgeInsets.only(top: 5.0),
|
||||||
// width: double.maxFinite,
|
// width: double.maxFinite,
|
||||||
|
@ -280,7 +281,7 @@ class _EventsDetailTabState extends State<EventsDetailTab> {
|
||||||
height: 40,
|
height: 40,
|
||||||
child: FloatingActionButton.extended(
|
child: FloatingActionButton.extended(
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
backgroundColor: EventsConstants.oldbgcolor,
|
backgroundColor: AppColors.oldbgcolor,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
isExtended = !isExtended;
|
isExtended = !isExtended;
|
||||||
|
@ -326,7 +327,7 @@ class _EventsDetailTabState extends State<EventsDetailTab> {
|
||||||
height: 40,
|
height: 40,
|
||||||
child: FloatingActionButton.extended(
|
child: FloatingActionButton.extended(
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
backgroundColor: EventsConstants.oldbgcolor,
|
backgroundColor: AppColors.oldbgcolor,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
isExtendedInterested = !isExtendedInterested;
|
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/eventsdetailmodel.dart';
|
||||||
import 'package:konectar_events/model/eventspeakers.dart';
|
import 'package:konectar_events/model/eventspeakers.dart';
|
||||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
import 'package:konectar_events/utils/dateformater.dart';
|
import 'package:konectar_events/utils/dateformater.dart';
|
||||||
import 'package:konectar_events/utils/util.dart';
|
import 'package:konectar_events/utils/util.dart';
|
||||||
|
@ -254,7 +255,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
return Consumer<ViewInteractionProvider>(
|
return Consumer<ViewInteractionProvider>(
|
||||||
builder: (BuildContext context, provider, Widget? child) {
|
builder: (BuildContext context, provider, Widget? child) {
|
||||||
return Container(
|
return Container(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
@ -407,11 +408,11 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
//return SafeArea(
|
//return SafeArea(
|
||||||
return Container(
|
return Container(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: EventsConstants.bgcolor,
|
backgroundColor: AppColors.bgcolor,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
// title: Text(""),
|
// title: Text(""),
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
backgroundColor: EventsConstants.blueColor,
|
backgroundColor: AppColors.blueColor,
|
||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
flexibleSpace: Row(
|
flexibleSpace: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
@ -451,7 +452,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
// decoration: TextDecoration.underline,
|
// decoration: TextDecoration.underline,
|
||||||
// decorationColor: Colors.blue,
|
// decorationColor: Colors.blue,
|
||||||
color: EventsConstants.blueColor,
|
color: AppColors.blueColor,
|
||||||
|
|
||||||
//fontWeight: FontWeight.bold,
|
//fontWeight: FontWeight.bold,
|
||||||
fontSize: isTablet ? 22 : 14,
|
fontSize: isTablet ? 22 : 14,
|
||||||
|
@ -522,7 +523,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.miniEndFloat,
|
floatingActionButtonLocation: FloatingActionButtonLocation.miniEndFloat,
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
// backgroundColor: const Color.fromARGB(255, 222, 237, 247),
|
// backgroundColor: const Color.fromARGB(255, 222, 237, 247),
|
||||||
backgroundColor: EventsConstants.blueColor,
|
backgroundColor: AppColors.blueColor,
|
||||||
tooltip: 'Actions',
|
tooltip: 'Actions',
|
||||||
// heroTag: "floatbtn232342",
|
// heroTag: "floatbtn232342",
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
@ -546,7 +547,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
// child:
|
// child:
|
||||||
|
|
||||||
Container(
|
Container(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
// width: MediaQuery.of(context).size.width,
|
// width: MediaQuery.of(context).size.width,
|
||||||
// constraints: BoxConstraints(minHeight: 120, maxHeight: 130),
|
// constraints: BoxConstraints(minHeight: 120, maxHeight: 130),
|
||||||
//height: 240,
|
//height: 240,
|
||||||
|
@ -729,7 +730,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
color: EventsConstants.blueColor,
|
color: AppColors.blueColor,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
buildCardView(
|
buildCardView(
|
||||||
|
@ -764,7 +765,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
indicatorSize: TabBarIndicatorSize.tab,
|
indicatorSize: TabBarIndicatorSize.tab,
|
||||||
labelColor: Colors.black,
|
labelColor: Colors.black,
|
||||||
tabAlignment: TabAlignment.fill,
|
tabAlignment: TabAlignment.fill,
|
||||||
indicatorColor: EventsConstants.blueColor,
|
indicatorColor: AppColors.blueColor,
|
||||||
unselectedLabelColor: Colors.grey,
|
unselectedLabelColor: Colors.grey,
|
||||||
labelStyle: TextStyle(
|
labelStyle: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
@ -814,7 +815,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
visible: isLoading,
|
visible: isLoading,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: CircularProgressIndicator(
|
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),
|
padding: const EdgeInsets.only(right: 16, top: 8, bottom: 8),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
borderRadius: const BorderRadius.all(
|
borderRadius: const BorderRadius.all(
|
||||||
Radius.circular(38.0),
|
Radius.circular(38.0),
|
||||||
),
|
),
|
||||||
|
@ -926,7 +927,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
Widget getAppBarUI(EventsList eventsList) {
|
Widget getAppBarUI(EventsList eventsList) {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: EventsConstants.blueColor,
|
color: AppColors.blueColor,
|
||||||
boxShadow: <BoxShadow>[
|
boxShadow: <BoxShadow>[
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.grey.withOpacity(0.2),
|
color: Colors.grey.withOpacity(0.2),
|
||||||
|
@ -1397,7 +1398,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
child: FloatingActionButton.extended(
|
child: FloatingActionButton.extended(
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
// heroTag: "following45",
|
// heroTag: "following45",
|
||||||
backgroundColor: EventsConstants.bgcolor,
|
backgroundColor: AppColors.bgcolor,
|
||||||
//backgroundColor: Colors.red,
|
//backgroundColor: Colors.red,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
// String msg = await provider
|
// String msg = await provider
|
||||||
|
@ -1506,7 +1507,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
height: 45,
|
height: 45,
|
||||||
child: FloatingActionButton.extended(
|
child: FloatingActionButton.extended(
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
backgroundColor: EventsConstants.bgcolor,
|
backgroundColor: AppColors.bgcolor,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (!event.eventUserInterest!) {
|
if (!event.eventUserInterest!) {
|
||||||
await provider.addEventsToFavs(event.eventId!);
|
await provider.addEventsToFavs(event.eventId!);
|
||||||
|
@ -1617,7 +1618,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
// :
|
// :
|
||||||
Container(
|
Container(
|
||||||
height: MediaQuery.of(context).size.height,
|
height: MediaQuery.of(context).size.height,
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
padding: EdgeInsets.only(left: 8, right: 8),
|
padding: EdgeInsets.only(left: 8, right: 8),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Expanded(
|
child: Expanded(
|
||||||
|
@ -1739,7 +1740,7 @@ class _EventsListingScreenState extends State<EventsListingScreen>
|
||||||
padding: EdgeInsets.only(left: 8),
|
padding: EdgeInsets.only(left: 8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
// color: Color.fromARGB(179, 248, 238, 238),
|
// color: Color.fromARGB(179, 248, 238, 238),
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
|
@ -2089,7 +2090,7 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
|
||||||
@override
|
@override
|
||||||
Widget build(
|
Widget build(
|
||||||
BuildContext context, double shrinkOffset, bool overlapsContent) {
|
BuildContext context, double shrinkOffset, bool overlapsContent) {
|
||||||
return Container(color: EventsConstants.tabbgColor, child: _tabBar);
|
return Container(color: AppColors.tabbgColor, child: _tabBar);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -5,6 +5,7 @@ import 'package:flutter/widgets.dart';
|
||||||
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
import 'package:konectar_events/model/eventsdetailmodel.dart';
|
||||||
import 'package:konectar_events/model/eventsmodel.dart';
|
import 'package:konectar_events/model/eventsmodel.dart';
|
||||||
import 'package:konectar_events/model/neweventsmodel.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/constants.dart';
|
||||||
import 'package:konectar_events/utils/dateformater.dart';
|
import 'package:konectar_events/utils/dateformater.dart';
|
||||||
|
@ -73,7 +74,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
||||||
return DefaultTabController(
|
return DefaultTabController(
|
||||||
length: 4,
|
length: 4,
|
||||||
//child: SafeArea(
|
//child: SafeArea(
|
||||||
// appBar: CustomAppBar(title: "", backgroundcolor: EventsConstants.bgcolor),
|
// appBar: CustomAppBar(title: "", backgroundcolor: AppColors.bgcolor),
|
||||||
//body:
|
//body:
|
||||||
// NestedScrollView(
|
// NestedScrollView(
|
||||||
// headerSliverBuilder:
|
// headerSliverBuilder:
|
||||||
|
@ -87,7 +88,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
||||||
// floating: false,
|
// floating: false,
|
||||||
// pinned: true,
|
// pinned: true,
|
||||||
// stretch: false,
|
// stretch: false,
|
||||||
// backgroundColor: EventsConstants.bgcolor,
|
// backgroundColor: AppColors.bgcolor,
|
||||||
// flexibleSpace: FlexibleSpaceBar(
|
// flexibleSpace: FlexibleSpaceBar(
|
||||||
// centerTitle: false,
|
// centerTitle: false,
|
||||||
// expandedTitleScale: 2.4,
|
// expandedTitleScale: 2.4,
|
||||||
|
@ -156,11 +157,11 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
||||||
//return SafeArea(
|
//return SafeArea(
|
||||||
return Container(
|
return Container(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: EventsConstants.bgcolor,
|
backgroundColor: AppColors.bgcolor,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
// title: Text(""),
|
// title: Text(""),
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
backgroundColor: EventsConstants.blueColor,
|
backgroundColor: AppColors.blueColor,
|
||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
flexibleSpace: Row(
|
flexibleSpace: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
@ -200,7 +201,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
// decoration: TextDecoration.underline,
|
// decoration: TextDecoration.underline,
|
||||||
// decorationColor: Colors.blue,
|
// decorationColor: Colors.blue,
|
||||||
color: EventsConstants.blueColor,
|
color: AppColors.blueColor,
|
||||||
|
|
||||||
//fontWeight: FontWeight.bold,
|
//fontWeight: FontWeight.bold,
|
||||||
fontSize: isTablet ? 22 : 14,
|
fontSize: isTablet ? 22 : 14,
|
||||||
|
@ -260,7 +261,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.miniEndFloat,
|
floatingActionButtonLocation: FloatingActionButtonLocation.miniEndFloat,
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
// backgroundColor: const Color.fromARGB(255, 222, 237, 247),
|
// backgroundColor: const Color.fromARGB(255, 222, 237, 247),
|
||||||
backgroundColor: EventsConstants.blueColor,
|
backgroundColor: AppColors.blueColor,
|
||||||
tooltip: 'Actions',
|
tooltip: 'Actions',
|
||||||
// heroTag: "floatbtn232342",
|
// heroTag: "floatbtn232342",
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
@ -268,7 +269,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
height: 240,
|
height: 240,
|
||||||
child: Center(
|
child: Center(
|
||||||
|
@ -412,7 +413,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
color: EventsConstants.blueColor,
|
color: AppColors.blueColor,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
buildCardView(
|
buildCardView(
|
||||||
|
@ -447,7 +448,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
||||||
indicatorSize: TabBarIndicatorSize.tab,
|
indicatorSize: TabBarIndicatorSize.tab,
|
||||||
labelColor: Colors.black,
|
labelColor: Colors.black,
|
||||||
tabAlignment: TabAlignment.fill,
|
tabAlignment: TabAlignment.fill,
|
||||||
indicatorColor: EventsConstants.blueColor,
|
indicatorColor: AppColors.blueColor,
|
||||||
unselectedLabelColor: Colors.grey,
|
unselectedLabelColor: Colors.grey,
|
||||||
labelStyle: TextStyle(
|
labelStyle: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
@ -490,7 +491,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
||||||
padding: const EdgeInsets.only(right: 16, top: 8, bottom: 8),
|
padding: const EdgeInsets.only(right: 16, top: 8, bottom: 8),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
borderRadius: const BorderRadius.all(
|
borderRadius: const BorderRadius.all(
|
||||||
Radius.circular(38.0),
|
Radius.circular(38.0),
|
||||||
),
|
),
|
||||||
|
@ -557,7 +558,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
||||||
Widget getAppBarUI(EventsList eventsList) {
|
Widget getAppBarUI(EventsList eventsList) {
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: EventsConstants.blueColor,
|
color: AppColors.blueColor,
|
||||||
boxShadow: <BoxShadow>[
|
boxShadow: <BoxShadow>[
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.grey.withOpacity(0.2),
|
color: Colors.grey.withOpacity(0.2),
|
||||||
|
@ -1015,7 +1016,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
||||||
child: FloatingActionButton.extended(
|
child: FloatingActionButton.extended(
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
// heroTag: "following45",
|
// heroTag: "following45",
|
||||||
backgroundColor: EventsConstants.bgcolor,
|
backgroundColor: AppColors.bgcolor,
|
||||||
//backgroundColor: Colors.red,
|
//backgroundColor: Colors.red,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
// String msg = await provider
|
// String msg = await provider
|
||||||
|
@ -1125,7 +1126,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
||||||
height: 45,
|
height: 45,
|
||||||
child: FloatingActionButton.extended(
|
child: FloatingActionButton.extended(
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
backgroundColor: EventsConstants.bgcolor,
|
backgroundColor: AppColors.bgcolor,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (!event.isfav) {
|
if (!event.isfav) {
|
||||||
event.isfav = !event.isfav;
|
event.isfav = !event.isfav;
|
||||||
|
@ -1213,7 +1214,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
||||||
// :
|
// :
|
||||||
Container(
|
Container(
|
||||||
height: MediaQuery.of(context).size.height,
|
height: MediaQuery.of(context).size.height,
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
padding: EdgeInsets.only(left: 8, right: 8),
|
padding: EdgeInsets.only(left: 8, right: 8),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
|
@ -1317,7 +1318,7 @@ class _EventsListingOfflineScreenState extends State<EventsListingOfflineScreen>
|
||||||
padding: EdgeInsets.only(left: 8),
|
padding: EdgeInsets.only(left: 8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
// color: Color.fromARGB(179, 248, 238, 238),
|
// color: Color.fromARGB(179, 248, 238, 238),
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
|
@ -1654,7 +1655,7 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
|
||||||
@override
|
@override
|
||||||
Widget build(
|
Widget build(
|
||||||
BuildContext context, double shrinkOffset, bool overlapsContent) {
|
BuildContext context, double shrinkOffset, bool overlapsContent) {
|
||||||
return Container(color: EventsConstants.tabbgColor, child: _tabBar);
|
return Container(color: AppColors.tabbgColor, child: _tabBar);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:konectar_events/model/neweventsmodel.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/constants.dart';
|
||||||
import 'package:konectar_events/view/eventslist.dart';
|
import 'package:konectar_events/view/eventslist.dart';
|
||||||
import 'package:word_cloud/word_cloud_data.dart';
|
import 'package:word_cloud/word_cloud_data.dart';
|
||||||
|
@ -105,7 +106,7 @@ class _EventsTabState extends State<EventsTab> {
|
||||||
top: false,
|
top: false,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
bottomNavigationBar: BottomNavigationBar(
|
bottomNavigationBar: BottomNavigationBar(
|
||||||
backgroundColor: EventsConstants.blueColor,
|
backgroundColor: AppColors.blueColor,
|
||||||
type: BottomNavigationBarType.fixed,
|
type: BottomNavigationBarType.fixed,
|
||||||
currentIndex: _selectedIndex,
|
currentIndex: _selectedIndex,
|
||||||
//backgroundColor: Color.fromARGB(255, 35, 79, 150),
|
//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/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/custombutton.dart';
|
import 'package:konectar_events/contacts_module/ui_screen/interactionform/widget/custombutton.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
import 'package:konectar_events/widgets/customappbar.dart';
|
import 'package:konectar_events/widgets/customappbar.dart';
|
||||||
import 'package:konectar_events/widgets/customtextfield.dart';
|
import 'package:konectar_events/widgets/customtextfield.dart';
|
||||||
|
@ -71,7 +72,7 @@ class _HelpDeskScreenState extends State<HelpDeskScreen> {
|
||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: Colors.white),
|
||||||
),
|
),
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
backgroundColor: EventsConstants.blueColor,
|
backgroundColor: AppColors.blueColor,
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
),
|
),
|
||||||
body: Container(
|
body: Container(
|
||||||
|
@ -152,7 +153,7 @@ class _HelpDeskScreenState extends State<HelpDeskScreen> {
|
||||||
),
|
),
|
||||||
Center(
|
Center(
|
||||||
child: CustomButton(
|
child: CustomButton(
|
||||||
backgroundColor: EventsConstants.blueColor,
|
backgroundColor: AppColors.blueColor,
|
||||||
onPressed: () => (),
|
onPressed: () => (),
|
||||||
title: "Submit",
|
title: "Submit",
|
||||||
textColor: Colors.white,
|
textColor: Colors.white,
|
||||||
|
|
|
@ -10,10 +10,12 @@ import 'package:flutter/services.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart';
|
import 'package: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/contacts_module/custom_widget/show_alert.dart';
|
||||||
import 'package:konectar_events/model/keywords_model.dart';
|
import 'package:konectar_events/model/keywords_model.dart';
|
||||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||||
import 'package:konectar_events/utils/apicall.dart';
|
import 'package:konectar_events/utils/apicall.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
import 'package:konectar_events/utils/dateformater.dart';
|
import 'package:konectar_events/utils/dateformater.dart';
|
||||||
import 'package:konectar_events/utils/util.dart';
|
import 'package:konectar_events/utils/util.dart';
|
||||||
|
@ -338,7 +340,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
endDrawer: populateDrawer(provider),
|
endDrawer: populateDrawer(provider),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
backgroundColor: EventsConstants.blueColor,
|
backgroundColor: AppColors.blueColor,
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
title: _isSearch
|
title: _isSearch
|
||||||
? Padding(
|
? Padding(
|
||||||
|
@ -378,7 +380,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
fillColor: EventsConstants.blueColor,
|
fillColor: AppColors.blueColor,
|
||||||
contentPadding: EdgeInsets.symmetric(vertical: 9.0),
|
contentPadding: EdgeInsets.symmetric(vertical: 9.0),
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
hintText: "Search for events...",
|
hintText: "Search for events...",
|
||||||
|
@ -462,7 +464,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
body: Container(
|
body: Container(
|
||||||
//color: EventsConstants.bgcolor,
|
//color: AppColors.bgcolor,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
child: buildPaginationListView(context, provider)),
|
child: buildPaginationListView(context, provider)),
|
||||||
),
|
),
|
||||||
|
@ -485,7 +487,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 24,
|
height: 24,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
boxShadow: <BoxShadow>[
|
boxShadow: <BoxShadow>[
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.grey.withOpacity(0.2),
|
color: Colors.grey.withOpacity(0.2),
|
||||||
|
@ -496,7 +498,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
//color: EventsConstants.bgcolor,
|
//color: AppColors.bgcolor,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding:
|
||||||
|
@ -564,31 +566,23 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 8.0, right: 2.0),
|
padding: const EdgeInsets.only(left: 8.0, right: 2.0),
|
||||||
child: CupertinoSwitch(
|
|
||||||
activeColor: Color.fromARGB(255, 0, 71, 132),
|
child: CustomSwitch(
|
||||||
value: provider.isFavSeleted,
|
activeclor: AppColors.blueColor,
|
||||||
onChanged: (value) {
|
switchvalue: provider.isFavSeleted,
|
||||||
|
onchanged: (value) {
|
||||||
provider.isFavSeleted = value;
|
provider.isFavSeleted = value;
|
||||||
if (provider.isFavSeleted) {
|
if (provider.isFavSeleted) {
|
||||||
pagingController.refresh();
|
pagingController.refresh();
|
||||||
|
|
||||||
//_pagingController.
|
|
||||||
// _pagingController
|
|
||||||
// .addPageRequestListener((pageKey) {
|
|
||||||
// await _fetchPage(0);
|
|
||||||
// });
|
|
||||||
} else {
|
} else {
|
||||||
provider.isFavSeleted = false;
|
provider.isFavSeleted = false;
|
||||||
provider.isAllSelected = !provider.isAllSelected;
|
provider.isAllSelected = !provider.isAllSelected;
|
||||||
pagingController.refresh();
|
pagingController.refresh();
|
||||||
// _pagingController
|
|
||||||
// .addPageRequestListener((pageKey) {
|
|
||||||
// await _fetchPage(0);
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
// ),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(right: 8.0, top: 9.0),
|
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),
|
padding: const EdgeInsets.only(right: 12, top: 8, bottom: 8),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
borderRadius: const BorderRadius.all(
|
borderRadius: const BorderRadius.all(
|
||||||
Radius.circular(24.0),
|
Radius.circular(24.0),
|
||||||
),
|
),
|
||||||
|
@ -932,28 +926,20 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
|
|
||||||
populateDrawer(EventsProvider provider) {
|
populateDrawer(EventsProvider provider) {
|
||||||
return Theme(
|
return Theme(
|
||||||
data: Theme.of(context).copyWith(canvasColor: EventsConstants.bgcolor),
|
data: Theme.of(context).copyWith(canvasColor: AppColors.bgcolor),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: MediaQuery.of(context).size.width * 0.60,
|
width: MediaQuery.of(context).size.width * 0.60,
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
child: Drawer(
|
child: Drawer(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
// DrawerHeader(
|
|
||||||
// child: Center(
|
|
||||||
// child: Text('Filters'),
|
|
||||||
// // child: Image.asset("assets/images/lf_logo.png",
|
|
||||||
// // height: 100, width: 100),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
Container(
|
Container(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
padding: EdgeInsets.only(top: 20, left: 5.0),
|
padding: EdgeInsets.only(top: 20, left: 5.0),
|
||||||
),
|
),
|
||||||
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 8.0),
|
padding: const EdgeInsets.only(left: 8.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
@ -976,29 +962,6 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
style: TextStyle(fontSize: 20),
|
style: TextStyle(fontSize: 20),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
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(
|
SizedBox(
|
||||||
width: 8.0,
|
width: 8.0,
|
||||||
),
|
),
|
||||||
|
@ -1009,39 +972,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
height: 7,
|
height: 7,
|
||||||
color: Colors.black,
|
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(
|
Wrap(
|
||||||
//spacing: 4,
|
|
||||||
// runSpacing: 4,
|
|
||||||
// crossAxisAlignment: WrapCrossAlignment.start,
|
|
||||||
// runAlignment: WrapAlignment.spaceEvenly,
|
|
||||||
// alignment: WrapAlignment.spaceEvenly,
|
|
||||||
// direction: Axis.horizontal,
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: isTablet
|
width: isTablet
|
||||||
|
@ -1156,7 +1087,6 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
Divider(
|
Divider(
|
||||||
height: 1,
|
height: 1,
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
|
@ -1527,9 +1457,9 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
},
|
},
|
||||||
child: Card(
|
child: Card(
|
||||||
//elevation: 4,
|
//elevation: 4,
|
||||||
color: EventsConstants.homeCardBackgound,
|
color: AppColors.homeCardBackgound,
|
||||||
//surfaceTintColor: Colors.white,
|
//surfaceTintColor: Colors.white,
|
||||||
surfaceTintColor: EventsConstants.homeCardBackgound,
|
surfaceTintColor: AppColors.homeCardBackgound,
|
||||||
// shadowColor: Constants.bgcolor,
|
// shadowColor: Constants.bgcolor,
|
||||||
child: buildCardView(context, eventsList, provider),
|
child: buildCardView(context, eventsList, provider),
|
||||||
),
|
),
|
||||||
|
@ -1602,7 +1532,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
},
|
},
|
||||||
child: Card(
|
child: Card(
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
shadowColor: EventsConstants.bgcolor,
|
shadowColor: AppColors.bgcolor,
|
||||||
child: buildCardView(
|
child: buildCardView(
|
||||||
context, provider.eventList[index], provider)));
|
context, provider.eventList[index], provider)));
|
||||||
},
|
},
|
||||||
|
@ -1628,7 +1558,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
// color: Color.fromARGB(179, 248, 238, 238),
|
// color: Color.fromARGB(179, 248, 238, 238),
|
||||||
|
|
||||||
// color: Colors.white,
|
// color: Colors.white,
|
||||||
color: EventsConstants.homeCardBackgound,
|
color: AppColors.homeCardBackgound,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20))),
|
borderRadius: BorderRadius.all(Radius.circular(20))),
|
||||||
// height: MediaQuery.of(context).size.height * 0.2,
|
// height: MediaQuery.of(context).size.height * 0.2,
|
||||||
// height: 136,
|
// height: 136,
|
||||||
|
@ -1659,11 +1589,11 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
text: TextSpan(children: [
|
text: TextSpan(children: [
|
||||||
// WidgetSpan(
|
// WidgetSpan(
|
||||||
// child: Icon(Icons.bookmark,
|
// child: Icon(Icons.bookmark,
|
||||||
// color: EventsConstants.blueColor,
|
// color: AppColors.blueColor,
|
||||||
// size: isTablet ? 14 : 18)
|
// size: isTablet ? 14 : 18)
|
||||||
// // provider.ifOfflineExists(event.eventId!)
|
// // provider.ifOfflineExists(event.eventId!)
|
||||||
// // ? Icon(Icons.bookmark,
|
// // ? Icon(Icons.bookmark,
|
||||||
// // color: EventsConstants.blueColor,
|
// // color: AppColors.blueColor,
|
||||||
// // size: isTablet ? 14 : 18)
|
// // size: isTablet ? 14 : 18)
|
||||||
// // : SizedBox.shrink(),
|
// // : SizedBox.shrink(),
|
||||||
// ),
|
// ),
|
||||||
|
@ -1765,7 +1695,7 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
text: TextSpan(children: [
|
text: TextSpan(children: [
|
||||||
WidgetSpan(
|
WidgetSpan(
|
||||||
child: Icon(Icons.bookmark,
|
child: Icon(Icons.bookmark,
|
||||||
color: EventsConstants.blueColor,
|
color: AppColors.blueColor,
|
||||||
size: isTablet ? 14 : 16),
|
size: isTablet ? 14 : 16),
|
||||||
),
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
|
@ -1798,9 +1728,8 @@ class _HomeScreenState extends State<HomeScreen> with TickerProviderStateMixin {
|
||||||
child: FloatingActionButton.extended(
|
child: FloatingActionButton.extended(
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
shape: CircleBorder(),
|
shape: CircleBorder(),
|
||||||
backgroundColor:
|
backgroundColor: AppColors.bgcolor,
|
||||||
EventsConstants.bgcolor,
|
//backgroundColor: AppColors.homeCardBackgound,
|
||||||
//backgroundColor: EventsConstants.homeCardBackgound,
|
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
// event.isfav = !event.isfav;
|
// 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/keywords_model.dart';
|
||||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||||
import 'package:konectar_events/utils/apicall.dart';
|
import 'package:konectar_events/utils/apicall.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
import 'package:konectar_events/utils/util.dart';
|
import 'package:konectar_events/utils/util.dart';
|
||||||
|
|
||||||
|
@ -227,7 +228,7 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
||||||
endDrawer: populateDrawer(provider),
|
endDrawer: populateDrawer(provider),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
backgroundColor: EventsConstants.blueColor,
|
backgroundColor: AppColors.blueColor,
|
||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
title: _isSearch
|
title: _isSearch
|
||||||
? Container(
|
? Container(
|
||||||
|
@ -246,7 +247,7 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
fillColor: EventsConstants.blueColor,
|
fillColor: AppColors.blueColor,
|
||||||
contentPadding: EdgeInsets.symmetric(vertical: 9.0),
|
contentPadding: EdgeInsets.symmetric(vertical: 9.0),
|
||||||
border: OutlineInputBorder(),
|
border: OutlineInputBorder(),
|
||||||
hintText: "Search for events...",
|
hintText: "Search for events...",
|
||||||
|
@ -321,7 +322,7 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
body: Container(
|
body: Container(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
child: buildListView(context, provider)),
|
child: buildListView(context, provider)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -342,7 +343,7 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 24,
|
height: 24,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
boxShadow: <BoxShadow>[
|
boxShadow: <BoxShadow>[
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.grey.withOpacity(0.2),
|
color: Colors.grey.withOpacity(0.2),
|
||||||
|
@ -353,7 +354,7 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.only(left: 16, right: 16, top: 8, bottom: 4),
|
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),
|
padding: const EdgeInsets.only(right: 12, top: 8, bottom: 8),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
borderRadius: const BorderRadius.all(
|
borderRadius: const BorderRadius.all(
|
||||||
Radius.circular(24.0),
|
Radius.circular(24.0),
|
||||||
),
|
),
|
||||||
|
@ -762,10 +763,10 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
||||||
|
|
||||||
populateDrawer(EventsOfflineProvider provider) {
|
populateDrawer(EventsOfflineProvider provider) {
|
||||||
return Theme(
|
return Theme(
|
||||||
data: Theme.of(context).copyWith(canvasColor: EventsConstants.bgcolor),
|
data: Theme.of(context).copyWith(canvasColor: AppColors.bgcolor),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: MediaQuery.of(context).size.width * 0.60,
|
width: MediaQuery.of(context).size.width * 0.60,
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
child: Drawer(
|
child: Drawer(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
|
@ -1429,7 +1430,7 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
||||||
},
|
},
|
||||||
child: Card(
|
child: Card(
|
||||||
elevation: 2,
|
elevation: 2,
|
||||||
shadowColor: EventsConstants.bgcolor,
|
shadowColor: AppColors.bgcolor,
|
||||||
child: buildCardView(
|
child: buildCardView(
|
||||||
context, provider.eventList[index], provider)));
|
context, provider.eventList[index], provider)));
|
||||||
},
|
},
|
||||||
|
@ -1561,7 +1562,7 @@ class _OfflineHomeScreenState extends State<OfflineHomeScreen>
|
||||||
child: FloatingActionButton.extended(
|
child: FloatingActionButton.extended(
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
shape: CircleBorder(),
|
shape: CircleBorder(),
|
||||||
backgroundColor: EventsConstants.bgcolor,
|
backgroundColor: AppColors.bgcolor,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
// String msg = await provider
|
// String msg = await provider
|
||||||
// .addEventsToFavs(event.eventId!);
|
// .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/allsessionnotesmodel.dart';
|
||||||
import 'package:konectar_events/model/neweventsmodel.dart';
|
import 'package:konectar_events/model/neweventsmodel.dart';
|
||||||
import 'package:konectar_events/model/specialtymodel.dart';
|
import 'package:konectar_events/model/specialtymodel.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
import 'package:konectar_events/viewmodel/eventsprovider.dart';
|
import 'package:konectar_events/viewmodel/eventsprovider.dart';
|
||||||
import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
|
import 'package:konectar_events/viewmodel/hcpprofprovider.dart';
|
||||||
|
@ -80,7 +81,7 @@ class _EventsInsightsState extends State<EventsInsights> {
|
||||||
widgets.add(ScatterItem(widget.kFlutterHashtags[i], i));
|
widgets.add(ScatterItem(widget.kFlutterHashtags[i], i));
|
||||||
}
|
}
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: EventsConstants.bgcolor,
|
backgroundColor: AppColors.bgcolor,
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
|
@ -135,7 +136,7 @@ class _EventsInsightsState extends State<EventsInsights> {
|
||||||
provider.isLoadingInsights
|
provider.isLoadingInsights
|
||||||
? Center(
|
? Center(
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
color: EventsConstants.blueColor,
|
color: AppColors.blueColor,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: _buildCharts(provider, widgets),
|
: _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/userdata_model.dart';
|
||||||
import 'package:konectar_events/model/verify_user_resp.dart';
|
import 'package:konectar_events/model/verify_user_resp.dart';
|
||||||
import 'package:konectar_events/utils/apicall.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/constants.dart';
|
||||||
import 'package:konectar_events/utils/sessionmanager.dart';
|
import 'package:konectar_events/utils/sessionmanager.dart';
|
||||||
import 'package:konectar_events/utils/util.dart';
|
import 'package:konectar_events/utils/util.dart';
|
||||||
|
@ -140,48 +141,6 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||||
|
|
||||||
List<Widget> _buildBody(Orientation orientation, LoginProvider provider) {
|
List<Widget> _buildBody(Orientation orientation, LoginProvider provider) {
|
||||||
return [
|
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(
|
SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
|
@ -323,7 +282,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||||
),
|
),
|
||||||
Center(
|
Center(
|
||||||
child: CustomButton(
|
child: CustomButton(
|
||||||
backgroundColor: EventsConstants.onboardButtonColor,
|
backgroundColor: AppColors.onboardButtonColor,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (textFieldsValidation(provider).isEmpty) {
|
if (textFieldsValidation(provider).isEmpty) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -331,28 +290,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||||
provider.loading = true;
|
provider.loading = true;
|
||||||
});
|
});
|
||||||
print("email:${emailTextController.text}");
|
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");
|
print("FIRST LOGIN");
|
||||||
if (!provider.showCodeField) {
|
if (!provider.showCodeField) {
|
||||||
provider.email = emailTextController.text;
|
provider.email = emailTextController.text;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:animations/animations.dart';
|
import 'package:animations/animations.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
|
|
||||||
class CenterNextButton extends StatelessWidget {
|
class CenterNextButton extends StatelessWidget {
|
||||||
|
@ -76,7 +77,7 @@ class CenterNextButton extends StatelessWidget {
|
||||||
borderRadius: BorderRadius.circular(
|
borderRadius: BorderRadius.circular(
|
||||||
8 + 32 * (1 - _signUpMoveAnimation.value)),
|
8 + 32 * (1 - _signUpMoveAnimation.value)),
|
||||||
//color: Color(0xff132137),
|
//color: Color(0xff132137),
|
||||||
color: EventsConstants.onboardButtonColor,
|
color: AppColors.onboardButtonColor,
|
||||||
),
|
),
|
||||||
child: PageTransitionSwitcher(
|
child: PageTransitionSwitcher(
|
||||||
duration: Duration(milliseconds: 480),
|
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_editinteraction.dart';
|
||||||
import 'package:konectar_events/contacts_module/ui_screen/new_viewinteraction.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/app_theme.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
import 'package:konectar_events/utils/dateformater.dart';
|
import 'package:konectar_events/utils/dateformater.dart';
|
||||||
import 'package:konectar_events/view/helpdesk.dart';
|
import 'package:konectar_events/view/helpdesk.dart';
|
||||||
|
@ -48,10 +49,10 @@ class _NavigationHomeScreenState extends State<NavigationHomeScreen> {
|
||||||
onDrawerCall: (DrawerIndex drawerIndexdata) async {
|
onDrawerCall: (DrawerIndex drawerIndexdata) async {
|
||||||
bool checkContacts = await HiveOperations.checkIfApiExists(
|
bool checkContacts = await HiveOperations.checkIfApiExists(
|
||||||
EventsConstants.contactsListapi, EventsConstants.moduleName);
|
EventsConstants.contactsListapi, EventsConstants.moduleName);
|
||||||
if (!checkContacts && drawerIndexdata.name == "Contacts") {
|
// if (!checkContacts && drawerIndexdata.name == "Contacts") {
|
||||||
} else {
|
// } else {
|
||||||
changeIndex(drawerIndexdata);
|
changeIndex(drawerIndexdata);
|
||||||
}
|
// }
|
||||||
//callback from drawer for replace screen as user need with passing DrawerIndex(Enum index)
|
//callback from drawer for replace screen as user need with passing DrawerIndex(Enum index)
|
||||||
},
|
},
|
||||||
screenView: screenView,
|
screenView: screenView,
|
||||||
|
@ -66,7 +67,7 @@ class _NavigationHomeScreenState extends State<NavigationHomeScreen> {
|
||||||
return Consumer<ViewInteractionProvider>(
|
return Consumer<ViewInteractionProvider>(
|
||||||
builder: (BuildContext context, provider, Widget? child) {
|
builder: (BuildContext context, provider, Widget? child) {
|
||||||
return Container(
|
return Container(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|
|
@ -26,6 +26,7 @@ import 'package:konectar_events/model/eventsdetailmodel.dart';
|
||||||
import 'package:konectar_events/model/eventspeakers.dart';
|
import 'package:konectar_events/model/eventspeakers.dart';
|
||||||
import 'package:konectar_events/model/sessionnotesmodel.dart';
|
import 'package:konectar_events/model/sessionnotesmodel.dart';
|
||||||
import 'package:konectar_events/model/sessionstopics_model.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/constants.dart';
|
||||||
import 'package:konectar_events/utils/dateformater.dart';
|
import 'package:konectar_events/utils/dateformater.dart';
|
||||||
import 'package:konectar_events/utils/util.dart';
|
import 'package:konectar_events/utils/util.dart';
|
||||||
|
@ -235,11 +236,11 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
return DefaultTabController(
|
return DefaultTabController(
|
||||||
length: provider.tabs.length,
|
length: provider.tabs.length,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: EventsConstants.bgcolor,
|
backgroundColor: AppColors.bgcolor,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
// title: Text(""),
|
// title: Text(""),
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
backgroundColor: EventsConstants.blueColor,
|
backgroundColor: AppColors.blueColor,
|
||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
flexibleSpace: FlexibleSpaceBar(
|
flexibleSpace: FlexibleSpaceBar(
|
||||||
background: Padding(
|
background: Padding(
|
||||||
|
@ -291,7 +292,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
SliverAppBar(
|
SliverAppBar(
|
||||||
expandedHeight: 280.0,
|
expandedHeight: 280.0,
|
||||||
// expandedHeight: MediaQuery.of(context).size.height * 0.25,
|
// expandedHeight: MediaQuery.of(context).size.height * 0.25,
|
||||||
backgroundColor: EventsConstants.bgcolor,
|
backgroundColor: AppColors.bgcolor,
|
||||||
//backgroundColor: Colors.white,
|
//backgroundColor: Colors.white,
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
floating: false,
|
floating: false,
|
||||||
|
@ -325,7 +326,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
indicatorSize: TabBarIndicatorSize.tab,
|
indicatorSize: TabBarIndicatorSize.tab,
|
||||||
tabAlignment: TabAlignment.fill,
|
tabAlignment: TabAlignment.fill,
|
||||||
labelColor: Colors.black,
|
labelColor: Colors.black,
|
||||||
indicatorColor: EventsConstants.blueColor,
|
indicatorColor: AppColors.blueColor,
|
||||||
labelStyle: TextStyle(
|
labelStyle: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
|
@ -400,9 +401,9 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
begin: Alignment.bottomCenter,
|
begin: Alignment.bottomCenter,
|
||||||
end: Alignment.topCenter,
|
end: Alignment.topCenter,
|
||||||
colors: [
|
colors: [
|
||||||
EventsConstants.blueColor,
|
AppColors.blueColor,
|
||||||
EventsConstants.blueColor,
|
AppColors.blueColor,
|
||||||
EventsConstants.blueColor,
|
AppColors.blueColor,
|
||||||
// const Color.fromARGB(255, 222, 237, 247),
|
// const Color.fromARGB(255, 222, 237, 247),
|
||||||
// const Color.fromARGB(255, 222, 237, 247),
|
// const Color.fromARGB(255, 222, 237, 247),
|
||||||
// Color(0xff006df1)
|
// Color(0xff006df1)
|
||||||
|
@ -681,7 +682,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
// sessionList = eventsdetail.sessionName!.split(',');
|
// sessionList = eventsdetail.sessionName!.split(',');
|
||||||
sessionList = widget.sessionNames;
|
sessionList = widget.sessionNames;
|
||||||
return Container(
|
return Container(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
@ -819,7 +820,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
height: 40,
|
height: 40,
|
||||||
child:
|
child:
|
||||||
// CustomButton(
|
// CustomButton(
|
||||||
// backgroundColor: EventsConstants.btnGreenColor,
|
// backgroundColor: AppColors.btnGreenColor,
|
||||||
// onPressed: () async {
|
// onPressed: () async {
|
||||||
// isLoading = true;
|
// isLoading = true;
|
||||||
|
|
||||||
|
@ -977,7 +978,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
visible: isLoading,
|
visible: isLoading,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
color: EventsConstants.blueColor,
|
color: AppColors.blueColor,
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -991,7 +992,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
// padding: EdgeInsets.all(4.0),
|
// padding: EdgeInsets.all(4.0),
|
||||||
// child: Text('Cancel',
|
// child: Text('Cancel',
|
||||||
// style: TextStyle(
|
// style: TextStyle(
|
||||||
// fontSize: 14, color: EventsConstants.blueColor)),
|
// fontSize: 14, color: AppColors.blueColor)),
|
||||||
// ),
|
// ),
|
||||||
child: OutlinedButton(
|
child: OutlinedButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
@ -1033,7 +1034,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
// ),
|
// ),
|
||||||
// child: const Text('Cancel',
|
// child: const Text('Cancel',
|
||||||
// style: TextStyle(
|
// style: TextStyle(
|
||||||
// fontSize: 14, color: EventsConstants.blueColor)),
|
// fontSize: 14, color: AppColors.blueColor)),
|
||||||
// onPressed: () {
|
// onPressed: () {
|
||||||
// enableCancel = false;
|
// enableCancel = false;
|
||||||
// notesController.clear();
|
// notesController.clear();
|
||||||
|
@ -1242,7 +1243,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
padding: EdgeInsets.only(left: 8),
|
padding: EdgeInsets.only(left: 8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
// color: Color.fromARGB(179, 248, 238, 238),
|
// color: Color.fromARGB(179, 248, 238, 238),
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
),
|
),
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
padding: EdgeInsets.only(top: 10.0, left: 4.0),
|
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,
|
// minWidth: MediaQuery.of(context).size.width * 0.34,
|
||||||
maxWidth: MediaQuery.of(context).size.width),
|
maxWidth: MediaQuery.of(context).size.width),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: EventsConstants.bgtopic,
|
color: AppColors.bgtopic,
|
||||||
border: Border.all(color: Colors.grey),
|
border: Border.all(color: Colors.grey),
|
||||||
borderRadius: BorderRadius.all(
|
borderRadius: BorderRadius.all(
|
||||||
Radius.circular(10.0),
|
Radius.circular(10.0),
|
||||||
|
@ -1358,7 +1359,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
overflow: TextOverflow.clip,
|
overflow: TextOverflow.clip,
|
||||||
color: EventsConstants.fonttopic,
|
color: AppColors.fonttopic,
|
||||||
fontSize: isTablet ? 16 : 14),
|
fontSize: isTablet ? 16 : 14),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -1371,7 +1372,7 @@ class _HCPProfileScreenState extends State<HCPProfileScreen> {
|
||||||
return Consumer<ViewInteractionProvider>(
|
return Consumer<ViewInteractionProvider>(
|
||||||
builder: (BuildContext context, provider, Widget? child) {
|
builder: (BuildContext context, provider, Widget? child) {
|
||||||
return Container(
|
return Container(
|
||||||
color: EventsConstants.bgcolor,
|
color: AppColors.bgcolor,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
@ -1549,8 +1550,8 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
|
||||||
// end: Alignment.topCenter,
|
// end: Alignment.topCenter,
|
||||||
// colors: [
|
// colors: [
|
||||||
// // Constants.blueColor,
|
// // Constants.blueColor,
|
||||||
// EventsConstants.tabbgColor,
|
// AppColors.tabbgColor,
|
||||||
// EventsConstants.blueColor,
|
// AppColors.blueColor,
|
||||||
// // Constants.tabbgColor,
|
// // Constants.tabbgColor,
|
||||||
// // const Color.fromARGB(255, 222, 237, 247),
|
// // const Color.fromARGB(255, 222, 237, 247),
|
||||||
// // 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,
|
begin: Alignment.bottomCenter,
|
||||||
end: Alignment.topCenter,
|
end: Alignment.topCenter,
|
||||||
colors: [
|
colors: [
|
||||||
EventsConstants.blueColor,
|
AppColors.blueColor,
|
||||||
EventsConstants.blueColor,
|
AppColors.blueColor,
|
||||||
EventsConstants.blueColor,
|
AppColors.blueColor,
|
||||||
// const Color.fromARGB(255, 222, 237, 247),
|
// const Color.fromARGB(255, 222, 237, 247),
|
||||||
// const Color.fromARGB(255, 222, 237, 247),
|
// const Color.fromARGB(255, 222, 237, 247),
|
||||||
// Color(0xff006df1)
|
// Color(0xff006df1)
|
||||||
|
|
|
@ -3,6 +3,7 @@ import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_scatter/flutter_scatter.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/constants.dart';
|
||||||
import 'package:konectar_events/utils/util.dart';
|
import 'package:konectar_events/utils/util.dart';
|
||||||
import 'package:konectar_events/widgets/customappbar.dart';
|
import 'package:konectar_events/widgets/customappbar.dart';
|
||||||
|
@ -36,7 +37,7 @@ class _SocialMediaState extends State<SocialMedia> {
|
||||||
final screenSize = MediaQuery.of(context).size;
|
final screenSize = MediaQuery.of(context).size;
|
||||||
final ratio = screenSize.width / (screenSize.height / 2);
|
final ratio = screenSize.width / (screenSize.height / 2);
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: EventsConstants.bgcolor,
|
backgroundColor: AppColors.bgcolor,
|
||||||
// appBar: CustomAppBar(
|
// appBar: CustomAppBar(
|
||||||
// title: "Social Media",
|
// title: "Social Media",
|
||||||
// fontColor: Colors.black,
|
// fontColor: Colors.black,
|
||||||
|
|
|
@ -6,7 +6,8 @@ class HiveOperations {
|
||||||
late Box<HiveApiConstants> hiveApiConstantsBox;
|
late Box<HiveApiConstants> hiveApiConstantsBox;
|
||||||
hiveApiConstantsBox =
|
hiveApiConstantsBox =
|
||||||
await Hive.openBox<HiveApiConstants>('hiveApiConstants');
|
await Hive.openBox<HiveApiConstants>('hiveApiConstants');
|
||||||
|
print("DataAffing");
|
||||||
|
// hiveApiConstantsBox.clear();
|
||||||
hiveApiConstantsBox.addAll(hiveList);
|
hiveApiConstantsBox.addAll(hiveList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +17,8 @@ class HiveOperations {
|
||||||
await Hive.openBox<HiveApiConstants>('hiveApiConstants');
|
await Hive.openBox<HiveApiConstants>('hiveApiConstants');
|
||||||
|
|
||||||
List<HiveApiConstants> list = hiveApiConstantsBox.values.toList();
|
List<HiveApiConstants> list = hiveApiConstantsBox.values.toList();
|
||||||
|
|
||||||
|
print("Show/HideApiList: $list");
|
||||||
return list.indexWhere(
|
return list.indexWhere(
|
||||||
(element) =>
|
(element) =>
|
||||||
element.functionName == api && element.module == moduleName,
|
element.functionName == api && element.module == moduleName,
|
||||||
|
|
|
@ -107,6 +107,12 @@ class LoginProvider extends ChangeNotifier {
|
||||||
interval: 0,
|
interval: 0,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
module: "eventapis"),
|
module: "eventapis"),
|
||||||
|
|
||||||
|
HiveApiConstants(
|
||||||
|
functionName: "ContactList",
|
||||||
|
interval: 0,
|
||||||
|
method: "POST",
|
||||||
|
module: "contactapis"),
|
||||||
// HiveApiConstants(functionName: "contactslistapi", interval: 0),
|
// HiveApiConstants(functionName: "contactslistapi", interval: 0),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
|
|
||||||
class ChartLine extends StatelessWidget {
|
class ChartLine extends StatelessWidget {
|
||||||
|
@ -47,7 +48,7 @@ class ChartLine extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
//constraints: BoxConstraints(maxWidth: lineWidget),
|
//constraints: BoxConstraints(maxWidth: lineWidget),
|
||||||
color: EventsConstants.blueColor,
|
color: AppColors.blueColor,
|
||||||
height: 40,
|
height: 40,
|
||||||
width: lineWidget,
|
width: lineWidget,
|
||||||
padding: const EdgeInsets.all(8.0),
|
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/utils/sessionmanager.dart';
|
||||||
import 'package:konectar_events/view/login.dart';
|
import 'package:konectar_events/view/login.dart';
|
||||||
import 'package:konectar_events/viewmodel/hive_repository.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';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
class HomeDrawer extends StatefulWidget {
|
class HomeDrawer extends StatefulWidget {
|
||||||
|
@ -42,38 +44,40 @@ class _HomeDrawerState extends State<HomeDrawer> {
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDrawerListArray() async {
|
void setDrawerListArray() async {
|
||||||
|
print("HiiisetDrawerListArray");
|
||||||
bool checkContacts = await HiveOperations.checkIfApiExists(
|
bool checkContacts = await HiveOperations.checkIfApiExists(
|
||||||
EventsConstants.contactsListapi, EventsConstants.moduleName);
|
EventsConstants.contactsListapi, EventsConstants.moduleName);
|
||||||
if (!checkContacts) {
|
print("CheckContacts_123$checkContacts");
|
||||||
drawerList = <DrawerList>[
|
// if (!checkContacts) {
|
||||||
DrawerList(
|
// drawerList = <DrawerList>[
|
||||||
index: DrawerIndex.HOME,
|
// DrawerList(
|
||||||
labelName: 'Events',
|
// index: DrawerIndex.HOME,
|
||||||
icon: Icon(Icons.event),
|
// 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(
|
// DrawerList(
|
||||||
// index: DrawerIndex.Share,
|
// index: DrawerIndex.FeedBack,
|
||||||
// labelName: 'Rate the app',
|
// labelName: 'HelpDesk',
|
||||||
// icon: Icon(Icons.share),
|
// icon: Icon(Icons.help),
|
||||||
// ),
|
// ),
|
||||||
// DrawerList(
|
// DrawerList(
|
||||||
// index: DrawerIndex.About,
|
// index: DrawerIndex.Invite,
|
||||||
// labelName: 'About Us',
|
// labelName: 'Medical Insight',
|
||||||
// icon: Icon(Icons.info),
|
// icon: Icon(Icons.group),
|
||||||
// ),
|
// ),
|
||||||
];
|
// // DrawerList(
|
||||||
} else {
|
// // 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 = <DrawerList>[
|
||||||
DrawerList(
|
DrawerList(
|
||||||
index: DrawerIndex.Contacts,
|
index: DrawerIndex.Contacts,
|
||||||
|
@ -109,8 +113,79 @@ class _HomeDrawerState extends State<HomeDrawer> {
|
||||||
// icon: Icon(Icons.info),
|
// 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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -243,6 +318,8 @@ class _HomeDrawerState extends State<HomeDrawer> {
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
// Provider.of<LoginProvider>(context, listen: false)
|
||||||
|
// .saveApiData();
|
||||||
onTapped();
|
onTapped();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:konectar_events/utils/appcolors.dart';
|
||||||
import 'package:konectar_events/utils/constants.dart';
|
import 'package:konectar_events/utils/constants.dart';
|
||||||
|
|
||||||
class SnackBarWidget {
|
class SnackBarWidget {
|
||||||
|
@ -9,9 +10,8 @@ class SnackBarWidget {
|
||||||
msg,
|
msg,
|
||||||
style: TextStyle(color: Colors.black),
|
style: TextStyle(color: Colors.black),
|
||||||
),
|
),
|
||||||
backgroundColor: error
|
backgroundColor:
|
||||||
? Color.fromARGB(255, 235, 110, 76)
|
error ? Color.fromARGB(255, 235, 110, 76) : AppColors.oldbgcolor,
|
||||||
: EventsConstants.oldbgcolor,
|
|
||||||
duration: error ? Durations.long3 : Durations.long1,
|
duration: error ? Durations.long3 : Durations.long1,
|
||||||
);
|
);
|
||||||
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
||||||
|
|
62
pubspec.lock
62
pubspec.lock
|
@ -253,10 +253,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
|
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.19.0"
|
version: "1.18.0"
|
||||||
connectivity_plus:
|
connectivity_plus:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -534,6 +534,38 @@ packages:
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
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:
|
flutter_cache_manager:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -860,18 +892,18 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker
|
name: leak_tracker
|
||||||
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
|
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.0.7"
|
version: "10.0.5"
|
||||||
leak_tracker_flutter_testing:
|
leak_tracker_flutter_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker_flutter_testing
|
name: leak_tracker_flutter_testing
|
||||||
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
|
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.8"
|
version: "3.0.5"
|
||||||
leak_tracker_testing:
|
leak_tracker_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1308,7 +1340,7 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.99"
|
||||||
sliver_tools:
|
sliver_tools:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1369,10 +1401,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
|
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.12.0"
|
version: "1.11.1"
|
||||||
state_notifier:
|
state_notifier:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1401,10 +1433,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: string_scanner
|
name: string_scanner
|
||||||
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
|
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.2.0"
|
||||||
syncfusion_flutter_charts:
|
syncfusion_flutter_charts:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -1457,10 +1489,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
|
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.3"
|
version: "0.7.2"
|
||||||
textfield_tags:
|
textfield_tags:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
|
@ -1609,10 +1641,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vm_service
|
name: vm_service
|
||||||
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
|
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "14.3.0"
|
version: "14.2.5"
|
||||||
watcher:
|
watcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -96,6 +96,8 @@ dependencies:
|
||||||
flutter_svg_provider: ^1.0.7
|
flutter_svg_provider: ^1.0.7
|
||||||
zoom_widget: ^2.0.1
|
zoom_widget: ^2.0.1
|
||||||
http: ^1.2.2
|
http: ^1.2.2
|
||||||
|
flutter_background_service: ^5.0.10
|
||||||
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue