Conflicts:
	lib/routes.dart
	lib/screens/patients/patients_screen.dart
merge-requests/32/head
her_username 5 years ago
commit 84ebdb98ea

@ -3,3 +3,7 @@ const BASE_URL = 'https://hmgwebservices.com/Services/';
const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z]";
const ONLY_DATE = "[0-9/]";
//*********change value to decode json from Dropdown ************
var SERVICES_PATIANT = ["GetMyOutPatient", "GetMyInPatient", "GtMyDischargePatient","GtMyReferredPatient","GtMyDischargeReferralPatient","GtMyTomorrowPatient","GtMyReferralPatient"];
var SERVICES_PATIANT2 = ["List_MyOutPatient", "List_MyInPatient", "List_MyReferredPatient","List_MyReferredPatient","List_MyDischargeReferredPatient","List_MyTomorrowPatient","List_MyReferralPatient"];
//******************

@ -1,11 +1,16 @@
const PATIENT_TYPE = const [
{"text": "outPatiant", "val": "1"},
{"text": "Tomorrow Patient", "val": "2"},
{"text": "outPatiant", "val": "0"},
{"text": "InPatiant", "val": "1"},
{"text": "Discharge", "val": "2"},
{"text": "Referrd", "val": "3"},
{"text": "Discharge", "val": "4"},
{"text": "InPatiant", "val": "5"},
{"text": "Referral Discharge", "val": "6"},
{"text": "Referral Discharge", "val": "4"},
{"text": "Tomorrow Patient", "val": "5"},
{"text": "Referral", "val": "6"},
];

@ -25,6 +25,9 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider.value(value: ProjectsProvider()),
],
child: MaterialApp(
//******amjad*****To remove debug app*******************
showSemanticsDebugger: false,
//********************************
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,

@ -20,6 +20,17 @@ class PatientModel {
bool IsLoginForDoctorApp;
bool PatientOutSA;
getFirstName() {
return this.FirstName;
}
setFirstName( FirstName) {
this.FirstName = FirstName;
}
PatientModel(
{this.ProjectID,
this.ClinicID,
@ -41,4 +52,14 @@ class PatientModel {
this.SessionID,
this.IsLoginForDoctorApp,
this.PatientOutSA});
factory PatientModel.fromJson(Map<String, dynamic> json) => PatientModel(
FirstName: json["FirstName"],
LastName: json["LasttName"],
);
}
//***************************

@ -8,13 +8,21 @@ 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';
class PatientsProvider with ChangeNotifier {
Client client =
HttpClientWithInterceptor.build(interceptors: [HttpInterceptor()]);
Future<Map> getPatientList(PatientModel patient, patientType) async {
const url =
BASE_URL+'DoctorApplication.svc/REST/GetMyInPatient';
/* const url =
BASE_URL+'DoctorApplication.svc/REST/GetMyInPatient';*/
// var srvicePatiant = ["GetMyOutPatient", "GetMyInPatient", "GtMyDischargePatient","GtMyReferredPatient","GtMyDischargeReferralPatient","GtMyTomorrowPatient","GtMyReferralPatient"];
// print("a=SERVICES_PATIANT[patientType]========='=======a");
int val = int.parse(patientType);
final url =
BASE_URL + 'DoctorApplication.svc/REST/' + SERVICES_PATIANT[val];
// print("a===========$url=======a");
try {
final response = await client.post(url,
body: json.encode({
@ -39,6 +47,26 @@ class PatientsProvider with ChangeNotifier {
"IsLoginForDoctorApp": patient.IsLoginForDoctorApp,
"PatientOutSA": patient.PatientOutSA
}));
//**********************
//***********************
return Future.value(json.decode(response.body));
} catch (error) {
throw error;
}
}
/*
*@author: Elham Rababah
*@Date:27/4/2020
*@param:
*@return:Future
*@desc: getPatientVitalSign
*/
Future<Map> getPatientVitalSign(patient) async {
try {
final response =
await client.post(GET_PATIENT_VITAL_SIGN, body: json.encode(patient));
return Future.value(json.decode(response.body));
} catch (error) {
throw error;

@ -12,17 +12,17 @@ import './screens/my_schedule_screen.dart';
import './screens/patients/patient_profile_screen.dart';
import './screens/patients/patient_search_screen.dart';
import './screens/patients/patients_screen.dart';
import './screens/patients/profile/vital_sign/vital_sign_screen.dart';
import './screens/profile_screen.dart';
import './screens/settings/settings_screen.dart';
const String INIT_ROUTE = HOME;
const String INIT_ROUTE = LOGIN; //PATIENT_SEARCH;
const String HOME = '/';
const String LOGIN = 'login';
const String PROFILE = 'profile';
const String CHANGE_PASSWORD = 'change-password';
const String VERIFY_ACCOUNT = 'verify-account';
const String VERIFICATION_METHODS ='verification-methods';
const String VERIFICATION_METHODS = 'verification-methods';
const String MY_SCHEDULE = 'my-schedule';
const String QR_READER = 'qr-reader';
const String PATIENT_SEARCH = 'patients/patient-search';
@ -32,6 +32,7 @@ const String BLOOD_BANK = 'blood-bank';
const String DOCTOR_REPLY = 'doctor-reply';
const String MEDICINE_SEARCH = 'medicine-search';
const String SETTINGS = 'settings';
const String VITAL_SIGN = 'vital-sign';
var routes = {
HOME: (_) => DashboardScreen(),
@ -47,6 +48,7 @@ var routes = {
SETTINGS: (_) => SettingsScreen(),
CHANGE_PASSWORD: (_) => ChangePasswordScreen(),
VERIFY_ACCOUNT: (_) => VerifyAccountScreen(),
VERIFICATION_METHODS:(_)=> VerificationMethodsScreen(),
PATIENTS_PROFILE:(_)=> PatientProfileScreen()
VERIFICATION_METHODS: (_) => VerificationMethodsScreen(),
PATIENTS_PROFILE: (_) => PatientProfileScreen(),
VITAL_SIGN: (_) => VitalSignScreen()
};

@ -0,0 +1,31 @@
/*
*@author: Amjad Amireh
*@Date:27/4/2020
*@param:
*@return:pass a List<dynamic> to a List<MyModel> from a JSON
*@desc:
*/
import 'package:doctor_app_flutter/screens/patients/patiant_info_model.dart';
class TopTenUsersModelResponse {
final List<PatiantInformtion> list;
String firstName;
TopTenUsersModelResponse({
this.list,
this.firstName,
});
factory TopTenUsersModelResponse.fromJson(List<dynamic> parsedJson) {
// List<PatientModel> list = new List<PatientModel>();
List<PatiantInformtion> list = new List<PatiantInformtion>();
//PatiantInformtion
list = parsedJson.map((i) => PatiantInformtion.fromJson(i)).toList();
return new TopTenUsersModelResponse(list: list);
}
}
class PatiantInformtionl {
}

@ -0,0 +1,131 @@
import 'dart:convert';
//PatiantInformtion patiantInformtionFromJson(String str) => PatiantInformtion.fromJson(json.decode(str));
////String patiantInformtionToJson(PatiantInformtion data) => json.encode(data.toJson());
//****************************** */
/*
*@author: Amjad Amireh
*@Date:27/4/2020
*@param:
*@return:Patian information Model
*@desc:
*/
class PatiantInformtion {
final List<PatiantInformtion> list;
int projectId;
int clinicId;
int doctorId;
int patientId;
String doctorName;
String doctorNameN;
String firstName;
String middleName;
String lastName;
String firstNameN;
String middleNameN;
String lastNameN;
int gender;
String dateofBirth;
String nationalityId;
String mobileNumber;
String emailAddress;
String patientIdentificationNo;
int patientType;
String admissionNo;
String admissionDate;
String roomId;
String bedId;
String nursingStationId;
String description;
String clinicDescription;
String clinicDescriptionN;
String nationalityName;
String nationalityNameN;
String age;
String genderDescription;
String nursingStationName;
PatiantInformtion({
this.list,
this.projectId,
this.clinicId,
this.doctorId,
this.patientId,
this.doctorName,
this.doctorNameN,
this.firstName,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.gender,
this.dateofBirth,
this.nationalityId,
this.mobileNumber,
this.emailAddress,
this.patientIdentificationNo,
this.patientType,
this.admissionNo,
this.admissionDate,
this.roomId,
this.bedId,
this.nursingStationId,
this.description,
this.clinicDescription,
this.clinicDescriptionN,
this.nationalityName,
this.nationalityNameN,
this.age,
this.genderDescription,
this.nursingStationName,
});
factory PatiantInformtion.fromJson(Map<String, dynamic> json) => PatiantInformtion(
projectId: json["ProjectID"],
clinicId: json["ClinicID"],
doctorId: json["DoctorID"],
patientId: json["PatientID"],
doctorName: json["DoctorName"],
doctorNameN: json["DoctorNameN"],
firstName: json["FirstName"],
middleName: json["MiddleName"],
lastName: json["LastName"],
firstNameN: json["FirstNameN"],
middleNameN: json["MiddleNameN"],
lastNameN: json["LastNameN"],
gender: json["Gender"],
dateofBirth: json["DateofBirth"],
nationalityId: json["NationalityID"],
mobileNumber: json["MobileNumber"],
emailAddress: json["EmailAddress"],
patientIdentificationNo: json["PatientIdentificationNo"],
patientType: json["PatientType"],
admissionNo: json["AdmissionNo"],
admissionDate: json["AdmissionDate"],
roomId: json["RoomID"],
bedId: json["BedID"],
nursingStationId: json["NursingStationID"],
description: json["Description"],
clinicDescription: json["ClinicDescription"],
clinicDescriptionN: json["ClinicDescriptionN"],
nationalityName: json["NationalityName"],
nationalityNameN: json["NationalityNameN"],
age: json["Age"],
genderDescription: json["GenderDescription"],
nursingStationName: json["NursingStationName"],
);
}

@ -63,13 +63,13 @@ class _PatientSearchScreenState extends State<PatientSearchScreen> {
if (_formKey.currentState.validate()) {
// If all data are correct then save data to out variables
_formKey.currentState.save();
// _formKey.currentState.save();
sharedPref.getString(TOKEN).then((token) {
print(token+"EEEEEE");
_patientSearchFormValues.TokenID = token;
_patientSearchFormValues.ProjectID= 15;
print(_patientSearchFormValues.PatientMobileNumber+"dfdfdfddf");
// print(_patientSearchFormValues.PatientMobileNumber+"dfdfdfddf");
Navigator.of(context).pushNamed(PATIENTS, arguments: {
"patientSearchForm": _patientSearchFormValues,
"selectedType": _selectedType

@ -20,7 +20,6 @@ class _PatientsListScreenState extends State<PatientsListScreen> {
String patientType = routeArgs['selectedType'];
print(patientType);
if (_isInit) {
// setState(() {});
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
patientsProv.getPatientList(patient, patientType).then((res) {
// print('MessageStatus${res['MessageStatus']}');
@ -62,3 +61,6 @@ class _PatientsListScreenState extends State<PatientsListScreen> {
);
}
}
/*
{ProjectID: 15, ClinicID: null, DoctorID: 4709, PatientID: 1288076, DoctorName: SHAZIA MAQSOOD, DoctorNameN: null, FirstName: LAMA, MiddleName: ABDULLAH, LastName: AL-SALOOM, FirstNameN: null, MiddleNameN: null, LastNameN: null, Gender: 2, DateofBirth: /Date(522363600000+0300)/, NationalityID: null, MobileNumber: 0543133371, EmailAddress: Lala_as@hotmail.com, PatientIdentificationNo: 1040451369, PatientType: 1, AdmissionNo: 2020008493, AdmissionDate: /Date(1587589200000+0300)/, RoomID: 119, BedID: 119, NursingStationID: null, Description: null, ClinicDescription: OB-GYNE, ClinicDescriptionN: null, NationalityName: Saudi, NationalityNameN: null, Age: 34 Yr, GenderDescription: Female, NursingStationName: Post Natal Ward A2}
*/

@ -1,61 +1,171 @@
import 'package:doctor_app_flutter/config/size_config.dart';
/*
*@author: Amjad Amireh Merge to Elham rababah
*@Date:27/4/2020
*@param:
*@return:PatientsScreen
*@desc:
*/
import 'package:doctor_app_flutter/models/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';
import 'package:doctor_app_flutter/screens/patients/patiant_info_model.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
//*************
import '../../config/size_config.dart';
import 'package:hexcolor/hexcolor.dart';
//********
import '../../widgets/shared/app_scaffold_widget.dart';
import '../../widgets/shared/card_with_bg_widget.dart';
class PatientsScreen extends StatelessWidget {
List<String> litems = [
"1",
"1",
"1",
];
import 'package:doctor_app_flutter/config/config.dart';
class PatientsScreen extends StatefulWidget {
@override
_PatientsScreenState createState() => _PatientsScreenState();
}
class _PatientsScreenState extends State<PatientsScreen> {
List<dynamic> litems;
//*******************
List<PatiantInformtion> responseModelList;
//List<PatiantInformtion<dynamic>> litems2;
//*******************
bool _isInit = true;
var _isLoading = true;
var _hasError;
//*******Amjad add to search box******
final _controller = TextEditingController();
//**************
PatientModel patient;
@override
void didChangeDependencies() {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
//PatientModel patient = routeArgs['patientSearchForm'];
patient = routeArgs['patientSearchForm'];
//PatiantInformtion patiantInfo = routeArgs['patientSearchForm'];
print(patient.TokenID+"EEEEEE");
String patientType = routeArgs['selectedType'];
print("**************patiant Type**************");
print(patientType);
print("**************test**************");
if (_isInit) {
// setState(() {});
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
patientsProv.getPatientList(patient, patientType).then((res) {
// print('MessageStatus${res['MessageStatus']}');
print('List_MyInPatient${(res['List_MyInPatient'])}');
setState(() {
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;
//********************
_isLoading = false;
_hasError = res['ErrorEndUserMessage'];
});
print(res);
}).catchError((error) {
print(error);
});
}
_isInit = false;
super.didChangeDependencies();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: 'Patients',
body: Container(
child: Column(
children: litems.map((item) {
return InkWell(
child: CardWithBgWidget(
widget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text('Fahad AlSlehm - 324599', style: textStyle(2.5)),
SizedBox(
height: 8,
),
Text('12/04/2020 - 02:00 PM', style: textStyle(2.5)),
SizedBox(
height: 8,
),
Row(
children: <Widget>[
Icon(Icons.pin_drop),
Text("line3Text", style: textStyle(2.5))
],
)
],
),
),
onTap: () {
Navigator.of(context).pushNamed(PATIENTS_PROFILE);
},
);
}).toList(),
//***********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())
],
),
),
),
],
))
);
}
TextStyle textStyle(size, [FontWeight weight]) {
return TextStyle(
fontSize: size * SizeConfig.textMultiplier, fontWeight: weight);
//***********amjad update*************
InputDecoration buildInputDecoration(BuildContext context, hint) {
return InputDecoration(
prefixIcon:Icon(Icons.search,color: Colors.red),
filled: true,
fillColor: Colors.white,
//Image.asset(asset),
/* icon: Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(Icons.search),
),*/
hintText: hint,
hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(20)),
borderSide: BorderSide(color: Hexcolor('#CCCCCC')),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Theme.of(context).primaryColor),
));
}
//*************
}
//***********************
class CustomShapeClipper extends CustomClipper<Path> {
@override

@ -0,0 +1,104 @@
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
import 'package:doctor_app_flutter/models/patient_model.dart';
import 'package:doctor_app_flutter/providers/patients_provider.dart';
import 'package:doctor_app_flutter/routes.dart';
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../../widgets/shared/app_scaffold_widget.dart';
import '../../../../widgets/shared/card_with_bg_widget.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
/*
*@author: Elham Rababah
*@Date:26/4/2020
*@param:
*@return:VitalSignScreen
*@desc: VitalSignScreen class
*/
class VitalSignScreen extends StatefulWidget {
@override
_VitalSignScreenState createState() => _VitalSignScreenState();
}
class _VitalSignScreenState extends State<VitalSignScreen> {
List<String> litems = [
"1",
"1",
"1",
];
var _isLoading = true;
var _hasError;
var _isInit = true;
@override
void didChangeDependencies() {
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
var patient = routeArgs['patient'];
print(patient);
// String patientType = routeArgs['selectedType'];
// print(patientType);
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;
});
super.didChangeDependencies();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: "VITAL SIGN",
body: Container(
child: Column(
children: litems.map((item) {
return InkWell(
child: CardWithBgWidget(
line1Text: 'Fahad AlSlehm - 324599',
line2Text: '12/04/2020 - 02:00 PM',
heightPercentage: 0.15,
widthPercentage: 0.80),
onTap: () {
Navigator.of(context).pushNamed(VITAL_SIGN);
},
);
}).toList(),
),
),
);
}
}

@ -13,12 +13,43 @@ 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"
};
@override
Widget build(BuildContext context) {
return ListView(padding: EdgeInsets.zero, children: <Widget>[
ProfileHeaderWidget(),
ProfileHeaderWidget(patient: patient),
ProfileGeneralInfoWidget(),
ProfileMedicalInfoWidget(),
ProfileMedicalInfoWidget(patient: patient),
ProfileStatusInfoWidget()
]);
}

@ -14,7 +14,9 @@ import '../../shared/profile_image_widget.dart';
class ProfileHeaderWidget extends StatelessWidget {
const ProfileHeaderWidget({
Key key,
this.patient
}) : super(key: key);
final patient;
@override
Widget build(BuildContext context) {
@ -23,8 +25,8 @@ class ProfileHeaderWidget extends StatelessWidget {
child: ProfileImageWidget(
url:
"http://images4.fanpop.com/image/photos/16200000/David-Schwimmer-Ross-Geller-ross-geller-16258927-629-779.jpg",
name: "Fahad AlSlehm",
des: "324599",
name: patient['FirstName']+' '+patient['LastName'] ,
des: patient['FirstName'],
height: SizeConfig.heightMultiplier * 17,
width: SizeConfig.heightMultiplier * 17,
color: Hexcolor('#58434F')),

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/routes.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
@ -5,7 +6,6 @@ import '../../../config/size_config.dart';
import '../../shared/app_texts_widget.dart';
import '../../shared/rounded_container_widget.dart';
/*
*@author: Elham Rababah
*@Date:22/4/2020
@ -14,14 +14,12 @@ import '../../shared/rounded_container_widget.dart';
*@desc: Profile Medical Info Widget
*/
class ProfileMedicalInfoWidget extends StatelessWidget {
const ProfileMedicalInfoWidget({
Key key,
}) : super(key: key);
ProfileMedicalInfoWidget({Key key, this.patient}) : super(key: key);
Map patient;
@override
Widget build(BuildContext context) {
String url = "assets/images/";
final double contWidth = SizeConfig.screenWidth * 0.70;
final double contWidth = SizeConfig.realScreenWidth * 0.70;
final double contHeight = SizeConfig.screenHeight * 0.30;
return RoundedContainer(
@ -44,11 +42,16 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
CircleAvatarWidget(
des: 'Vital Sign',
url: url + 'heartbeat.png',
width: (contWidth) / 3.5,
height: (contWidth) / 3.5,
InkWell(
onTap: () {
navigator(context,VITAL_SIGN);
},
child: CircleAvatarWidget(
des: 'Vital Sign',
url: url + 'heartbeat.png',
width: (contWidth) / 3.5,
height: (contWidth) / 3.5,
),
),
CircleAvatarWidget(
des: 'Lab Result',
@ -79,6 +82,11 @@ class ProfileMedicalInfoWidget extends StatelessWidget {
height: contHeight,
);
}
void navigator(BuildContext context,route) {
Navigator.of(context).pushNamed(VITAL_SIGN,
arguments: {'patient': patient});
}
}
class CircleAvatarWidget extends StatelessWidget {
@ -106,7 +114,7 @@ class CircleAvatarWidget extends StatelessWidget {
decoration: new BoxDecoration(
// color: Colors.green, // border color
shape: BoxShape.circle,
border: Border.all(color: Hexcolor('#B7831A'),width: 1.5)),
border: Border.all(color: Hexcolor('#B7831A'), width: 1.5)),
child: CircleAvatar(
radius: SizeConfig.imageSizeMultiplier * 12,
child: Image.asset(url),

@ -3,9 +3,9 @@ import 'package:hexcolor/hexcolor.dart';
import '../../config/size_config.dart';
import '../../presentation/doctor_app_icons.dart';
import '../../screens/patients/patients_screen.dart';
import '../../widgets/shared/app_drawer_widget.dart';
import '../../widgets/shared/app_loader_widget.dart';
import '../../widgets/shared/custom_shape_clipper.dart';
class AppScaffold extends StatelessWidget {
bool pageOnly = false;

Loading…
Cancel
Save