2024-07-05 08:48:29 +00:00
|
|
|
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/events_provider.dart';
|
|
|
|
import 'package:discover_module/provider_class/publications_provider.dart';
|
|
|
|
import 'package:discover_module/provider_class/trials_provider.dart';
|
|
|
|
import 'package:discover_module/ui_screen/affiliation_data.dart';
|
|
|
|
import 'package:discover_module/ui_screen/events_data.dart';
|
|
|
|
import 'package:discover_module/ui_screen/interactionform/NewtworkConnectivity.dart';
|
|
|
|
import 'package:discover_module/ui_screen/interactionform/configprovider.dart';
|
|
|
|
import 'package:discover_module/ui_screen/interactionform/edit_interaction_screen.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:discover_module/ui_screen/interactionform/view_interaction_screen.dart';
|
|
|
|
import 'package:discover_module/ui_screen/interactionform/viewinteractionprovider.dart';
|
|
|
|
import 'package:discover_module/ui_screen/newformlist.dart';
|
|
|
|
import 'package:discover_module/ui_screen/publication_data.dart';
|
|
|
|
import 'package:expandable/expandable.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/rendering.dart';
|
|
|
|
import 'package:flutter/widgets.dart';
|
|
|
|
import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
class NewProfile extends StatefulWidget {
|
|
|
|
const NewProfile({Key? key, required this.text}) : super(key: key);
|
|
|
|
final Map<dynamic, dynamic> text;
|
|
|
|
|
|
|
|
@override
|
|
|
|
State<NewProfile> createState() => _NewProfileState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _NewProfileState extends State<NewProfile> {
|
|
|
|
bool isonline = false;
|
|
|
|
List affiliation_data = [];
|
|
|
|
List publication_data = [];
|
|
|
|
List event_data = [];
|
|
|
|
List trial_data = [];
|
|
|
|
|
|
|
|
List<SaveInteraction> viewformData = [];
|
|
|
|
|
|
|
|
bool _isExpanded = false;
|
|
|
|
// final ScrollController controller = ScrollController();
|
|
|
|
|
|
|
|
// final ScrollController controller2 = ScrollController();
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
// TODO: implement initState
|
|
|
|
super.initState();
|
|
|
|
print("pooja123");
|
2024-07-08 04:58:57 +00:00
|
|
|
//init();
|
2024-07-05 08:48:29 +00:00
|
|
|
|
|
|
|
getaffiliations();
|
|
|
|
|
|
|
|
getuserdetails();
|
|
|
|
|
|
|
|
print("Widget_isssIndex_iss ${widget.text}");
|
|
|
|
print(
|
|
|
|
"Widget_isssIndex_iss ${widget.text!["id"]},${widget.text!["name"]},${widget.text!["img_path"]}");
|
|
|
|
}
|
|
|
|
|
|
|
|
init() async {
|
|
|
|
await Provider.of<InteractionProvider>(context, listen: false)
|
|
|
|
.initConfigData();
|
|
|
|
final data =
|
|
|
|
await Provider.of<ViewInteractionProvider>(context, listen: false);
|
|
|
|
|
|
|
|
// if(data.g)
|
|
|
|
data.getRecords("form-3 demo");
|
2024-07-08 04:58:57 +00:00
|
|
|
// setState(() {});
|
2024-07-05 08:48:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
getaffiliations() async {
|
|
|
|
var affiliations =
|
|
|
|
Provider.of<AffiliationsProvider>(context, listen: false);
|
|
|
|
|
|
|
|
await affiliations.getAffiliationsdata();
|
|
|
|
final affilist = affiliations.adddta;
|
|
|
|
|
|
|
|
var publication = Provider.of<PublicatioProvider>(context, listen: false);
|
|
|
|
|
|
|
|
await publication.publicatininfo();
|
|
|
|
final publist = publication.publicationlist;
|
|
|
|
|
|
|
|
var events = Provider.of<EventProvider>(context, listen: false);
|
|
|
|
await events.geteventdata();
|
|
|
|
final eventlist = events.EventsList;
|
|
|
|
|
|
|
|
var form = Provider.of<ViewInteractionProvider>(context, listen: false);
|
|
|
|
// form.savedList;
|
|
|
|
|
|
|
|
var trials = Provider.of<TrialsProvider>(context, listen: false);
|
|
|
|
await trials.trialsdata();
|
|
|
|
|
|
|
|
final trialslist = trials.trialsinfo;
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
affiliation_data = affilist;
|
|
|
|
publication_data = publist;
|
|
|
|
event_data = eventlist;
|
|
|
|
viewformData = form.savedList;
|
|
|
|
trial_data = trialslist;
|
|
|
|
});
|
|
|
|
|
|
|
|
print("Affiliations_data_is: $affilist");
|
|
|
|
print("trialslist_data_is: $trialslist");
|
|
|
|
}
|
|
|
|
|
|
|
|
getuserdetails() async {
|
|
|
|
// HiveFunctions.getindexUser(widget.text);
|
|
|
|
|
|
|
|
NetworkConnectivity networkConnectivity = NetworkConnectivity();
|
|
|
|
bool isonline1 = await networkConnectivity.isInternetAvailable();
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
print("Profile_isOnline: $isonline1");
|
|
|
|
isonline = isonline1;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return SafeArea(
|
|
|
|
child: Scaffold(
|
|
|
|
//backgroundColor: Color.fromARGB(255, 200, 222, 241),
|
|
|
|
backgroundColor: Color.fromARGB(255, 237, 230, 230),
|
|
|
|
appBar: AppBar(
|
|
|
|
//backgroundColor: Colors.transparent,
|
|
|
|
title: const Text('Profile'),
|
|
|
|
),
|
|
|
|
body: ListView(
|
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: <Widget>[
|
|
|
|
// Padding(
|
|
|
|
// padding: EdgeInsets.all(8.0),
|
|
|
|
// child: ProfilePicture(
|
|
|
|
// name: widget.text!["name"],
|
|
|
|
// radius: 38,
|
|
|
|
// fontsize: 21,
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
child: widget.text!["img_path"] == null
|
|
|
|
? ProfilePicture(
|
|
|
|
name: widget.text!["name"],
|
|
|
|
radius: 38,
|
|
|
|
fontsize: 21,
|
|
|
|
)
|
|
|
|
: ClipOval(
|
|
|
|
child: SizedBox.fromSize(
|
|
|
|
size: Size.fromRadius(48), // Image radius
|
|
|
|
child: Image.network(widget.text!["img_path"],
|
|
|
|
fit: BoxFit.cover),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
// Text(
|
|
|
|
// "Gerosa, Gino",
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: 22.0,
|
|
|
|
// color: Colors.black,
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
Text1(
|
|
|
|
title: "Dr " + widget.text!["name"],
|
|
|
|
txtcolor: Colors.black,
|
|
|
|
fontweight: FontWeight.normal,
|
|
|
|
txtfont: 22.0),
|
|
|
|
// Text(
|
|
|
|
// "Cardiac Surgery",
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontWeight: FontWeight.bold, fontSize: 14.0),
|
|
|
|
// ),
|
|
|
|
Text1(
|
|
|
|
title: widget.text!["speciality"],
|
|
|
|
txtcolor: Colors.black,
|
|
|
|
fontweight: FontWeight.normal,
|
|
|
|
txtfont: 15.0),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
height: 15.0,
|
|
|
|
),
|
|
|
|
Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 15.0),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
const Icon(
|
|
|
|
Icons.location_city_sharp,
|
|
|
|
color: Color.fromARGB(255, 0, 71, 132),
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
width: 3.0,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// "Azienda Ospedaliera di Padova",
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontWeight: FontWeight.bold, fontSize: 14.0),
|
|
|
|
// ),
|
|
|
|
child: Text1(
|
|
|
|
title: widget.text!["addr"] ??
|
|
|
|
"Azienda Ospedaliera di Padova",
|
|
|
|
txtcolor: Colors.black,
|
|
|
|
txtfont: 15.0,
|
|
|
|
fontweight: FontWeight.normal,
|
|
|
|
)),
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
height: 8.0,
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 15.0),
|
|
|
|
child: Row(children: [
|
|
|
|
const Icon(
|
|
|
|
Icons.location_pin,
|
|
|
|
color: Color.fromARGB(255, 0, 71, 132),
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
width: 3.0,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// "Via Giustiniani, 2, Padova, Veneto 35128, Italy",
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontWeight: FontWeight.bold, fontSize: 14.0),
|
|
|
|
// ),
|
|
|
|
child: Text1(
|
|
|
|
title: widget.text!["adrr"] ??
|
|
|
|
"Via Giustiniani, 2, Padova, Veneto 35128, Italy",
|
|
|
|
txtcolor: Colors.black,
|
|
|
|
fontweight: FontWeight.normal,
|
|
|
|
txtfont: 15.0),
|
|
|
|
),
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
height: 8.0,
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 15.0),
|
|
|
|
child: Row(children: [
|
|
|
|
const Icon(
|
|
|
|
Icons.phone,
|
|
|
|
color: Color.fromARGB(255, 0, 71, 132),
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
width: 3.0,
|
|
|
|
),
|
|
|
|
// Text(
|
|
|
|
// "+390498212410 X 12",
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontWeight: FontWeight.bold, fontSize: 14.0),
|
|
|
|
// ),
|
|
|
|
Text1(
|
|
|
|
title: widget.text!["phone_no"].toString(),
|
|
|
|
txtcolor: Colors.black,
|
|
|
|
fontweight: FontWeight.normal,
|
|
|
|
txtfont: 15.0),
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
height: 8.0,
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 15.0),
|
|
|
|
child: Row(children: [
|
|
|
|
const Icon(
|
|
|
|
Icons.call,
|
|
|
|
color: Color.fromARGB(255, 0, 71, 132),
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
width: 3.0,
|
|
|
|
),
|
|
|
|
Text1(
|
|
|
|
title: widget.text!["phone_no"].toString(),
|
|
|
|
txtcolor: Colors.black,
|
|
|
|
fontweight: FontWeight.normal,
|
|
|
|
txtfont: 15.0),
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
height: 8.0,
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 15.0),
|
|
|
|
child: Row(children: [
|
|
|
|
const Icon(
|
|
|
|
Icons.email,
|
|
|
|
color: Color.fromARGB(255, 0, 71, 132),
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
width: 3.0,
|
|
|
|
),
|
|
|
|
Text1(
|
|
|
|
title: widget.text!["email"],
|
|
|
|
txtcolor: Colors.black,
|
|
|
|
fontweight: FontWeight.normal,
|
|
|
|
txtfont: 15.0),
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
height: 8.0,
|
|
|
|
),
|
|
|
|
// isonline
|
|
|
|
// ?
|
|
|
|
Container(
|
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
|
child: Card(
|
|
|
|
elevation: 4,
|
|
|
|
clipBehavior: Clip.antiAliasWithSaveLayer,
|
|
|
|
surfaceTintColor: Colors.white,
|
|
|
|
// shape: RoundedRectangleBorder(
|
|
|
|
// borderRadius:
|
|
|
|
// BorderRadius.circular(0.0),
|
|
|
|
// ),
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.circular(30.0)),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
// const Text(
|
|
|
|
// "Profile Summarry",
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: 20.0, fontWeight: FontWeight.bold),
|
|
|
|
// ),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.all(12.0),
|
|
|
|
child: Text1(
|
|
|
|
title: "Profile Summarry",
|
|
|
|
txtcolor: Colors.black,
|
|
|
|
fontweight: FontWeight.normal,
|
|
|
|
txtfont: 18.0),
|
|
|
|
),
|
|
|
|
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.all(12.0),
|
|
|
|
child: Text1(
|
|
|
|
title: widget.text!["summarry"],
|
|
|
|
txtcolor: Colors.black,
|
|
|
|
fontweight: FontWeight.normal,
|
|
|
|
txtfont: 15.0),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.all(0.0),
|
|
|
|
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(0),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: <Widget>[
|
|
|
|
// const SizedBox(height: 10),
|
|
|
|
// Flexible(
|
|
|
|
// flex: 1,
|
|
|
|
// child: Padding(
|
|
|
|
// padding: const EdgeInsets.only(
|
|
|
|
// left: 1.0, right: 1.0),
|
|
|
|
// child: Card(
|
|
|
|
// elevation: 5,
|
|
|
|
// shape: RoundedRectangleBorder(
|
|
|
|
// borderRadius:
|
|
|
|
// BorderRadius.circular(0.0),
|
|
|
|
// ),
|
|
|
|
// color: const Color.fromARGB(
|
|
|
|
// 255, 0, 71, 137),
|
|
|
|
// child: ExpansionTile(
|
|
|
|
// maintainState: true,
|
|
|
|
// // onExpansionChanged:
|
|
|
|
// // (bool expanded) {
|
|
|
|
// // setState(() {
|
|
|
|
// // _isExpanded = expanded;
|
|
|
|
// // });
|
|
|
|
// // },
|
|
|
|
// backgroundColor:
|
|
|
|
// const Color.fromARGB(
|
|
|
|
// 255, 0, 71, 137),
|
|
|
|
// collapsedIconColor: Colors.white,
|
|
|
|
// // trailing: Icon(
|
|
|
|
// // _isExpanded
|
|
|
|
// // ? Icons.keyboard_arrow_up
|
|
|
|
// // : Icons
|
|
|
|
// // .keyboard_arrow_down,
|
|
|
|
// // color: Colors.white),
|
|
|
|
// // collapsedBackgroundColor: Color(0xFF2b9af3),
|
|
|
|
// initiallyExpanded: true,
|
|
|
|
// title: Row(
|
|
|
|
// //mainAxisSize: MainAxisSize.min,
|
|
|
|
// children: [
|
|
|
|
// Text1(
|
|
|
|
// title: "Affiliations",
|
|
|
|
// txtcolor: Colors.white,
|
|
|
|
// fontweight:
|
|
|
|
// FontWeight.normal,
|
|
|
|
// txtfont: 17.0),
|
|
|
|
// const SizedBox(
|
|
|
|
// width: 8.0,
|
|
|
|
// ),
|
|
|
|
// // Text1(
|
|
|
|
// // title: widget
|
|
|
|
// // .text![
|
|
|
|
// // "affiliations_count"]
|
|
|
|
// // .toString(),
|
|
|
|
// // txtfont: 18.0,
|
|
|
|
// // txtcolor:
|
|
|
|
// // const Color
|
|
|
|
// // .fromARGB(
|
|
|
|
// // 255,
|
|
|
|
// // 60,
|
|
|
|
// // 82,
|
|
|
|
// // 102),
|
|
|
|
// // )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// children: [
|
|
|
|
// SingleChildScrollView(
|
|
|
|
// scrollDirection:
|
|
|
|
// Axis.horizontal,
|
|
|
|
// child: Container(
|
|
|
|
// width:
|
|
|
|
// MediaQuery.of(context)
|
|
|
|
// .size
|
|
|
|
// .width,
|
|
|
|
// color: Colors.white,
|
|
|
|
// child: DataTable(
|
|
|
|
// columns: const [
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'sl no'))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Organization Name'),
|
|
|
|
// )),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Department'))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Role'))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Time Frame'))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Org Type'))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Eng Type'))),
|
|
|
|
// // Add more columns as needed
|
|
|
|
// ],
|
|
|
|
// rows: List.generate(
|
|
|
|
// affiliation_data.length,
|
|
|
|
// (index) => DataRow(
|
|
|
|
// cells: [
|
|
|
|
// DataCell(Text(
|
|
|
|
// affiliation_data[
|
|
|
|
// index]
|
|
|
|
// ['id']
|
|
|
|
// .toString())),
|
|
|
|
// DataCell(Text(
|
|
|
|
// affiliation_data[
|
|
|
|
// index]
|
|
|
|
// [
|
|
|
|
// 'org_name']
|
|
|
|
// .toString())),
|
|
|
|
// DataCell(Text(
|
|
|
|
// affiliation_data[
|
|
|
|
// index]
|
|
|
|
// ['dept']
|
|
|
|
// .toString())),
|
|
|
|
// DataCell(Text(
|
|
|
|
// affiliation_data[
|
|
|
|
// index]
|
|
|
|
// ['role']
|
|
|
|
// .toString())),
|
|
|
|
// DataCell(Text(
|
|
|
|
// affiliation_data[
|
|
|
|
// index]
|
|
|
|
// [
|
|
|
|
// 'time_frame']
|
|
|
|
// .toString())),
|
|
|
|
// DataCell(Text(
|
|
|
|
// affiliation_data[
|
|
|
|
// index]
|
|
|
|
// [
|
|
|
|
// 'org_type']
|
|
|
|
// .toString())),
|
|
|
|
// DataCell(Text(
|
|
|
|
// affiliation_data[
|
|
|
|
// index]
|
|
|
|
// [
|
|
|
|
// 'emg_type']
|
|
|
|
// .toString())),
|
|
|
|
// // Add more DataCells as needed
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// 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: (_) =>
|
|
|
|
// AffiliationsData()));
|
|
|
|
// },
|
|
|
|
// child:
|
|
|
|
// Text('Show More'),
|
|
|
|
// style: OutlinedButton
|
|
|
|
// .styleFrom(
|
|
|
|
// shape:
|
|
|
|
// RoundedRectangleBorder(
|
|
|
|
// borderRadius:
|
|
|
|
// BorderRadius
|
|
|
|
// .circular(
|
|
|
|
// 12),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ]),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
|
|
|
|
Flexible(
|
|
|
|
flex: 1,
|
|
|
|
// height:
|
|
|
|
// 200, // Set a fixed height or use constraints as needed
|
|
|
|
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
left: 1.0, right: 1.0),
|
|
|
|
child: Card(
|
|
|
|
elevation: 5,
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(0.0),
|
|
|
|
),
|
|
|
|
color: const Color.fromARGB(
|
|
|
|
255, 0, 71, 137),
|
|
|
|
child: ExpansionTile(
|
|
|
|
maintainState: true,
|
|
|
|
onExpansionChanged:
|
|
|
|
(bool expanded) {
|
|
|
|
setState(() {
|
|
|
|
_isExpanded = expanded;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
backgroundColor:
|
|
|
|
const Color.fromARGB(
|
|
|
|
255, 0, 71, 137),
|
|
|
|
trailing: Icon(
|
|
|
|
_isExpanded
|
|
|
|
? Icons.keyboard_arrow_up
|
|
|
|
: Icons
|
|
|
|
.keyboard_arrow_down,
|
|
|
|
color: Colors.white),
|
|
|
|
// backgroundColor: Colors.white,
|
|
|
|
// collapsedBackgroundColor: Color(0xFF2b9af3),
|
|
|
|
initiallyExpanded: true,
|
|
|
|
title: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
Text1(
|
|
|
|
title: "Affiliations",
|
|
|
|
txtcolor: Colors.white,
|
|
|
|
fontweight:
|
|
|
|
FontWeight.normal,
|
|
|
|
txtfont: 17.0),
|
|
|
|
const SizedBox(
|
|
|
|
width: 8.0,
|
|
|
|
),
|
|
|
|
Text1(
|
|
|
|
title: "4",
|
|
|
|
txtcolor: Colors.white,
|
|
|
|
fontweight:
|
|
|
|
FontWeight.normal,
|
|
|
|
txtfont: 17.0),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
children: [
|
|
|
|
Scrollbar(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
scrollDirection:
|
|
|
|
Axis.horizontal,
|
|
|
|
child: Container(
|
|
|
|
// width:
|
|
|
|
// MediaQuery.of(context)
|
|
|
|
// .size
|
|
|
|
// .width,
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
minWidth:
|
|
|
|
MediaQuery.of(
|
|
|
|
context)
|
|
|
|
.size
|
|
|
|
.width),
|
|
|
|
color: Colors.white,
|
|
|
|
child: DataTable(
|
|
|
|
columns: const [
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'',
|
|
|
|
softWrap:
|
|
|
|
true))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Organization Name'),
|
|
|
|
)),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Department'))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Role'))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Time Frame'))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Org Type'))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Eng Type'))),
|
|
|
|
|
|
|
|
// Add more columns as needed
|
|
|
|
],
|
|
|
|
rows: List.generate(
|
|
|
|
affiliation_data
|
|
|
|
.length,
|
|
|
|
(index) => DataRow(
|
|
|
|
cells: [
|
|
|
|
DataCell(Text(
|
|
|
|
affiliation_data[
|
|
|
|
index]
|
|
|
|
['id']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
affiliation_data[
|
|
|
|
index]
|
|
|
|
[
|
|
|
|
'org_name']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
affiliation_data[
|
|
|
|
index]
|
|
|
|
[
|
|
|
|
'dept']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
affiliation_data[
|
|
|
|
index]
|
|
|
|
[
|
|
|
|
'role']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
affiliation_data[
|
|
|
|
index]
|
|
|
|
[
|
|
|
|
'time_frame']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
affiliation_data[
|
|
|
|
index]
|
|
|
|
[
|
|
|
|
'org_type']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
affiliation_data[
|
|
|
|
index]
|
|
|
|
[
|
|
|
|
'emg_type']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
|
|
|
|
// Add more DataCells as needed
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
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: (_) =>
|
|
|
|
AffiliationsData()));
|
|
|
|
},
|
|
|
|
child:
|
|
|
|
Text('Show More'),
|
|
|
|
style: OutlinedButton
|
|
|
|
.styleFrom(
|
|
|
|
shape:
|
|
|
|
RoundedRectangleBorder(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius
|
|
|
|
.circular(
|
|
|
|
12),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
), // adds spacing between the text and image
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
height: 10.0,
|
|
|
|
),
|
|
|
|
|
|
|
|
Flexible(
|
|
|
|
flex: 1,
|
|
|
|
// height:
|
|
|
|
// 200, // Set a fixed height or use constraints as needed
|
|
|
|
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
left: 1.0, right: 1.0),
|
|
|
|
child: Container(
|
|
|
|
child: Card(
|
|
|
|
elevation: 5,
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(0.0),
|
|
|
|
),
|
|
|
|
color: const Color.fromARGB(
|
|
|
|
255, 0, 71, 137),
|
|
|
|
child: ExpansionTile(
|
|
|
|
maintainState: true,
|
|
|
|
// backgroundColor: Colors.white,
|
|
|
|
// collapsedBackgroundColor: Color(0xFF2b9af3),
|
|
|
|
onExpansionChanged:
|
|
|
|
(bool expanded) {
|
|
|
|
setState(() {
|
|
|
|
_isExpanded = expanded;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
backgroundColor:
|
|
|
|
const Color.fromARGB(
|
|
|
|
255, 0, 71, 137),
|
|
|
|
trailing: Icon(
|
|
|
|
_isExpanded
|
|
|
|
? Icons
|
|
|
|
.keyboard_arrow_up
|
|
|
|
: Icons
|
|
|
|
.keyboard_arrow_down,
|
|
|
|
color: Colors.white),
|
|
|
|
initiallyExpanded: true,
|
|
|
|
title: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
Text1(
|
|
|
|
title: "Publications",
|
|
|
|
txtcolor: Colors.white,
|
|
|
|
fontweight:
|
|
|
|
FontWeight.normal,
|
|
|
|
txtfont: 17.0),
|
|
|
|
const SizedBox(
|
|
|
|
width: 8.0,
|
|
|
|
),
|
|
|
|
Text1(
|
|
|
|
title: "3",
|
|
|
|
txtcolor: Colors.white,
|
|
|
|
fontweight:
|
|
|
|
FontWeight.normal,
|
|
|
|
txtfont: 17.0),
|
|
|
|
// Text1(
|
|
|
|
// title: widget
|
|
|
|
// .text![
|
|
|
|
// "publications_count"]
|
|
|
|
// .toString(),
|
|
|
|
// txtfont: 18.0,
|
|
|
|
// txtcolor: Color
|
|
|
|
// .fromARGB(
|
|
|
|
// 255,
|
|
|
|
// 0,
|
|
|
|
// 71,
|
|
|
|
// 137),
|
|
|
|
// )
|
|
|
|
],
|
|
|
|
),
|
|
|
|
children: [
|
|
|
|
Scrollbar(
|
|
|
|
//isAlwaysShown: true,
|
|
|
|
child:
|
|
|
|
SingleChildScrollView(
|
|
|
|
scrollDirection:
|
|
|
|
Axis.horizontal,
|
|
|
|
child: Container(
|
|
|
|
// width: MediaQuery.of(
|
|
|
|
// context)
|
|
|
|
// .size
|
|
|
|
// .width,
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
minWidth:
|
|
|
|
MediaQuery.of(
|
|
|
|
context)
|
|
|
|
.size
|
|
|
|
.width),
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
child: DataTable(
|
|
|
|
columns: const [
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'sl no'))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Artical Title',
|
|
|
|
softWrap:
|
|
|
|
true),
|
|
|
|
)),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Journal Name',
|
|
|
|
softWrap: true,
|
|
|
|
))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Date'))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Authors'))),
|
|
|
|
|
|
|
|
// Add more columns as needed
|
|
|
|
],
|
|
|
|
rows: List.generate(
|
|
|
|
publication_data
|
|
|
|
.length,
|
|
|
|
(index) => DataRow(
|
|
|
|
cells: [
|
|
|
|
DataCell(Text(
|
|
|
|
publication_data[index]
|
|
|
|
[
|
|
|
|
'id']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
publication_data[index]
|
|
|
|
[
|
|
|
|
'artical_title']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
publication_data[index]
|
|
|
|
[
|
|
|
|
'journal_name']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
publication_data[index]
|
|
|
|
[
|
|
|
|
'date']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
publication_data[index]
|
|
|
|
[
|
|
|
|
'author']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
|
|
|
|
// Add more DataCells as needed
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
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: OutlinedButton
|
|
|
|
.styleFrom(
|
|
|
|
shape:
|
|
|
|
RoundedRectangleBorder(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius
|
|
|
|
.circular(
|
|
|
|
12),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
), // adds spacing between the text and image
|
|
|
|
|
|
|
|
const SizedBox(height: 10),
|
|
|
|
|
|
|
|
Flexible(
|
|
|
|
flex: 1,
|
|
|
|
// height:
|
|
|
|
// 200, // Set a fixed height or use constraints as needed
|
|
|
|
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
left: 1.0, right: 1.0),
|
|
|
|
child: Card(
|
|
|
|
elevation: 5,
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(0.0),
|
|
|
|
),
|
|
|
|
color: const Color.fromARGB(
|
|
|
|
255, 0, 71, 137),
|
|
|
|
child: ExpansionTile(
|
|
|
|
maintainState: true,
|
|
|
|
onExpansionChanged:
|
|
|
|
(bool expanded) {
|
|
|
|
setState(() {
|
|
|
|
_isExpanded = expanded;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
backgroundColor:
|
|
|
|
const Color.fromARGB(
|
|
|
|
255, 0, 71, 137),
|
|
|
|
trailing: Icon(
|
|
|
|
_isExpanded
|
|
|
|
? Icons.keyboard_arrow_up
|
|
|
|
: Icons
|
|
|
|
.keyboard_arrow_down,
|
|
|
|
color: Colors.white),
|
|
|
|
// backgroundColor: Colors.white,
|
|
|
|
// collapsedBackgroundColor: Color(0xFF2b9af3),
|
|
|
|
initiallyExpanded: true,
|
|
|
|
title: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
Text1(
|
|
|
|
title: "Events",
|
|
|
|
txtcolor: Colors.white,
|
|
|
|
fontweight:
|
|
|
|
FontWeight.normal,
|
|
|
|
txtfont: 17.0),
|
|
|
|
const SizedBox(
|
|
|
|
width: 8.0,
|
|
|
|
),
|
|
|
|
Text1(
|
|
|
|
title: "4",
|
|
|
|
txtcolor: Colors.white,
|
|
|
|
fontweight:
|
|
|
|
FontWeight.normal,
|
|
|
|
txtfont: 17.0),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
children: [
|
|
|
|
Scrollbar(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
scrollDirection:
|
|
|
|
Axis.horizontal,
|
|
|
|
child: Container(
|
|
|
|
// width:
|
|
|
|
// MediaQuery.of(context)
|
|
|
|
// .size
|
|
|
|
// .width,
|
|
|
|
constraints:
|
|
|
|
BoxConstraints(
|
|
|
|
minWidth: MediaQuery.of(
|
|
|
|
context)
|
|
|
|
.size
|
|
|
|
.width,
|
|
|
|
),
|
|
|
|
color: Colors.white,
|
|
|
|
child: DataTable(
|
|
|
|
columns: const [
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'sl no',
|
|
|
|
softWrap:
|
|
|
|
true))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Event Name',
|
|
|
|
softWrap: true),
|
|
|
|
)),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Session Type',
|
|
|
|
softWrap:
|
|
|
|
true))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Topic',
|
|
|
|
softWrap:
|
|
|
|
true))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Role',
|
|
|
|
softWrap:
|
|
|
|
true))),
|
|
|
|
|
|
|
|
// Add more columns as needed
|
|
|
|
],
|
|
|
|
rows: List.generate(
|
|
|
|
event_data.length,
|
|
|
|
(index) => DataRow(
|
|
|
|
cells: [
|
|
|
|
DataCell(Text(
|
|
|
|
event_data[index]
|
|
|
|
['id']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
event_data[index]
|
|
|
|
[
|
|
|
|
'event_name']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
event_data[index]
|
|
|
|
[
|
|
|
|
'session_type']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
event_data[index]
|
|
|
|
[
|
|
|
|
'topic']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
event_data[index]
|
|
|
|
[
|
|
|
|
'role']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
|
|
|
|
// Add more DataCells as needed
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
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: (_) =>
|
|
|
|
EventsData()));
|
|
|
|
},
|
|
|
|
child:
|
|
|
|
Text('Show More'),
|
|
|
|
style: OutlinedButton
|
|
|
|
.styleFrom(
|
|
|
|
shape:
|
|
|
|
RoundedRectangleBorder(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius
|
|
|
|
.circular(
|
|
|
|
12),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
), // adds spacing between the text and image
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
height: 10.0,
|
|
|
|
),
|
|
|
|
|
|
|
|
Flexible(
|
|
|
|
flex: 1,
|
|
|
|
// height:
|
|
|
|
// 200, // Set a fixed height or use constraints as needed
|
|
|
|
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
left: 1.0, right: 1.0),
|
|
|
|
child: Card(
|
|
|
|
elevation: 5,
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(0.0),
|
|
|
|
),
|
|
|
|
color: const Color.fromARGB(
|
|
|
|
255, 0, 71, 137),
|
|
|
|
child: ExpansionTile(
|
|
|
|
maintainState: true,
|
|
|
|
onExpansionChanged:
|
|
|
|
(bool expanded) {
|
|
|
|
setState(() {
|
|
|
|
_isExpanded = expanded;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
backgroundColor:
|
|
|
|
const Color.fromARGB(
|
|
|
|
255, 0, 71, 137),
|
|
|
|
trailing: Icon(
|
|
|
|
_isExpanded
|
|
|
|
? Icons.keyboard_arrow_up
|
|
|
|
: Icons
|
|
|
|
.keyboard_arrow_down,
|
|
|
|
color: Colors.white),
|
|
|
|
// backgroundColor: Colors.white,
|
|
|
|
// collapsedBackgroundColor: Color(0xFF2b9af3),
|
|
|
|
initiallyExpanded: true,
|
|
|
|
title: Row(
|
|
|
|
mainAxisAlignment:
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
Text1(
|
|
|
|
title: "Trials",
|
|
|
|
txtcolor: Colors.white,
|
|
|
|
fontweight:
|
|
|
|
FontWeight.normal,
|
|
|
|
txtfont: 17.0),
|
|
|
|
const SizedBox(
|
|
|
|
width: 8.0,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
children: [
|
|
|
|
Scrollbar(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
scrollDirection:
|
|
|
|
Axis.horizontal,
|
|
|
|
child: Container(
|
|
|
|
// width:
|
|
|
|
// MediaQuery.of(context)
|
|
|
|
// .size
|
|
|
|
// .width,
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
minWidth:
|
|
|
|
MediaQuery.of(
|
|
|
|
context)
|
|
|
|
.size
|
|
|
|
.width),
|
|
|
|
color: Colors.white,
|
|
|
|
child: DataTable(
|
|
|
|
columns: const [
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'',
|
|
|
|
softWrap:
|
|
|
|
true))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Trial Name',
|
|
|
|
softWrap: true),
|
|
|
|
)),
|
|
|
|
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Status',
|
|
|
|
softWrap:
|
|
|
|
true))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Sponsers',
|
|
|
|
softWrap:
|
|
|
|
true))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Condition',
|
|
|
|
softWrap:
|
|
|
|
true))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Intervention',
|
|
|
|
softWrap:
|
|
|
|
true))),
|
|
|
|
DataColumn(
|
|
|
|
label: Expanded(
|
|
|
|
child: Text(
|
|
|
|
'Phase',
|
|
|
|
softWrap:
|
|
|
|
true))),
|
|
|
|
|
|
|
|
// Add more columns as needed
|
|
|
|
],
|
|
|
|
rows: List.generate(
|
|
|
|
trial_data.length,
|
|
|
|
(index) => DataRow(
|
|
|
|
cells: [
|
|
|
|
DataCell(Text(
|
|
|
|
trial_data[index]
|
|
|
|
['id']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
trial_data[index]
|
|
|
|
[
|
|
|
|
'trial_name']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
trial_data[index]
|
|
|
|
[
|
|
|
|
'status']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
trial_data[index]
|
|
|
|
[
|
|
|
|
'sponsors']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
trial_data[index]
|
|
|
|
[
|
|
|
|
'condition']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
trial_data[index]
|
|
|
|
[
|
|
|
|
'intervention']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
DataCell(Text(
|
|
|
|
trial_data[index]
|
|
|
|
[
|
|
|
|
'phase']
|
|
|
|
.toString(),
|
|
|
|
softWrap:
|
|
|
|
true)),
|
|
|
|
|
|
|
|
// Add more DataCells as needed
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
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: (_) =>
|
|
|
|
EventsData()));
|
|
|
|
},
|
|
|
|
child:
|
|
|
|
Text('Show More'),
|
|
|
|
style: OutlinedButton
|
|
|
|
.styleFrom(
|
|
|
|
shape:
|
|
|
|
RoundedRectangleBorder(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius
|
|
|
|
.circular(
|
|
|
|
12),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
), // adds spacing between the text and image
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
height: 10.0,
|
|
|
|
),
|
|
|
|
Flexible(
|
|
|
|
flex: 1,
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
left: 1.0, right: 1.0),
|
|
|
|
child: Card(
|
|
|
|
elevation: 5,
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(0.0),
|
|
|
|
),
|
|
|
|
color: const Color.fromARGB(
|
|
|
|
255, 0, 71, 137),
|
|
|
|
child: ExpansionTile(
|
|
|
|
maintainState: true,
|
|
|
|
onExpansionChanged:
|
|
|
|
(bool expanded) {
|
|
|
|
setState(() {
|
|
|
|
_isExpanded = expanded;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
backgroundColor:
|
|
|
|
const Color.fromARGB(
|
|
|
|
255, 0, 71, 137),
|
|
|
|
trailing: Icon(
|
|
|
|
_isExpanded
|
|
|
|
? Icons.keyboard_arrow_up
|
|
|
|
: Icons
|
|
|
|
.keyboard_arrow_down,
|
|
|
|
color: Colors.white),
|
|
|
|
// collapsedBackgroundColor: Color(0xFF2b9af3),
|
|
|
|
initiallyExpanded: true,
|
|
|
|
title: Row(
|
|
|
|
//mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
GestureDetector(
|
|
|
|
onTap: () async {
|
|
|
|
final provider = Provider
|
|
|
|
.of<InteractionProvider>(
|
|
|
|
context,
|
|
|
|
listen: false);
|
|
|
|
if (getCount(
|
|
|
|
provider
|
|
|
|
.intConfigDataList[
|
|
|
|
0]
|
|
|
|
.name,
|
|
|
|
provider) !=
|
|
|
|
0) {
|
|
|
|
provider.savedList
|
|
|
|
.where((element) =>
|
|
|
|
element.form ==
|
|
|
|
provider
|
|
|
|
.intConfigDataList[
|
|
|
|
0]
|
|
|
|
.name)
|
|
|
|
.toList();
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(
|
|
|
|
builder: (BuildContext
|
|
|
|
context) =>
|
|
|
|
SavedFormListScreen(
|
|
|
|
formname: provider
|
|
|
|
.intConfigDataList[
|
|
|
|
0]
|
|
|
|
.name,
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Text1(
|
|
|
|
title:
|
|
|
|
"Interaction Form",
|
|
|
|
txtcolor: Colors.white,
|
|
|
|
fontweight:
|
|
|
|
FontWeight.normal,
|
|
|
|
txtfont: 17.0),
|
|
|
|
),
|
|
|
|
const SizedBox(
|
|
|
|
width: 8.0,
|
|
|
|
),
|
|
|
|
// Text1(
|
|
|
|
// title: widget
|
|
|
|
// .text![
|
|
|
|
// "affiliations_count"]
|
|
|
|
// .toString(),
|
|
|
|
// txtfont: 18.0,
|
|
|
|
// txtcolor:
|
|
|
|
// const Color
|
|
|
|
// .fromARGB(
|
|
|
|
// 255,
|
|
|
|
// 60,
|
|
|
|
// 82,
|
|
|
|
// 102),
|
|
|
|
// )
|
|
|
|
],
|
|
|
|
),
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
height: MediaQuery.of(context)
|
|
|
|
.size
|
|
|
|
.height /
|
|
|
|
5,
|
|
|
|
color: Colors.white,
|
|
|
|
child: Consumer<
|
|
|
|
ViewInteractionProvider>(
|
|
|
|
builder:
|
|
|
|
(BuildContext context,
|
|
|
|
provider,
|
|
|
|
Widget? child) {
|
|
|
|
print(
|
|
|
|
"P_leangth : ${provider.savedList.length}");
|
|
|
|
|
|
|
|
if (provider
|
|
|
|
.savedList.length !=
|
|
|
|
0) {
|
|
|
|
return ListView.builder(
|
|
|
|
shrinkWrap: true,
|
|
|
|
physics:
|
|
|
|
NeverScrollableScrollPhysics(),
|
|
|
|
itemCount: provider
|
|
|
|
.savedList
|
|
|
|
.take(2)
|
|
|
|
.length,
|
|
|
|
itemBuilder:
|
|
|
|
(context, index) {
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
ListTile(
|
|
|
|
subtitle:
|
|
|
|
Text(
|
|
|
|
'Updated on ${provider.savedList[index].updatedTime}',
|
|
|
|
//style: TextStyle(fontStyle: FontStyle.italic),
|
|
|
|
),
|
|
|
|
title: Text(
|
|
|
|
provider
|
|
|
|
.savedList[
|
|
|
|
index]
|
|
|
|
.id,
|
|
|
|
),
|
|
|
|
trailing:
|
|
|
|
SizedBox(
|
|
|
|
width: 150,
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
IconButton(
|
|
|
|
onPressed:
|
|
|
|
() {
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(
|
|
|
|
builder: (BuildContext context) => ViewInteractionScreen(
|
|
|
|
saveInteraction: provider.savedList[index],
|
|
|
|
)));
|
|
|
|
},
|
|
|
|
icon:
|
|
|
|
const Icon(
|
|
|
|
Icons.info_outline,
|
|
|
|
size: 24,
|
|
|
|
color: Color.fromARGB(255, 8, 39, 92),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
IconButton(
|
|
|
|
onPressed:
|
|
|
|
() async {
|
|
|
|
await provider.initConfigData().then({
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(
|
|
|
|
builder: (BuildContext context) => EditInteractionScreen(
|
|
|
|
saveInteraction: provider.savedList[index],
|
|
|
|
)))
|
|
|
|
});
|
|
|
|
},
|
|
|
|
icon:
|
|
|
|
const Icon(
|
|
|
|
Icons.edit,
|
|
|
|
size: 24,
|
|
|
|
color: Color.fromARGB(255, 8, 39, 92),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
IconButton(
|
|
|
|
onPressed:
|
|
|
|
() {
|
|
|
|
showDeleteRecordAlertDialog(context, provider.savedList[index].id, provider.savedList[index]);
|
|
|
|
},
|
|
|
|
icon:
|
|
|
|
const Icon(
|
|
|
|
Icons.delete,
|
|
|
|
size: 24,
|
|
|
|
color: Color.fromARGB(255, 8, 39, 92),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(
|
|
|
|
builder: (BuildContext context) => ViewInteractionScreen(
|
|
|
|
saveInteraction: provider.savedList[index],
|
|
|
|
)));
|
|
|
|
},
|
|
|
|
),
|
|
|
|
const Divider(),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
return Container(
|
|
|
|
color: Colors.white,
|
|
|
|
width: MediaQuery.of(
|
|
|
|
context)
|
|
|
|
.size
|
|
|
|
.width,
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Text("No records"),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
),
|
|
|
|
|
|
|
|
// SingleChildScrollView(
|
|
|
|
// scrollDirection:
|
|
|
|
// Axis.horizontal,
|
|
|
|
// child: Container(
|
|
|
|
// width: MediaQuery.of(
|
|
|
|
// context)
|
|
|
|
// .size
|
|
|
|
// .width,
|
|
|
|
// color: Colors.white,
|
|
|
|
// child: Text("hiiiiii")),
|
|
|
|
// ),
|
|
|
|
Container(
|
|
|
|
color: Colors.white,
|
|
|
|
child: Align(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Padding(
|
|
|
|
padding:
|
|
|
|
const EdgeInsets.all(
|
|
|
|
8.0),
|
|
|
|
child: OutlinedButton(
|
|
|
|
onPressed: () {
|
|
|
|
final provider = Provider
|
|
|
|
.of<InteractionProvider>(
|
|
|
|
context,
|
|
|
|
listen:
|
|
|
|
false);
|
|
|
|
if (getCount(
|
|
|
|
provider
|
|
|
|
.intConfigDataList[
|
|
|
|
0]
|
|
|
|
.name,
|
|
|
|
provider) !=
|
|
|
|
0) {
|
|
|
|
provider.savedList
|
|
|
|
.where((element) =>
|
|
|
|
element
|
|
|
|
.form ==
|
|
|
|
provider
|
|
|
|
.intConfigDataList[
|
|
|
|
0]
|
|
|
|
.name)
|
|
|
|
.toList();
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(
|
|
|
|
builder: (BuildContext
|
|
|
|
context) =>
|
|
|
|
SavedFormListScreen(
|
|
|
|
formname: provider
|
|
|
|
.intConfigDataList[0]
|
|
|
|
.name,
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child:
|
|
|
|
Text('Show More'),
|
|
|
|
style: OutlinedButton
|
|
|
|
.styleFrom(
|
|
|
|
shape:
|
|
|
|
RoundedRectangleBorder(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius
|
|
|
|
.circular(
|
|
|
|
12),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
// )
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
// :
|
|
|
|
// Card(
|
|
|
|
// surfaceTintColor: Colors.white,
|
|
|
|
// margin: EdgeInsets.symmetric(
|
|
|
|
// horizontal: 15.0, vertical: 5.0),
|
|
|
|
// clipBehavior: Clip.antiAlias,
|
|
|
|
// color: Colors.white,
|
|
|
|
// elevation: 5.0,
|
|
|
|
// child: Padding(
|
|
|
|
// padding: EdgeInsets.symmetric(
|
|
|
|
// horizontal: 1.0, vertical: 22.0),
|
|
|
|
// child: Row(
|
|
|
|
// children: <Widget>[
|
|
|
|
// Expanded(
|
|
|
|
// child: Column(
|
|
|
|
// children: <Widget>[
|
|
|
|
// Text(
|
|
|
|
// "Affliations",
|
|
|
|
// style: TextStyle(
|
|
|
|
// color:
|
|
|
|
// Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// fontSize: 13.0,
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// SizedBox(
|
|
|
|
// height: 5.0,
|
|
|
|
// ),
|
|
|
|
// Text(
|
|
|
|
// widget.text["affiliations_count"]
|
|
|
|
// .toString(),
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: 13.0,
|
|
|
|
// color:
|
|
|
|
// Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// Expanded(
|
|
|
|
// child: Column(
|
|
|
|
// children: <Widget>[
|
|
|
|
// Text(
|
|
|
|
// "Events",
|
|
|
|
// style: TextStyle(
|
|
|
|
// color:
|
|
|
|
// Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// fontSize: 13.0,
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// SizedBox(
|
|
|
|
// height: 5.0,
|
|
|
|
// ),
|
|
|
|
// Text(
|
|
|
|
// widget.text["events_count"]
|
|
|
|
// .toString(),
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: 13.0,
|
|
|
|
// color:
|
|
|
|
// Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// Expanded(
|
|
|
|
// child: Column(
|
|
|
|
// children: <Widget>[
|
|
|
|
// Text(
|
|
|
|
// "Publications",
|
|
|
|
// style: TextStyle(
|
|
|
|
// color:
|
|
|
|
// Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// fontSize: 13.0,
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// SizedBox(
|
|
|
|
// height: 5.0,
|
|
|
|
// ),
|
|
|
|
// Text(
|
|
|
|
// widget.text["publications_count"]
|
|
|
|
// .toString(),
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: 13.0,
|
|
|
|
// color:
|
|
|
|
// Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// Expanded(
|
|
|
|
// child: Column(
|
|
|
|
// children: <Widget>[
|
|
|
|
// Text(
|
|
|
|
// "Trails",
|
|
|
|
// style: TextStyle(
|
|
|
|
// color:
|
|
|
|
// Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// fontSize: 13.0,
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// SizedBox(
|
|
|
|
// height: 5.0,
|
|
|
|
// ),
|
|
|
|
// Text(
|
|
|
|
// widget.text["publications_count"]
|
|
|
|
// .toString(),
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: 13.0,
|
|
|
|
// color:
|
|
|
|
// Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
floatingActionButton: Visibility(
|
|
|
|
visible: true,
|
|
|
|
child: FloatingActionButton(
|
|
|
|
onPressed: () async {
|
|
|
|
// final ConfigDataProvider configDataProvider =
|
|
|
|
// ConfigDataProvider();
|
|
|
|
|
|
|
|
// await configDataProvider.initConfigUIData();
|
|
|
|
Navigator.push(
|
|
|
|
context, MaterialPageRoute(builder: (context) => FormList()));
|
|
|
|
},
|
|
|
|
foregroundColor: Colors.white,
|
|
|
|
backgroundColor: const Color.fromARGB(255, 0, 71, 132),
|
|
|
|
child: new Icon(Icons.add),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
Future<int> getCount(String form, InteractionProvider provider) async {
|
|
|
|
await provider.getRecords();
|
|
|
|
|
|
|
|
return provider.savedList.where((element) => element.form == form).length;
|
|
|
|
}
|
|
|
|
|
|
|
|
buidCard() {
|
|
|
|
Text("Hiii");
|
|
|
|
}
|
|
|
|
|
|
|
|
showDeleteRecordAlertDialog(
|
|
|
|
BuildContext context, String record, SaveInteraction saveInteraction) {
|
|
|
|
// set up the buttons
|
|
|
|
ViewInteractionProvider provider =
|
|
|
|
Provider.of<ViewInteractionProvider>(context, listen: false);
|
|
|
|
Widget cancelButton = TextButton(
|
|
|
|
child: const Text("YES"),
|
|
|
|
onPressed: () async {
|
|
|
|
await provider.deleteRecord(saveInteraction).then((value) {
|
|
|
|
_displaySnackBar("Deleted sucessfully!");
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
});
|
|
|
|
},
|
|
|
|
);
|
|
|
|
Widget continueButton = TextButton(
|
|
|
|
child: const Text("NO"),
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
},
|
|
|
|
);
|
|
|
|
|
|
|
|
// set up the AlertDialog
|
|
|
|
AlertDialog alert = AlertDialog(
|
|
|
|
title: const Text(""),
|
|
|
|
content: Text("Are you sure you want to delete the record $record ?"),
|
|
|
|
actions: [
|
|
|
|
cancelButton,
|
|
|
|
continueButton,
|
|
|
|
],
|
|
|
|
);
|
|
|
|
|
|
|
|
// show the dialog
|
|
|
|
showDialog(
|
|
|
|
context: context,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
return alert;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
_displaySnackBar(String msg) {
|
|
|
|
final snackBar = SnackBar(
|
|
|
|
content: Text(
|
|
|
|
msg,
|
|
|
|
style: const TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold),
|
|
|
|
));
|
|
|
|
ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
|
|
|
//scaffoldKeyLogin.currentState!.showSnackBar(snackBar);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 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/events_provider.dart';
|
|
|
|
// import 'package:discover_module/provider_class/publications_provider.dart';
|
|
|
|
// import 'package:discover_module/provider_class/trials_provider.dart';
|
|
|
|
// import 'package:discover_module/ui_screen/affiliation_data.dart';
|
|
|
|
// import 'package:discover_module/ui_screen/events_data.dart';
|
|
|
|
// import 'package:discover_module/ui_screen/interactionform/NewtworkConnectivity.dart';
|
|
|
|
// import 'package:discover_module/ui_screen/interactionform/configprovider.dart';
|
|
|
|
// import 'package:discover_module/ui_screen/interactionform/edit_interaction_screen.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:discover_module/ui_screen/interactionform/view_interaction_screen.dart';
|
|
|
|
// import 'package:discover_module/ui_screen/interactionform/viewinteractionprovider.dart';
|
|
|
|
// import 'package:discover_module/ui_screen/newformlist.dart';
|
|
|
|
// import 'package:discover_module/ui_screen/publication_data.dart';
|
|
|
|
// import 'package:expandable/expandable.dart';
|
|
|
|
// import 'package:flutter/cupertino.dart';
|
|
|
|
// import 'package:flutter/material.dart';
|
|
|
|
// import 'package:flutter/rendering.dart';
|
|
|
|
// import 'package:flutter/widgets.dart';
|
|
|
|
// import 'package:flutter_profile_picture/flutter_profile_picture.dart';
|
|
|
|
// import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
// class NewProfile extends StatefulWidget {
|
|
|
|
// const NewProfile({Key? key, required this.text}) : super(key: key);
|
|
|
|
// final Map<dynamic, dynamic> text;
|
|
|
|
|
|
|
|
// @override
|
|
|
|
// State<NewProfile> createState() => _NewProfileState();
|
|
|
|
// }
|
|
|
|
|
|
|
|
// class _NewProfileState extends State<NewProfile> {
|
|
|
|
// bool isonline = false;
|
|
|
|
// List affiliation_data = [];
|
|
|
|
// List publication_data = [];
|
|
|
|
// List event_data = [];
|
|
|
|
// List trial_data = [];
|
|
|
|
|
|
|
|
// List<SaveInteraction> viewformData = [];
|
|
|
|
|
|
|
|
// bool _isExpanded = false;
|
|
|
|
// // final ScrollController controller = ScrollController();
|
|
|
|
|
|
|
|
// // final ScrollController controller2 = ScrollController();
|
|
|
|
|
|
|
|
// @override
|
|
|
|
// void initState() {
|
|
|
|
// // TODO: implement initState
|
|
|
|
// super.initState();
|
|
|
|
// print("pooja123");
|
|
|
|
|
|
|
|
// getaffiliations();
|
|
|
|
|
|
|
|
// getuserdetails();
|
|
|
|
// print("Widget_isssIndex_iss ${widget.text}");
|
|
|
|
// print(
|
|
|
|
// "Widget_isssIndex_iss ${widget.text!["id"]},${widget.text!["name"]},${widget.text!["img_path"]}");
|
|
|
|
// }
|
|
|
|
|
|
|
|
// getaffiliations() async {
|
|
|
|
// var affiliations =
|
|
|
|
// Provider.of<AffiliationsProvider>(context, listen: false);
|
|
|
|
|
|
|
|
// await affiliations.getAffiliationsdata();
|
|
|
|
// final affilist = affiliations.adddta;
|
|
|
|
|
|
|
|
// var publication = Provider.of<PublicatioProvider>(context, listen: false);
|
|
|
|
|
|
|
|
// await publication.publicatininfo();
|
|
|
|
// final publist = publication.publicationlist;
|
|
|
|
|
|
|
|
// var events = Provider.of<EventProvider>(context, listen: false);
|
|
|
|
// await events.geteventdata();
|
|
|
|
// final eventlist = events.EventsList;
|
|
|
|
|
|
|
|
// var form = Provider.of<ViewInteractionProvider>(context, listen: false);
|
|
|
|
// // form.savedList;
|
|
|
|
|
|
|
|
// var trials = Provider.of<TrialsProvider>(context, listen: false);
|
|
|
|
// await trials.trialsdata();
|
|
|
|
|
|
|
|
// final trialslist = trials.trialsinfo;
|
|
|
|
|
|
|
|
// setState(() {
|
|
|
|
// affiliation_data = affilist;
|
|
|
|
// publication_data = publist;
|
|
|
|
// event_data = eventlist;
|
|
|
|
// viewformData = form.savedList;
|
|
|
|
// trial_data = trialslist;
|
|
|
|
// });
|
|
|
|
|
|
|
|
// print("Affiliations_data_is: $affilist");
|
|
|
|
// print("trialslist_data_is: $trialslist");
|
|
|
|
// }
|
|
|
|
|
|
|
|
// getuserdetails() async {
|
|
|
|
// // HiveFunctions.getindexUser(widget.text);
|
|
|
|
|
|
|
|
// NetworkConnectivity networkConnectivity = NetworkConnectivity();
|
|
|
|
// bool isonline1 = await networkConnectivity.isInternetAvailable();
|
|
|
|
|
|
|
|
// setState(() {
|
|
|
|
// print("Profile_isOnline: $isonline1");
|
|
|
|
// isonline = isonline1;
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
|
|
|
|
// @override
|
|
|
|
// Widget build(BuildContext context) {
|
|
|
|
// return SafeArea(
|
|
|
|
// child: Scaffold(
|
|
|
|
// //backgroundColor: Color.fromARGB(255, 200, 222, 241),
|
|
|
|
// backgroundColor: Color.fromARGB(255, 237, 230, 230),
|
|
|
|
// appBar: AppBar(
|
|
|
|
// //backgroundColor: Colors.transparent,
|
|
|
|
// title: const Text('Profile'),
|
|
|
|
// ),
|
|
|
|
// body: ListView(
|
|
|
|
// children: [
|
|
|
|
// Column(
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
// children: <Widget>[
|
|
|
|
// // Padding(
|
|
|
|
// // padding: EdgeInsets.all(8.0),
|
|
|
|
// // child: ProfilePicture(
|
|
|
|
// // name: widget.text!["name"],
|
|
|
|
// // radius: 38,
|
|
|
|
// // fontsize: 21,
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// Padding(
|
|
|
|
// padding: EdgeInsets.all(8.0),
|
|
|
|
// child: widget.text!["img_path"] == null
|
|
|
|
// ? ProfilePicture(
|
|
|
|
// name: widget.text!["name"],
|
|
|
|
// radius: 38,
|
|
|
|
// fontsize: 21,
|
|
|
|
// )
|
|
|
|
// : ClipOval(
|
|
|
|
// child: SizedBox.fromSize(
|
|
|
|
// size: Size.fromRadius(48), // Image radius
|
|
|
|
// child: Image.network(widget.text!["img_path"],
|
|
|
|
// fit: BoxFit.cover),
|
|
|
|
// ),
|
|
|
|
// )),
|
|
|
|
// Column(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
// children: [
|
|
|
|
// // Text(
|
|
|
|
// // "Gerosa, Gino",
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // fontSize: 22.0,
|
|
|
|
// // color: Colors.black,
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// Text1(
|
|
|
|
// title: "Dr " + widget.text!["name"],
|
|
|
|
// txtcolor: Colors.black,
|
|
|
|
// fontweight: FontWeight.normal,
|
|
|
|
// txtfont: 22.0),
|
|
|
|
// // Text(
|
|
|
|
// // "Cardiac Surgery",
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // fontWeight: FontWeight.bold, fontSize: 14.0),
|
|
|
|
// // ),
|
|
|
|
// Text1(
|
|
|
|
// title: widget.text!["speciality"],
|
|
|
|
// txtcolor: Colors.black,
|
|
|
|
// fontweight: FontWeight.normal,
|
|
|
|
// txtfont: 15.0),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// SizedBox(
|
|
|
|
// height: 15.0,
|
|
|
|
// ),
|
|
|
|
// Column(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
// children: <Widget>[
|
|
|
|
// Padding(
|
|
|
|
// padding: const EdgeInsets.only(left: 15.0),
|
|
|
|
// child: Row(
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
// children: [
|
|
|
|
// const Icon(
|
|
|
|
// Icons.location_city_sharp,
|
|
|
|
// color: Color.fromARGB(255, 0, 71, 132),
|
|
|
|
// ),
|
|
|
|
// const SizedBox(
|
|
|
|
// width: 3.0,
|
|
|
|
// ),
|
|
|
|
// Expanded(
|
|
|
|
// // child: Text(
|
|
|
|
// // "Azienda Ospedaliera di Padova",
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // fontWeight: FontWeight.bold, fontSize: 14.0),
|
|
|
|
// // ),
|
|
|
|
// child: Text1(
|
|
|
|
// title: widget.text!["addr"] ??
|
|
|
|
// "Azienda Ospedaliera di Padova",
|
|
|
|
// txtcolor: Colors.black,
|
|
|
|
// txtfont: 15.0,
|
|
|
|
// fontweight: FontWeight.normal,
|
|
|
|
// )),
|
|
|
|
// ]),
|
|
|
|
// ),
|
|
|
|
// const SizedBox(
|
|
|
|
// height: 8.0,
|
|
|
|
// ),
|
|
|
|
// Padding(
|
|
|
|
// padding: const EdgeInsets.only(left: 15.0),
|
|
|
|
// child: Row(children: [
|
|
|
|
// const Icon(
|
|
|
|
// Icons.location_pin,
|
|
|
|
// color: Color.fromARGB(255, 0, 71, 132),
|
|
|
|
// ),
|
|
|
|
// const SizedBox(
|
|
|
|
// width: 3.0,
|
|
|
|
// ),
|
|
|
|
// Expanded(
|
|
|
|
// // child: Text(
|
|
|
|
// // "Via Giustiniani, 2, Padova, Veneto 35128, Italy",
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // fontWeight: FontWeight.bold, fontSize: 14.0),
|
|
|
|
// // ),
|
|
|
|
// child: Text1(
|
|
|
|
// title: widget.text!["adrr"] ??
|
|
|
|
// "Via Giustiniani, 2, Padova, Veneto 35128, Italy",
|
|
|
|
// txtcolor: Colors.black,
|
|
|
|
// fontweight: FontWeight.normal,
|
|
|
|
// txtfont: 15.0),
|
|
|
|
// ),
|
|
|
|
// ]),
|
|
|
|
// ),
|
|
|
|
// const SizedBox(
|
|
|
|
// height: 8.0,
|
|
|
|
// ),
|
|
|
|
// Padding(
|
|
|
|
// padding: const EdgeInsets.only(left: 15.0),
|
|
|
|
// child: Row(children: [
|
|
|
|
// const Icon(
|
|
|
|
// Icons.phone,
|
|
|
|
// color: Color.fromARGB(255, 0, 71, 132),
|
|
|
|
// ),
|
|
|
|
// const SizedBox(
|
|
|
|
// width: 3.0,
|
|
|
|
// ),
|
|
|
|
// // Text(
|
|
|
|
// // "+390498212410 X 12",
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // fontWeight: FontWeight.bold, fontSize: 14.0),
|
|
|
|
// // ),
|
|
|
|
// Text1(
|
|
|
|
// title: widget.text!["phone_no"].toString(),
|
|
|
|
// txtcolor: Colors.black,
|
|
|
|
// fontweight: FontWeight.normal,
|
|
|
|
// txtfont: 15.0),
|
|
|
|
// ]),
|
|
|
|
// ),
|
|
|
|
// const SizedBox(
|
|
|
|
// height: 8.0,
|
|
|
|
// ),
|
|
|
|
// Padding(
|
|
|
|
// padding: const EdgeInsets.only(left: 15.0),
|
|
|
|
// child: Row(children: [
|
|
|
|
// const Icon(
|
|
|
|
// Icons.call,
|
|
|
|
// color: Color.fromARGB(255, 0, 71, 132),
|
|
|
|
// ),
|
|
|
|
// const SizedBox(
|
|
|
|
// width: 3.0,
|
|
|
|
// ),
|
|
|
|
// Text1(
|
|
|
|
// title: widget.text!["phone_no"].toString(),
|
|
|
|
// txtcolor: Colors.black,
|
|
|
|
// fontweight: FontWeight.normal,
|
|
|
|
// txtfont: 15.0),
|
|
|
|
// ]),
|
|
|
|
// ),
|
|
|
|
// const SizedBox(
|
|
|
|
// height: 8.0,
|
|
|
|
// ),
|
|
|
|
// Padding(
|
|
|
|
// padding: const EdgeInsets.only(left: 15.0),
|
|
|
|
// child: Row(children: [
|
|
|
|
// const Icon(
|
|
|
|
// Icons.email,
|
|
|
|
// color: Color.fromARGB(255, 0, 71, 132),
|
|
|
|
// ),
|
|
|
|
// const SizedBox(
|
|
|
|
// width: 3.0,
|
|
|
|
// ),
|
|
|
|
// Text1(
|
|
|
|
// title: widget.text!["email"],
|
|
|
|
// txtcolor: Colors.black,
|
|
|
|
// fontweight: FontWeight.normal,
|
|
|
|
// txtfont: 15.0),
|
|
|
|
// ]),
|
|
|
|
// ),
|
|
|
|
// const SizedBox(
|
|
|
|
// height: 8.0,
|
|
|
|
// ),
|
|
|
|
// // isonline
|
|
|
|
// // ?
|
|
|
|
// Container(
|
|
|
|
// width: MediaQuery.of(context).size.width,
|
|
|
|
// child: Card(
|
|
|
|
// elevation: 4,
|
|
|
|
// clipBehavior: Clip.antiAliasWithSaveLayer,
|
|
|
|
// surfaceTintColor: Colors.white,
|
|
|
|
// // shape: RoundedRectangleBorder(
|
|
|
|
// // borderRadius:
|
|
|
|
// // BorderRadius.circular(0.0),
|
|
|
|
// // ),
|
|
|
|
// shape: RoundedRectangleBorder(
|
|
|
|
// borderRadius: BorderRadius.circular(30.0)),
|
|
|
|
// child: Column(
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
// children: [
|
|
|
|
// // const Text(
|
|
|
|
// // "Profile Summarry",
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // fontSize: 20.0, fontWeight: FontWeight.bold),
|
|
|
|
// // ),
|
|
|
|
// Padding(
|
|
|
|
// padding: const EdgeInsets.all(12.0),
|
|
|
|
// child: Text1(
|
|
|
|
// title: "Profile Summarry",
|
|
|
|
// txtcolor: Colors.black,
|
|
|
|
// fontweight: FontWeight.normal,
|
|
|
|
// txtfont: 18.0),
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Padding(
|
|
|
|
// padding: const EdgeInsets.all(12.0),
|
|
|
|
// child: Text1(
|
|
|
|
// title: widget.text!["summarry"],
|
|
|
|
// txtcolor: Colors.black,
|
|
|
|
// fontweight: FontWeight.normal,
|
|
|
|
// txtfont: 15.0),
|
|
|
|
// ),
|
|
|
|
// Padding(
|
|
|
|
// padding: EdgeInsets.all(0.0),
|
|
|
|
|
|
|
|
// child: Padding(
|
|
|
|
// padding: const EdgeInsets.all(0),
|
|
|
|
// child: Column(
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
// children: <Widget>[
|
|
|
|
// // const SizedBox(height: 10),
|
|
|
|
// // Flexible(
|
|
|
|
// // flex: 1,
|
|
|
|
// // child: Padding(
|
|
|
|
// // padding: const EdgeInsets.only(
|
|
|
|
// // left: 1.0, right: 1.0),
|
|
|
|
// // child: Card(
|
|
|
|
// // elevation: 5,
|
|
|
|
// // shape: RoundedRectangleBorder(
|
|
|
|
// // borderRadius:
|
|
|
|
// // BorderRadius.circular(0.0),
|
|
|
|
// // ),
|
|
|
|
// // color: const Color.fromARGB(
|
|
|
|
// // 255, 0, 71, 137),
|
|
|
|
// // child: ExpansionTile(
|
|
|
|
// // maintainState: true,
|
|
|
|
// // // onExpansionChanged:
|
|
|
|
// // // (bool expanded) {
|
|
|
|
// // // setState(() {
|
|
|
|
// // // _isExpanded = expanded;
|
|
|
|
// // // });
|
|
|
|
// // // },
|
|
|
|
// // backgroundColor:
|
|
|
|
// // const Color.fromARGB(
|
|
|
|
// // 255, 0, 71, 137),
|
|
|
|
// // collapsedIconColor: Colors.white,
|
|
|
|
// // // trailing: Icon(
|
|
|
|
// // // _isExpanded
|
|
|
|
// // // ? Icons.keyboard_arrow_up
|
|
|
|
// // // : Icons
|
|
|
|
// // // .keyboard_arrow_down,
|
|
|
|
// // // color: Colors.white),
|
|
|
|
// // // collapsedBackgroundColor: Color(0xFF2b9af3),
|
|
|
|
// // initiallyExpanded: true,
|
|
|
|
// // title: Row(
|
|
|
|
// // //mainAxisSize: MainAxisSize.min,
|
|
|
|
// // children: [
|
|
|
|
// // Text1(
|
|
|
|
// // title: "Affiliations",
|
|
|
|
// // txtcolor: Colors.white,
|
|
|
|
// // fontweight:
|
|
|
|
// // FontWeight.normal,
|
|
|
|
// // txtfont: 17.0),
|
|
|
|
// // const SizedBox(
|
|
|
|
// // width: 8.0,
|
|
|
|
// // ),
|
|
|
|
// // // Text1(
|
|
|
|
// // // title: widget
|
|
|
|
// // // .text![
|
|
|
|
// // // "affiliations_count"]
|
|
|
|
// // // .toString(),
|
|
|
|
// // // txtfont: 18.0,
|
|
|
|
// // // txtcolor:
|
|
|
|
// // // const Color
|
|
|
|
// // // .fromARGB(
|
|
|
|
// // // 255,
|
|
|
|
// // // 60,
|
|
|
|
// // // 82,
|
|
|
|
// // // 102),
|
|
|
|
// // // )
|
|
|
|
// // ],
|
|
|
|
// // ),
|
|
|
|
// // children: [
|
|
|
|
// // SingleChildScrollView(
|
|
|
|
// // scrollDirection:
|
|
|
|
// // Axis.horizontal,
|
|
|
|
// // child: Container(
|
|
|
|
// // width:
|
|
|
|
// // MediaQuery.of(context)
|
|
|
|
// // .size
|
|
|
|
// // .width,
|
|
|
|
// // color: Colors.white,
|
|
|
|
// // child: DataTable(
|
|
|
|
// // columns: const [
|
|
|
|
// // DataColumn(
|
|
|
|
// // label: Expanded(
|
|
|
|
// // child: Text(
|
|
|
|
// // 'sl no'))),
|
|
|
|
// // DataColumn(
|
|
|
|
// // label: Expanded(
|
|
|
|
// // child: Text(
|
|
|
|
// // 'Organization Name'),
|
|
|
|
// // )),
|
|
|
|
// // DataColumn(
|
|
|
|
// // label: Expanded(
|
|
|
|
// // child: Text(
|
|
|
|
// // 'Department'))),
|
|
|
|
// // DataColumn(
|
|
|
|
// // label: Expanded(
|
|
|
|
// // child: Text(
|
|
|
|
// // 'Role'))),
|
|
|
|
// // DataColumn(
|
|
|
|
// // label: Expanded(
|
|
|
|
// // child: Text(
|
|
|
|
// // 'Time Frame'))),
|
|
|
|
// // DataColumn(
|
|
|
|
// // label: Expanded(
|
|
|
|
// // child: Text(
|
|
|
|
// // 'Org Type'))),
|
|
|
|
// // DataColumn(
|
|
|
|
// // label: Expanded(
|
|
|
|
// // child: Text(
|
|
|
|
// // 'Eng Type'))),
|
|
|
|
// // // Add more columns as needed
|
|
|
|
// // ],
|
|
|
|
// // rows: List.generate(
|
|
|
|
// // affiliation_data.length,
|
|
|
|
// // (index) => DataRow(
|
|
|
|
// // cells: [
|
|
|
|
// // DataCell(Text(
|
|
|
|
// // affiliation_data[
|
|
|
|
// // index]
|
|
|
|
// // ['id']
|
|
|
|
// // .toString())),
|
|
|
|
// // DataCell(Text(
|
|
|
|
// // affiliation_data[
|
|
|
|
// // index]
|
|
|
|
// // [
|
|
|
|
// // 'org_name']
|
|
|
|
// // .toString())),
|
|
|
|
// // DataCell(Text(
|
|
|
|
// // affiliation_data[
|
|
|
|
// // index]
|
|
|
|
// // ['dept']
|
|
|
|
// // .toString())),
|
|
|
|
// // DataCell(Text(
|
|
|
|
// // affiliation_data[
|
|
|
|
// // index]
|
|
|
|
// // ['role']
|
|
|
|
// // .toString())),
|
|
|
|
// // DataCell(Text(
|
|
|
|
// // affiliation_data[
|
|
|
|
// // index]
|
|
|
|
// // [
|
|
|
|
// // 'time_frame']
|
|
|
|
// // .toString())),
|
|
|
|
// // DataCell(Text(
|
|
|
|
// // affiliation_data[
|
|
|
|
// // index]
|
|
|
|
// // [
|
|
|
|
// // 'org_type']
|
|
|
|
// // .toString())),
|
|
|
|
// // DataCell(Text(
|
|
|
|
// // affiliation_data[
|
|
|
|
// // index]
|
|
|
|
// // [
|
|
|
|
// // 'emg_type']
|
|
|
|
// // .toString())),
|
|
|
|
// // // Add more DataCells as needed
|
|
|
|
// // ],
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // 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: (_) =>
|
|
|
|
// // AffiliationsData()));
|
|
|
|
// // },
|
|
|
|
// // child:
|
|
|
|
// // Text('Show More'),
|
|
|
|
// // style: OutlinedButton
|
|
|
|
// // .styleFrom(
|
|
|
|
// // shape:
|
|
|
|
// // RoundedRectangleBorder(
|
|
|
|
// // borderRadius:
|
|
|
|
// // BorderRadius
|
|
|
|
// // .circular(
|
|
|
|
// // 12),
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // )
|
|
|
|
// // ]),
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
|
|
|
|
// Flexible(
|
|
|
|
// flex: 1,
|
|
|
|
// // height:
|
|
|
|
// // 200, // Set a fixed height or use constraints as needed
|
|
|
|
|
|
|
|
// child: Padding(
|
|
|
|
// padding: const EdgeInsets.only(
|
|
|
|
// left: 1.0, right: 1.0),
|
|
|
|
// child: Card(
|
|
|
|
// elevation: 5,
|
|
|
|
// shape: RoundedRectangleBorder(
|
|
|
|
// borderRadius:
|
|
|
|
// BorderRadius.circular(0.0),
|
|
|
|
// ),
|
|
|
|
// color: const Color.fromARGB(
|
|
|
|
// 255, 0, 71, 137),
|
|
|
|
// child: ExpansionTile(
|
|
|
|
// maintainState: true,
|
|
|
|
// onExpansionChanged:
|
|
|
|
// (bool expanded) {
|
|
|
|
// setState(() {
|
|
|
|
// _isExpanded = expanded;
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// backgroundColor:
|
|
|
|
// const Color.fromARGB(
|
|
|
|
// 255, 0, 71, 137),
|
|
|
|
// trailing: Icon(
|
|
|
|
// _isExpanded
|
|
|
|
// ? Icons.keyboard_arrow_up
|
|
|
|
// : Icons
|
|
|
|
// .keyboard_arrow_down,
|
|
|
|
// color: Colors.white),
|
|
|
|
// // backgroundColor: Colors.white,
|
|
|
|
// // collapsedBackgroundColor: Color(0xFF2b9af3),
|
|
|
|
// initiallyExpanded: true,
|
|
|
|
// title: Row(
|
|
|
|
// mainAxisAlignment:
|
|
|
|
// MainAxisAlignment.start,
|
|
|
|
// // mainAxisSize: MainAxisSize.min,
|
|
|
|
// children: [
|
|
|
|
// Text1(
|
|
|
|
// title: "Affiliations",
|
|
|
|
// txtcolor: Colors.white,
|
|
|
|
// fontweight:
|
|
|
|
// FontWeight.normal,
|
|
|
|
// txtfont: 17.0),
|
|
|
|
// const SizedBox(
|
|
|
|
// width: 8.0,
|
|
|
|
// ),
|
|
|
|
// Text1(
|
|
|
|
// title: "4",
|
|
|
|
// txtcolor: Colors.white,
|
|
|
|
// fontweight:
|
|
|
|
// FontWeight.normal,
|
|
|
|
// txtfont: 17.0),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// children: [
|
|
|
|
// Scrollbar(
|
|
|
|
// child: SingleChildScrollView(
|
|
|
|
// scrollDirection:
|
|
|
|
// Axis.horizontal,
|
|
|
|
// child: Container(
|
|
|
|
// // width:
|
|
|
|
// // MediaQuery.of(context)
|
|
|
|
// // .size
|
|
|
|
// // .width,
|
|
|
|
// constraints: BoxConstraints(
|
|
|
|
// minWidth:
|
|
|
|
// MediaQuery.of(
|
|
|
|
// context)
|
|
|
|
// .size
|
|
|
|
// .width),
|
|
|
|
// color: Colors.white,
|
|
|
|
// child: DataTable(
|
|
|
|
// columns: const [
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// '',
|
|
|
|
// softWrap:
|
|
|
|
// true))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Organization Name'),
|
|
|
|
// )),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Department'))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Role'))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Time Frame'))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Org Type'))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Eng Type'))),
|
|
|
|
|
|
|
|
// // Add more columns as needed
|
|
|
|
// ],
|
|
|
|
// rows: List.generate(
|
|
|
|
// affiliation_data
|
|
|
|
// .length,
|
|
|
|
// (index) => DataRow(
|
|
|
|
// cells: [
|
|
|
|
// DataCell(Text(
|
|
|
|
// affiliation_data[
|
|
|
|
// index]
|
|
|
|
// ['id']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// affiliation_data[
|
|
|
|
// index]
|
|
|
|
// [
|
|
|
|
// 'org_name']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// affiliation_data[
|
|
|
|
// index]
|
|
|
|
// [
|
|
|
|
// 'dept']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// affiliation_data[
|
|
|
|
// index]
|
|
|
|
// [
|
|
|
|
// 'role']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// affiliation_data[
|
|
|
|
// index]
|
|
|
|
// [
|
|
|
|
// 'time_frame']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// affiliation_data[
|
|
|
|
// index]
|
|
|
|
// [
|
|
|
|
// 'org_type']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// affiliation_data[
|
|
|
|
// index]
|
|
|
|
// [
|
|
|
|
// 'emg_type']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
|
|
|
|
// // Add more DataCells as needed
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// 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: (_) =>
|
|
|
|
// AffiliationsData()));
|
|
|
|
// },
|
|
|
|
// child:
|
|
|
|
// Text('Show More'),
|
|
|
|
// style: OutlinedButton
|
|
|
|
// .styleFrom(
|
|
|
|
// shape:
|
|
|
|
// RoundedRectangleBorder(
|
|
|
|
// borderRadius:
|
|
|
|
// BorderRadius
|
|
|
|
// .circular(
|
|
|
|
// 12),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ]),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ), // adds spacing between the text and image
|
|
|
|
|
|
|
|
// SizedBox(
|
|
|
|
// height: 10.0,
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Flexible(
|
|
|
|
// flex: 1,
|
|
|
|
// // height:
|
|
|
|
// // 200, // Set a fixed height or use constraints as needed
|
|
|
|
|
|
|
|
// child: Padding(
|
|
|
|
// padding: const EdgeInsets.only(
|
|
|
|
// left: 1.0, right: 1.0),
|
|
|
|
// child: Container(
|
|
|
|
// child: Card(
|
|
|
|
// elevation: 5,
|
|
|
|
// shape: RoundedRectangleBorder(
|
|
|
|
// borderRadius:
|
|
|
|
// BorderRadius.circular(0.0),
|
|
|
|
// ),
|
|
|
|
// color: const Color.fromARGB(
|
|
|
|
// 255, 0, 71, 137),
|
|
|
|
// child: ExpansionTile(
|
|
|
|
// maintainState: true,
|
|
|
|
// // backgroundColor: Colors.white,
|
|
|
|
// // collapsedBackgroundColor: Color(0xFF2b9af3),
|
|
|
|
// onExpansionChanged:
|
|
|
|
// (bool expanded) {
|
|
|
|
// setState(() {
|
|
|
|
// _isExpanded = expanded;
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// backgroundColor:
|
|
|
|
// const Color.fromARGB(
|
|
|
|
// 255, 0, 71, 137),
|
|
|
|
// trailing: Icon(
|
|
|
|
// _isExpanded
|
|
|
|
// ? Icons
|
|
|
|
// .keyboard_arrow_up
|
|
|
|
// : Icons
|
|
|
|
// .keyboard_arrow_down,
|
|
|
|
// color: Colors.white),
|
|
|
|
// initiallyExpanded: true,
|
|
|
|
// title: Row(
|
|
|
|
// mainAxisAlignment:
|
|
|
|
// MainAxisAlignment.start,
|
|
|
|
// // mainAxisSize: MainAxisSize.min,
|
|
|
|
// children: [
|
|
|
|
// Text1(
|
|
|
|
// title: "Publications",
|
|
|
|
// txtcolor: Colors.white,
|
|
|
|
// fontweight:
|
|
|
|
// FontWeight.normal,
|
|
|
|
// txtfont: 17.0),
|
|
|
|
// const SizedBox(
|
|
|
|
// width: 8.0,
|
|
|
|
// ),
|
|
|
|
// Text1(
|
|
|
|
// title: "3",
|
|
|
|
// txtcolor: Colors.white,
|
|
|
|
// fontweight:
|
|
|
|
// FontWeight.normal,
|
|
|
|
// txtfont: 17.0),
|
|
|
|
// // Text1(
|
|
|
|
// // title: widget
|
|
|
|
// // .text![
|
|
|
|
// // "publications_count"]
|
|
|
|
// // .toString(),
|
|
|
|
// // txtfont: 18.0,
|
|
|
|
// // txtcolor: Color
|
|
|
|
// // .fromARGB(
|
|
|
|
// // 255,
|
|
|
|
// // 0,
|
|
|
|
// // 71,
|
|
|
|
// // 137),
|
|
|
|
// // )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// children: [
|
|
|
|
// Scrollbar(
|
|
|
|
// //isAlwaysShown: true,
|
|
|
|
// child:
|
|
|
|
// SingleChildScrollView(
|
|
|
|
// scrollDirection:
|
|
|
|
// Axis.horizontal,
|
|
|
|
// child: Container(
|
|
|
|
// // width: MediaQuery.of(
|
|
|
|
// // context)
|
|
|
|
// // .size
|
|
|
|
// // .width,
|
|
|
|
// constraints: BoxConstraints(
|
|
|
|
// minWidth:
|
|
|
|
// MediaQuery.of(
|
|
|
|
// context)
|
|
|
|
// .size
|
|
|
|
// .width),
|
|
|
|
|
|
|
|
// color: Colors.white,
|
|
|
|
// child: DataTable(
|
|
|
|
// columns: const [
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'sl no'))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Artical Title',
|
|
|
|
// softWrap:
|
|
|
|
// true),
|
|
|
|
// )),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Journal Name',
|
|
|
|
// softWrap: true,
|
|
|
|
// ))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Date'))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Authors'))),
|
|
|
|
|
|
|
|
// // Add more columns as needed
|
|
|
|
// ],
|
|
|
|
// rows: List.generate(
|
|
|
|
// publication_data
|
|
|
|
// .length,
|
|
|
|
// (index) => DataRow(
|
|
|
|
// cells: [
|
|
|
|
// DataCell(Text(
|
|
|
|
// publication_data[index]
|
|
|
|
// [
|
|
|
|
// 'id']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// publication_data[index]
|
|
|
|
// [
|
|
|
|
// 'artical_title']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// publication_data[index]
|
|
|
|
// [
|
|
|
|
// 'journal_name']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// publication_data[index]
|
|
|
|
// [
|
|
|
|
// 'date']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// publication_data[index]
|
|
|
|
// [
|
|
|
|
// 'author']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
|
|
|
|
// // Add more DataCells as needed
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// 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: OutlinedButton
|
|
|
|
// .styleFrom(
|
|
|
|
// shape:
|
|
|
|
// RoundedRectangleBorder(
|
|
|
|
// borderRadius:
|
|
|
|
// BorderRadius
|
|
|
|
// .circular(
|
|
|
|
// 12),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ]),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ), // adds spacing between the text and image
|
|
|
|
|
|
|
|
// const SizedBox(height: 10),
|
|
|
|
|
|
|
|
// Flexible(
|
|
|
|
// flex: 1,
|
|
|
|
// // height:
|
|
|
|
// // 200, // Set a fixed height or use constraints as needed
|
|
|
|
|
|
|
|
// child: Padding(
|
|
|
|
// padding: const EdgeInsets.only(
|
|
|
|
// left: 1.0, right: 1.0),
|
|
|
|
// child: Card(
|
|
|
|
// elevation: 5,
|
|
|
|
// shape: RoundedRectangleBorder(
|
|
|
|
// borderRadius:
|
|
|
|
// BorderRadius.circular(0.0),
|
|
|
|
// ),
|
|
|
|
// color: const Color.fromARGB(
|
|
|
|
// 255, 0, 71, 137),
|
|
|
|
// child: ExpansionTile(
|
|
|
|
// maintainState: true,
|
|
|
|
// onExpansionChanged:
|
|
|
|
// (bool expanded) {
|
|
|
|
// setState(() {
|
|
|
|
// _isExpanded = expanded;
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// backgroundColor:
|
|
|
|
// const Color.fromARGB(
|
|
|
|
// 255, 0, 71, 137),
|
|
|
|
// trailing: Icon(
|
|
|
|
// _isExpanded
|
|
|
|
// ? Icons.keyboard_arrow_up
|
|
|
|
// : Icons
|
|
|
|
// .keyboard_arrow_down,
|
|
|
|
// color: Colors.white),
|
|
|
|
// // backgroundColor: Colors.white,
|
|
|
|
// // collapsedBackgroundColor: Color(0xFF2b9af3),
|
|
|
|
// initiallyExpanded: true,
|
|
|
|
// title: Row(
|
|
|
|
// mainAxisAlignment:
|
|
|
|
// MainAxisAlignment.start,
|
|
|
|
// // mainAxisSize: MainAxisSize.min,
|
|
|
|
// children: [
|
|
|
|
// Text1(
|
|
|
|
// title: "Events",
|
|
|
|
// txtcolor: Colors.white,
|
|
|
|
// fontweight:
|
|
|
|
// FontWeight.normal,
|
|
|
|
// txtfont: 17.0),
|
|
|
|
// const SizedBox(
|
|
|
|
// width: 8.0,
|
|
|
|
// ),
|
|
|
|
// Text1(
|
|
|
|
// title: "4",
|
|
|
|
// txtcolor: Colors.white,
|
|
|
|
// fontweight:
|
|
|
|
// FontWeight.normal,
|
|
|
|
// txtfont: 17.0),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// children: [
|
|
|
|
// Scrollbar(
|
|
|
|
// child: SingleChildScrollView(
|
|
|
|
// scrollDirection:
|
|
|
|
// Axis.horizontal,
|
|
|
|
// child: Container(
|
|
|
|
// // width:
|
|
|
|
// // MediaQuery.of(context)
|
|
|
|
// // .size
|
|
|
|
// // .width,
|
|
|
|
// constraints:
|
|
|
|
// BoxConstraints(
|
|
|
|
// minWidth: MediaQuery.of(
|
|
|
|
// context)
|
|
|
|
// .size
|
|
|
|
// .width,
|
|
|
|
// ),
|
|
|
|
// color: Colors.white,
|
|
|
|
// child: DataTable(
|
|
|
|
// columns: const [
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'sl no',
|
|
|
|
// softWrap:
|
|
|
|
// true))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Event Name',
|
|
|
|
// softWrap: true),
|
|
|
|
// )),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Session Type',
|
|
|
|
// softWrap:
|
|
|
|
// true))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Topic',
|
|
|
|
// softWrap:
|
|
|
|
// true))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Role',
|
|
|
|
// softWrap:
|
|
|
|
// true))),
|
|
|
|
|
|
|
|
// // Add more columns as needed
|
|
|
|
// ],
|
|
|
|
// rows: List.generate(
|
|
|
|
// event_data.length,
|
|
|
|
// (index) => DataRow(
|
|
|
|
// cells: [
|
|
|
|
// DataCell(Text(
|
|
|
|
// event_data[index]
|
|
|
|
// ['id']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// event_data[index]
|
|
|
|
// [
|
|
|
|
// 'event_name']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// event_data[index]
|
|
|
|
// [
|
|
|
|
// 'session_type']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// event_data[index]
|
|
|
|
// [
|
|
|
|
// 'topic']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// event_data[index]
|
|
|
|
// [
|
|
|
|
// 'role']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
|
|
|
|
// // Add more DataCells as needed
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// 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: (_) =>
|
|
|
|
// EventsData()));
|
|
|
|
// },
|
|
|
|
// child:
|
|
|
|
// Text('Show More'),
|
|
|
|
// style: OutlinedButton
|
|
|
|
// .styleFrom(
|
|
|
|
// shape:
|
|
|
|
// RoundedRectangleBorder(
|
|
|
|
// borderRadius:
|
|
|
|
// BorderRadius
|
|
|
|
// .circular(
|
|
|
|
// 12),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ]),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ), // adds spacing between the text and image
|
|
|
|
|
|
|
|
// SizedBox(
|
|
|
|
// height: 10.0,
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Flexible(
|
|
|
|
// flex: 1,
|
|
|
|
// // height:
|
|
|
|
// // 200, // Set a fixed height or use constraints as needed
|
|
|
|
|
|
|
|
// child: Padding(
|
|
|
|
// padding: const EdgeInsets.only(
|
|
|
|
// left: 1.0, right: 1.0),
|
|
|
|
// child: Card(
|
|
|
|
// elevation: 5,
|
|
|
|
// shape: RoundedRectangleBorder(
|
|
|
|
// borderRadius:
|
|
|
|
// BorderRadius.circular(0.0),
|
|
|
|
// ),
|
|
|
|
// color: const Color.fromARGB(
|
|
|
|
// 255, 0, 71, 137),
|
|
|
|
// child: ExpansionTile(
|
|
|
|
// maintainState: true,
|
|
|
|
// onExpansionChanged:
|
|
|
|
// (bool expanded) {
|
|
|
|
// setState(() {
|
|
|
|
// _isExpanded = expanded;
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// backgroundColor:
|
|
|
|
// const Color.fromARGB(
|
|
|
|
// 255, 0, 71, 137),
|
|
|
|
// trailing: Icon(
|
|
|
|
// _isExpanded
|
|
|
|
// ? Icons.keyboard_arrow_up
|
|
|
|
// : Icons
|
|
|
|
// .keyboard_arrow_down,
|
|
|
|
// color: Colors.white),
|
|
|
|
// // backgroundColor: Colors.white,
|
|
|
|
// // collapsedBackgroundColor: Color(0xFF2b9af3),
|
|
|
|
// initiallyExpanded: true,
|
|
|
|
// title: Row(
|
|
|
|
// mainAxisAlignment:
|
|
|
|
// MainAxisAlignment.start,
|
|
|
|
// // mainAxisSize: MainAxisSize.min,
|
|
|
|
// children: [
|
|
|
|
// Text1(
|
|
|
|
// title: "Trials",
|
|
|
|
// txtcolor: Colors.white,
|
|
|
|
// fontweight:
|
|
|
|
// FontWeight.normal,
|
|
|
|
// txtfont: 17.0),
|
|
|
|
// const SizedBox(
|
|
|
|
// width: 8.0,
|
|
|
|
// ),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// children: [
|
|
|
|
// Scrollbar(
|
|
|
|
// child: SingleChildScrollView(
|
|
|
|
// scrollDirection:
|
|
|
|
// Axis.horizontal,
|
|
|
|
// child: Container(
|
|
|
|
// // width:
|
|
|
|
// // MediaQuery.of(context)
|
|
|
|
// // .size
|
|
|
|
// // .width,
|
|
|
|
// constraints: BoxConstraints(
|
|
|
|
// minWidth:
|
|
|
|
// MediaQuery.of(
|
|
|
|
// context)
|
|
|
|
// .size
|
|
|
|
// .width),
|
|
|
|
// color: Colors.white,
|
|
|
|
// child: DataTable(
|
|
|
|
// columns: const [
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// '',
|
|
|
|
// softWrap:
|
|
|
|
// true))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Trial Name',
|
|
|
|
// softWrap: true),
|
|
|
|
// )),
|
|
|
|
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Status',
|
|
|
|
// softWrap:
|
|
|
|
// true))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Sponsers',
|
|
|
|
// softWrap:
|
|
|
|
// true))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Condition',
|
|
|
|
// softWrap:
|
|
|
|
// true))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Intervention',
|
|
|
|
// softWrap:
|
|
|
|
// true))),
|
|
|
|
// DataColumn(
|
|
|
|
// label: Expanded(
|
|
|
|
// child: Text(
|
|
|
|
// 'Phase',
|
|
|
|
// softWrap:
|
|
|
|
// true))),
|
|
|
|
|
|
|
|
// // Add more columns as needed
|
|
|
|
// ],
|
|
|
|
// rows: List.generate(
|
|
|
|
// trial_data.length,
|
|
|
|
// (index) => DataRow(
|
|
|
|
// cells: [
|
|
|
|
// DataCell(Text(
|
|
|
|
// trial_data[index]
|
|
|
|
// ['id']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// trial_data[index]
|
|
|
|
// [
|
|
|
|
// 'trial_name']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// trial_data[index]
|
|
|
|
// [
|
|
|
|
// 'status']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// trial_data[index]
|
|
|
|
// [
|
|
|
|
// 'sponsors']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// trial_data[index]
|
|
|
|
// [
|
|
|
|
// 'condition']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// trial_data[index]
|
|
|
|
// [
|
|
|
|
// 'intervention']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
// DataCell(Text(
|
|
|
|
// trial_data[index]
|
|
|
|
// [
|
|
|
|
// 'phase']
|
|
|
|
// .toString(),
|
|
|
|
// softWrap:
|
|
|
|
// true)),
|
|
|
|
|
|
|
|
// // Add more DataCells as needed
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// 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: (_) =>
|
|
|
|
// EventsData()));
|
|
|
|
// },
|
|
|
|
// child:
|
|
|
|
// Text('Show More'),
|
|
|
|
// style: OutlinedButton
|
|
|
|
// .styleFrom(
|
|
|
|
// shape:
|
|
|
|
// RoundedRectangleBorder(
|
|
|
|
// borderRadius:
|
|
|
|
// BorderRadius
|
|
|
|
// .circular(
|
|
|
|
// 12),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ]),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ), // adds spacing between the text and image
|
|
|
|
|
|
|
|
// SizedBox(
|
|
|
|
// height: 10.0,
|
|
|
|
// ),
|
|
|
|
// Flexible(
|
|
|
|
// flex: 1,
|
|
|
|
// child: Padding(
|
|
|
|
// padding: const EdgeInsets.only(
|
|
|
|
// left: 1.0, right: 1.0),
|
|
|
|
// child: Card(
|
|
|
|
// elevation: 5,
|
|
|
|
// shape: RoundedRectangleBorder(
|
|
|
|
// borderRadius:
|
|
|
|
// BorderRadius.circular(0.0),
|
|
|
|
// ),
|
|
|
|
// color: const Color.fromARGB(
|
|
|
|
// 255, 0, 71, 137),
|
|
|
|
// child: ExpansionTile(
|
|
|
|
// maintainState: true,
|
|
|
|
// onExpansionChanged:
|
|
|
|
// (bool expanded) {
|
|
|
|
// setState(() {
|
|
|
|
// _isExpanded = expanded;
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// backgroundColor:
|
|
|
|
// const Color.fromARGB(
|
|
|
|
// 255, 0, 71, 137),
|
|
|
|
// trailing: Icon(
|
|
|
|
// _isExpanded
|
|
|
|
// ? Icons.keyboard_arrow_up
|
|
|
|
// : Icons
|
|
|
|
// .keyboard_arrow_down,
|
|
|
|
// color: Colors.white),
|
|
|
|
// // collapsedBackgroundColor: Color(0xFF2b9af3),
|
|
|
|
// initiallyExpanded: true,
|
|
|
|
// title: Row(
|
|
|
|
// //mainAxisSize: MainAxisSize.min,
|
|
|
|
// children: [
|
|
|
|
// GestureDetector(
|
|
|
|
// onTap: () async {
|
|
|
|
// final provider = Provider
|
|
|
|
// .of<InteractionProvider>(
|
|
|
|
// context,
|
|
|
|
// listen: false);
|
|
|
|
// if (getCount(
|
|
|
|
// provider
|
|
|
|
// .intConfigDataList[
|
|
|
|
// 0]
|
|
|
|
// .name,
|
|
|
|
// provider) !=
|
|
|
|
// 0) {
|
|
|
|
// provider.savedList
|
|
|
|
// .where((element) =>
|
|
|
|
// element.form ==
|
|
|
|
// provider
|
|
|
|
// .intConfigDataList[
|
|
|
|
// 0]
|
|
|
|
// .name)
|
|
|
|
// .toList();
|
|
|
|
// Navigator.push(
|
|
|
|
// context,
|
|
|
|
// MaterialPageRoute(
|
|
|
|
// builder: (BuildContext
|
|
|
|
// context) =>
|
|
|
|
// SavedFormListScreen(
|
|
|
|
// formname: provider
|
|
|
|
// .intConfigDataList[
|
|
|
|
// 0]
|
|
|
|
// .name,
|
|
|
|
// )));
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// child: Text1(
|
|
|
|
// title:
|
|
|
|
// "Interaction Form",
|
|
|
|
// txtcolor: Colors.white,
|
|
|
|
// fontweight:
|
|
|
|
// FontWeight.normal,
|
|
|
|
// txtfont: 17.0),
|
|
|
|
// ),
|
|
|
|
// const SizedBox(
|
|
|
|
// width: 8.0,
|
|
|
|
// ),
|
|
|
|
// // Text1(
|
|
|
|
// // title: widget
|
|
|
|
// // .text![
|
|
|
|
// // "affiliations_count"]
|
|
|
|
// // .toString(),
|
|
|
|
// // txtfont: 18.0,
|
|
|
|
// // txtcolor:
|
|
|
|
// // const Color
|
|
|
|
// // .fromARGB(
|
|
|
|
// // 255,
|
|
|
|
// // 60,
|
|
|
|
// // 82,
|
|
|
|
// // 102),
|
|
|
|
// // )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// children: [
|
|
|
|
// Container(
|
|
|
|
// height: MediaQuery.of(context)
|
|
|
|
// .size
|
|
|
|
// .height /
|
|
|
|
// 5,
|
|
|
|
// color: Colors.white,
|
|
|
|
// child: Consumer<
|
|
|
|
// ViewInteractionProvider>(
|
|
|
|
// builder:
|
|
|
|
// (BuildContext context,
|
|
|
|
// provider,
|
|
|
|
// Widget? child) {
|
|
|
|
// print(
|
|
|
|
// "P_leangth : ${provider.savedList.length}");
|
|
|
|
// return ListView.builder(
|
|
|
|
// shrinkWrap: true,
|
|
|
|
// physics:
|
|
|
|
// NeverScrollableScrollPhysics(),
|
|
|
|
// itemCount: provider
|
|
|
|
// .savedList
|
|
|
|
// .take(2)
|
|
|
|
// .length,
|
|
|
|
// itemBuilder:
|
|
|
|
// (context, index) {
|
|
|
|
// return Column(
|
|
|
|
// children: [
|
|
|
|
// ListTile(
|
|
|
|
// subtitle: Text(
|
|
|
|
// 'Updated on ${provider.savedList[index].updatedTime}',
|
|
|
|
// //style: TextStyle(fontStyle: FontStyle.italic),
|
|
|
|
// ),
|
|
|
|
// title: Text(
|
|
|
|
// provider
|
|
|
|
// .savedList[
|
|
|
|
// index]
|
|
|
|
// .id,
|
|
|
|
// ),
|
|
|
|
// trailing:
|
|
|
|
// SizedBox(
|
|
|
|
// width: 150,
|
|
|
|
// child: Row(
|
|
|
|
// children: [
|
|
|
|
// IconButton(
|
|
|
|
// onPressed:
|
|
|
|
// () {
|
|
|
|
// Navigator.push(
|
|
|
|
// context,
|
|
|
|
// MaterialPageRoute(
|
|
|
|
// builder: (BuildContext context) => ViewInteractionScreen(
|
|
|
|
// saveInteraction: provider.savedList[index],
|
|
|
|
// )));
|
|
|
|
// },
|
|
|
|
// icon:
|
|
|
|
// const Icon(
|
|
|
|
// Icons.info_outline,
|
|
|
|
// size:
|
|
|
|
// 24,
|
|
|
|
// color: Color.fromARGB(
|
|
|
|
// 255,
|
|
|
|
// 8,
|
|
|
|
// 39,
|
|
|
|
// 92),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// IconButton(
|
|
|
|
// onPressed:
|
|
|
|
// () async {
|
|
|
|
// await provider.initConfigData().then({
|
|
|
|
// Navigator.push(
|
|
|
|
// context,
|
|
|
|
// MaterialPageRoute(
|
|
|
|
// builder: (BuildContext context) => EditInteractionScreen(
|
|
|
|
// saveInteraction: provider.savedList[index],
|
|
|
|
// )))
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// icon:
|
|
|
|
// const Icon(
|
|
|
|
// Icons.edit,
|
|
|
|
// size:
|
|
|
|
// 24,
|
|
|
|
// color: Color.fromARGB(
|
|
|
|
// 255,
|
|
|
|
// 8,
|
|
|
|
// 39,
|
|
|
|
// 92),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// IconButton(
|
|
|
|
// onPressed:
|
|
|
|
// () {
|
|
|
|
// showDeleteRecordAlertDialog(
|
|
|
|
// context,
|
|
|
|
// provider.savedList[index].id,
|
|
|
|
// provider.savedList[index]);
|
|
|
|
// },
|
|
|
|
// icon:
|
|
|
|
// const Icon(
|
|
|
|
// Icons.delete,
|
|
|
|
// size:
|
|
|
|
// 24,
|
|
|
|
// color: Color.fromARGB(
|
|
|
|
// 255,
|
|
|
|
// 8,
|
|
|
|
// 39,
|
|
|
|
// 92),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ]),
|
|
|
|
// ),
|
|
|
|
// onTap: () {
|
|
|
|
// Navigator.push(
|
|
|
|
// context,
|
|
|
|
// MaterialPageRoute(
|
|
|
|
// builder: (BuildContext context) => ViewInteractionScreen(
|
|
|
|
// saveInteraction: provider.savedList[index],
|
|
|
|
// )));
|
|
|
|
// },
|
|
|
|
// ),
|
|
|
|
// const Divider(),
|
|
|
|
// ],
|
|
|
|
// );
|
|
|
|
// });
|
|
|
|
// }),
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// // SingleChildScrollView(
|
|
|
|
// // scrollDirection:
|
|
|
|
// // Axis.horizontal,
|
|
|
|
// // child: Container(
|
|
|
|
// // width: MediaQuery.of(
|
|
|
|
// // context)
|
|
|
|
// // .size
|
|
|
|
// // .width,
|
|
|
|
// // color: Colors.white,
|
|
|
|
// // child: Text("hiiiiii")),
|
|
|
|
// // ),
|
|
|
|
// Container(
|
|
|
|
// color: Colors.white,
|
|
|
|
// child: Align(
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
// child: Padding(
|
|
|
|
// padding:
|
|
|
|
// const EdgeInsets.all(
|
|
|
|
// 8.0),
|
|
|
|
// child: OutlinedButton(
|
|
|
|
// onPressed: () {
|
|
|
|
// final provider = Provider
|
|
|
|
// .of<InteractionProvider>(
|
|
|
|
// context,
|
|
|
|
// listen:
|
|
|
|
// false);
|
|
|
|
// if (getCount(
|
|
|
|
// provider
|
|
|
|
// .intConfigDataList[
|
|
|
|
// 0]
|
|
|
|
// .name,
|
|
|
|
// provider) !=
|
|
|
|
// 0) {
|
|
|
|
// provider.savedList
|
|
|
|
// .where((element) =>
|
|
|
|
// element
|
|
|
|
// .form ==
|
|
|
|
// provider
|
|
|
|
// .intConfigDataList[
|
|
|
|
// 0]
|
|
|
|
// .name)
|
|
|
|
// .toList();
|
|
|
|
// Navigator.push(
|
|
|
|
// context,
|
|
|
|
// MaterialPageRoute(
|
|
|
|
// builder: (BuildContext
|
|
|
|
// context) =>
|
|
|
|
// SavedFormListScreen(
|
|
|
|
// formname: provider
|
|
|
|
// .intConfigDataList[0]
|
|
|
|
// .name,
|
|
|
|
// )));
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// child:
|
|
|
|
// Text('Show More'),
|
|
|
|
// style: OutlinedButton
|
|
|
|
// .styleFrom(
|
|
|
|
// shape:
|
|
|
|
// RoundedRectangleBorder(
|
|
|
|
// borderRadius:
|
|
|
|
// BorderRadius
|
|
|
|
// .circular(
|
|
|
|
// 12),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// ]),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// // )
|
|
|
|
// )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// )
|
|
|
|
// // :
|
|
|
|
// // Card(
|
|
|
|
// // surfaceTintColor: Colors.white,
|
|
|
|
// // margin: EdgeInsets.symmetric(
|
|
|
|
// // horizontal: 15.0, vertical: 5.0),
|
|
|
|
// // clipBehavior: Clip.antiAlias,
|
|
|
|
// // color: Colors.white,
|
|
|
|
// // elevation: 5.0,
|
|
|
|
// // child: Padding(
|
|
|
|
// // padding: EdgeInsets.symmetric(
|
|
|
|
// // horizontal: 1.0, vertical: 22.0),
|
|
|
|
// // child: Row(
|
|
|
|
// // children: <Widget>[
|
|
|
|
// // Expanded(
|
|
|
|
// // child: Column(
|
|
|
|
// // children: <Widget>[
|
|
|
|
// // Text(
|
|
|
|
// // "Affliations",
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // color:
|
|
|
|
// // Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// // fontSize: 13.0,
|
|
|
|
// // fontWeight: FontWeight.bold,
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // SizedBox(
|
|
|
|
// // height: 5.0,
|
|
|
|
// // ),
|
|
|
|
// // Text(
|
|
|
|
// // widget.text["affiliations_count"]
|
|
|
|
// // .toString(),
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // fontSize: 13.0,
|
|
|
|
// // color:
|
|
|
|
// // Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// // ),
|
|
|
|
// // )
|
|
|
|
// // ],
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // Expanded(
|
|
|
|
// // child: Column(
|
|
|
|
// // children: <Widget>[
|
|
|
|
// // Text(
|
|
|
|
// // "Events",
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // color:
|
|
|
|
// // Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// // fontSize: 13.0,
|
|
|
|
// // fontWeight: FontWeight.bold,
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // SizedBox(
|
|
|
|
// // height: 5.0,
|
|
|
|
// // ),
|
|
|
|
// // Text(
|
|
|
|
// // widget.text["events_count"]
|
|
|
|
// // .toString(),
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // fontSize: 13.0,
|
|
|
|
// // color:
|
|
|
|
// // Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// // ),
|
|
|
|
// // )
|
|
|
|
// // ],
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // Expanded(
|
|
|
|
// // child: Column(
|
|
|
|
// // children: <Widget>[
|
|
|
|
// // Text(
|
|
|
|
// // "Publications",
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // color:
|
|
|
|
// // Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// // fontSize: 13.0,
|
|
|
|
// // fontWeight: FontWeight.bold,
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // SizedBox(
|
|
|
|
// // height: 5.0,
|
|
|
|
// // ),
|
|
|
|
// // Text(
|
|
|
|
// // widget.text["publications_count"]
|
|
|
|
// // .toString(),
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // fontSize: 13.0,
|
|
|
|
// // color:
|
|
|
|
// // Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// // ),
|
|
|
|
// // )
|
|
|
|
// // ],
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // Expanded(
|
|
|
|
// // child: Column(
|
|
|
|
// // children: <Widget>[
|
|
|
|
// // Text(
|
|
|
|
// // "Trails",
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // color:
|
|
|
|
// // Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// // fontSize: 13.0,
|
|
|
|
// // fontWeight: FontWeight.bold,
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // SizedBox(
|
|
|
|
// // height: 5.0,
|
|
|
|
// // ),
|
|
|
|
// // Text(
|
|
|
|
// // widget.text["publications_count"]
|
|
|
|
// // .toString(),
|
|
|
|
// // style: TextStyle(
|
|
|
|
// // fontSize: 13.0,
|
|
|
|
// // color:
|
|
|
|
// // Color.fromARGB(255, 0, 71, 137),
|
|
|
|
// // ),
|
|
|
|
// // )
|
|
|
|
// // ],
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // ],
|
|
|
|
// // ),
|
|
|
|
// // ),
|
|
|
|
// // )
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// floatingActionButton: Visibility(
|
|
|
|
// visible: true,
|
|
|
|
// child: FloatingActionButton(
|
|
|
|
// onPressed: () async {
|
|
|
|
// // final ConfigDataProvider configDataProvider =
|
|
|
|
// // ConfigDataProvider();
|
|
|
|
|
|
|
|
// // await configDataProvider.initConfigUIData();
|
|
|
|
// Navigator.push(
|
|
|
|
// context, MaterialPageRoute(builder: (context) => FormList()));
|
|
|
|
// },
|
|
|
|
// foregroundColor: Colors.white,
|
|
|
|
// backgroundColor: const Color.fromARGB(255, 0, 71, 132),
|
|
|
|
// child: new Icon(Icons.add),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// );
|
|
|
|
// }
|
|
|
|
|
|
|
|
// Future<int> getCount(String form, InteractionProvider provider) async {
|
|
|
|
// await provider.getRecords();
|
|
|
|
|
|
|
|
// return provider.savedList.where((element) => element.form == form).length;
|
|
|
|
// }
|
|
|
|
|
|
|
|
// buidCard() {
|
|
|
|
// Text("Hiii");
|
|
|
|
// }
|
|
|
|
|
|
|
|
// showDeleteRecordAlertDialog(
|
|
|
|
// BuildContext context, String record, SaveInteraction saveInteraction) {
|
|
|
|
// // set up the buttons
|
|
|
|
// ViewInteractionProvider provider =
|
|
|
|
// Provider.of<ViewInteractionProvider>(context, listen: false);
|
|
|
|
// Widget cancelButton = TextButton(
|
|
|
|
// child: const Text("YES"),
|
|
|
|
// onPressed: () async {
|
|
|
|
// await provider.deleteRecord(saveInteraction).then((value) {
|
|
|
|
// _displaySnackBar("Deleted sucessfully!");
|
|
|
|
// Navigator.of(context).pop();
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// );
|
|
|
|
// Widget continueButton = TextButton(
|
|
|
|
// child: const Text("NO"),
|
|
|
|
// onPressed: () {
|
|
|
|
// Navigator.of(context).pop();
|
|
|
|
// },
|
|
|
|
// );
|
|
|
|
|
|
|
|
// // set up the AlertDialog
|
|
|
|
// AlertDialog alert = AlertDialog(
|
|
|
|
// title: const Text(""),
|
|
|
|
// content: Text("Are you sure you want to delete the record $record ?"),
|
|
|
|
// actions: [
|
|
|
|
// cancelButton,
|
|
|
|
// continueButton,
|
|
|
|
// ],
|
|
|
|
// );
|
|
|
|
|
|
|
|
// // show the dialog
|
|
|
|
// showDialog(
|
|
|
|
// context: context,
|
|
|
|
// builder: (BuildContext context) {
|
|
|
|
// return alert;
|
|
|
|
// },
|
|
|
|
// );
|
|
|
|
// }
|
|
|
|
|
|
|
|
// _displaySnackBar(String msg) {
|
|
|
|
// final snackBar = SnackBar(
|
|
|
|
// content: Text(
|
|
|
|
// msg,
|
|
|
|
// style: const TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold),
|
|
|
|
// ));
|
|
|
|
// ScaffoldMessenger.of(context).showSnackBar(snackBar);
|
|
|
|
// //scaffoldKeyLogin.currentState!.showSnackBar(snackBar);
|
|
|
|
// }
|
|
|
|
// }
|