fix home page design

merge-requests/669/head
Mohammad Aljammal 5 years ago
parent a525787c19
commit 57fcd2cdeb

@ -105,7 +105,7 @@ class LabsService extends BaseService {
await baseAppClient.postPatient(url, patient: patient, await baseAppClient.postPatient(url, patient: patient,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
patientLabSpecialResult.clear(); // patientLabSpecialResult.clear();
labResultList.clear(); labResultList.clear();
if (isInpatient) { if (isInpatient) {

@ -257,41 +257,6 @@ class ProcedureViewModel extends BaseViewModel {
} }
} }
getPatientLabResult(
{PatientLabOrders patientLabOrder, PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _labsService.getPatientLabResult(
patientLabOrder: patientLabOrder, patient: patient);
if (_labsService.hasError) {
error = _labsService.error;
setState(ViewState.Error);
} else {
_labsService.labResultList.forEach((element) {
List<LabResultList> patientLabOrdersClinic = labResultLists
.where(
(elementClinic) => elementClinic.filterName == element.testCode)
.toList();
if (patientLabOrdersClinic.length != 0) {
var value =
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])]
.patientLabResultList
.where((e) =>
e.sampleCollectedOn == element.sampleCollectedOn &&
e.resultValue == element.resultValue)
.toList();
if (value.isEmpty)
labResultLists[labResultLists.indexOf(patientLabOrdersClinic[0])]
.patientLabResultList
.add(element);
} else {
labResultLists
.add(LabResultList(filterName: element.testCode, lab: element));
}
});
setState(ViewState.Idle);
}
}
getPatientLabOrdersResults( getPatientLabOrdersResults(
{PatientLabOrders patientLabOrder, {PatientLabOrders patientLabOrder,

@ -62,9 +62,7 @@ class _LandingPageState extends State<LandingPage> {
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
controller: pageController, controller: pageController,
children: [ children: [
ShowCaseWidget( HomeScreen(),
builder: Builder(builder: (context) => HomeScreen()),
),
MyScheduleScreen(), MyScheduleScreen(),
QrReaderScreen(), QrReaderScreen(),
DoctorReplyScreen( DoctorReplyScreen(

@ -1,3 +1,4 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart';
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart'; import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -28,8 +29,8 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
// height: MediaQuery.of(context).size.height * 0.35, height: MediaQuery.of(context).size.height * 0.35,
height: 230, // height: 230,
child: Swiper( child: Swiper(
onIndexChanged: (index) { onIndexChanged: (index) {
if (mounted) { if (mounted) {
@ -210,12 +211,12 @@ class _DashboardSwipeWidgetState extends State<DashboardSwipeWidget> {
widget.model widget.model
.getPatientCount(dashboardItemList[2]) .getPatientCount(dashboardItemList[2])
.toString(), .toString(),
fontSize: 28, fontSize: SizeConfig.textMultiplier * 3.0,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
) )
], ],
), ),
top: MediaQuery.of(context).size.height * 0.12, top: MediaQuery.of(context).size.height * 0.13,
left: 0, left: 0,
right: 0) right: 0)
]), ]),

@ -27,7 +27,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
PatiantInformtion patient; PatiantInformtion patient;
bool isFromSearch = false; bool isFromSearch = false;
bool isFromLiveCare = true; bool isFromLiveCare = false;
bool isInpatient = false; bool isInpatient = false;
@ -73,6 +73,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
if (routeArgs.containsKey("isSearchAndOut")) { if (routeArgs.containsKey("isSearchAndOut")) {
isSearchAndOut = routeArgs['isSearchAndOut']; isSearchAndOut = routeArgs['isSearchAndOut'];
} }
if(routeArgs.containsKey("isFromLiveCare")) {
isFromLiveCare = routeArgs['isFromLiveCare'];
}
if (isInpatient) if (isInpatient)
_activeTab = 0; _activeTab = 0;
else else
@ -287,7 +290,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
), ),
], ],
), ),
) : Container(), ) : null,
), ),

@ -9,12 +9,12 @@ class GetActivityButton extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
width: 110, width: MediaQuery.of(context).size.height * 0.125,
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(15),
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.fromLTRB(8, 0, 8, 0), padding: const EdgeInsets.fromLTRB(8, 0, 8, 0),

@ -14,7 +14,7 @@ class GetOutPatientStack extends StatelessWidget {
var list = new List<Widget>(); var list = new List<Widget>();
value.summaryoptions.forEach((result) => value.summaryoptions.forEach((result) =>
{list.add(getStack(result, value.summaryoptions.first.value))}); {list.add(getStack(result, value.summaryoptions.first.value,context))});
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
@ -32,7 +32,7 @@ class GetOutPatientStack extends StatelessWidget {
); );
} }
getStack(Summaryoptions value, max) { getStack(Summaryoptions value, max,context) {
return Expanded( return Expanded(
child: Container( child: Container(
margin: EdgeInsets.symmetric(horizontal: 2), margin: EdgeInsets.symmetric(horizontal: 2),
@ -55,7 +55,7 @@ class GetOutPatientStack extends StatelessWidget {
child: Container( child: Container(
child: SizedBox(), child: SizedBox(),
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
height: max != 0 ? (150 * value.value) / max : 0, height: max != 0 ? ((MediaQuery.of(context).size.height * 0.24 )* value.value) / max : 0,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
color: Color(0x63D02127), color: Color(0x63D02127),
@ -63,7 +63,7 @@ class GetOutPatientStack extends StatelessWidget {
), ),
), ),
Container( Container(
height: 150, height: (MediaQuery.of(context).size.height * 0.24 ),
margin: EdgeInsets.only(left: 5, top: 5), margin: EdgeInsets.only(left: 5, top: 5),
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: RotatedBox( child: RotatedBox(

Loading…
Cancel
Save