AppBar Design update&Design Fixes

merge-requests/410/head
hussam al-habibeh 4 years ago
parent b1ec91b20a
commit 5342d26c86

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/patient_profile_screen.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -73,6 +74,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
builder:
(BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold(
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patient.patientType.toString(), patient.arrivedOn),
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(),
body: NetworkBaseView(
@ -82,8 +85,8 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
child: Container(
child: Column(
children: [
PatientProfileHeaderNewDesign(patient,
patient.patientType.toString(), patient.arrivedOn),
// PatientProfileHeaderNewDesign(patient,
// patient.patientType.toString(), patient.arrivedOn),
model.medicalFileList.length != 0 &&
model
.medicalFileList[0]
@ -488,28 +491,62 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
FontWeight
.w700,
),
AppText(
model
.medicalFileList[
0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstAssessments[
index]
.condition
.trim(),
Expanded(
child: AppText(
model
.medicalFileList[
0]
.entityList[
0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstAssessments[
index]
.condition
.trim(),
),
),
],
),
Row(
children: [
Expanded(
child: AppText(
model
.medicalFileList[
0]
.entityList[
0]
.timelines[
encounterNumber]
.timeLineEvents[
0]
.consulations[
0]
.lstAssessments[
index]
.description,
fontWeight:
FontWeight
.w700,
),
)
],
),
Row(
children: [
AppText(
model
'Type: ',
fontWeight:
FontWeight
.w700,
),
Expanded(
child: AppText(model
.medicalFileList[
0]
.entityList[0]
@ -521,22 +558,16 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
0]
.lstAssessments[
index]
.description,
fontWeight:
FontWeight
.w700,
)
.type),
),
],
),
Row(
children: [
AppText(
'Type: ',
fontWeight:
FontWeight
.w700,
),
AppText(model
SizedBox(
height: 15.0,
),
Expanded(
child: AppText(
model
.medicalFileList[
0]
.entityList[0]
@ -547,25 +578,9 @@ class _MedicalFileDetailsState extends State<MedicalFileDetails> {
.consulations[0]
.lstAssessments[
index]
.type),
],
),
SizedBox(
height: 15.0,
),
AppText(
model
.medicalFileList[
0]
.entityList[0]
.timelines[
encounterNumber]
.timeLineEvents[0]
.consulations[0]
.lstAssessments[
index]
.remarks
.trim(),
.remarks
.trim(),
),
),
Divider(
height: 1,

@ -10,9 +10,12 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
@ -36,6 +39,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
builder:
(BuildContext context, MedicalFileViewModel model, Widget child) =>
AppScaffold(
appBar: PatientProfileHeaderNewDesignAppBar(
patient, patientType.toString() ?? "0", patientType),
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).medicalReport.toUpperCase(),
body: NetworkBaseView(
@ -48,8 +53,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
// ? MainAxisAlignment.start
// : MainAxisAlignment.center,
children: [
PatientProfileHeaderNewDesign(
patient, patient.patientType.toString(), arrivalType),
// PatientProfileHeaderNewDesign(
// patient, patient.patientType.toString(), arrivalType),
Padding(
padding:
EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0),
@ -92,181 +97,215 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
itemCount: model.medicalFileList[0].entityList[0]
.timelines.length,
itemBuilder: (BuildContext ctxt, int index) {
return Padding(
padding: EdgeInsets.symmetric(
horizontal: 12.0, vertical: 8.0),
child: InkWell(
child: Container(
width: double.infinity,
margin: EdgeInsets.only(
top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(
color: Colors.grey[200], width: 0.5),
),
child: Column(
children: [
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName,
fontWeight: FontWeight.w700,
fontSize: 17.0,
fontFamily: 'Poppins',
)
],
),
Row(
children: [
AppText(
Helpers.convertStringToDate(model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.date)
.day
.toString() +
"/",
),
AppText(
Helpers.convertStringToDate(model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.date)
.month
.toString() +
"/",
),
AppText(
Helpers.convertStringToDate(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.date)
.year
.toString(),
),
],
)
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
ClipRRect(
borderRadius:
BorderRadius.all(
Radius.circular(30)),
child: Image.network(
'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg',
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
],
),
),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
TranslationBase.of(context)
.clinic +
": ",
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName,
fontWeight: FontWeight.w600,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
AppText(
TranslationBase.of(context)
.branch +
": ",
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.projectName,
fontWeight: FontWeight.w600,
),
],
),
],
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.end,
children: [
Column(
children: [
Icon(
Icons.remove_red_eye,
size: 30.0,
)
],
)
],
),
],
),
return InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => MedicalFileDetails(
age: patient.age,
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
patient: patient,
)),
);
},
child: DoctorCard(
doctorName: model.medicalFileList[0]
.entityList[0].timelines[index].doctorName,
clinic: model.medicalFileList[0].entityList[0]
.timelines[index].clinicName,
branch: model.medicalFileList[0].entityList[0]
.timelines[index].projectName,
profileUrl:
'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg',
appointmentDate:
DateUtils.getDateTimeFromServerFormat(
model.medicalFileList[0].entityList[0]
.timelines[index].date,
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
MedicalFileDetails(
age: patient.age,
firstName: patient.firstName,
lastName: patient.lastName,
gender: patient.genderDescription,
encounterNumber: index,
pp: patient.patientId,
patient: patient,
)),
);
},
isPrescriptions: true,
),
);
// return Padding(
// padding: EdgeInsets.symmetric(
// horizontal: 12.0, vertical: 8.0),
// child: InkWell(
// child: Container(
// width: double.infinity,
// margin: EdgeInsets.only(
// top: 10, left: 10, right: 10),
// padding: EdgeInsets.all(8.0),
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.all(
// Radius.circular(10.0),
// ),
// border: Border.all(
// color: Colors.grey[200], width: 0.5),
// ),
// child: Column(
// children: [
// Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceBetween,
// children: [
// Row(
// children: [
// AppText(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .doctorName,
// fontWeight: FontWeight.w700,
// fontSize: 17.0,
// fontFamily: 'Poppins',
// )
// ],
// ),
// Row(
// children: [
// AppText(
// Helpers.convertStringToDate(model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .date)
// .day
// .toString() +
// "/",
// ),
// AppText(
// Helpers.convertStringToDate(model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .date)
// .month
// .toString() +
// "/",
// ),
// AppText(
// Helpers.convertStringToDate(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .date)
// .year
// .toString(),
// ),
// ],
// )
// ],
// ),
// Row(
// mainAxisAlignment:
// MainAxisAlignment.start,
// children: [
// Padding(
// padding: const EdgeInsets.all(8.0),
// child: Column(
// children: [
// ClipRRect(
// borderRadius:
// BorderRadius.all(
// Radius.circular(30)),
// child: Image.network(
// 'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg',
// fit: BoxFit.cover,
// width: 60,
// height: 70,
// ),
// ),
// ],
// ),
// ),
// Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Row(
// children: [
// AppText(
// TranslationBase.of(context)
// .clinic +
// ": ",
// ),
// AppText(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .clinicName,
// fontWeight: FontWeight.w600,
// ),
// ],
// ),
// Row(
// mainAxisAlignment:
// MainAxisAlignment
// .spaceBetween,
// children: [
// AppText(
// TranslationBase.of(context)
// .branch +
// ": ",
// ),
// AppText(
// model
// .medicalFileList[0]
// .entityList[0]
// .timelines[index]
// .projectName,
// fontWeight: FontWeight.w600,
// ),
// ],
// ),
// ],
// ),
// ],
// ),
// Row(
// mainAxisAlignment:
// MainAxisAlignment.end,
// children: [
// Column(
// children: [
// Icon(
// Icons.remove_red_eye,
// size: 30.0,
// )
// ],
// )
// ],
// ),
// ],
// ),
// ),
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// MedicalFileDetails(
// age: patient.age,
// firstName: patient.firstName,
// lastName: patient.lastName,
// gender: patient.genderDescription,
// encounterNumber: index,
// pp: patient.patientId,
// patient: patient,
// )),
// );
// },
// ),
// );
})
: Column(
children: [

@ -25,7 +25,10 @@ class AppScaffold extends StatelessWidget {
this.body,
this.isLoading = false,
this.isShowAppBar = true,
this.baseViewModel, this.bottomSheet, this.backgroundColor, this.appBar});
this.baseViewModel,
this.bottomSheet,
this.backgroundColor,
this.appBar});
@override
Widget build(BuildContext context) {
@ -36,30 +39,35 @@ class AppScaffold extends StatelessWidget {
FocusScope.of(context).requestFocus(new FocusNode());
},
child: Scaffold(
backgroundColor: backgroundColor??Colors.white,
backgroundColor: backgroundColor ?? Colors.white,
appBar: isShowAppBar
? appBar ?? AppBar(
elevation: 0,
backgroundColor: HexColor('#515B5D'),
textTheme: TextTheme(headline6: TextStyle(color: Colors.white)),
title: Text(appBarTitle.toUpperCase()),
leading: Builder(builder: (BuildContext context) {
return IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Colors.white, //Colors.black,
onPressed: () => Navigator.pop(context),
);
}),
centerTitle: true,
actions: <Widget>[
IconButton(
icon: Icon(DoctorApp.home_icon_active),
color: Colors.white, //Colors.black,
onPressed: () => Navigator.pushNamedAndRemoveUntil(
context, HOME, (r) => false),
),
],
)
? appBar ??
AppBar(
elevation: 0,
backgroundColor: Colors.white, //HexColor('#515B5D'),
textTheme: TextTheme(
headline6: TextStyle(
color: Colors.black87,
fontSize: 16.8,
)),
title: Text(appBarTitle.toUpperCase()),
leading: Builder(builder: (BuildContext context) {
return IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
);
}),
centerTitle: true,
actions: <Widget>[
IconButton(
icon: Icon(DoctorApp.home_icon_active),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pushNamedAndRemoveUntil(
context, HOME, (r) => false),
),
],
)
: null,
bottomSheet: bottomSheet,
body: projectProvider.isInternetConnection

Loading…
Cancel
Save