DiscoverModule/lib/ui_screen/location_tab.dart

1470 lines
72 KiB
Dart

import 'package:discover_module/constants.dart';
import 'package:discover_module/custom_widget/text.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/location_provider.dart';
import 'package:discover_module/provider_class/phoneno_provider.dart';
import 'package:discover_module/provider_class/training_provider.dart';
import 'package:discover_module/ui_screen/awardshowmore.dart';
import 'package:discover_module/ui_screen/bottom_sheet.dart';
import 'package:discover_module/ui_screen/cer_show_more.dart';
import 'package:discover_module/ui_screen/edu_show_more.dart';
import 'package:discover_module/ui_screen/email_show_more.dart';
import 'package:discover_module/ui_screen/interactionform/widget/location_showmore.dart';
import 'package:discover_module/ui_screen/pno_showmore.dart';
import 'package:discover_module/ui_screen/training_showmore.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class LocationTab extends StatefulWidget {
// const LocationTab({super.key});
LocationTab({required this.text, Key? key}) : super(key: key);
final int text;
@override
State<LocationTab> createState() => _LocationTabState();
}
class _LocationTabState extends State<LocationTab> {
bool _isExpanded = false;
List locationList = [];
List pno = [];
List emailid = [];
List training = [];
List education = [];
List award = [];
List certificate = [];
@override
void initState() {
// TODO: implement initState
super.initState();
getaffiliations();
}
getaffiliations() async {
var location = Provider.of<LocationProvider>(context, listen: false);
await location.locationinfo(widget.text);
final loclist = location.locationlist;
var phone = Provider.of<PhonenoProvider>(context, listen: false);
await phone.phoneinfo(widget.text);
final phoneno = phone.phonenolist;
var email = Provider.of<EmailProvider>(context, listen: false);
await email.emailinfo(widget.text);
final emailno1 = email.emailkollist;
var trai = Provider.of<TrainigProvider>(context, listen: false);
await trai.traininginfo(widget.text);
final training1 = trai.traininglist;
var edu = Provider.of<EducationProvider>(context, listen: false);
await edu.eduinfo(widget.text);
final edu1 = edu.educationlist;
var awa = Provider.of<AwardProvider>(context, listen: false);
await awa.awainfo(widget.text);
final awa1 = awa.awardlist;
var cer = Provider.of<CertificateProvider>(context, listen: false);
await cer.certificateinfo(widget.text);
final cer1 = cer.certificatelist;
setState(() {
locationList = loclist;
pno = phoneno;
emailid = emailno1;
training = training1;
certificate = cer1;
education = edu1;
award = awa1;
});
print("emailidemailid_isss: $emailid");
//final affiliationsss = affiliation_data['Affiliations'] as List<Map<String, dynamic>>;
}
@override
Widget build(BuildContext context) {
return Center(
child: ListView(children: [
locationList.length != 0
? ListTileTheme(
dense: true,
child: Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
child: Card(
margin: EdgeInsets.all(1.0),
//elevation: 5,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(0.0),
),
color: Constants.k2color11,
child: ExpansionTile(
backgroundColor: Constants.k2color11,
initiallyExpanded: false,
maintainState: true,
// backgroundColor: Colors.white,
// collapsedBackgroundColor: Color(0xFF2b9af3),
onExpansionChanged: (bool expanded) {
setState(() {
_isExpanded = expanded;
});
},
trailing: Icon(
_isExpanded
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.black),
title: Row(
mainAxisAlignment: MainAxisAlignment.start,
// mainAxisSize: MainAxisSize.min,
children: [
Text1(
title: "Locations",
txtcolor: Colors.black,
fontweight: FontWeight.normal,
txtfont: 16.0),
const SizedBox(
width: 8.0,
),
Text1(
title: "(${locationList.length.toString()})",
txtcolor: Colors.black,
fontweight: FontWeight.normal,
txtfont: 16.0),
],
),
children: [
Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Container(
constraints: BoxConstraints(
minWidth:
MediaQuery.of(context).size.width),
color: Colors.white,
child: DataTable(
showCheckboxColumn: false,
columns: const [
DataColumn(
label: Expanded(
child: Text('Institution',
style: TextStyle(
fontWeight: FontWeight.w600),
softWrap: true),
)),
DataColumn(
label: Expanded(
child: Text('Address',
style: TextStyle(
fontWeight:
FontWeight.w600)))),
],
rows: List.generate(
locationList.take(2).length,
(index) => DataRow(
onSelectChanged: (value) {
print(
"message ${locationList[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(
locationList[index]);
},
);
},
cells: [
DataCell(Text(
locationList[index]['Institution']
.toString(),
softWrap: true)),
DataCell(Text(
locationList[index]['Address']
.toString(),
softWrap: true)),
],
),
),
),
),
),
),
Container(
color: Colors.white,
child: Align(
alignment: Alignment.center,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: OutlinedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => Locationfulldata(
text: widget.text)));
},
child: Text(
'Show More',
style:
TextStyle(color: Constants.k2color),
),
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
),
),
)
]),
),
),
),
)
: Container(), // adds spacing between the text and image
pno.length != 0
? ListTileTheme(
dense: true,
child: Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
child: Card(
margin: EdgeInsets.all(1.0),
// elevation: 5,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(0.0),
),
color: Constants.k2color11,
child: ExpansionTile(
backgroundColor: Constants.k2color11,
initiallyExpanded: false,
maintainState: true,
// backgroundColor: Colors.white,
// collapsedBackgroundColor: Color(0xFF2b9af3),
onExpansionChanged: (bool expanded) {
setState(() {
_isExpanded = expanded;
});
},
trailing: Icon(
_isExpanded
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.black),
title: Row(
mainAxisAlignment: MainAxisAlignment.start,
// mainAxisSize: MainAxisSize.min,
children: [
Text1(
title: "Phone Numbers",
txtcolor: Colors.black,
fontweight: FontWeight.normal,
txtfont: 16.0),
const SizedBox(
width: 8.0,
),
Text1(
title: "(${pno.length.toString()})",
txtcolor: Colors.black,
fontweight: FontWeight.normal,
txtfont: 16.0),
],
),
children: [
Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Container(
constraints: BoxConstraints(
minWidth:
MediaQuery.of(context).size.width),
color: Colors.white,
child: DataTable(
showCheckboxColumn: false,
columns: 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.take(2).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)),
],
),
),
),
),
),
),
Container(
color: Colors.white,
child: Align(
alignment: Alignment.center,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: OutlinedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => PhoneShowMore(
text: widget.text)));
},
child: Text(
'Show More',
style:
TextStyle(color: Constants.k2color),
),
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
),
),
)
]),
),
),
),
)
: Container(), // adds spacing between the text and image
emailid.length != 0
? ListTileTheme(
dense: true,
child: Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
child: Card(
margin: EdgeInsets.all(1.0),
//elevation: 5,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(0.0),
),
color: Constants.k2color11,
child: ExpansionTile(
backgroundColor: Constants.k2color11,
initiallyExpanded: false,
maintainState: true,
// backgroundColor: Colors.white,
// collapsedBackgroundColor: Color(0xFF2b9af3),
onExpansionChanged: (bool expanded) {
setState(() {
_isExpanded = expanded;
});
},
trailing: Icon(
_isExpanded
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.black),
title: Row(
mainAxisAlignment: MainAxisAlignment.start,
// mainAxisSize: MainAxisSize.min,
children: [
Text1(
title: "Emails",
txtcolor: Colors.black,
fontweight: FontWeight.normal,
txtfont: 16.0),
const SizedBox(
width: 8.0,
),
Text1(
title: "(${emailid.length.toString()})",
txtcolor: Colors.black,
fontweight: FontWeight.normal,
txtfont: 16.0),
],
),
children: [
Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Container(
constraints: BoxConstraints(
minWidth:
MediaQuery.of(context).size.width),
color: Colors.white,
child: DataTable(
showCheckboxColumn: false,
columns: const [
DataColumn(
label: Expanded(
child: Text('Email Type',
style: TextStyle(
fontWeight: FontWeight.w600),
softWrap: true),
)),
DataColumn(
label: Expanded(
child: Text('Email',
style: TextStyle(
fontWeight:
FontWeight.w600)))),
],
rows: List.generate(
emailid.take(2).length,
(index) => DataRow(
onSelectChanged: (value) {
print("message ${emailid[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(emailid[index]);
},
);
},
cells: [
DataCell(Text(
emailid[index]['Email Type']
.toString(),
softWrap: true)),
DataCell(Text(
emailid[index]['Email']
.toString(),
softWrap: true)),
],
),
),
),
),
),
),
Container(
color: Colors.white,
child: Align(
alignment: Alignment.center,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: OutlinedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => EmailShowMore(
text: widget.text)));
},
child: Text(
'Show More',
style:
TextStyle(color: Constants.k2color),
),
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
),
),
)
]),
),
),
),
)
: Container(), // adds spacing between the text and image
training.length != 0
? ListTileTheme(
dense: true,
child: Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
child: Card(
margin: EdgeInsets.all(1.0),
//elevation: 5,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(0.0),
),
color: Constants.k2color11,
child: ExpansionTile(
backgroundColor: Constants.k2color11,
initiallyExpanded: false,
maintainState: true,
// backgroundColor: Colors.white,
// collapsedBackgroundColor: Color(0xFF2b9af3),
onExpansionChanged: (bool expanded) {
setState(() {
_isExpanded = expanded;
});
},
trailing: Icon(
_isExpanded
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.black),
title: Row(
mainAxisAlignment: MainAxisAlignment.start,
// mainAxisSize: MainAxisSize.min,
children: [
Text1(
title: "Training ",
txtcolor: Colors.black,
fontweight: FontWeight.normal,
txtfont: 16.0),
const SizedBox(
width: 8.0,
),
Text1(
title: "(${training.length.toString()})",
txtcolor: Colors.black,
fontweight: FontWeight.normal,
txtfont: 16.0),
],
),
children: [
Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Container(
constraints: BoxConstraints(
minWidth:
MediaQuery.of(context).size.width),
color: Colors.white,
child: DataTable(
showCheckboxColumn: false,
columns: const [
DataColumn(
label: Expanded(
child: Text('Education Type',
style: TextStyle(
fontWeight: FontWeight.w600),
softWrap: true),
)),
DataColumn(
label: Expanded(
child: Text('Institution Name',
style: TextStyle(
fontWeight:
FontWeight.w600)))),
],
rows: List.generate(
training.take(2).length,
(index) => DataRow(
onSelectChanged: (value) {
print("message ${training[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(training[index]);
},
);
},
cells: [
DataCell(Text(
training[index]['Education Type']
.toString(),
softWrap: true)),
DataCell(Text(
training[index]
['Institution Name']
.toString(),
softWrap: true)),
],
),
),
),
),
),
),
Container(
color: Colors.white,
child: Align(
alignment: Alignment.center,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: OutlinedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => TrainingShowMore(
text: widget.text)));
},
child: Text(
'Show More',
style:
TextStyle(color: Constants.k2color),
),
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
),
),
)
]),
),
),
),
)
: Container(), // adds spacing between the text and image
ListTileTheme(
dense: true,
child: Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
child: Card(
margin: EdgeInsets.all(1.0),
//elevation: 5,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(0.0),
),
color: Constants.k2color11,
child: ExpansionTile(
backgroundColor: Constants.k2color11,
initiallyExpanded: false,
maintainState: true,
// backgroundColor: Colors.white,
// collapsedBackgroundColor: Color(0xFF2b9af3),
onExpansionChanged: (bool expanded) {
setState(() {
_isExpanded = expanded;
});
},
trailing: Icon(
_isExpanded
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.black),
title: Row(
mainAxisAlignment: MainAxisAlignment.start,
// mainAxisSize: MainAxisSize.min,
children: [
Text1(
title: "Education ",
txtcolor: Colors.black,
fontweight: FontWeight.normal,
txtfont: 16.0),
const SizedBox(
width: 8.0,
),
Text1(
title: "(${education.length.toString()})",
txtcolor: Colors.black,
fontweight: FontWeight.normal,
txtfont: 16.0),
],
),
children: [
Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Container(
constraints: BoxConstraints(
minWidth: MediaQuery.of(context).size.width),
color: Colors.white,
child: DataTable(
showCheckboxColumn: false,
columns: const [
DataColumn(
label: Expanded(
child: Text('Education Type',
style: TextStyle(
fontWeight: FontWeight.w600),
softWrap: true),
)),
DataColumn(
label: Expanded(
child: Text('Institution Name',
style: TextStyle(
fontWeight: FontWeight.w600)))),
],
rows: List.generate(
education.take(2).length,
(index) => DataRow(
onSelectChanged: (value) {
print("message ${education[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(education[index]);
},
);
},
cells: [
DataCell(Text(
education[index]['Education Type']
.toString(),
softWrap: true)),
DataCell(Text(
education[index]['Institution Name']
.toString(),
softWrap: true)),
],
),
),
),
),
),
),
Container(
color: Colors.white,
child: Align(
alignment: Alignment.center,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: OutlinedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => EducationShowMore(
text: widget.text,
)));
},
child: Text(
'Show More',
style: TextStyle(color: Constants.k2color),
),
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
),
),
)
]),
),
),
),
), // adds spacing between the text and image
award.length != 0
? ListTileTheme(
dense: true,
child: Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
child: Card(
margin: EdgeInsets.all(1.0),
//elevation: 5,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(0.0),
),
color: Constants.k2color11,
child: ExpansionTile(
backgroundColor: Constants.k2color11,
initiallyExpanded: false,
maintainState: true,
// backgroundColor: Colors.white,
// collapsedBackgroundColor: Color(0xFF2b9af3),
onExpansionChanged: (bool expanded) {
setState(() {
_isExpanded = expanded;
});
},
trailing: Icon(
_isExpanded
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.black),
title: Row(
mainAxisAlignment: MainAxisAlignment.start,
// mainAxisSize: MainAxisSize.min,
children: [
Text1(
title: "Awards ",
txtcolor: Colors.black,
fontweight: FontWeight.normal,
txtfont: 16.0),
const SizedBox(
width: 8.0,
),
Text1(
title: "(${award.length.toString()})",
txtcolor: Colors.black,
fontweight: FontWeight.normal,
txtfont: 16.0),
],
),
children: [
Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Container(
constraints: BoxConstraints(
minWidth:
MediaQuery.of(context).size.width),
color: Colors.white,
child: DataTable(
showCheckboxColumn: false,
columns: const [
DataColumn(
label: Expanded(
child: Text('Education Type',
style: TextStyle(
fontWeight: FontWeight.w600),
softWrap: true),
)),
DataColumn(
label: Expanded(
child: Text('Institution Name',
style: TextStyle(
fontWeight:
FontWeight.w600)))),
],
rows: List.generate(
award.take(2).length,
(index) => DataRow(
onSelectChanged: (value) {
print("message ${award[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(award[index]);
},
);
},
cells: [
DataCell(Text(
award[index]['Education Type']
.toString(),
softWrap: true)),
DataCell(Text(
award[index]['Institution Name']
.toString(),
softWrap: true)),
],
),
),
),
),
),
),
Container(
color: Colors.white,
child: Align(
alignment: Alignment.center,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: OutlinedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => AwardShowMore(
text: widget.text)));
},
child: Text(
'Show More',
style:
TextStyle(color: Constants.k2color),
),
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
),
),
)
]),
),
),
),
)
: Container(), // adds spacing between the text and image
certificate.length != 0
? ListTileTheme(
dense: true,
child: Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
child: Card(
margin: EdgeInsets.all(1.0),
//elevation: 5,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(0.0),
),
color: Constants.k2color11,
child: ExpansionTile(
backgroundColor: Constants.k2color11,
initiallyExpanded: false,
maintainState: true,
// backgroundColor: Colors.white,
// collapsedBackgroundColor: Color(0xFF2b9af3),
onExpansionChanged: (bool expanded) {
setState(() {
_isExpanded = expanded;
});
},
trailing: Icon(
_isExpanded
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.black),
title: Row(
mainAxisAlignment: MainAxisAlignment.start,
// mainAxisSize: MainAxisSize.min,
children: [
Text1(
title: "Certificates ",
txtcolor: Colors.black,
fontweight: FontWeight.normal,
txtfont: 16.0),
const SizedBox(
width: 8.0,
),
Text1(
title: "(${certificate.length.toString()})",
txtcolor: Colors.black,
fontweight: FontWeight.normal,
txtfont: 16.0),
],
),
children: [
Scrollbar(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Container(
constraints: BoxConstraints(
minWidth:
MediaQuery.of(context).size.width),
color: Colors.white,
child: DataTable(
showCheckboxColumn: false,
columns: const [
DataColumn(
label: Expanded(
child: Text('Education Type',
style: TextStyle(
fontWeight: FontWeight.w600),
softWrap: true),
)),
DataColumn(
label: Expanded(
child: Text('Institution Name',
style: TextStyle(
fontWeight:
FontWeight.w600)))),
],
rows: List.generate(
certificate.take(2).length,
(index) => DataRow(
onSelectChanged: (value) {
print(
"message ${certificate[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(certificate[index]);
},
);
},
cells: [
DataCell(Text(
certificate[index]
['Education Type']
.toString(),
softWrap: true)),
DataCell(Text(
certificate[index]
['Institution Name']
.toString(),
softWrap: true)),
],
),
),
),
),
),
),
Container(
color: Colors.white,
child: Align(
alignment: Alignment.center,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: OutlinedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => CerShowMore(
text: widget.text)));
},
child: Text(
'Show More',
style:
TextStyle(color: Constants.k2color),
),
style: OutlinedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
),
),
)
]),
),
),
),
)
: Container(), // adds spacing between the text and image
// ListTileTheme(
// dense: true,
// child: Padding(
// padding: const EdgeInsets.only(left: 8.0, right: 8.0),
// child: Container(
// child: Card(
// margin: EdgeInsets.all(1.0),
// // elevation: 5,
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(0.0),
// ),
// color: Constants.k2color11,
// child: ExpansionTile(
// backgroundColor: Constants.k2color11,
// initiallyExpanded: false,
// maintainState: true,
// // backgroundColor: Colors.white,
// // collapsedBackgroundColor: Color(0xFF2b9af3),
// onExpansionChanged: (bool expanded) {
// setState(() {
// _isExpanded = expanded;
// });
// },
// trailing: Icon(
// _isExpanded
// ? Icons.keyboard_arrow_up
// : Icons.keyboard_arrow_down,
// color: Colors.black),
// title: Row(
// mainAxisAlignment: MainAxisAlignment.start,
// // mainAxisSize: MainAxisSize.min,
// children: [
// Text1(
// title: "Staff/Assistant",
// txtcolor: Colors.black,
// fontweight: FontWeight.normal,
// txtfont: 16.0),
// const SizedBox(
// width: 8.0,
// ),
// Text1(
// title: "(3)",
// txtcolor: Colors.black,
// fontweight: FontWeight.normal,
// txtfont: 16.0),
// ],
// ),
// children: [
// Scrollbar(
// child: SingleChildScrollView(
// scrollDirection: Axis.horizontal,
// child: Container(
// constraints: BoxConstraints(
// minWidth: MediaQuery.of(context).size.width),
// color: Colors.white,
// child: DataTable(
// showCheckboxColumn: false,
// columns: const [
// DataColumn(
// label: Expanded(
// child: Text('Title',
// style: TextStyle(
// fontWeight: FontWeight.w600),
// softWrap: true),
// )),
// DataColumn(
// label: Expanded(
// child: Text('Location',
// style: TextStyle(
// fontWeight: FontWeight.w600)))),
// ],
// rows: List.generate(
// publication_data.length,
// (index) => DataRow(
// onSelectChanged: (value) {
// print("message ${publication_data[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(publication_data[index]);
// },
// );
// },
// cells: [
// DataCell(Text(
// publication_data[index]['Institution']
// .toString(),
// softWrap: true)),
// DataCell(Text(
// publication_data[index]['Address']
// .toString(),
// softWrap: true)),
// ],
// ),
// ),
// ),
// ),
// ),
// ),
// Container(
// color: Colors.white,
// child: Align(
// alignment: Alignment.center,
// child: Padding(
// padding: const EdgeInsets.all(8.0),
// child: OutlinedButton(
// onPressed: () {
// // Navigator.push(
// // context,
// // MaterialPageRoute(
// // builder: (_) =>
// // PublicationsData()));
// },
// child: Text(
// 'Show More',
// style: TextStyle(color: Constants.k2color),
// ),
// style: OutlinedButton.styleFrom(
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(12),
// ),
// ),
// ),
// ),
// ),
// )
// ]),
// ),
// ),
// ),
// ), // adds spacing between the text and image
// ListTileTheme(
// dense: true,
// child: Padding(
// padding: const EdgeInsets.only(left: 8.0, right: 8.0),
// child: Container(
// child: Card(
// margin: EdgeInsets.all(1.0),
// ///elevation: 5,
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(0.0),
// ),
// color: Constants.k2color11,
// child: ExpansionTile(
// backgroundColor: Constants.k2color11,
// initiallyExpanded: false,
// maintainState: true,
// // backgroundColor: Colors.white,
// // collapsedBackgroundColor: Color(0xFF2b9af3),
// onExpansionChanged: (bool expanded) {
// setState(() {
// _isExpanded = expanded;
// });
// },
// trailing: Icon(
// _isExpanded
// ? Icons.keyboard_arrow_up
// : Icons.keyboard_arrow_down,
// color: Colors.black),
// title: Row(
// mainAxisAlignment: MainAxisAlignment.start,
// // mainAxisSize: MainAxisSize.min,
// children: [
// Text1(
// title: "State License",
// txtcolor: Colors.black,
// fontweight: FontWeight.normal,
// txtfont: 16.0),
// const SizedBox(
// width: 8.0,
// ),
// Text1(
// title: "(3)",
// txtcolor: Colors.black,
// fontweight: FontWeight.normal,
// txtfont: 16.0),
// ],
// ),
// children: [
// Scrollbar(
// child: SingleChildScrollView(
// scrollDirection: Axis.horizontal,
// child: Container(
// constraints: BoxConstraints(
// minWidth: MediaQuery.of(context).size.width),
// color: Colors.white,
// child: DataTable(
// showCheckboxColumn: false,
// columns: const [
// DataColumn(
// label: Expanded(
// child: Text('License No',
// style: TextStyle(
// fontWeight: FontWeight.w600),
// softWrap: true),
// )),
// DataColumn(
// label: Expanded(
// child: Text('State',
// style: TextStyle(
// fontWeight: FontWeight.w600)))),
// ],
// rows: List.generate(
// publication_data.length,
// (index) => DataRow(
// onSelectChanged: (value) {
// print("message ${publication_data[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(publication_data[index]);
// },
// );
// },
// cells: [
// DataCell(Text(
// publication_data[index]['Institution']
// .toString(),
// softWrap: true)),
// DataCell(Text(
// publication_data[index]['Address']
// .toString(),
// softWrap: true)),
// ],
// ),
// ),
// ),
// ),
// ),
// ),
// Container(
// color: Colors.white,
// child: Align(
// alignment: Alignment.center,
// child: Padding(
// padding: const EdgeInsets.all(8.0),
// child: OutlinedButton(
// onPressed: () {
// // Navigator.push(
// // context,
// // MaterialPageRoute(
// // builder: (_) =>
// // PublicationsData()));
// },
// child: Text(
// 'Show More',
// style: TextStyle(color: Constants.k2color),
// ),
// style: OutlinedButton.styleFrom(
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(12),
// ),
// ),
// ),
// ),
// ),
// )
// ]),
// ),
// ),
// ),
// ), // ],
]),
);
}
}