|
|
|
@ -85,14 +85,18 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
|
projectViewModel = Provider.of(context);
|
|
|
|
|
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
|
|
|
|
|
return AppScaffold(
|
|
|
|
|
appBarTitle: TranslationBase.of(context).myFamilyFiles,
|
|
|
|
|
appBarTitle: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.myFamilyFiles,
|
|
|
|
|
isShowAppBar: widget.isAppbarVisible,
|
|
|
|
|
imagesInfo: imagesInfo,
|
|
|
|
|
showNewAppBar: true,
|
|
|
|
|
showNewAppBarTitle: true,
|
|
|
|
|
onTap: widget.isAppbarVisible == false ? widget.onBackClick : null,
|
|
|
|
|
icon: "assets/images/new/bottom_nav/family_files.svg",
|
|
|
|
|
description: TranslationBase.of(context).familyInfo,
|
|
|
|
|
description: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.familyInfo,
|
|
|
|
|
body: Column(
|
|
|
|
|
children: [
|
|
|
|
|
TabBar(
|
|
|
|
@ -114,26 +118,35 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
|
),
|
|
|
|
|
tabs: [Text(TranslationBase.of(context).family), Text(TranslationBase.of(context).request)],
|
|
|
|
|
tabs: [Text(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.family), Text(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.request)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: (user != null && projectViewModel.isLogin)
|
|
|
|
|
? TabBarView(
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
children: [myFamilyDetails(context), myFamilyRequest(context)],
|
|
|
|
|
)
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
controller: _tabController,
|
|
|
|
|
children: [myFamilyDetails(context), myFamilyRequest(context)],
|
|
|
|
|
)
|
|
|
|
|
: Container(child: AppText('')),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
bottomSheet: Container(
|
|
|
|
|
color: Theme.of(context).scaffoldBackgroundColor,
|
|
|
|
|
color: Theme
|
|
|
|
|
.of(context)
|
|
|
|
|
.scaffoldBackgroundColor,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
padding: EdgeInsets.all(14),
|
|
|
|
|
child: DefaultButton(
|
|
|
|
|
TranslationBase.of(context).addFamilyMember,
|
|
|
|
|
() async {
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.addFamilyMember,
|
|
|
|
|
() async {
|
|
|
|
|
Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER_TYPE);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
@ -156,20 +169,25 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
|
return Padding(padding: EdgeInsets.only(top: 50), child: Text('Loading...'));
|
|
|
|
|
default:
|
|
|
|
|
if (snapshot.hasError)
|
|
|
|
|
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
|
|
|
|
|
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.noDataAvailable));
|
|
|
|
|
else
|
|
|
|
|
return ListView.separated(
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
snapshot.data.getAllSharedRecordsByStatusList[index].gender = 2;
|
|
|
|
|
if (snapshot.data.getAllSharedRecordsByStatusList[index].status == 3)
|
|
|
|
|
return Card(
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.all(5),
|
|
|
|
|
shape: cardRadius(15),
|
|
|
|
|
color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0xffFDA4B0) : Color(0xff6EA8FF),
|
|
|
|
|
elevation: 0.0,
|
|
|
|
|
decoration: cardRadius(15, elevation: 0, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0xffFDA4B0) : Color(0xff6EA8FF),),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
// height: 130,0xffFDA4B0
|
|
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
|
|
// height: 130,0xffFDA4B0
|
|
|
|
|
width: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.width,
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
@ -178,17 +196,23 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Texts(
|
|
|
|
|
snapshot.data.getAllSharedRecordsByStatusList[index].patientName.toLowerCase().capitalizeFirstofEach,
|
|
|
|
|
snapshot.data.getAllSharedRecordsByStatusList[index].patientName
|
|
|
|
|
.toLowerCase()
|
|
|
|
|
.capitalizeFirstofEach,
|
|
|
|
|
fontSize: 22,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
Texts(TranslationBase.of(context).fileNumber + ': ' + snapshot.data.getAllSharedRecordsByStatusList[index].responseID.toString(),
|
|
|
|
|
Texts(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.fileNumber + ': ' + snapshot.data.getAllSharedRecordsByStatusList[index].responseID.toString(),
|
|
|
|
|
fontSize: 12, color: Colors.white),
|
|
|
|
|
Texts(
|
|
|
|
|
snapshot.data.getAllSharedRecordsByStatusList[index].age.toString() +
|
|
|
|
|
' ' +
|
|
|
|
|
TranslationBase.of(context).years +
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.years +
|
|
|
|
|
', ' +
|
|
|
|
|
snapshot.data.getAllSharedRecordsByStatusList[index].genderDescription,
|
|
|
|
|
fontSize: 12,
|
|
|
|
@ -222,7 +246,9 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
|
// if (isSwitchUser == true) switchUser(snapshot.data.getAllSharedRecordsByStatusList[index], context);
|
|
|
|
|
// },
|
|
|
|
|
// ),
|
|
|
|
|
Texts(TranslationBase.of(context).switchUser,
|
|
|
|
|
Texts(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.switchUser,
|
|
|
|
|
color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
fontWeight: FontWeight.w600)
|
|
|
|
@ -246,7 +272,9 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 5,
|
|
|
|
|
),
|
|
|
|
|
Texts(TranslationBase.of(context).delete,
|
|
|
|
|
Texts(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.delete,
|
|
|
|
|
color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
fontWeight: FontWeight.w600),
|
|
|
|
@ -274,373 +302,406 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int checkActive(List<GetAllSharedRecordsByStatusList> list) {
|
|
|
|
|
return list.where((o) => o.status == 3).toList().length;
|
|
|
|
|
return list
|
|
|
|
|
.where((o) => o.status == 3)
|
|
|
|
|
.toList()
|
|
|
|
|
.length;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget myFamilyRequest(context) {
|
|
|
|
|
return //Padding(
|
|
|
|
|
// padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
|
// child:
|
|
|
|
|
SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height,
|
|
|
|
|
margin: EdgeInsets.only(top: 10),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
FractionallySizedBox(
|
|
|
|
|
widthFactor: 1.0,
|
|
|
|
|
child: AppExpandableNotifier(
|
|
|
|
|
title: TranslationBase.of(context).userViewRequest,
|
|
|
|
|
bodyWidget: FutureBuilder(
|
|
|
|
|
future: getUserViewRequest(), // async work
|
|
|
|
|
builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
|
|
|
|
|
switch (snapshot.connectionState) {
|
|
|
|
|
case ConnectionState.waiting:
|
|
|
|
|
return SizedBox();
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
if (snapshot.hasError)
|
|
|
|
|
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
|
|
|
|
|
else
|
|
|
|
|
return ListView.separated(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
|
|
|
|
|
itemBuilder: (context, _index) {
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
border: Border.all(width: 1, color: Color(0xffEFEFEF)),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Color(0xff000000).withOpacity(.05),
|
|
|
|
|
//spreadRadius: 5,
|
|
|
|
|
blurRadius: 27,
|
|
|
|
|
offset: Offset(0, -3),
|
|
|
|
|
// padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
|
|
|
|
// child:
|
|
|
|
|
SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: MediaQuery
|
|
|
|
|
.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.height,
|
|
|
|
|
margin: EdgeInsets.only(top: 10),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
FractionallySizedBox(
|
|
|
|
|
widthFactor: 1.0,
|
|
|
|
|
child: AppExpandableNotifier(
|
|
|
|
|
title: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.userViewRequest,
|
|
|
|
|
bodyWidget: FutureBuilder(
|
|
|
|
|
future: getUserViewRequest(), // async work
|
|
|
|
|
builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
|
|
|
|
|
switch (snapshot.connectionState) {
|
|
|
|
|
case ConnectionState.waiting:
|
|
|
|
|
return SizedBox();
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
if (snapshot.hasError)
|
|
|
|
|
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.noDataAvailable));
|
|
|
|
|
else
|
|
|
|
|
return ListView.separated(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
|
|
|
|
|
itemBuilder: (context, _index) {
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
border: Border.all(width: 1, color: Color(0xffEFEFEF)),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Color(0xff000000).withOpacity(.05),
|
|
|
|
|
//spreadRadius: 5,
|
|
|
|
|
blurRadius: 27,
|
|
|
|
|
offset: Offset(0, -3),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Column(children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: Row(children: [
|
|
|
|
|
Expanded(flex: 3, child: AppText(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.name, fontWeight: FontWeight.w600)),
|
|
|
|
|
Expanded(flex: 1, child: AppText(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.allow, fontWeight: FontWeight.w600)),
|
|
|
|
|
Expanded(flex: 1, child: AppText(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.reject, fontWeight: FontWeight.w600)),
|
|
|
|
|
])),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(left: 10.0, right: 10.0),
|
|
|
|
|
child: Divider(color: Colors.black, height: 1.5, thickness: 1.5),
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
|
|
|
|
|
return Container(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Texts(
|
|
|
|
|
result.patientName,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: IconButton(
|
|
|
|
|
icon: SvgPicture.asset("assets/images/new-design/allow.svg", height: 22),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
acceptRemoveRequest(result.iD, 3, context);
|
|
|
|
|
},
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: IconButton(
|
|
|
|
|
icon: SvgPicture.asset("assets/images/new-design/reject.svg", height: 22),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
acceptRemoveRequest(result.iD, 4, context);
|
|
|
|
|
},
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
}).toList())
|
|
|
|
|
])
|
|
|
|
|
],
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Column(children: [
|
|
|
|
|
));
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (context, index) => SizedBox(height: 14),
|
|
|
|
|
itemCount: 1);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
))),
|
|
|
|
|
|
|
|
|
|
// RoundedContainer(
|
|
|
|
|
// child: ExpansionTile(
|
|
|
|
|
// title: Text(
|
|
|
|
|
// TranslationBase.of(context).userViewRequest,
|
|
|
|
|
// style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, color: Colors.black),
|
|
|
|
|
// ),
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// FutureBuilder(
|
|
|
|
|
// future: getUserViewRequest(), // async work
|
|
|
|
|
// builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
|
|
|
|
|
// switch (snapshot.connectionState) {
|
|
|
|
|
// case ConnectionState.waiting:
|
|
|
|
|
// return Padding(padding: EdgeInsets.only(top: 50), child: Text('Loading....'));
|
|
|
|
|
// default:
|
|
|
|
|
// if (snapshot.hasError)
|
|
|
|
|
// return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
|
|
|
|
|
// else
|
|
|
|
|
// return Container(
|
|
|
|
|
// padding: EdgeInsets.all(15),
|
|
|
|
|
// child: Card(
|
|
|
|
|
// elevation: 3,
|
|
|
|
|
// shape: cardRadius(8),
|
|
|
|
|
// child: Column(
|
|
|
|
|
// children: [
|
|
|
|
|
// Column(children: [
|
|
|
|
|
// Padding(
|
|
|
|
|
// padding: EdgeInsets.all(10),
|
|
|
|
|
// child: Row(children: [
|
|
|
|
|
// Expanded(flex: 3, child: AppText(TranslationBase.of(context).name, fontWeight: FontWeight.w600)),
|
|
|
|
|
// Expanded(flex: 1, child: AppText(TranslationBase.of(context).allow, fontWeight: FontWeight.w600)),
|
|
|
|
|
// Expanded(flex: 1, child: AppText(TranslationBase.of(context).reject, fontWeight: FontWeight.w600)),
|
|
|
|
|
// ])),
|
|
|
|
|
// Divider(color: Colors.black, height: 1.5, thickness: 1.5),
|
|
|
|
|
// Column(
|
|
|
|
|
// children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
|
|
|
|
|
// return Container(
|
|
|
|
|
// padding: EdgeInsets.all(10),
|
|
|
|
|
// child: Row(
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// Expanded(
|
|
|
|
|
// flex: 3,
|
|
|
|
|
// child: Texts(
|
|
|
|
|
// result.patientName,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// fontSize: 12,
|
|
|
|
|
// )),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// flex: 1,
|
|
|
|
|
// child: IconButton(
|
|
|
|
|
// icon: Icon(
|
|
|
|
|
// Icons.check_circle,
|
|
|
|
|
// color: Color(0xff349745),
|
|
|
|
|
// ),
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// acceptRemoveRequest(result.iD, 3, context);
|
|
|
|
|
// },
|
|
|
|
|
// )),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// flex: 1,
|
|
|
|
|
// child: IconButton(
|
|
|
|
|
// icon: Icon(
|
|
|
|
|
// Icons.close,
|
|
|
|
|
// color: Colors.red[900],
|
|
|
|
|
// ),
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// acceptRemoveRequest(result.iD, 4, context);
|
|
|
|
|
// },
|
|
|
|
|
// ))
|
|
|
|
|
// ],
|
|
|
|
|
// ));
|
|
|
|
|
// }).toList())
|
|
|
|
|
// ])
|
|
|
|
|
// ],
|
|
|
|
|
// )));
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
SizedBox(height: 15),
|
|
|
|
|
FractionallySizedBox(
|
|
|
|
|
widthFactor: 1.0,
|
|
|
|
|
child: AppExpandableNotifier(
|
|
|
|
|
title: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.sentRequest,
|
|
|
|
|
bodyWidget: FutureBuilder(
|
|
|
|
|
future: getSentRequest(), // async work
|
|
|
|
|
builder: (BuildContext context, AsyncSnapshot<GetAllSharedRecordsByStatusResponse> snapshot) {
|
|
|
|
|
switch (snapshot.connectionState) {
|
|
|
|
|
case ConnectionState.waiting:
|
|
|
|
|
return SizedBox();
|
|
|
|
|
default:
|
|
|
|
|
if (snapshot.hasError)
|
|
|
|
|
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.noDataAvailable));
|
|
|
|
|
else
|
|
|
|
|
return ListView.separated(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
|
|
|
|
|
itemBuilder: (context, _index) {
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
border: Border.all(width: 1, color: Color(0xffEFEFEF)),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Color(0xff000000).withOpacity(.05),
|
|
|
|
|
//spreadRadius: 5,
|
|
|
|
|
blurRadius: 27,
|
|
|
|
|
offset: Offset(0, -3),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: Row(children: [
|
|
|
|
|
Expanded(flex: 3, child: AppText(TranslationBase.of(context).name, fontWeight: FontWeight.w600)),
|
|
|
|
|
Expanded(flex: 1, child: AppText(TranslationBase.of(context).allow, fontWeight: FontWeight.w600)),
|
|
|
|
|
Expanded(flex: 1, child: AppText(TranslationBase.of(context).reject, fontWeight: FontWeight.w600)),
|
|
|
|
|
Expanded(flex: 3, child: AppText(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.name, fontWeight: FontWeight.w600)),
|
|
|
|
|
Expanded(flex: 1, child: AppText(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.status, fontWeight: FontWeight.w600))
|
|
|
|
|
])),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(left: 10.0, right: 10.0),
|
|
|
|
|
child: Divider(color: Colors.black, height: 1.5, thickness: 1.5),
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
|
|
|
|
|
return Container(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Texts(
|
|
|
|
|
result.patientName,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: IconButton(
|
|
|
|
|
icon: SvgPicture.asset("assets/images/new-design/allow.svg", height: 22),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
acceptRemoveRequest(result.iD, 3, context);
|
|
|
|
|
},
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: IconButton(
|
|
|
|
|
icon: SvgPicture.asset("assets/images/new-design/reject.svg", height: 22),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
acceptRemoveRequest(result.iD, 4, context);
|
|
|
|
|
},
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
}).toList())
|
|
|
|
|
])
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (context, index) => SizedBox(height: 14),
|
|
|
|
|
itemCount: 1);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
))),
|
|
|
|
|
|
|
|
|
|
// RoundedContainer(
|
|
|
|
|
// child: ExpansionTile(
|
|
|
|
|
// title: Text(
|
|
|
|
|
// TranslationBase.of(context).userViewRequest,
|
|
|
|
|
// style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, color: Colors.black),
|
|
|
|
|
// ),
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// FutureBuilder(
|
|
|
|
|
// future: getUserViewRequest(), // async work
|
|
|
|
|
// builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
|
|
|
|
|
// switch (snapshot.connectionState) {
|
|
|
|
|
// case ConnectionState.waiting:
|
|
|
|
|
// return Padding(padding: EdgeInsets.only(top: 50), child: Text('Loading....'));
|
|
|
|
|
// default:
|
|
|
|
|
// if (snapshot.hasError)
|
|
|
|
|
// return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
|
|
|
|
|
// else
|
|
|
|
|
// return Container(
|
|
|
|
|
// padding: EdgeInsets.all(15),
|
|
|
|
|
// child: Card(
|
|
|
|
|
// elevation: 3,
|
|
|
|
|
// shape: cardRadius(8),
|
|
|
|
|
// child: Column(
|
|
|
|
|
// children: [
|
|
|
|
|
// Column(children: [
|
|
|
|
|
// Padding(
|
|
|
|
|
// padding: EdgeInsets.all(10),
|
|
|
|
|
// child: Row(children: [
|
|
|
|
|
// Expanded(flex: 3, child: AppText(TranslationBase.of(context).name, fontWeight: FontWeight.w600)),
|
|
|
|
|
// Expanded(flex: 1, child: AppText(TranslationBase.of(context).allow, fontWeight: FontWeight.w600)),
|
|
|
|
|
// Expanded(flex: 1, child: AppText(TranslationBase.of(context).reject, fontWeight: FontWeight.w600)),
|
|
|
|
|
// ])),
|
|
|
|
|
// Divider(color: Colors.black, height: 1.5, thickness: 1.5),
|
|
|
|
|
// Column(
|
|
|
|
|
// children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
|
|
|
|
|
// return Container(
|
|
|
|
|
// padding: EdgeInsets.all(10),
|
|
|
|
|
// child: Row(
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// Expanded(
|
|
|
|
|
// flex: 3,
|
|
|
|
|
// child: Texts(
|
|
|
|
|
// result.patientName,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// fontSize: 12,
|
|
|
|
|
// )),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// flex: 1,
|
|
|
|
|
// child: IconButton(
|
|
|
|
|
// icon: Icon(
|
|
|
|
|
// Icons.check_circle,
|
|
|
|
|
// color: Color(0xff349745),
|
|
|
|
|
// ),
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// acceptRemoveRequest(result.iD, 3, context);
|
|
|
|
|
// },
|
|
|
|
|
// )),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// flex: 1,
|
|
|
|
|
// child: IconButton(
|
|
|
|
|
// icon: Icon(
|
|
|
|
|
// Icons.close,
|
|
|
|
|
// color: Colors.red[900],
|
|
|
|
|
// ),
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// acceptRemoveRequest(result.iD, 4, context);
|
|
|
|
|
// },
|
|
|
|
|
// ))
|
|
|
|
|
// ],
|
|
|
|
|
// ));
|
|
|
|
|
// }).toList())
|
|
|
|
|
// ])
|
|
|
|
|
// ],
|
|
|
|
|
// )));
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
SizedBox(height: 15),
|
|
|
|
|
FractionallySizedBox(
|
|
|
|
|
widthFactor: 1.0,
|
|
|
|
|
child: AppExpandableNotifier(
|
|
|
|
|
title: TranslationBase.of(context).sentRequest,
|
|
|
|
|
bodyWidget: FutureBuilder(
|
|
|
|
|
future: getSentRequest(), // async work
|
|
|
|
|
builder: (BuildContext context, AsyncSnapshot<GetAllSharedRecordsByStatusResponse> snapshot) {
|
|
|
|
|
switch (snapshot.connectionState) {
|
|
|
|
|
case ConnectionState.waiting:
|
|
|
|
|
return SizedBox();
|
|
|
|
|
default:
|
|
|
|
|
if (snapshot.hasError)
|
|
|
|
|
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
|
|
|
|
|
else
|
|
|
|
|
return ListView.separated(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
|
|
|
|
|
itemBuilder: (context, _index) {
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
border: Border.all(width: 1, color: Color(0xffEFEFEF)),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Color(0xff000000).withOpacity(.05),
|
|
|
|
|
//spreadRadius: 5,
|
|
|
|
|
blurRadius: 27,
|
|
|
|
|
offset: Offset(0, -3),
|
|
|
|
|
),
|
|
|
|
|
children: snapshot.data.getAllSharedRecordsByStatusList.map<Widget>((result) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Texts(
|
|
|
|
|
result.patientName,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: cardRadius(10, color: result.status == 3 ? Color(0xff349745) : Color(0xffD02127), elevation: 3,),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: AppText(
|
|
|
|
|
result.statusDescription,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
)))),
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
}).toList(),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
));
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (context, index) => SizedBox(height: 14),
|
|
|
|
|
itemCount: 1,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}))),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
),
|
|
|
|
|
FractionallySizedBox(
|
|
|
|
|
widthFactor: 1.0,
|
|
|
|
|
child: AppExpandableNotifier(
|
|
|
|
|
title: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.userView,
|
|
|
|
|
bodyWidget: FutureBuilder(
|
|
|
|
|
future: getUserViewRequest(), // async work
|
|
|
|
|
builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
|
|
|
|
|
switch (snapshot.connectionState) {
|
|
|
|
|
case ConnectionState.waiting:
|
|
|
|
|
return Padding(padding: EdgeInsets.only(top: 50), child: Text(''));
|
|
|
|
|
default:
|
|
|
|
|
if (snapshot.hasError)
|
|
|
|
|
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.noDataAvailable));
|
|
|
|
|
else
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
border: Border.all(width: 1, color: Color(0xffEFEFEF)),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Color(0xff000000).withOpacity(.05),
|
|
|
|
|
//spreadRadius: 5,
|
|
|
|
|
blurRadius: 27,
|
|
|
|
|
offset: Offset(0, -3),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Column(children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: Row(children: [
|
|
|
|
|
Expanded(flex: 3, child: AppText(TranslationBase.of(context).name, fontWeight: FontWeight.w600)),
|
|
|
|
|
Expanded(flex: 1, child: AppText(TranslationBase.of(context).status, fontWeight: FontWeight.w600))
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.name,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.delete,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
)),
|
|
|
|
|
])),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(left: 10.0, right: 10.0),
|
|
|
|
|
child: Divider(color: Colors.black, height: 1.5, thickness: 1.5),
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
children: snapshot.data.getAllSharedRecordsByStatusList.map<Widget>((result) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Texts(
|
|
|
|
|
result.patientName,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Card(
|
|
|
|
|
shape: cardRadius(10),
|
|
|
|
|
color: result.status == 3 ? Color(0xff349745) : Color(0xffD02127),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: AppText(
|
|
|
|
|
result.statusDescription,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
)))),
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
}).toList(),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (context, index) => SizedBox(height: 14),
|
|
|
|
|
itemCount: 1,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}))),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 15,
|
|
|
|
|
),
|
|
|
|
|
FractionallySizedBox(
|
|
|
|
|
widthFactor: 1.0,
|
|
|
|
|
child: AppExpandableNotifier(
|
|
|
|
|
title: TranslationBase.of(context).userView,
|
|
|
|
|
bodyWidget: FutureBuilder(
|
|
|
|
|
future: getUserViewRequest(), // async work
|
|
|
|
|
builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
|
|
|
|
|
switch (snapshot.connectionState) {
|
|
|
|
|
case ConnectionState.waiting:
|
|
|
|
|
return Padding(padding: EdgeInsets.only(top: 50), child: Text(''));
|
|
|
|
|
default:
|
|
|
|
|
if (snapshot.hasError)
|
|
|
|
|
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
|
|
|
|
|
else
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
border: Border.all(width: 1, color: Color(0xffEFEFEF)),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Color(0xff000000).withOpacity(.05),
|
|
|
|
|
//spreadRadius: 5,
|
|
|
|
|
blurRadius: 27,
|
|
|
|
|
offset: Offset(0, -3),
|
|
|
|
|
),
|
|
|
|
|
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Texts(
|
|
|
|
|
result.patientName,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: IconButton(
|
|
|
|
|
icon: Icon(
|
|
|
|
|
Icons.delete,
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
deactivateRequest(result.iD, 5, context);
|
|
|
|
|
},
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
}).toList())
|
|
|
|
|
])
|
|
|
|
|
],
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Column(children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: Row(children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).name,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).delete,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
)),
|
|
|
|
|
])),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(left: 10.0, right: 10.0),
|
|
|
|
|
child: Divider(color: Colors.black, height: 1.5, thickness: 1.5),
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Texts(
|
|
|
|
|
result.patientName,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
)),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: IconButton(
|
|
|
|
|
icon: Icon(
|
|
|
|
|
Icons.delete,
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
deactivateRequest(result.iD, 5, context);
|
|
|
|
|
},
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
}).toList())
|
|
|
|
|
])
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
})))
|
|
|
|
|
],
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
})))
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String isAvailable() {
|
|
|
|
|
if (isVaiable == false) {
|
|
|
|
|
this.isVaiable = true;
|
|
|
|
|
return TranslationBase.of(context).noDataAvailable;
|
|
|
|
|
return TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.noDataAvailable;
|
|
|
|
|
} else {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
@ -667,9 +728,15 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
|
deleteFamily(family, context) {
|
|
|
|
|
ConfirmDialog dialog = new ConfirmDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
confirmMessage: TranslationBase.of(context).removeFamilyMember,
|
|
|
|
|
okText: TranslationBase.of(context).confirm,
|
|
|
|
|
cancelText: TranslationBase.of(context).cancel_nocaps,
|
|
|
|
|
confirmMessage: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.removeFamilyMember,
|
|
|
|
|
okText: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.confirm,
|
|
|
|
|
cancelText: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.cancel_nocaps,
|
|
|
|
|
okFunction: () => {ConfirmDialog.closeAlertDialog(context), removeFamily(family, context)},
|
|
|
|
|
cancelFunction: () => {});
|
|
|
|
|
dialog.showAlertDialog(context);
|
|
|
|
@ -730,26 +797,29 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
|
_vitalSignService.heightCm = "";
|
|
|
|
|
_vitalSignService.weightKg = "";
|
|
|
|
|
await authenticatedUserObject.getUser(getUser: true);
|
|
|
|
|
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).user = authenticatedUserObject.user;
|
|
|
|
|
Provider
|
|
|
|
|
.of<ProjectViewModel>(AppGlobal.context, listen: false)
|
|
|
|
|
.user = authenticatedUserObject.user;
|
|
|
|
|
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).setUser(authenticatedUserObject.user);
|
|
|
|
|
|
|
|
|
|
appointmentRateViewModel
|
|
|
|
|
.getIsLastAppointmentRatedList()
|
|
|
|
|
.then((value) => {
|
|
|
|
|
getToDoCount(),
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context),
|
|
|
|
|
if (appointmentRateViewModel.isHaveAppointmentNotRate)
|
|
|
|
|
{
|
|
|
|
|
Navigator.pushAndRemoveUntil(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: RateAppointmentDoctor(),
|
|
|
|
|
),
|
|
|
|
|
(r) => false)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{Navigator.pushAndRemoveUntil(AppGlobal.context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false)}
|
|
|
|
|
})
|
|
|
|
|
.then((value) =>
|
|
|
|
|
{
|
|
|
|
|
getToDoCount(),
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context),
|
|
|
|
|
if (appointmentRateViewModel.isHaveAppointmentNotRate)
|
|
|
|
|
{
|
|
|
|
|
Navigator.pushAndRemoveUntil(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: RateAppointmentDoctor(),
|
|
|
|
|
),
|
|
|
|
|
(r) => false)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{Navigator.pushAndRemoveUntil(AppGlobal.context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false)}
|
|
|
|
|
})
|
|
|
|
|
.catchError((err) {
|
|
|
|
|
print(err);
|
|
|
|
|
// Utils.hideProgressDialog();
|
|
|
|
|