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/models/patient/patiant_info_model.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/translations_delegate_base.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(
baseViewModel: model,
isShowAppBar: false,
isShowAppBar: true,
appBar: PatientSearchHeader(
title: "LiveCare Patients",
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -69,25 +73,7 @@ class _LiveCarePatientScreenState extends State<LiveCarePatientScreen> {
decoration: BoxDecoration(
color: Colors.white,
),
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),
),
),
]),
),
child: Container(),
),
SizedBox(
height: 20,

@ -138,7 +138,9 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
width: SizeConfig.getTextMultiplierBasedOnWidth() * 20,
height: SizeConfig.getTextMultiplierBasedOnWidth() * 20,
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,
),
),
@ -175,7 +177,10 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
3.5,
),
patient.startTime != null
? AppText(patient.startTime != null ? patient.startTime : '',
? AppText(
patient.startTime != null
? patient.startTime
: '',
fontWeight: FontWeight.w700,
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
@ -303,7 +308,9 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
width: 30,
height: 30,
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(
shape: BoxShape.rectangle,
border: Border(
@ -350,7 +357,7 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
),
if (invoiceNO != null && !isPrescriptions)
HeaderRow(
label: 'Invoice: ',
label: 'Invoice: ',
value: invoiceNO ?? "",
),
if (branch != null)
@ -380,8 +387,8 @@ class PatientProfileAppBar extends StatelessWidget with PreferredSizeWidget {
: 'Prescriptions Date ',
value:
'${AppDateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',
),
]),
),
]),
),
),
],

@ -88,8 +88,11 @@ class _AppDrawerState extends State<AppDrawer> {
padding: EdgeInsets.only(top: 8.0),
child: AppText(
TranslationBase.of(context).dr +
authenticationViewModel
.doctorProfile?.doctorName,
capitalizeOnlyFirstLater(
authenticationViewModel
.doctorProfile.doctorName
.replaceAll("DR.", "")
.toLowerCase()),
fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),
fontFamily: 'Poppins',
@ -257,3 +260,9 @@ class _AppDrawerState extends State<AppDrawer> {
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(
height: widget.height != 0 && widget.maxLines == 1
? widget.height + 8
: null,
: MediaQuery.of(context).size.height * 0.098,
decoration: widget.hasBorder
? TextFieldsUtils.containerBorderDecoration(
Color(0Xffffffff),
@ -106,7 +106,7 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
)
: null,
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(
onTap: widget.onClick ?? null,
child: Row(
@ -123,28 +123,29 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
if ((widget.controller != null &&
widget.controller.text != "") ||
widget.dropDownText != null)
AppText(
widget.hintText,
// marginTop: widget.hasHintmargin ? 0 : 30,
color: Color(0xFF2E303A),
fontSize: widget.isPrscription == false
? 11.0
// SizeConfig.getHeightMultiplier() *
// (SizeConfig.isWidthLarge ? 1.1 : 1.3)
: 0,
fontWeight: FontWeight.w600,
letterSpacing: -0.44,
fontFamily: 'Poppins',
),
// if ((widget.controller != null &&
// widget.controller.text != "") ||
// widget.dropDownText != null)
AppText(
widget.hintText,
// marginTop: widget.hasHintmargin ? 0 : 30,
color: Color(0xFF2E303A),
fontSize: widget.isPrscription == false
? 11.0
// SizeConfig.getHeightMultiplier() *
// (SizeConfig.isWidthLarge ? 1.1 : 1.3)
: 0,
fontWeight: FontWeight.w600,
letterSpacing: -0.44,
fontFamily: 'Poppins',
),
widget.dropDownText == null
? Container(
height:
widget.height != 0 && widget.maxLines == 1
? widget.height - 22
: null,
: MediaQuery.of(context).size.height *
0.045,
child: TextFormField(
textAlign: projectViewModel.isArabic
? TextAlign.right

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

Loading…
Cancel
Save