TextField & page header design fix

doctor-app-design
hussam al-habibeh 4 years ago
parent fca6990938
commit a4aa695f25

@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/core/viewModel/LiveCarePatientViewModel.dart'
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart';
import 'package:doctor_app_flutter/util/NotificationPermissionUtils.dart'; import 'package:doctor_app_flutter/util/NotificationPermissionUtils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient_card/PatientCard.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_card/PatientCard.dart';
@ -60,7 +61,10 @@ class _LiveCarePatientScreenState extends State<LiveCarePatientScreen> {
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: true,
appBar: PatientSearchHeader(
title: "LiveCare Patients",
),
body: Column( body: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -69,25 +73,7 @@ class _LiveCarePatientScreenState extends State<LiveCarePatientScreen> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
child: Container( child: Container(),
padding: EdgeInsets.only(left: 10, right: 10, bottom: 10),
margin: EdgeInsets.only(top: 50),
child: Row(children: [
IconButton(
icon: Icon(Icons.arrow_back_ios),
color: Colors.black, //Colors.black,
onPressed: () => Navigator.pop(context),
),
Expanded(
child: AppText(
"LiveCare Patients",
fontSize: SizeConfig.textMultiplier * 2.8,
fontWeight: FontWeight.bold,
color: Color(0xFF2B353E),
),
),
]),
),
), ),
SizedBox( SizedBox(
height: 20, height: 20,

@ -138,7 +138,9 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
width: SizeConfig.getTextMultiplierBasedOnWidth() * 20, width: SizeConfig.getTextMultiplierBasedOnWidth() * 20,
height: SizeConfig.getTextMultiplierBasedOnWidth() * 20, height: SizeConfig.getTextMultiplierBasedOnWidth() * 20,
child: Image.asset( child: Image.asset(
gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png', gender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
@ -175,7 +177,10 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
3.5, 3.5,
), ),
patient.startTime != null patient.startTime != null
? AppText(patient.startTime != null ? patient.startTime : '', ? AppText(
patient.startTime != null
? patient.startTime
: '',
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: SizeConfig fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() * .getTextMultiplierBasedOnWidth() *
@ -303,7 +308,9 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
width: 30, width: 30,
height: 30, height: 30,
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: projectViewModel.isArabic ? 10 : 85, right: projectViewModel.isArabic ? 85 : 10, top: 5), left: projectViewModel.isArabic ? 10 : 85,
right: projectViewModel.isArabic ? 85 : 10,
top: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border( border: Border(
@ -350,7 +357,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
), ),
if (invoiceNO != null && !isPrescriptions) if (invoiceNO != null && !isPrescriptions)
HeaderRow( HeaderRow(
label: 'Invoice: ', label: 'Invoice: ',
value: invoiceNO ?? "", value: invoiceNO ?? "",
), ),
if (branch != null) if (branch != null)
@ -380,8 +387,8 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
: 'Prescriptions Date ', : 'Prescriptions Date ',
value: value:
'${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', '${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',
), ),
]), ]),
), ),
), ),
], ],

@ -88,8 +88,11 @@ class _AppDrawerState extends State<AppDrawer> {
padding: EdgeInsets.only(top: 8.0), padding: EdgeInsets.only(top: 8.0),
child: AppText( child: AppText(
TranslationBase.of(context).dr + TranslationBase.of(context).dr +
authenticationViewModel capitalizeOnlyFirstLater(
.doctorProfile?.doctorName, authenticationViewModel
.doctorProfile.doctorName
.replaceAll("DR.", "")
.toLowerCase()),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -257,3 +260,9 @@ class _AppDrawerState extends State<AppDrawer> {
Navigator.of(context).pushNamed(routeName); Navigator.of(context).pushNamed(routeName);
} }
} }
String capitalizeOnlyFirstLater(String text) {
if (text.trim().isEmpty) return "";
return "${text[0].toUpperCase()}${text.substring(1)}";
}

@ -96,7 +96,7 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
Container( Container(
height: widget.height != 0 && widget.maxLines == 1 height: widget.height != 0 && widget.maxLines == 1
? widget.height + 8 ? widget.height + 8
: null, : MediaQuery.of(context).size.height * 0.098,
decoration: widget.hasBorder decoration: widget.hasBorder
? TextFieldsUtils.containerBorderDecoration( ? TextFieldsUtils.containerBorderDecoration(
Color(0Xffffffff), Color(0Xffffffff),
@ -106,7 +106,7 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
) )
: null, : null,
padding: padding:
EdgeInsets.only(top: 4.0, bottom: 4.0, left: 8.0, right: 8.0), EdgeInsets.only(top: 4.0, bottom: 0.0, left: 8.0, right: 8.0),
child: InkWell( child: InkWell(
onTap: widget.onClick ?? null, onTap: widget.onClick ?? null,
child: Row( child: Row(
@ -123,28 +123,29 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
if ((widget.controller != null && // if ((widget.controller != null &&
widget.controller.text != "") || // widget.controller.text != "") ||
widget.dropDownText != null) // widget.dropDownText != null)
AppText( AppText(
widget.hintText, widget.hintText,
// marginTop: widget.hasHintmargin ? 0 : 30, // marginTop: widget.hasHintmargin ? 0 : 30,
color: Color(0xFF2E303A), color: Color(0xFF2E303A),
fontSize: widget.isPrscription == false fontSize: widget.isPrscription == false
? 11.0 ? 11.0
// SizeConfig.getHeightMultiplier() * // SizeConfig.getHeightMultiplier() *
// (SizeConfig.isWidthLarge ? 1.1 : 1.3) // (SizeConfig.isWidthLarge ? 1.1 : 1.3)
: 0, : 0,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.44, letterSpacing: -0.44,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
widget.dropDownText == null widget.dropDownText == null
? Container( ? Container(
height: height:
widget.height != 0 && widget.maxLines == 1 widget.height != 0 && widget.maxLines == 1
? widget.height - 22 ? widget.height - 22
: null, : MediaQuery.of(context).size.height *
0.045,
child: TextFormField( child: TextFormField(
textAlign: projectViewModel.isArabic textAlign: projectViewModel.isArabic
? TextAlign.right ? TextAlign.right

@ -45,7 +45,7 @@ class TextFieldsUtils {
borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0),
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
),*/ ),*/
hintText: selectedText != null ? selectedText : hintText ?? "", hintText: selectedText != null ? selectedText : "" ?? "",
suffixIcon: Icon( suffixIcon: Icon(
suffixIcon ?? null, suffixIcon ?? null,
color: Colors.grey.shade600, color: Colors.grey.shade600,

Loading…
Cancel
Save