netwoke issue

This commit is contained in:
poojakhatawate 2024-07-08 10:28:57 +05:30
parent 7647e4737f
commit e1ecc9824c
7 changed files with 2147 additions and 507 deletions

33
lib/connectivity.dart Normal file
View File

@ -0,0 +1,33 @@
import 'dart:async';
import 'dart:io';
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:dio/dio.dart';
class NetworkConnectivity {
// Future<bool> isInternetAvailable() async {
// var connectivityResult = await (Connectivity().checkConnectivity());
// return connectivityResult != ConnectivityResult.none;
// }
Future<bool> isInternetAvailable() async {
var connectivityResult = await Connectivity().checkConnectivity();
if (connectivityResult == ConnectivityResult.none) {
return false;
} else {
try {
// final result = await InternetAddress.lookup('google.com');
// return true;
final result = await Dio().get('www.google.com');
if (result.statusCode == 200) {
// if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) {
return true;
//}
}
return false;
} on SocketException catch (_) {
return false;
}
}
}
}

View File

@ -4,5 +4,6 @@ class Constants {
static Color k2color = Color.fromARGB(255, 0, 71, 132); static Color k2color = Color.fromARGB(255, 0, 71, 132);
//static const url = "http://192.168.172.50:8082/api"; //static const url = "http://192.168.172.50:8082/api";
static const url = 'http://192.168.2.143:8081/api'; static const url = 'http://192.168.2.143:8082/api';
//static const url = 'http://192.168.153.50:8081/api';
} }

View File

@ -304,13 +304,13 @@ class Contacts extends StatefulWidget {
class _ContactsState extends State<Contacts> { class _ContactsState extends State<Contacts> {
final _contactBox = Hive.box("mycontact"); final _contactBox = Hive.box("mycontact");
bool _switchValue = false; bool _switchValue = false;
bool isOnline2 = true; bool? isOnline2;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
setupConnectivityListener(); setupConnectivityListener();
getCall(); // getCall();
} }
Future<void> setupConnectivityListener() async { Future<void> setupConnectivityListener() async {
@ -323,6 +323,9 @@ class _ContactsState extends State<Contacts> {
isOnline2 = isOnline; isOnline2 = isOnline;
}); });
} }
if (isOnline2 == true) {
getCall();
}
} }
} }
@ -339,6 +342,7 @@ class _ContactsState extends State<Contacts> {
SystemChrome.setSystemUIOverlayStyle( SystemChrome.setSystemUIOverlayStyle(
SystemUiOverlayStyle(statusBarColor: Color.fromARGB(255, 0, 71, 132))); SystemUiOverlayStyle(statusBarColor: Color.fromARGB(255, 0, 71, 132)));
print("internet data_is: $isOnline2");
return SafeArea( return SafeArea(
child: Scaffold( child: Scaffold(
body: Consumer<hcpProvider>( body: Consumer<hcpProvider>(
@ -410,100 +414,100 @@ class _ContactsState extends State<Contacts> {
), ),
], ],
), ),
isOnline2 if (isOnline2 == true)
? Expanded( Expanded(
child: ListView.builder( child: ListView.builder(
itemCount: value.list.length, itemCount: value.list.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
var data = value.list[index]; var data = value.list[index];
return ListTile( return ListTile(
onTap: () { onTap: () {
// Navigator.push( // Navigator.push(
// context, // context,
// MaterialPageRoute( // MaterialPageRoute(
// builder: (context) => Profile( // builder: (context) => Profile(
// text: data, // text: data,
// ), // ),
// ), // ),
// ); // );
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (_) => builder: (_) => NewProfile(text: data)));
NewProfile(text: data)));
},
leading: data["img_path"] == null
? ProfilePicture(
name: data["name"],
radius: 20,
fontsize: 12,
)
: ClipOval(
child: SizedBox.fromSize(
size: Size.fromRadius(20),
child: Image.network(data["img_path"],
fit: BoxFit.cover),
),
),
title: Text(
data["name"],
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold,
),
),
subtitle: Text(
"Added by Pooja.K",
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.normal,
),
),
);
}, },
), leading: data["img_path"] == null
) ? ProfilePicture(
: Expanded( name: data["name"],
child: ListView.builder( radius: 20,
itemCount: _contactBox.values.length, fontsize: 12,
itemBuilder: (BuildContext context, int index) { )
var data = _contactBox.get(index); : ClipOval(
print(":data_is: $data"); child: SizedBox.fromSize(
return ListTile( size: Size.fromRadius(20),
onTap: () { child: Image.network(data["img_path"],
Navigator.push( fit: BoxFit.cover),
context,
MaterialPageRoute(
builder: (context) => Profile(
text: data!,
),
), ),
);
},
leading: ProfilePicture(
name: data["name"],
radius: 20,
fontsize: 12,
),
title: Text(
data["name"],
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold,
), ),
), title: Text(
subtitle: Text( data["name"],
"Added by Pooja.K", style: TextStyle(
style: TextStyle( fontSize: 18.0,
fontSize: 14.0, fontWeight: FontWeight.bold,
fontWeight: FontWeight.normal, ),
),
subtitle: Text(
"Added by Pooja.K",
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.normal,
),
),
);
},
),
)
else
Expanded(
child: ListView.builder(
itemCount: _contactBox.values.length,
itemBuilder: (BuildContext context, int index) {
var data = _contactBox.get(index);
print(":data_is: $data");
return ListTile(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Profile(
text: data!,
), ),
), ),
); );
}, },
), leading: ProfilePicture(
), name: data["name"],
radius: 20,
fontsize: 12,
),
title: Text(
data["name"],
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.bold,
),
),
subtitle: Text(
"Added by Pooja.K",
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.normal,
),
),
);
},
),
),
], ],
); );
}, },

View File

@ -3,6 +3,7 @@ import 'dart:io';
import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
class NetworkConnectivity { class NetworkConnectivity {
// Future<bool> isInternetAvailable() async { // Future<bool> isInternetAvailable() async {
@ -15,14 +16,25 @@ class NetworkConnectivity {
return false; return false;
} else { } else {
try { try {
// final result = await InternetAddress.lookup('google.com'); if (!kIsWeb) {
final result = await Dio().get('www.google.com'); final result = await InternetAddress.lookup('google.com');
if (result.statusCode == 200) {
// if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) {
return true; return true;
//} } else {
final result = await Dio().get('www.google.com');
if (result.statusCode == 200) {
// if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) {
return true;
//}
}
} }
// final result = await Dio().get('www.google.com');
// if (result.statusCode == 200) {
// // if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) {
// return true;
// //}
// }
return false; return false;
} on SocketException catch (_) { } on SocketException catch (_) {
return false; return false;

File diff suppressed because it is too large Load Diff

View File

@ -53,12 +53,12 @@ class _NewProfileState extends State<NewProfile> {
// TODO: implement initState // TODO: implement initState
super.initState(); super.initState();
print("pooja123"); print("pooja123");
//init();
getaffiliations(); getaffiliations();
getuserdetails(); getuserdetails();
init();
print("Widget_isssIndex_iss ${widget.text}"); print("Widget_isssIndex_iss ${widget.text}");
print( print(
"Widget_isssIndex_iss ${widget.text!["id"]},${widget.text!["name"]},${widget.text!["img_path"]}"); "Widget_isssIndex_iss ${widget.text!["id"]},${widget.text!["name"]},${widget.text!["img_path"]}");
@ -72,7 +72,7 @@ class _NewProfileState extends State<NewProfile> {
// if(data.g) // if(data.g)
data.getRecords("form-3 demo"); data.getRecords("form-3 demo");
setState(() {}); // setState(() {});
} }
getaffiliations() async { getaffiliations() async {

View File

@ -1,292 +1,9 @@
// import 'package:discover_module/ui_screen/interactionform/configprovider.dart';
// import 'package:discover_module/ui_screen/interactionform/interaction_screen.dart';
// import 'package:discover_module/ui_screen/interactionform/interactionlistscreen.dart';
// import 'package:discover_module/ui_screen/interactionform/interactionprovider.dart';
// import 'package:discover_module/ui_screen/interactionform/model/save_interaction.dart';
// import 'package:discover_module/ui_screen/interactionform/view_forms_list.dart';
// import 'package:flutter/cupertino.dart';
// import 'package:flutter/material.dart';
// import 'package:flutter/widgets.dart';
// import 'package:provider/provider.dart';
// class FormList extends StatefulWidget {
// const FormList({super.key});
// @override
// State<FormList> createState() => _FormListState();
// }
// class _FormListState extends State<FormList> {
// List<SaveInteraction> savedList = [];
// @override
// void initState() {
// WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
// // if (!mytimer!.isActive) {
// // activateTimer();
// // }
// print("interactionListt");
// init();
// });
// super.initState();
// }
// init() async {
// print("init");
// await Provider.of<InteractionProvider>(context, listen: false)
// .initConfigData();
// await Provider.of<InteractionProvider>(context, listen: false).getRecords();
// setState(() {});
// }
// Future<int> getCount(String form, InteractionProvider provider) async {
// await provider.getRecords();
// return provider.savedList.where((element) => element.form == form).length;
// }
// @override
// Widget build(BuildContext context) {
// return Consumer<InteractionProvider>(
// builder: (BuildContext context, provider, Widget? child) {
// return SafeArea(
// child: Scaffold(
// appBar: AppBar(
// title: Text("Form List"),
// ),
// body: ListView.builder(
// itemCount: provider.intConfigDataList.length,
// cacheExtent:
// double.parse(provider.intConfigDataList.length.toString()),
// itemBuilder: (context, index) {
// return Column(
// children: [
// ListTile(
// title: const Text(
// "Add My Event",
// style: TextStyle(fontSize: 18.0),
// ),
// onTap: () async {
// final ConfigDataProvider configDataProvider =
// ConfigDataProvider();
// await configDataProvider.initConfigUIData123();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// const InteractionListScreen()));
// // Navigator.push(context,
// // MaterialPageRoute(builder: (context) => AddEventScreen()));
// },
// trailing: const Icon(Icons.arrow_forward_ios),
// ),
// Divider(),
// // ListTile(
// // title: const Text(
// // "Interaction",
// // style: TextStyle(fontSize: 18.0),
// // ),
// // onTap: () async {
// // print("I am Interaction");
// // final ConfigDataProvider configDataProvider =
// // ConfigDataProvider();
// // await configDataProvider.initConfigUIData();
// // // Navigator.push(context, MaterialPageRoute(builder: (context)))=> InteractionScreen();
// // Navigator.push(
// // context,
// // MaterialPageRoute(
// // builder: (context) => InteractionListScreen()));
// // },
// // trailing: const Icon(Icons.arrow_forward_ios),
// // ),
// ListTile(
// title: const Text(
// "Interaction",
// style: TextStyle(fontSize: 18.0),
// ),
// onTap: () async {
// print(
// "I am Interaction:${index}, ${provider.intConfigDataList[index].name}");
// // final ConfigDataProvider configDataProvider =
// // ConfigDataProvider();
// // await configDataProvider.initConfigUIData();
// // // Navigator.push(context, MaterialPageRoute(builder: (context)))=> InteractionScreen();
// // Navigator.push(
// // context,
// // MaterialPageRoute(
// // builder: (context) => InteractionListScreen()));
// if (provider.intConfigDataList.length == 1) {
// setState(() {});
// final ConfigDataProvider configDataProvider =
// ConfigDataProvider();
// await configDataProvider.initConfigUIData();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (BuildContext context) =>
// InteractionScreen(
// index: index,
// form: provider
// .intConfigDataList[index].name,
// )));
// } else {
// final ConfigDataProvider configDataProvider =
// ConfigDataProvider();
// await configDataProvider.initConfigUIData();
// // Navigator.push(context, MaterialPageRoute(builder: (context)))=> InteractionScreen();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// InteractionListScreen()));
// }
// },
// trailing: const Icon(Icons.arrow_forward_ios),
// ),
// const Divider(),
// ListTile(
// title: const Text(
// "New Medical Insight",
// style: TextStyle(fontSize: 18.0),
// ),
// onTap: () async {
// final ConfigDataProvider configDataProvider =
// ConfigDataProvider();
// await configDataProvider.initConfigUIDataMedical();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// const InteractionListScreen()));
// },
// trailing: Icon(Icons.arrow_forward_ios),
// ),
// Divider(),
// ListTile(
// title: const Text(
// "Engagement",
// style: TextStyle(fontSize: 18.0),
// ),
// onTap: () async {
// final ConfigDataProvider configDataProvider =
// ConfigDataProvider();
// await configDataProvider.initConfigUIDataEng();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// const InteractionListScreen()));
// },
// trailing: const Icon(Icons.arrow_forward_ios),
// ),
// Divider(),
// ListTile(
// title: Row(
// children: [
// Text(
// provider.intConfigDataList[index].name,
// ),
// const SizedBox(
// width: 20,
// ),
// IconButton(
// onPressed: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (BuildContext context) =>
// InteractionScreen(
// index: index,
// form: provider
// .intConfigDataList[index].name,
// )));
// },
// icon: const Icon(
// Icons.arrow_circle_right_outlined,
// size: 30,
// color: Color.fromARGB(255, 8, 39, 92),
// ),
// ),
// ],
// ),
// trailing: provider.savedList.indexWhere((element) =>
// element.form ==
// provider.intConfigDataList[index].name) !=
// -1
// ? InkWell(
// onTap: () {
// print("inwesm Screenindex $index");
// if (getCount(
// provider.intConfigDataList[index].name,
// provider) !=
// 0) {
// provider.savedList
// .where((element) =>
// element.form ==
// provider
// .intConfigDataList[index].name)
// .toList();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (BuildContext context) =>
// SavedFormListScreen(
// formname: provider
// .intConfigDataList[index]
// .name,
// )));
// }
// },
// child: FittedBox(
// fit: BoxFit.scaleDown,
// child: Text(
// "${provider.savedList.where((element) => element.form == provider.intConfigDataList[index].name).length} record(s) saved",
// style: TextStyle(
// // fontSize: isTablet ? 18.0 : 14,
// fontSize: 18.0,
// color: Colors.blue.shade900),
// ),
// ),
// )
// : const SizedBox.shrink(),
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (BuildContext context) =>
// InteractionScreen(
// index: index,
// form: provider
// .intConfigDataList[index].name,
// )));
// },
// ),
// const Divider(),
// ],
// );
// }),
// ),
// );
// });
// }
// }
import 'package:discover_module/ui_screen/interactionform/configprovider.dart'; import 'package:discover_module/ui_screen/interactionform/configprovider.dart';
import 'package:discover_module/ui_screen/interactionform/interaction_screen.dart';
import 'package:discover_module/ui_screen/interactionform/interactionlistscreen.dart'; import 'package:discover_module/ui_screen/interactionform/interactionlistscreen.dart';
import 'package:discover_module/ui_screen/interactionform/interactionprovider.dart'; import 'package:discover_module/ui_screen/interactionform/interactionprovider.dart';
import 'package:discover_module/ui_screen/interactionform/model/save_interaction.dart';
import 'package:discover_module/ui_screen/interactionform/view_forms_list.dart';
import 'package:flutter/cupertino.dart'; 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';
@ -300,131 +17,523 @@ class FormList extends StatefulWidget {
} }
class _FormListState extends State<FormList> { class _FormListState extends State<FormList> {
var formdata; List<SaveInteraction> savedList = [];
@override @override
void initState() { void initState() {
// TODO: implement initState WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
super.initState(); // if (!mytimer!.isActive) {
// activateTimer();
// }
print("interactionListt");
init();
});
idata(); super.initState();
} }
idata() { init() async {
var iprovider = Provider.of<InteractionProvider>(context, listen: false); print("init");
setState(() { await Provider.of<InteractionProvider>(context, listen: false)
formdata = iprovider.intConfigDataList; .initConfigData();
}); print("init1");
await Provider.of<InteractionProvider>(context, listen: false).getRecords();
print("init2");
//setState(() {});
}
Future<int> getCount(String form, InteractionProvider provider) async {
await provider.getRecords();
return provider.savedList.where((element) => element.form == form).length;
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SafeArea( return Consumer<InteractionProvider>(
child: Scaffold( builder: (BuildContext context, provider, Widget? child) {
appBar: AppBar( return SafeArea(
title: Text("Form List"), child: Scaffold(
appBar: AppBar(
title: Text("Form List"),
),
body: provider.intConfigDataList.length == 1
? ListView.builder(
itemCount: provider.intConfigDataList.length,
cacheExtent: double.parse(
provider.intConfigDataList.length.toString()),
itemBuilder: (context, index) {
print("checkkkk");
return Column(
children: [
ListTile(
title: const Text(
"Add My Event",
style: TextStyle(fontSize: 18.0),
),
onTap: () async {
final ConfigDataProvider configDataProvider =
ConfigDataProvider();
await configDataProvider.initConfigUIData123();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const InteractionListScreen()));
// Navigator.push(context,
// MaterialPageRoute(builder: (context) => AddEventScreen()));
},
trailing: const Icon(Icons.arrow_forward_ios),
),
Divider(),
// ListTile(
// title: const Text(
// "Interaction",
// style: TextStyle(fontSize: 18.0),
// ),
// onTap: () async {
// print("I am Interaction");
// final ConfigDataProvider configDataProvider =
// ConfigDataProvider();
// await configDataProvider.initConfigUIData();
// // Navigator.push(context, MaterialPageRoute(builder: (context)))=> InteractionScreen();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => InteractionListScreen()));
// },
// trailing: const Icon(Icons.arrow_forward_ios),
// ),
ListTile(
title: const Text(
"Interaction",
style: TextStyle(fontSize: 18.0),
),
onTap: () async {
print(
"I am Interaction:${index}, ${provider.intConfigDataList[index].name}");
// final ConfigDataProvider configDataProvider =
// ConfigDataProvider();
// await configDataProvider.initConfigUIData();
// // Navigator.push(context, MaterialPageRoute(builder: (context)))=> InteractionScreen();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => InteractionListScreen()));
if (provider.intConfigDataList.length == 1) {
setState(() {});
final ConfigDataProvider configDataProvider =
ConfigDataProvider();
await configDataProvider.initConfigUIData();
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
InteractionScreen(
index: index,
form: provider
.intConfigDataList[index].name,
)));
} else {
final ConfigDataProvider configDataProvider =
ConfigDataProvider();
await configDataProvider.initConfigUIData();
// Navigator.push(context, MaterialPageRoute(builder: (context)))=> InteractionScreen();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
InteractionListScreen()));
}
},
trailing: const Icon(Icons.arrow_forward_ios),
),
const Divider(),
ListTile(
title: const Text(
"New Medical Insight",
style: TextStyle(fontSize: 18.0),
),
onTap: () async {
final ConfigDataProvider configDataProvider =
ConfigDataProvider();
await configDataProvider.initConfigUIDataMedical();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const InteractionListScreen()));
},
trailing: Icon(Icons.arrow_forward_ios),
),
Divider(),
ListTile(
title: const Text(
"Engagement",
style: TextStyle(fontSize: 18.0),
),
onTap: () async {
final ConfigDataProvider configDataProvider =
ConfigDataProvider();
await configDataProvider.initConfigUIDataEng();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const InteractionListScreen()));
},
trailing: const Icon(Icons.arrow_forward_ios),
),
Divider(),
// ListTile(
// title: Row(
// children: [
// Text(
// provider.intConfigDataList[index].name,
// ),
// const SizedBox(
// width: 20,
// ),
// IconButton(
// onPressed: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (BuildContext context) =>
// InteractionScreen(
// index: index,
// form: provider
// .intConfigDataList[index].name,
// )));
// },
// icon: const Icon(
// Icons.arrow_circle_right_outlined,
// size: 30,
// color: Color.fromARGB(255, 8, 39, 92),
// ),
// ),
// ],
// ),
// trailing: provider.savedList.indexWhere((element) =>
// element.form ==
// provider.intConfigDataList[index].name) !=
// -1
// ? InkWell(
// onTap: () {
// print("inwesm Screenindex $index");
// if (getCount(
// provider.intConfigDataList[index].name,
// provider) !=
// 0) {
// provider.savedList
// .where((element) =>
// element.form ==
// provider
// .intConfigDataList[index].name)
// .toList();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (BuildContext context) =>
// SavedFormListScreen(
// formname: provider
// .intConfigDataList[index]
// .name,
// )));
// }
// },
// child: FittedBox(
// fit: BoxFit.scaleDown,
// child: Text(
// "${provider.savedList.where((element) => element.form == provider.intConfigDataList[index].name).length} record(s) saved",
// style: TextStyle(
// // fontSize: isTablet ? 18.0 : 14,
// fontSize: 18.0,
// color: Colors.blue.shade900),
// ),
// ),
// )
// : const SizedBox.shrink(),
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (BuildContext context) =>
// InteractionScreen(
// index: index,
// form: provider
// .intConfigDataList[index].name,
// )));
// },
// ),
const Divider(),
],
);
})
: ListView(
children: [
ListTile(
title: const Text(
"Add My Event",
style: TextStyle(fontSize: 18.0),
),
onTap: () async {
final ConfigDataProvider configDataProvider =
ConfigDataProvider();
await configDataProvider.initConfigUIData123();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const InteractionListScreen()));
// Navigator.push(context,
// MaterialPageRoute(builder: (context) => AddEventScreen()));
},
trailing: const Icon(Icons.arrow_forward_ios),
),
Divider(),
// ListTile(
// title: const Text(
// "Interaction",
// style: TextStyle(fontSize: 18.0),
// ),
// onTap: () async {
// print("I am Interaction");
// final ConfigDataProvider configDataProvider =
// ConfigDataProvider();
// await configDataProvider.initConfigUIData();
// // Navigator.push(context, MaterialPageRoute(builder: (context)))=> InteractionScreen();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => InteractionListScreen()));
// },
// trailing: const Icon(Icons.arrow_forward_ios),
// ),
ListTile(
title: const Text(
"Interaction",
style: TextStyle(fontSize: 18.0),
),
onTap: () async {
print("I am Interaction");
final ConfigDataProvider configDataProvider =
ConfigDataProvider();
await configDataProvider.initConfigUIData();
// Navigator.push(context, MaterialPageRoute(builder: (context)))=> InteractionScreen();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => InteractionListScreen()));
},
trailing: const Icon(Icons.arrow_forward_ios),
),
const Divider(),
ListTile(
title: const Text(
"New Medical Insight",
style: TextStyle(fontSize: 18.0),
),
onTap: () async {
final ConfigDataProvider configDataProvider =
ConfigDataProvider();
await configDataProvider.initConfigUIDataMedical();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const InteractionListScreen()));
},
trailing: Icon(Icons.arrow_forward_ios),
),
Divider(),
ListTile(
title: const Text(
"Engagement",
style: TextStyle(fontSize: 18.0),
),
onTap: () async {
final ConfigDataProvider configDataProvider =
ConfigDataProvider();
await configDataProvider.initConfigUIDataEng();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const InteractionListScreen()));
},
trailing: const Icon(Icons.arrow_forward_ios),
),
Divider(),
],
),
), ),
body: ListView( );
children: [ });
ListTile(
title: const Text(
"Add My Event",
style: TextStyle(fontSize: 18.0),
),
onTap: () async {
final ConfigDataProvider configDataProvider =
ConfigDataProvider();
await configDataProvider.initConfigUIData123();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const InteractionListScreen()));
// Navigator.push(context,
// MaterialPageRoute(builder: (context) => AddEventScreen()));
},
trailing: const Icon(Icons.arrow_forward_ios),
),
Divider(),
// ListTile(
// title: const Text(
// "Interaction",
// style: TextStyle(fontSize: 18.0),
// ),
// onTap: () async {
// print("I am Interaction");
// final ConfigDataProvider configDataProvider =
// ConfigDataProvider();
// await configDataProvider.initConfigUIData();
// // Navigator.push(context, MaterialPageRoute(builder: (context)))=> InteractionScreen();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => InteractionListScreen()));
// },
// trailing: const Icon(Icons.arrow_forward_ios),
// ),
ListTile(
title: const Text(
"Interaction",
style: TextStyle(fontSize: 18.0),
),
onTap: () async {
print("I am Interaction");
final ConfigDataProvider configDataProvider =
ConfigDataProvider();
await configDataProvider.initConfigUIData();
// Navigator.push(context, MaterialPageRoute(builder: (context)))=> InteractionScreen();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => InteractionListScreen()));
},
trailing: const Icon(Icons.arrow_forward_ios),
),
const Divider(),
ListTile(
title: const Text(
"New Medical Insight",
style: TextStyle(fontSize: 18.0),
),
onTap: () async {
final ConfigDataProvider configDataProvider =
ConfigDataProvider();
await configDataProvider.initConfigUIDataMedical();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const InteractionListScreen()));
},
trailing: Icon(Icons.arrow_forward_ios),
),
Divider(),
ListTile(
title: const Text(
"Engagement",
style: TextStyle(fontSize: 18.0),
),
onTap: () async {
final ConfigDataProvider configDataProvider =
ConfigDataProvider();
await configDataProvider.initConfigUIDataEng();
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const InteractionListScreen()));
},
trailing: const Icon(Icons.arrow_forward_ios),
),
Divider(),
],
),
),
);
} }
} }
// import 'package:discover_module/ui_screen/interactionform/configprovider.dart';
// import 'package:discover_module/ui_screen/interactionform/interactionlistscreen.dart';
// import 'package:discover_module/ui_screen/interactionform/interactionprovider.dart';
// import 'package:flutter/cupertino.dart';
// import 'package:flutter/material.dart';
// import 'package:flutter/widgets.dart';
// import 'package:provider/provider.dart';
// class FormList extends StatefulWidget {
// const FormList({super.key});
// @override
// State<FormList> createState() => _FormListState();
// }
// class _FormListState extends State<FormList> {
// var formdata;
// @override
// void initState() {
// // TODO: implement initState
// super.initState();
// idata();
// }
// idata() {
// var iprovider = Provider.of<InteractionProvider>(context, listen: false);
// setState(() {
// formdata = iprovider.intConfigDataList;
// });
// }
// @override
// Widget build(BuildContext context) {
// return SafeArea(
// child: Scaffold(
// appBar: AppBar(
// title: Text("Form List"),
// ),
// body: ListView(
// children: [
// ListTile(
// title: const Text(
// "Add My Event",
// style: TextStyle(fontSize: 18.0),
// ),
// onTap: () async {
// final ConfigDataProvider configDataProvider =
// ConfigDataProvider();
// await configDataProvider.initConfigUIData123();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => const InteractionListScreen()));
// // Navigator.push(context,
// // MaterialPageRoute(builder: (context) => AddEventScreen()));
// },
// trailing: const Icon(Icons.arrow_forward_ios),
// ),
// Divider(),
// // ListTile(
// // title: const Text(
// // "Interaction",
// // style: TextStyle(fontSize: 18.0),
// // ),
// // onTap: () async {
// // print("I am Interaction");
// // final ConfigDataProvider configDataProvider =
// // ConfigDataProvider();
// // await configDataProvider.initConfigUIData();
// // // Navigator.push(context, MaterialPageRoute(builder: (context)))=> InteractionScreen();
// // Navigator.push(
// // context,
// // MaterialPageRoute(
// // builder: (context) => InteractionListScreen()));
// // },
// // trailing: const Icon(Icons.arrow_forward_ios),
// // ),
// ListTile(
// title: const Text(
// "Interaction",
// style: TextStyle(fontSize: 18.0),
// ),
// onTap: () async {
// print("I am Interaction");
// final ConfigDataProvider configDataProvider =
// ConfigDataProvider();
// await configDataProvider.initConfigUIData();
// // Navigator.push(context, MaterialPageRoute(builder: (context)))=> InteractionScreen();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => InteractionListScreen()));
// },
// trailing: const Icon(Icons.arrow_forward_ios),
// ),
// const Divider(),
// ListTile(
// title: const Text(
// "New Medical Insight",
// style: TextStyle(fontSize: 18.0),
// ),
// onTap: () async {
// final ConfigDataProvider configDataProvider =
// ConfigDataProvider();
// await configDataProvider.initConfigUIDataMedical();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => const InteractionListScreen()));
// },
// trailing: Icon(Icons.arrow_forward_ios),
// ),
// Divider(),
// ListTile(
// title: const Text(
// "Engagement",
// style: TextStyle(fontSize: 18.0),
// ),
// onTap: () async {
// final ConfigDataProvider configDataProvider =
// ConfigDataProvider();
// await configDataProvider.initConfigUIDataEng();
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => const InteractionListScreen()));
// },
// trailing: const Icon(Icons.arrow_forward_ios),
// ),
// Divider(),
// ],
// ),
// ),
// );
// }
// }