vital sign screen

merge-requests/33/head
Elham Rababah 5 years ago
parent 691e7dbac6
commit 5e7526f2c7

@ -0,0 +1,77 @@
/*
*@author: Elham Rababah
*@Date:27/4/2020
*@param:
*@return:
*@desc: VitalSignReqModel
*/
class VitalSignReqModel {
int patientID;
int projectID;
int patientTypeID;
int inOutpatientType;
int transNo;
int languageID;
String stamp ;
String iPAdress;
double versionID;
int channel;
String tokenID;
String sessionID;
bool isLoginForDoctorApp;
bool patientOutSA;
VitalSignReqModel(
{this.patientID,
this.projectID,
this.inOutpatientType,
this.transNo,
this.languageID,
this.tokenID,
this.stamp = '2020-04-26T09:32:18.317Z',
this.iPAdress='11.11.11.11',
this.versionID=1.2,
this.channel=9,
this.sessionID='E2bsEeYEJo',
this.isLoginForDoctorApp=true,
this.patientTypeID,
this.patientOutSA=false});
VitalSignReqModel.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
patientID = json['PatientID'];
languageID = json['LanguageID'];
inOutpatientType = json['InOutpatientType'];
transNo = json['TransNo'];
stamp = json['stamp'];
iPAdress = json['IPAdress'];
versionID = json['VersionID'];
channel = json['Channel'];
tokenID = json['TokenID'];
sessionID = json['SessionID'];
isLoginForDoctorApp = json['IsLoginForDoctorApp'];
patientOutSA = json['PatientOutSA'];
patientTypeID = json['PatientTypeID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID;
data['InOutpatientType'] = this.inOutpatientType;
data['TransNo'] = this.transNo;
data['LanguageID'] = this.languageID;
data['stamp'] = this.stamp;
data['IPAdress'] = this.iPAdress;
data['VersionID'] = this.versionID;
data['Channel'] = this.channel;
data['TokenID'] = this.tokenID;
data['SessionID'] = this.sessionID;
data['IsLoginForDoctorApp'] = this.isLoginForDoctorApp;
data['PatientOutSA'] = this.patientOutSA;
data['PatientTypeID'] = this.patientTypeID;
return data;
}
}

@ -1,18 +1,28 @@
import 'dart:convert';
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/screens/patients/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
import 'package:http_interceptor/http_client_with_interceptor.dart';
import '../interceptor/http_interceptor.dart';
import '../models/patient_model.dart';
const GET_PATIENT_VITAL_SIGN = 'Doctors.svc/REST/Doctor_GetPatientVitalSign';
const GET_PATIENT_VITAL_SIGN =
BASE_URL + 'Doctors.svc/REST/Doctor_GetPatientVitalSign';
class PatientsProvider with ChangeNotifier {
bool isLoading = true;
bool isError = false;
String error = '';
List<PatiantInformtion> patientVitalSignList = [];
Client client =
HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]);
PatiantInformtion _selectedPatient;
Future<Map> getPatientList(PatientModel patient, patientType) async {
/* const url =
BASE_URL+'DoctorApplication.svc/REST/GetMyInPatient';*/
@ -63,13 +73,43 @@ class PatientsProvider with ChangeNotifier {
*@return:Future
*@desc: getPatientVitalSign
*/
Future<Map> getPatientVitalSign(patient) async {
getPatientVitalSign(patient) async {
try {
final response =
await client.post(GET_PATIENT_VITAL_SIGN, body: json.encode(patient));
return Future.value(json.decode(response.body));
if (await Helpers.checkConnection()) {
final response = await client.post(GET_PATIENT_VITAL_SIGN,
body: json.encode(patient));
final int statusCode = response.statusCode;
isLoading = false;
if (statusCode < 200 || statusCode >= 400 || json == null) {
isError = true;
error = 'Error While Fetching data';
} else {
var res = json.decode(response.body);
print('$res');
if (res['MessageStatus'] == 1) {
patientVitalSignList = res['List_DoctorPatientVitalSign'];
} else {
isError = true;
error = res['ErrorMessage'] ?? res['ErrorEndUserMessage'];
}
}
} else {
isLoading = false;
isError = true;
error = 'Please Check The Internet Connection';
}
} catch (error) {
throw error;
}
}
PatiantInformtion getSelectedPatient() {
return _selectedPatient;
}
setSelectedPatient(PatiantInformtion patient) {
// return _selectedPatient;
_selectedPatient = patient;
}
}

@ -72,7 +72,7 @@ class _LoginsreenState extends State<Loginsreen> {
return Text('Error: ${snapshot.error}');
} else {
return Container(
margin: EdgeInsetsDirectional.fromSTEB(30, 0, 0, 0),
margin: EdgeInsetsDirectional.fromSTEB(30, 0, 0, 30),
alignment: Alignment.topLeft,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:flutter/services.dart';
@ -13,7 +14,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import '../../lookups/patient_lookup.dart';
import '../../models/patient_model.dart';
import '../../widgets/patients/dynamic_elements.dart';
import '../../config/config.dart';

@ -1,8 +1,9 @@
import '../../models/patient_model.dart';
import '../../providers/patients_provider.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../providers/patients_provider.dart';
class PatientsListScreen extends StatefulWidget {
@override
_PatientsListScreenState createState() => _PatientsListScreenState();

@ -6,7 +6,7 @@
*@desc:
*/
import 'package:doctor_app_flutter/models/patient_model.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/patients/TopTenUsersModelResponse.dart';
@ -30,12 +30,11 @@ class PatientsScreen extends StatefulWidget {
}
class _PatientsScreenState extends State<PatientsScreen> {
List<dynamic> litems;
//*******************
List<PatiantInformtion> responseModelList;
//List<PatiantInformtion<dynamic>> litems2;
//*******************
List<dynamic> litems;
//*******************
List<PatiantInformtion> responseModelList;
//List<PatiantInformtion<dynamic>> litems2;
//*******************
bool _isInit = true;
@ -45,21 +44,21 @@ class _PatientsScreenState extends State<PatientsScreen> {
//*******Amjad add to search box******
final _controller = TextEditingController();
//**************
PatientModel patient;
PatientModel patient;
@override
void didChangeDependencies() {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
//PatientModel patient = routeArgs['patientSearchForm'];
patient = routeArgs['patientSearchForm'];
patient = routeArgs['patientSearchForm'];
//PatiantInformtion patiantInfo = routeArgs['patientSearchForm'];
print(patient.TokenID+"EEEEEE");
print(patient.TokenID + "EEEEEE");
String patientType = routeArgs['selectedType'];
print("**************patiant Type**************");
print(patientType);
print("**************test**************");
print("**************test**************");
if (_isInit) {
// setState(() {});
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
@ -67,20 +66,20 @@ class _PatientsScreenState extends State<PatientsScreen> {
// print('MessageStatus${res['MessageStatus']}');
print('List_MyInPatient${(res['List_MyInPatient'])}');
setState(() {
int val2=int.parse(patientType);
litems =res[SERVICES_PATIANT2[val2]];//res['List_MyInPatient'];
int val2 = int.parse(patientType);
litems = res[SERVICES_PATIANT2[val2]]; //res['List_MyInPatient'];
//********************
// litems2=res[SERVICES_PATIANT2[val2]];
//PatiantInformtion
//List<PatiantInformtion> responseModelList = new PatiantInformtion.fromJson(litems).;//TopTenUsersModelResponse.fromJson(parsed).list;
final List parsed = litems;//json.decode(response.body);
//List<PatientModel> responseModelList = new TopTenUsersModelResponse.fromJson(parsed).list;
// List<PatiantInformtion> responseModelList = new TopTenUsersModelResponse.fromJson(parsed).list;
responseModelList = new TopTenUsersModelResponse.fromJson(parsed).list;
// litems2=res[SERVICES_PATIANT2[val2]];
//PatiantInformtion
//List<PatiantInformtion> responseModelList = new PatiantInformtion.fromJson(litems).;//TopTenUsersModelResponse.fromJson(parsed).list;
final List parsed = litems; //json.decode(response.body);
//List<PatientModel> responseModelList = new TopTenUsersModelResponse.fromJson(parsed).list;
// List<PatiantInformtion> responseModelList = new TopTenUsersModelResponse.fromJson(parsed).list;
responseModelList =
new TopTenUsersModelResponse.fromJson(parsed).list;
//********************
_isLoading = false;
_hasError = res['ErrorEndUserMessage'];
_hasError = res['ErrorEndUserMessage'];
});
print(res);
}).catchError((error) {
@ -93,60 +92,73 @@ class _PatientsScreenState extends State<PatientsScreen> {
@override
Widget build(BuildContext context) {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
return AppScaffold(
appBarTitle: 'Patients',
//***********Modify by amjad (create List view to insert all new data webservise in scroll )*************
body: Container(child:ListView(
scrollDirection: Axis.vertical,
children: <Widget>[
Container(
//child:litems == null?Column():Column(children: <Widget>[
child:litems == null?Column():Column(children: <Widget>[
Container(
width: SizeConfig.screenWidth * 0.80,
child: TextField(
controller: _controller,
onSubmitted: (value) {
// fetch all the news related to the keyword
if (value.isNotEmpty) {
// vm.search(value);
}
},
decoration: buildInputDecoration(
context, 'Search patiant'),
appBarTitle: 'Patients',
//***********Modify by amjad (create List view to insert all new data webservise in scroll )*************
body: Container(
child: ListView(
scrollDirection: Axis.vertical,
children: <Widget>[
Container(
//child:litems == null?Column():Column(children: <Widget>[
child: litems == null
? Column()
: Column(
children: <Widget>[
Container(
width: SizeConfig.screenWidth * 0.80,
child: TextField(
controller: _controller,
onSubmitted: (value) {
// fetch all the news related to the keyword
if (value.isNotEmpty) {
// vm.search(value);
}
},
decoration:
buildInputDecoration(context, 'Search patiant'),
),
),
),
Column(children: responseModelList.map((PatiantInformtion item) {
return InkWell(
child: CardWithBgWidget(
line1Text:item.nationalityName,//item['FirstName'],//patient.getFirstName(),//item['FirstName'],
line2Text:item.lastName, //responseModelList['LastName'],//item['LastName'],//'12/04/2020 - 02:00 PM',
// line3Text: item.middleName,
heightPercentage: 0.15,
widthPercentage: 0.80),
onTap: (){
Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: {"patient": responseModelList});
},
);
}).toList())
Column(
children:
responseModelList.map((PatiantInformtion item) {
return InkWell(
child: CardWithBgWidget(
line1Text: item
.nationalityName, //item['FirstName'],//patient.getFirstName(),//item['FirstName'],
line2Text: item
.lastName, //responseModelList['LastName'],//item['LastName'],//'12/04/2020 - 02:00 PM',
// line3Text: item.middleName,
heightPercentage: 0.15,
widthPercentage: 0.80),
onTap: () =>
tapOnPatient(context, item, patientsProv),
);
}).toList())
],
),
),
],
),
),
],
))
);
)));
}
void tapOnPatient(BuildContext context, PatiantInformtion patient,
PatientsProvider patientsProv) {
patientsProv.setSelectedPatient(patient);
Navigator.of(context)
.pushNamed(PATIENTS_PROFILE, arguments: {"patient": patient});
}
//***********amjad update*************
InputDecoration buildInputDecoration(BuildContext context, hint) {
InputDecoration buildInputDecoration(BuildContext context, hint) {
return InputDecoration(
prefixIcon:Icon(Icons.search,color: Colors.red),
prefixIcon: Icon(Icons.search, color: Colors.red),
filled: true,
fillColor: Colors.white,
//Image.asset(asset),
/* icon: Padding(
/* icon: Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(Icons.search),
),*/
@ -164,30 +176,5 @@ class _PatientsScreenState extends State<PatientsScreen> {
}
//*************
}
//***********************
//***********************
class CustomShapeClipper extends CustomClipper<Path> {
@override
Path getClip(Size size) {
final Path path = Path();
path.lineTo(0.0, size.height);
var firstEndPoint = Offset(size.width * .5, size.height / 2);
var firstControlpoint = Offset(size.width * 0.25, size.height * 0.95 + 30);
path.quadraticBezierTo(firstControlpoint.dx, firstControlpoint.dy,
firstEndPoint.dx, firstEndPoint.dy);
var secondEndPoint = Offset(size.width, size.height * 0.10);
var secondControlPoint = Offset(size.width * .75, size.height * .10 - 20);
path.quadraticBezierTo(secondControlPoint.dx, secondControlPoint.dy,
secondEndPoint.dx, secondEndPoint.dy);
path.lineTo(size.width, 0.0);
path.close();
return path;
}
@override
bool shouldReclip(CustomClipper oldClipper) => true;
}

@ -1,8 +1,10 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/models/patient_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign_req_model.dart';
import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/patients/patiant_info_model.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -30,62 +32,48 @@ class _VitalSignScreenState extends State<VitalSignScreen> {
"1",
];
var _isLoading = true;
var _hasError;
var _isInit = true;
@override
void didChangeDependencies() {
PatientsProvider getVitalSignList(context, PatientsProvider patientsProv) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
var patient = routeArgs['patient'];
print(patient);
// String patientType = routeArgs['selectedType'];
// print(patientType);
PatiantInformtion patient = routeArgs['patient'];
sharedPref.getString(TOKEN).then((token) {
print(token);
var model = {
"PatientID": patient['PatientID'],
"ProjectID": patient['ProjectID'],
"PatientTypeID": patient['PatientType'],
"InOutPatientType": 1,
"TransNo":patient['AdmissionNo'] !=null ? int.parse(patient['AdmissionNo']) : 0,
"LanguageID": 2,
"stamp": "2020-04-26T09:32:18.317Z",
"IPAdress": "11.11.11.11",
"VersionID": 1.2,
"Channel": 9,
"TokenID": token,
"SessionID": "E2bsEeYEJo",
"IsLoginForDoctorApp": true,
"PatientOutSA": false
};
if (_isInit) {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
patientsProv.getPatientVitalSign(model).then((res) {
print('wwww');
debugPrint("${res}");
setState(() {
_isLoading = false;
_hasError = res['ErrorEndUserMessage'];
});
print(res);
}).catchError((error) {
print(error);
});
}
_isInit = false;
VitalSignReqModel vitalSignReqModel = VitalSignReqModel(
patientID: patient.patientId,
projectID: patient.projectId,
tokenID: token,
patientTypeID: patient.patientType,
inOutpatientType: 1,
languageID: 2,
transNo:
patient.admissionNo != null ? int.parse(patient.admissionNo) : 0);
patientsProv.getPatientVitalSign(vitalSignReqModel.toJson());
return patientsProv;
});
super.didChangeDependencies();
}
@override
Widget build(BuildContext context) {
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
getVitalSignList(context, patientsProv);
return AppScaffold(
appBarTitle: "VITAL SIGN",
body: Container(
body: patientsProv.isLoading?DrAppCircularProgressIndeicator():patientsProv.isError
? Center(
child: Text(
patientsProv.error,
style: TextStyle(color: Theme.of(context).errorColor),
),
)
: patientsProv.patientVitalSignList.length == 0
? Center(
child: Text(
'You don\'t have any Schedule',
style: TextStyle(color: Theme.of(context).errorColor),
),
)
:Container(
child: Column(
children: litems.map((item) {
children: patientsProv.patientVitalSignList.map((item) {
return InkWell(
child: CardWithBgWidget(
line1Text: 'Fahad AlSlehm - 324599',

@ -6,8 +6,8 @@ import '../util/dr_app_toast_msg.dart';
import 'package:connectivity/connectivity.dart';
DrAppToastMsg toastMsg = DrAppToastMsg();
/*
*@author: Elham Rababah
*@Date:12/4/2020
@ -48,8 +48,7 @@ class Helpers {
children: items.map((item) {
return Text(
'${item["$decKey"]}',
style:
TextStyle(color: Theme.of(context).primaryColor, fontSize: 20),
style: TextStyle(fontSize: 20),
);
}).toList(),
@ -63,6 +62,13 @@ class Helpers {
);
}
/*
*@author: Elham Rababah
*@Date:12/4/2020
*@param: msg
*@return:
*@desc: showErrorToast
*/
showErrorToast([msg = null]) {
String localMsg = 'Something wrong happened, please contact the admin';
@ -80,9 +86,9 @@ class Helpers {
*@return: Boolean
*@desc: Check The Internet Connection
*/
static Future<bool> checkConnection() async {
static Future<bool> checkConnection() async {
ConnectivityResult connectivityResult =
await (Connectivity().checkConnectivity());
await (Connectivity().checkConnectivity());
if ((connectivityResult == ConnectivityResult.mobile) ||
(connectivityResult == ConnectivityResult.wifi)) {
return true;

@ -253,7 +253,7 @@ class _VerifyAccountState extends State<VerifyAccount> {
verifyAccountFormValue['digit3'] +
verifyAccountFormValue['digit4'];
print(activationCode);
print('${_loggedUser}');
Map model = {
"activationCode": activationCode,
"DoctorID": _loggedUser['DoctorID'],

@ -1,5 +1,5 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/models/patient_model.dart';
import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/widgets/shared/app_text_form_field.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';

@ -1,4 +1,7 @@
import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/screens/patients/patiant_info_model.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import './profile_general_info_content_widget.dart';
import '../../../config/size_config.dart';
@ -12,26 +15,28 @@ import '../../shared/rounded_container_widget.dart';
*@desc: Profile General Info Widget class
*/
class ProfileGeneralInfoWidget extends StatelessWidget {
const ProfileGeneralInfoWidget({
Key key,
}) : super(key: key);
ProfileGeneralInfoWidget({Key key, this.patient}) : super(key: key);
PatiantInformtion patient;
@override
Widget build(BuildContext context) {
// PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
// patient = patientsProv.getSelectedPatient();
return RoundedContainer(
child: ListView(
children: <Widget>[
ProfileGeneralInfoContentWidget(
title: "Age",
info: '55 Yr',
info: '${patient.age}',
),
ProfileGeneralInfoContentWidget(
title: "Contact Number",
info: '00 966 5000000000',
info: '${patient.mobileNumber}',
),
ProfileGeneralInfoContentWidget(
title: "Email",
info: 'Elham@yahoo.com',
info: '${patient.emailAddress}',
),
],
),
@ -39,4 +44,4 @@ class ProfileGeneralInfoWidget extends StatelessWidget {
height: SizeConfig.screenHeight * 0.25,
);
}
}
}

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/screens/patients/patiant_info_model.dart';
import 'package:flutter/material.dart';
import './Profile_general_info_Widget.dart';
@ -13,42 +14,48 @@ import './profile_status_info_widget.dart';
*@desc: Patient Profile Widget
*/
class PatientProfileWidget extends StatelessWidget {
Map patient = {
"ProjectID": 15,
"ClinicID": null,
"DoctorID": 70907,
"PatientID": 3315674,
"DoctorName": "MOQBIL ABDULLAH AL HODAITHY",
"DoctorNameN": null,
"FirstName": "WALEED",
"MiddleName": "ALI",
"LastName": "AL-YAZIDI",
"FirstNameN": null,
"MiddleNameN": null,
"LastNameN": null,
"Gender": 1,
"DateofBirth": "/Date(534286800000+0300)/",
"NationalityID": null,
"MobileNumber": "0500014559",
"EmailAddress": "unknown@unknown.com",
"PatientIdentificationNo": "1063236754",
"NationalityName": "Saudi",
"NationalityNameN": null,
"PatientStatusType": null,
"PatientType": 1,
"AppointmentDate": "/Date(1587848400000+0300)/",
"StartTime": "13:00:00",
"Age": "34 Yr",
"ClinicDescription": "INTERNAL MEDICINE CLINIC",
"GenderDescription": "Male",
"AdmissionDate": "/Date(1587848400000+0300)/",
"AdmissionNo": "2020008652"
};
// Map patient = {
// "ProjectID": 15,
// "ClinicID": null,
// "DoctorID": 70907,
// "PatientID": 3315674,
// "DoctorName": "MOQBIL ABDULLAH AL HODAITHY",
// "DoctorNameN": null,
// "FirstName": "WALEED",
// "MiddleName": "ALI",
// "LastName": "AL-YAZIDI",
// "FirstNameN": null,
// "MiddleNameN": null,
// "LastNameN": null,
// "Gender": 1,
// "DateofBirth": "/Date(534286800000+0300)/",
// "NationalityID": null,
// "MobileNumber": "0500014559",
// "EmailAddress": "unknown@unknown.com",
// "PatientIdentificationNo": "1063236754",
// "NationalityName": "Saudi",
// "NationalityNameN": null,
// "PatientStatusType": null,
// "PatientType": 1,
// "AppointmentDate": "/Date(1587848400000+0300)/",
// "StartTime": "13:00:00",
// "Age": "34 Yr",
// "ClinicDescription": "INTERNAL MEDICINE CLINIC",
// "GenderDescription": "Male",
// "AdmissionDate": "/Date(1587848400000+0300)/",
// "AdmissionNo": "2020008652"
// };
PatiantInformtion patient;
@override
Widget build(BuildContext context) {
final routeArgs =ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient'];
return ListView(padding: EdgeInsets.zero, children: <Widget>[
ProfileHeaderWidget(patient: patient),
ProfileGeneralInfoWidget(),
ProfileGeneralInfoWidget(patient: patient),
ProfileMedicalInfoWidget(patient: patient),
ProfileStatusInfoWidget()
]);

@ -1,5 +1,8 @@
import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/screens/patients/patiant_info_model.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
import '../../../config/size_config.dart';
import '../../shared/profile_image_widget.dart';
@ -12,25 +15,27 @@ import '../../shared/profile_image_widget.dart';
*@desc: Profile Header Widget class
*/
class ProfileHeaderWidget extends StatelessWidget {
const ProfileHeaderWidget({
ProfileHeaderWidget({
Key key,
this.patient
}) : super(key: key);
final patient;
PatiantInformtion patient;
@override
Widget build(BuildContext context) {
// PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
// patient = patientsProv.getSelectedPatient();
return Container(
height: SizeConfig.heightMultiplier * 30,
child: ProfileImageWidget(
url:
"http://images4.fanpop.com/image/photos/16200000/David-Schwimmer-Ross-Geller-ross-geller-16258927-629-779.jpg",
name: patient['FirstName']+' '+patient['LastName'] ,
des: patient['FirstName'],
name: patient.firstName + ' ' + patient.lastName,
des: patient.patientId.toString(),
height: SizeConfig.heightMultiplier * 17,
width: SizeConfig.heightMultiplier * 17,
color: Hexcolor('#58434F')),
);
}
}

@ -1,4 +1,5 @@
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/screens/patients/patiant_info_model.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
@ -15,7 +16,7 @@ import '../../shared/rounded_container_widget.dart';
*/
class ProfileMedicalInfoWidget extends StatelessWidget {
ProfileMedicalInfoWidget({Key key, this.patient}) : super(key: key);
Map patient;
PatiantInformtion patient;
@override
Widget build(BuildContext context) {
String url = "assets/images/";

Loading…
Cancel
Save