// // import 'package:discover_module/custom_widget/custom_expansiontile.dart'; // import 'package:discover_module/contacts_module/custom_widget/custom_expansiontile.dart'; // import 'package:discover_module/contacts_module/custom_widget/text.dart'; // import 'package:discover_module/contacts_module/model_class/k2_api_model/kol_Certificate_k2.dart'; // import 'package:discover_module/contacts_module/model_class/k2_api_model/kol_awards_k2.dart'; // import 'package:discover_module/contacts_module/model_class/k2_api_model/kol_education_k2.dart'; // import 'package:discover_module/contacts_module/model_class/k2_api_model/kol_email_k2.dart'; // import 'package:discover_module/contacts_module/model_class/k2_api_model/kol_location_k2.dart'; // import 'package:discover_module/contacts_module/model_class/k2_api_model/kol_pno_k2.dart'; // import 'package:discover_module/contacts_module/model_class/k2_api_model/kol_training_k2.dart'; // import 'package:discover_module/contacts_module/provider_class/award_provider.dart'; // import 'package:discover_module/contacts_module/provider_class/certificate_provider.dart'; // import 'package:discover_module/contacts_module/provider_class/educationprovider.dart'; // import 'package:discover_module/contacts_module/provider_class/email_provider.dart'; // import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_awards_provider.dart'; // import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_certificate_provider.dart'; // import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_education_provider.dart'; // import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_email_provider.dart'; // import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_locationprovider.dart'; // import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_pno_provider.dart'; // import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_training_provider.dart'; // import 'package:discover_module/contacts_module/provider_class/location_provider.dart'; // import 'package:discover_module/contacts_module/provider_class/phoneno_provider.dart'; // import 'package:discover_module/contacts_module/provider_class/training_provider.dart'; // import 'package:discover_module/contacts_module/storage_hive/awa_data/crud_awa.dart'; // import 'package:discover_module/contacts_module/storage_hive/cer_hive/crud_cer.dart'; // import 'package:discover_module/contacts_module/storage_hive/edu_data/crud_edu.dart'; // import 'package:discover_module/contacts_module/storage_hive/email_data/crud_email.dart'; // import 'package:discover_module/contacts_module/storage_hive/loc_data/crud_loc.dart'; // import 'package:discover_module/contacts_module/storage_hive/pno_data/crud_pno.dart'; // import 'package:discover_module/contacts_module/storage_hive/traning_data/crud_training.dart'; // import 'package:discover_module/contacts_module/ui_screen/k2api_integrated_ui/k2testbshhet.dart'; // import 'package:flutter/material.dart'; // import 'package:provider/provider.dart'; // class LocationTest extends StatefulWidget { // // const LocationTab({super.key}); // LocationTest({required this.text, this.offline, Key? key, this.offlineMode}) // : super(key: key); // final int text; // int? offline; // bool? offlineMode; // @override // State createState() => _LocationTestState(); // } // class _LocationTestState extends State { // //List locationList = []; // List locationList = []; // List pno = []; // List emailid = []; // List training = []; // List education = []; // List award = []; // List certificate = []; // @override // void initState() { // // TODO: implement initState // super.initState(); // print("I_amFalseee: ${widget.offlineMode}"); // print("I_am_locationList: ${locationList}"); // // WidgetsBinding.instance.addPostFrameCallback((timeStamp) { // getAffiliations(); // // }); // } // Future getAffiliations() async { // // ignore: prefer_typ(ing_uninitialized_variables // var loclist, phoneno, emailno1, edu1, awa1, cer1, training1; // if (widget.offline == 1) { // loclist = await retrieveidlocations(widget.text); // } else if (widget.offlineMode == false) { // } else { // if (locationList.isEmpty) { // print("Location_is_empty"); // var location = Provider.of(context, listen: false); // await location.locationinfo(widget.text); // locationList = location.locationlist; // // setState(() { // // locationList = loclist; // // }); // } else { // print("Location_not empty"); // } // } // // final locationProvider = // // Provider.of(context, listen: false); // // if (locationProvider.locationList.isEmpty) { // // await locationProvider.fetchLocations( // // widget.text, widget.offline, widget.offlineMode); // // locationList = locationProvider.locationList; // // } else { // // print("Iam_emptyyyy"); // // } // if (mounted) { // if (widget.offline == 1) { // phoneno = await retrieveidpnos(widget.text); // } else { // var phone = Provider.of(context, listen: false); // await phone.phoneinfo(widget.text); // phoneno = phone.phonenolist; // } // setState(() { // pno = phoneno; // }); // } // if (mounted) { // if (widget.offline == 1) { // emailno1 = await retrieveidemails(widget.text); // print("Saved_CheckingloclistEmailll: $emailno1"); // } else { // var email = Provider.of(context, listen: false); // await email.emailinfo(widget.text); // emailno1 = email.emailkollist; // print("Saved_CheckingloclistEmailll123: $emailno1"); // } // setState(() { // emailid = emailno1; // }); // } // if (mounted) { // if (widget.offline == 1) { // training1 = await retrieveidtri(widget.text); // print("Saved_CheckingloclistEmailll: $emailno1"); // } else { // var trai = Provider.of(context, listen: false); // await trai.traininginfo(widget.text); // training1 = trai.traininglist; // } // setState(() { // training = training1; // }); // } // if (mounted) { // if (widget.offline == 1) { // edu1 = await retrieveidedus(widget.text); // print("Saved_CheckingloclistEdu: $edu1"); // } else { // var edu = Provider.of(context, listen: false); // await edu.eduinfo(widget.text); // edu1 = edu.educationlist; // print("Saved_CheckingloclistEdu123: $edu1"); // } // setState(() { // education = edu1; // }); // } // if (mounted) { // if (widget.offline == 1) { // awa1 = await retrieveidawa(widget.text); // print("Saved_CheckingloclistEdu: $edu1"); // } else { // var awa = Provider.of(context, listen: false); // await awa.awainfo(widget.text); // awa1 = awa.awardlist; // } // setState(() { // award = awa1; // }); // } // if (mounted) { // if (widget.offline == 1) { // cer1 = await retrieveidcer(widget.text); // print("Saved_CheckingloclistEdu: $edu1"); // } else { // var cer = Provider.of(context, listen: false); // await cer.certificateinfo(widget.text); // cer1 = cer.certificatelist; // } // setState(() { // certificate = cer1; // }); // } // } // @override // Widget build(BuildContext context) { // return Center( // child: ListView( // children: [Text1(title: locationList.length.toString())], // // children: [ // // locationList.length != 0 // // ? CustomExpansionTile( // // title: "Locations", // // itemList: locationList.cast(), // // buttonText: 'Show More', // // field1: 'Institutation', // // field2: 'Address', // // noexpand: widget.offlineMode == null ? true : false, // // onItemSelected: (Data selectedPhoneNumber) { // // List> keyValue = [ // // { // // "Address": selectedPhoneNumber.address1, // // "Postal Code": selectedPhoneNumber.postalCode, // // "Primary": selectedPhoneNumber.formattedIsPrimary, // // "organization Name": selectedPhoneNumber.organizationName, // // "Country Name": selectedPhoneNumber.countryName, // // "State Name": selectedPhoneNumber.stateName, // // "City Name": selectedPhoneNumber.cityName, // // } // // ]; // // modelbsheet(keyValue); // // }, // // onButtonPressed: () { // // print("Show More button clicked"); // // }, // // ) // // : widget.offlineMode != null // // ? CustomExpansionTile( // // title: "Locations", // // itemList: locationList.cast(), // // buttonText: 'Show More', // // field1: 'Institutation', // // field2: 'Address', // // noexpand: widget.offlineMode == null ? true : false, // // onItemSelected: (Data selectedPhoneNumber) {}, // // ) // // : Container(), // // Container(), // // pno.length != 0 // // ? CustomExpansionTile( // // title: "Phone Numbers", // // itemList: pno.cast(), // // buttonText: 'Show More', // // field1: 'Phone Type', // // field2: 'Phone No', // // noexpand: widget.offlineMode == null ? true : false, // // onItemSelected: (DataPhno selectedPhoneNumber) { // // List> keyValue = [ // // { // // "Phone Number": selectedPhoneNumber.number, // // "Phone Type": selectedPhoneNumber.phoneTypeName, // // "Primary": selectedPhoneNumber.formattedIsPrimary, // // "organization Name": selectedPhoneNumber.organizationName, // // } // // ]; // // modelbsheet(keyValue); // // }, // // ) // // : widget.offlineMode != null // // ? CustomExpansionTile( // // title: "Phone Numbers", // // itemList: pno.cast(), // // buttonText: 'Show More', // // field1: 'Phone Type', // // field2: 'Phone No', // // noexpand: false, // // onItemSelected: (DataPhno selectedPhoneNumber) {}, // // ) // // : Container(), // // emailid.length != 0 // // ? CustomExpansionTile( // // title: "Emails", // // itemList: emailid.cast(), // // buttonText: 'Show More', // // field1: 'Email Type', // // field2: 'Email', // // noexpand: widget.offlineMode == null ? true : false, // // onItemSelected: (EmailData selectedPhoneNumber) { // // List> keyValue = [ // // { // // "Email": selectedPhoneNumber.email, // // "Email Type": selectedPhoneNumber.emailTypeName, // // } // // ]; // // modelbsheet(keyValue); // // }, // // ) // // : widget.offlineMode != null // // ? CustomExpansionTile( // // title: "Emails", // // itemList: emailid.cast(), // // buttonText: 'Show More', // // field1: 'Email Type', // // field2: 'Email', // // noexpand: false, // // onItemSelected: (EmailData selectedPhoneNumber) {}, // // ) // // : Container(), // // training.length != 0 // // ? CustomExpansionTile( // // title: "Trainings", // // itemList: training.cast(), // // buttonText: 'Show More', // // field1: 'Education Type', // // field2: 'Institution Name', // // noexpand: widget.offlineMode == null ? true : false, // // onItemSelected: (TrainingList selectedPhoneNumber) { // // List> keyValue = [ // // { // // "organization Id": selectedPhoneNumber.organizationId, // // "Degree": selectedPhoneNumber.degree, // // "Specialty": selectedPhoneNumber.specialty, // // "Start Date": selectedPhoneNumber.startDate, // // "End Date": selectedPhoneNumber.endDate, // // } // // ]; // // modelbsheet(keyValue); // // }, // // ) // // : widget.offlineMode != null // // ? CustomExpansionTile( // // title: "Trainings", // // itemList: training.cast(), // // buttonText: 'Show More', // // field1: 'Education Type', // // field2: 'Institution Name', // // noexpand: false, // // onItemSelected: (TrainingList selectedPhoneNumber) {}, // // ) // // : Container(), // // education.length != 0 // // ? CustomExpansionTile( // // title: "Education", // // itemList: education.cast(), // // buttonText: 'Show More', // // field1: 'Education Type', // // field2: 'Institution Name', // // noexpand: widget.offlineMode == null ? true : false, // // onItemSelected: (EducationList selectedPhoneNumber) { // // List> keyValue = [ // // { // // "organization Id": selectedPhoneNumber.organizationId, // // "Degree": selectedPhoneNumber.degree, // // "Specialty": selectedPhoneNumber.specialty, // // "Start Date": selectedPhoneNumber.startDate, // // "End Date": selectedPhoneNumber.endDate, // // } // // ]; // // modelbsheet(keyValue); // // }, // // ) // // : widget.offlineMode != null // // ? CustomExpansionTile( // // title: "Education", // // itemList: education.cast(), // // buttonText: 'Show More', // // field1: 'Education Type', // // field2: 'Institution Name', // // noexpand: false, // // onItemSelected: (EducationList selectedPhoneNumber) {}, // // ) // // : Container(), // // award.length != 0 // // ? CustomExpansionTile( // // title: "Awards", // // itemList: award.cast(), // // buttonText: 'Show More', // // field1: 'Education Type', // // field2: 'Institution Name', // // noexpand: widget.offlineMode == null ? true : false, // // onItemSelected: (AwardsList selectedPhoneNumber) { // // List> keyValue = [ // // { // // "Name": selectedPhoneNumber.name, // // "Start Date": selectedPhoneNumber.startDate, // // "End Date": selectedPhoneNumber.endDate, // // } // // ]; // // modelbsheet(keyValue); // // }, // // ) // // : widget.offlineMode != null // // ? CustomExpansionTile( // // title: "Awards", // // itemList: award.cast(), // // buttonText: 'Show More', // // field1: 'Education Type', // // field2: 'Institution Name', // // noexpand: false, // // onItemSelected: (AwardsList selectedPhoneNumber) {}, // // ) // // : Container(), // // certificate.length != 0 // // ? CustomExpansionTile( // // title: "Certificates", // // itemList: certificate.cast(), // // buttonText: 'Show More', // // field1: 'Education Type', // // field2: 'Institution Name', // // noexpand: widget.offlineMode == null ? true : false, // // onItemSelected: (CertificateList selectedPhoneNumber) { // // List> keyValue = [ // // { // // "Organization Id": selectedPhoneNumber.organizationId, // // "specialty": selectedPhoneNumber.specialty, // // "Start Date": selectedPhoneNumber.startDate, // // "End Date": selectedPhoneNumber.endDate, // // } // // ]; // // modelbsheet(keyValue); // // }, // // ) // // : widget.offlineMode != null // // ? CustomExpansionTile( // // title: "Certificates", // // itemList: certificate.cast(), // // buttonText: 'Show More', // // field1: 'Education Type', // // field2: 'Institution Name', // // noexpand: false, // // onItemSelected: (CertificateList selectedPhoneNumber) {}, // // ) // // : Container(), // // ] // ), // ); // } // void modelbsheet(List> 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/custom_widget/custom_expansiontile.dart'; import 'package:discover_module/contacts_module/custom_widget/custom_expansiontile.dart'; import 'package:discover_module/contacts_module/model_class/k2_api_model/kol_Certificate_k2.dart'; import 'package:discover_module/contacts_module/model_class/k2_api_model/kol_awards_k2.dart'; import 'package:discover_module/contacts_module/model_class/k2_api_model/kol_education_k2.dart'; import 'package:discover_module/contacts_module/model_class/k2_api_model/kol_email_k2.dart'; import 'package:discover_module/contacts_module/model_class/k2_api_model/kol_location_k2.dart'; import 'package:discover_module/contacts_module/model_class/k2_api_model/kol_pno_k2.dart'; import 'package:discover_module/contacts_module/model_class/k2_api_model/kol_training_k2.dart'; import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_awards_provider.dart'; import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_certificate_provider.dart'; import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_education_provider.dart'; import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_email_provider.dart'; import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_locationprovider.dart'; import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_pno_provider.dart'; import 'package:discover_module/contacts_module/provider_class/k2_provider/kol_training_provider.dart'; import 'package:discover_module/contacts_module/storage_hive/awa_data/crud_awa.dart'; import 'package:discover_module/contacts_module/storage_hive/cer_hive/crud_cer.dart'; import 'package:discover_module/contacts_module/storage_hive/edu_data/crud_edu.dart'; import 'package:discover_module/contacts_module/storage_hive/email_data/crud_email.dart'; import 'package:discover_module/contacts_module/storage_hive/loc_data/crud_loc.dart'; import 'package:discover_module/contacts_module/storage_hive/pno_data/crud_pno.dart'; import 'package:discover_module/contacts_module/storage_hive/traning_data/crud_training.dart'; import 'package:discover_module/contacts_module/ui_screen/k2api_integrated_ui/k2testbshhet.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class LocationK2Tab1 extends StatefulWidget { // const LocationTab({super.key}); LocationK2Tab1({required this.text, this.offline, Key? key, this.offlineMode}) : super(key: key); final int text; int? offline; bool? offlineMode; @override State createState() => _LocationK2TabState(); } class _LocationK2TabState extends State { List locationList = []; // List locationList = []; List pno = []; List emailid = []; List training = []; List education = []; List award = []; List certificate = []; @override void initState() { // TODO: implement initState super.initState(); print("I_amFalseee: ${widget.offlineMode}"); print("I_am_locationList: ${locationList}"); // WidgetsBinding.instance.addPostFrameCallback((timeStamp) { getAffiliations(); // }); } Future getAffiliations() async { // ignore: prefer_typ(ing_uninitialized_variables var loclist, phoneno, emailno1, edu1, awa1, cer1, training1; if (widget.offline == 1) { loclist = await retrieveidlocations(widget.text); } else if (widget.offlineMode == false) { } else { if (locationList.isEmpty) { print("Location_is_empty"); var location = Provider.of(context, listen: false); await location.locationinfo(widget.text); locationList = location.locationlist; // setState(() { // locationList = loclist; // }); } else { print("Location_not empty"); } } // final locationProvider = // Provider.of(context, listen: false); // if (locationProvider.locationList.isEmpty) { // await locationProvider.fetchLocations( // widget.text, widget.offline, widget.offlineMode); // locationList = locationProvider.locationList; // } else { // print("Iam_emptyyyy"); // } if (mounted) { if (widget.offline == 1) { phoneno = await retrieveidpnos(widget.text); } else { var phone = Provider.of(context, listen: false); await phone.phonek2info(widget.text); phoneno = phone.phonenolist; } setState(() { pno = phoneno; }); } if (mounted) { if (widget.offline == 1) { emailno1 = await retrieveidemails(widget.text); print("Saved_CheckingloclistEmailll: $emailno1"); } else { var email = Provider.of(context, listen: false); await email.emailinfo(widget.text); emailno1 = email.emailkollist; print("Saved_CheckingloclistEmailll123: $emailno1"); } setState(() { emailid = emailno1; }); } if (mounted) { if (widget.offline == 1) { training1 = await retrieveidtri(widget.text); print("Saved_CheckingloclistEmailll: $emailno1"); } else { var trai = Provider.of(context, listen: false); await trai.traininginfo(widget.text); training1 = trai.traininglist; } setState(() { training = training1; }); } if (mounted) { if (widget.offline == 1) { edu1 = await retrieveidedus(widget.text); print("Saved_CheckingloclistEdu: $edu1"); } else { var edu = Provider.of(context, listen: false); await edu.eduinfo(widget.text); edu1 = edu.educationlist; print("Saved_CheckingloclistEdu123: $edu1"); } setState(() { education = edu1; }); } if (mounted) { if (widget.offline == 1) { awa1 = await retrieveidawa(widget.text); print("Saved_CheckingloclistEdu: $edu1"); } else { var awa = Provider.of(context, listen: false); await awa.awainfo(widget.text); awa1 = awa.awardlist; } setState(() { award = awa1; }); } if (mounted) { if (widget.offline == 1) { cer1 = await retrieveidcer(widget.text); print("Saved_CheckingloclistEdu: $edu1"); } else { var cer = Provider.of(context, listen: false); await cer.certificateinfo(widget.text); cer1 = cer.certificatelist; } setState(() { certificate = cer1; }); } } @override Widget build(BuildContext context) { return Center( child: ListView(children: [ locationList.length != 0 ? CustomExpansionTile( title: "Locations", itemList: locationList.cast(), buttonText: 'Show More', field1: 'Institutation', field2: 'Address', noexpand: widget.offlineMode == null ? true : false, onItemSelected: (Data selectedPhoneNumber) { List> keyValue = [ { "Address": selectedPhoneNumber.address1, "Postal Code": selectedPhoneNumber.postalCode, "Primary": selectedPhoneNumber.formattedIsPrimary, "organization Name": selectedPhoneNumber.organizationName, "Country Name": selectedPhoneNumber.countryName, "State Name": selectedPhoneNumber.stateName, "City Name": selectedPhoneNumber.cityName, } ]; modelbsheet(keyValue); }, onButtonPressed: () { print("Show More button clicked"); }, ) : widget.offlineMode != null ? CustomExpansionTile( title: "Locations", itemList: locationList.cast(), buttonText: 'Show More', field1: 'Institutation', field2: 'Address', noexpand: widget.offlineMode == null ? true : false, onItemSelected: (Data selectedPhoneNumber) {}, ) : Container(), Container(), pno.length != 0 ? CustomExpansionTile( title: "Phone Numbers", itemList: pno.cast(), buttonText: 'Show More', field1: 'Phone Type', field2: 'Phone No', noexpand: widget.offlineMode == null ? true : false, onItemSelected: (DataPhno selectedPhoneNumber) { List> keyValue = [ { "Phone Number": selectedPhoneNumber.number, "Phone Type": selectedPhoneNumber.phoneTypeName, "Primary": selectedPhoneNumber.formattedIsPrimary, "organization Name": selectedPhoneNumber.organizationName, } ]; modelbsheet(keyValue); }, ) : widget.offlineMode != null ? CustomExpansionTile( title: "Phone Numbers", itemList: pno.cast(), buttonText: 'Show More', field1: 'Phone Type', field2: 'Phone No', noexpand: false, onItemSelected: (DataPhno selectedPhoneNumber) {}, ) : Container(), emailid.length != 0 ? CustomExpansionTile( title: "Emails", itemList: emailid.cast(), buttonText: 'Show More', field1: 'Email Type', field2: 'Email', noexpand: widget.offlineMode == null ? true : false, onItemSelected: (EmailData selectedPhoneNumber) { List> keyValue = [ { "Email": selectedPhoneNumber.email, "Email Type": selectedPhoneNumber.emailTypeName, } ]; modelbsheet(keyValue); }, ) : widget.offlineMode != null ? CustomExpansionTile( title: "Emails", itemList: emailid.cast(), buttonText: 'Show More', field1: 'Email Type', field2: 'Email', noexpand: false, onItemSelected: (EmailData selectedPhoneNumber) {}, ) : Container(), training.length != 0 ? CustomExpansionTile( title: "Trainings", itemList: training.cast(), buttonText: 'Show More', field1: 'Education Type', field2: 'Institution Name', noexpand: widget.offlineMode == null ? true : false, onItemSelected: (TrainingList selectedPhoneNumber) { List> keyValue = [ { "organization Id": selectedPhoneNumber.organizationId, "Degree": selectedPhoneNumber.degree, "Specialty": selectedPhoneNumber.specialty, "Start Date": selectedPhoneNumber.startDate, "End Date": selectedPhoneNumber.endDate, } ]; modelbsheet(keyValue); }, ) : widget.offlineMode != null ? CustomExpansionTile( title: "Trainings", itemList: training.cast(), buttonText: 'Show More', field1: 'Education Type', field2: 'Institution Name', noexpand: false, onItemSelected: (TrainingList selectedPhoneNumber) {}, ) : Container(), education.length != 0 ? CustomExpansionTile( title: "Education", itemList: education.cast(), buttonText: 'Show More', field1: 'Education Type', field2: 'Institution Name', noexpand: widget.offlineMode == null ? true : false, onItemSelected: (EducationList selectedPhoneNumber) { List> keyValue = [ { "organization Id": selectedPhoneNumber.organizationId, "Degree": selectedPhoneNumber.degree, "Specialty": selectedPhoneNumber.specialty, "Start Date": selectedPhoneNumber.startDate, "End Date": selectedPhoneNumber.endDate, } ]; modelbsheet(keyValue); }, ) : widget.offlineMode != null ? CustomExpansionTile( title: "Education", itemList: education.cast(), buttonText: 'Show More', field1: 'Education Type', field2: 'Institution Name', noexpand: false, onItemSelected: (EducationList selectedPhoneNumber) {}, ) : Container(), award.length != 0 ? CustomExpansionTile( title: "Awards", itemList: award.cast(), buttonText: 'Show More', field1: 'Education Type', field2: 'Institution Name', noexpand: widget.offlineMode == null ? true : false, onItemSelected: (AwardsList selectedPhoneNumber) { List> keyValue = [ { "Name": selectedPhoneNumber.name, "Start Date": selectedPhoneNumber.startDate, "End Date": selectedPhoneNumber.endDate, } ]; modelbsheet(keyValue); }, ) : widget.offlineMode != null ? CustomExpansionTile( title: "Awards", itemList: award.cast(), buttonText: 'Show More', field1: 'Education Type', field2: 'Institution Name', noexpand: false, onItemSelected: (AwardsList selectedPhoneNumber) {}, ) : Container(), certificate.length != 0 ? CustomExpansionTile( title: "Certificates", itemList: certificate.cast(), buttonText: 'Show More', field1: 'Education Type', field2: 'Institution Name', noexpand: widget.offlineMode == null ? true : false, onItemSelected: (CertificateList selectedPhoneNumber) { List> keyValue = [ { "Organization Id": selectedPhoneNumber.organizationId, "specialty": selectedPhoneNumber.specialty, "Start Date": selectedPhoneNumber.startDate, "End Date": selectedPhoneNumber.endDate, } ]; modelbsheet(keyValue); }, ) : widget.offlineMode != null ? CustomExpansionTile( title: "Certificates", itemList: certificate.cast(), buttonText: 'Show More', field1: 'Education Type', field2: 'Institution Name', noexpand: false, onItemSelected: (CertificateList selectedPhoneNumber) {}, ) : Container(), ]), ); } void modelbsheet(List> 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); }, ); } }