|
|
|
|
@ -14,8 +14,10 @@ import 'package:doctor_app_flutter/providers/patients_provider.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/routes.dart';
|
|
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/profile_image_widget.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
@ -40,7 +42,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
|
|
|
|
|
List date;
|
|
|
|
|
List unfilterDate;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Color sideColor = Colors.black;
|
|
|
|
|
List<PatiantInformtion> responseModelList;
|
|
|
|
|
List<PatiantInformtion> responseModelList2;
|
|
|
|
|
|
|
|
|
|
@ -91,7 +93,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
|
|
|
|
|
_isError = false;
|
|
|
|
|
} else {
|
|
|
|
|
_isError = true;
|
|
|
|
|
error = res['ErrorEndUserMessage'] ?? res['ErrorMessage'] ;
|
|
|
|
|
error = res['ErrorEndUserMessage'] ?? res['ErrorMessage'];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}).catchError((error) {
|
|
|
|
|
@ -276,6 +278,14 @@ class _PatientsScreenState extends State<PatientsScreen> {
|
|
|
|
|
return "Old Date";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
*@author: Amjad Amireh Modified New design
|
|
|
|
|
*@Date:21/5/2020
|
|
|
|
|
*@param:
|
|
|
|
|
*@return:PatientsScreen
|
|
|
|
|
|
|
|
|
|
*@desc:
|
|
|
|
|
*/
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
|
|
|
|
|
@ -333,54 +343,162 @@ class _PatientsScreenState extends State<PatientsScreen> {
|
|
|
|
|
context, 'Search Patient'),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10.0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
//===============
|
|
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Color(0Xffffffff),
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(20)),
|
|
|
|
|
//================
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.fromLTRB(15, 0, 15, 0),
|
|
|
|
|
child: Column(
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: responseModelList
|
|
|
|
|
.map((PatiantInformtion item) {
|
|
|
|
|
return InkWell(
|
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
|
child: CardWithBgWidgetNew(
|
|
|
|
|
//CardWithBgWidget(
|
|
|
|
|
|
|
|
|
|
widget: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
item.firstName +
|
|
|
|
|
" " +
|
|
|
|
|
item.lastName +
|
|
|
|
|
"- " +
|
|
|
|
|
item.patientId
|
|
|
|
|
.toString(),
|
|
|
|
|
fontSize: 2.5 *
|
|
|
|
|
SizeConfig
|
|
|
|
|
.textMultiplier,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.bold,
|
|
|
|
|
Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
.start,
|
|
|
|
|
children: [
|
|
|
|
|
Image.network(
|
|
|
|
|
"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png",
|
|
|
|
|
|
|
|
|
|
height: 100,
|
|
|
|
|
width: 100),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment
|
|
|
|
|
.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
item.firstName +
|
|
|
|
|
" " +
|
|
|
|
|
item.lastName,
|
|
|
|
|
fontSize: 2.5 *
|
|
|
|
|
SizeConfig
|
|
|
|
|
.textMultiplier,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.bold,
|
|
|
|
|
backGroundcolor:
|
|
|
|
|
Colors.white,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
"File Number:" +
|
|
|
|
|
item.patientId
|
|
|
|
|
.toString(),
|
|
|
|
|
fontSize: 2.0 *
|
|
|
|
|
SizeConfig
|
|
|
|
|
.textMultiplier,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.bold,
|
|
|
|
|
backGroundcolor:
|
|
|
|
|
Colors.white,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
"Age:" +
|
|
|
|
|
item.age
|
|
|
|
|
.toString(),
|
|
|
|
|
fontSize: 2.0 *
|
|
|
|
|
SizeConfig
|
|
|
|
|
.textMultiplier,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight
|
|
|
|
|
.bold,
|
|
|
|
|
backGroundcolor:
|
|
|
|
|
Colors.white,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
SERVICES_PATIANT2[int
|
|
|
|
|
.parse(
|
|
|
|
|
patientType)] ==
|
|
|
|
|
"List_MyOutPatient"
|
|
|
|
|
? Row(
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment
|
|
|
|
|
.spaceBetween,
|
|
|
|
|
children: <
|
|
|
|
|
Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
height:
|
|
|
|
|
20,
|
|
|
|
|
width:
|
|
|
|
|
80,
|
|
|
|
|
decoration:
|
|
|
|
|
BoxDecoration(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(50),
|
|
|
|
|
color:
|
|
|
|
|
Hexcolor("#20A169"),
|
|
|
|
|
),
|
|
|
|
|
child:
|
|
|
|
|
AppText(
|
|
|
|
|
item.startTime,
|
|
|
|
|
color:
|
|
|
|
|
Colors.white,
|
|
|
|
|
fontSize:
|
|
|
|
|
2 * SizeConfig.textMultiplier,
|
|
|
|
|
textAlign:
|
|
|
|
|
TextAlign.center,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width:60,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child:
|
|
|
|
|
AppText(
|
|
|
|
|
convertDateFormat2(item
|
|
|
|
|
.appointmentDate
|
|
|
|
|
.toString()),
|
|
|
|
|
fontSize:
|
|
|
|
|
2.0 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: AppText(
|
|
|
|
|
item.nationalityName,
|
|
|
|
|
fontSize: 2.5 *
|
|
|
|
|
SizeConfig
|
|
|
|
|
.textMultiplier,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
SERVICES_PATIANT2[int.parse(
|
|
|
|
|
patientType)] ==
|
|
|
|
|
"List_MyOutPatient"
|
|
|
|
|
? AppText(
|
|
|
|
|
convertDateFormat2(item
|
|
|
|
|
.appointmentDate
|
|
|
|
|
.toString()) +
|
|
|
|
|
" " +
|
|
|
|
|
"-" +
|
|
|
|
|
" " +
|
|
|
|
|
item.startTime,
|
|
|
|
|
fontSize: 2.5 *
|
|
|
|
|
SizeConfig
|
|
|
|
|
.textMultiplier)
|
|
|
|
|
: AppText(
|
|
|
|
|
item
|
|
|
|
|
.nationalityName,
|
|
|
|
|
fontSize: 2.5 *
|
|
|
|
|
SizeConfig
|
|
|
|
|
.textMultiplier)
|
|
|
|
|
Divider(color: Colors.grey)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -416,8 +534,8 @@ class _PatientsScreenState extends State<PatientsScreen> {
|
|
|
|
|
borderSide: BorderSide(color: Hexcolor('#CCCCCC')),
|
|
|
|
|
),
|
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10.0)),
|
|
|
|
|
borderSide: BorderSide(color: Theme.of(context).primaryColor),
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(50.0)),
|
|
|
|
|
borderSide: BorderSide(color: Colors.grey), //),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -426,7 +544,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.065,
|
|
|
|
|
width: SizeConfig.screenWidth * 0.80,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Color(0Xff59434f), borderRadius: BorderRadius.circular(20)),
|
|
|
|
|
color: Color(0Xffffffff), borderRadius: BorderRadius.circular(20)),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
@ -435,13 +553,28 @@ class _PatientsScreenState extends State<PatientsScreen> {
|
|
|
|
|
bool _isActive = _locations[_activeLocation] == item ? true : false;
|
|
|
|
|
return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Text(
|
|
|
|
|
item,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
|
),
|
|
|
|
|
child: Container(
|
|
|
|
|
height: 40,
|
|
|
|
|
width: 80,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(50),
|
|
|
|
|
color: _isActive ? Hexcolor("#B8382B") : Colors.white,
|
|
|
|
|
),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Text(
|
|
|
|
|
item,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
color: _isActive
|
|
|
|
|
? Colors.white
|
|
|
|
|
: Colors.black, //Colors.black,
|
|
|
|
|
// backgroundColor:_isActive
|
|
|
|
|
// ? Hexcolor("#B8382B")
|
|
|
|
|
// : Colors.white,//sideColor,
|
|
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
onTap: () {
|
|
|
|
|
print(_locations.indexOf(item));
|
|
|
|
|
|
|
|
|
|
@ -449,6 +582,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
|
|
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
_activeLocation = _locations.indexOf(item);
|
|
|
|
|
// sideColor=Colors.redAccent;
|
|
|
|
|
});
|
|
|
|
|
}),
|
|
|
|
|
_isActive
|
|
|
|
|
@ -456,6 +590,7 @@ class _PatientsScreenState extends State<PatientsScreen> {
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
height: 3,
|
|
|
|
|
width: 80,
|
|
|
|
|
)
|
|
|
|
|
|