fix taps inside in patient

merge-requests/922/head
Elham Rababh 4 years ago
parent efe25b898d
commit 25e09fa105

@ -52,11 +52,11 @@ const Map<String, Map<String, String>> localizedValues = {
"radiology": {"en": "Radiology", "ar": "الأشعة"},
"service": {"en": "Service", "ar": "خدمة"},
"referral": {"en": "Referral", "ar": "الإحالة"},
"inPatient": {"en": "InPatients", "ar": "مرضاي"},
"myInPatient": {"en": "My\nInPatients", "ar": "مرضاي\nالمنومين"},
"myInPatientTitle": {"en": "My InPatients", "ar": "مرضاي المنومين"},
"inPatient": {"en": "In Patients", "ar": "مرضاي"},
"myInPatient": {"en": "My\n Patients", "ar": "مرضاي\nالمنومين"},
"myInPatientTitle": {"en": "My Patients", "ar": "مرضاي المنومين"},
"inPatientLabel": {"en": "InPatients", "ar": "المريض المنوم"},
"inPatientAll": {"en": "All InPatients", "ar": "جميع المرضى المنومين"},
"inPatientAll": {"en": "All Patients", "ar": "جميع المرضى المنومين"},
"operations": {"en": "Operations", "ar": "عمليات"},
"patientServices": {"en": "Patient Services", "ar": "خدمات المرضى"},
"searchMedicineDashboard": {

@ -130,7 +130,7 @@ class _InPatientScreenState extends State<InPatientScreen>
child: TabBar(
isScrollable: false,
controller: _tabController,
indicatorColor: Colors.red,
indicatorColor: AppGlobal.appRedColor,
indicatorWeight: 0.001,
indicator:BoxDecoration(),
// indicatorSize: TabBarIndicatorSize.tab,
@ -202,38 +202,14 @@ class _InPatientScreenState extends State<InPatientScreen>
bool isLast = false,}) {
return Center(
child: Container(
height: screenSize.height * 0.060,
height: Helpers.getTabHeight(context),
decoration:Helpers.getBoxTabsBoxDecoration(isActive: isActive,isFirst: isFirst, isMiddle: isMiddle, isLast: isLast),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
title,
fontSize: SizeConfig.textMultiplier * 1.5,
color: isActive ? Colors.white : AppGlobal.appTextColor,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
Helpers.getTabText(title:title, isActive:isActive),
if (counter != -1)
Container(
margin: EdgeInsets.all(4),
width: 15,
height: 15,
decoration: BoxDecoration(
color: isActive ? Colors.white : AppGlobal.appRedColor,
shape: BoxShape.circle,
),
child: Center(
child: FittedBox(
child: AppText(
"$counter",
fontSize: SizeConfig.textMultiplier * 1.5,
color: !isActive ? Colors.white : AppGlobal.appRedColor,
fontWeight: FontWeight.w700,
),
),
),
),
Helpers.getTabCounter(isActive:isActive,counter:counter)
],
),
),

@ -11,6 +11,7 @@ import 'package:doctor_app_flutter/models/patient/patient_model.dart';
import 'package:doctor_app_flutter/routes.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/helpers.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/shared/app_scaffold_widget.dart';
@ -105,7 +106,7 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
children: [
Container(
// color: Colors.red,
height: screenSize.height * 0.070,
height: Helpers.getTabHeight(context),
decoration: TextFieldsUtils.containerBorderDecoration(
Color(0Xffffffff), Color(0xFFCCCCCC),
borderRadius: 4, borderWidth: 0),
@ -143,52 +144,24 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
child: Center(
child: Container(
height: screenSize.height * 0.070,
decoration:
TextFieldsUtils.containerBorderDecoration(
_isActive
? Color(0xFFD02127 /*B8382B*/)
: Color(0xFFEAEAEA),
_isActive
? Color(0xFFD02127)
: Color(0xFFEAEAEA),
borderRadius: 4,
borderWidth: 0),
decoration: Helpers.getBoxTabsBoxDecoration(
isActive: _isActive,
isFirst: _times.indexOf(item) == 0,
isLast:
_times.indexOf(item) == _times.length - 1,
isMiddle: _times.indexOf(item) != 0 && _times.indexOf(item) != _times.length - 1
),
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
item,
fontSize: SizeConfig.textMultiplier * 1.8,
color: _isActive
? Colors.white
: Color(0xFF2B353E),
fontWeight: FontWeight.w700,
),
Helpers.getTabText(title: item, isActive: _isActive),
_isActive &&
_activeLocation != 0 &&
model.state == ViewState.Idle
? Container(
padding: EdgeInsets.all(2),
margin: EdgeInsets.symmetric(
horizontal: 5),
decoration: new BoxDecoration(
color: Colors.white,
borderRadius:
BorderRadius.circular(50),
),
constraints: BoxConstraints(
minWidth: 20,
minHeight: 20,
),
child: new Text(
model.filterData.length.toString(),
style: new TextStyle(
color: Colors.red,
fontSize: 10),
textAlign: TextAlign.center,
),
)
? Helpers.getTabCounter(isActive:_isActive,counter: model.filterData.length)
: Container(),
],
),
@ -245,7 +218,6 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
},
),
),
Expanded(
child: Container(
child: model.filterData.isEmpty
@ -267,7 +239,8 @@ class _OutPatientsScreenState extends State<OutPatientsScreen> {
.patientStatusType ==
43))
return Padding(
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 0),
padding: EdgeInsets.symmetric(
horizontal: 8, vertical: 0),
child: PatientCard(
patientInfo: model.filterData[index],
patientType: patientType,

@ -348,4 +348,45 @@ class Helpers {
),
);
}
static getTabText({String title, bool isActive = false,}){
return AppText(
title,
fontSize: SizeConfig.textMultiplier * 1.8,
color: isActive ? Colors.white : AppGlobal.appTextColor,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
);
}
static getTabHeight(BuildContext context){
final screenSize = MediaQuery.of(context).size;
return screenSize.height * 0.07;
}
static getTabCounter({bool isActive: false,int counter}){
return Container(
margin: EdgeInsets.all(4),
width: 15,
height: 15,
decoration: BoxDecoration(
color: isActive ? Colors.white : AppGlobal.appRedColor,
shape: BoxShape.circle,
),
child: Center(
child: FittedBox(
child: AppText(
"$counter",
fontSize: SizeConfig.textMultiplier * 1.5,
color: !isActive ? Colors.white : AppGlobal.appRedColor,
fontWeight: FontWeight.w700,
),
),
),
);
}
}

Loading…
Cancel
Save