From 6ca54f885c8cca036e401fe0fb7c2b0eb4ce27b1 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Thu, 16 Dec 2021 18:20:11 +0200 Subject: [PATCH] fix header --- .../profile/lab_result/labs_home_page.dart | 7 ++--- lib/widgets/shared/app_scaffold_widget.dart | 28 ++++++++++--------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index 34bd650c..90a1c51e 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -1,6 +1,7 @@ import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:doctor_app_flutter/models/patient/profile/patient_profile_app_bar_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/laboratory_result_page.dart'; import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; @@ -53,10 +54,8 @@ class _LabsHomePageState extends State { baseViewModel: model, backgroundColor: Colors.grey[100], isShowAppBar: true, - appBar: PatientProfileAppBar( - patient, - isInpatient: isInpatient, - ), + patientProfileAppBarModel: PatientProfileAppBarModel( + patient: patient, isInpatient:isInpatient,), body: SingleChildScrollView( physics: BouncingScrollPhysics(), child: FractionallySizedBox( diff --git a/lib/widgets/shared/app_scaffold_widget.dart b/lib/widgets/shared/app_scaffold_widget.dart index 297ce714..2e36a6c7 100644 --- a/lib/widgets/shared/app_scaffold_widget.dart +++ b/lib/widgets/shared/app_scaffold_widget.dart @@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/patient/profile/patient_profile_app_bar_model.dart'; import 'package:doctor_app_flutter/routes.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-app-bar.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -36,7 +37,6 @@ class AppScaffold extends StatelessWidget { this.bottomSheet, this.backgroundColor, this.isHomeIcon = true, - this.subtitle, this.patientProfileAppBarModel, this.drawer, this.extendBody = false, this.bottomNavigationBar, this.appBar}); @@ -55,18 +55,20 @@ class AppScaffold extends StatelessWidget { extendBody: extendBody, bottomNavigationBar: bottomNavigationBar, appBar: isShowAppBar - ? appBar ?? - AppBar( - elevation: 0, - backgroundColor: Colors.white, //HexColor('#515B5D'), - textTheme: TextTheme( - headline6: TextStyle( - color: Colors.black87, - fontSize: 16.8, - )), - title: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ + ? patientProfileAppBarModel != null ? PatientProfileAppBar(patientProfileAppBarModel!.patient!, + patientProfileAppBarModel: patientProfileAppBarModel!,) : appBar ?? + AppBar( + elevation: 0, + backgroundColor: Colors.white, + //HexColor('#515B5D'), + textTheme: TextTheme( + headline6: TextStyle( + color: Colors.black87, + fontSize: 16.8, + )), + title: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ Text(appBarTitle.toUpperCase()), if (subtitle != null) Text(