diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart index 6b31b1ba..ac4c11e1 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart @@ -150,28 +150,32 @@ class _AllHabibMedicalSevicePage2State extends State color: Colors.white, ), ), - InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: HealthWeatherIndicator(), - ), - ); - }, - child: Padding( - padding: const EdgeInsets.only(top: 0, bottom: 0), - child: Text( - TranslationBase.of(context).moreDetails, - style: TextStyle(fontSize: 12, letterSpacing: -0.72, fontWeight: FontWeight.w600, color: Colors.white, decoration: TextDecoration.underline), - ), - ), - ) ], ), ), - SvgPicture.asset( - "assets/images/new/cloudy.svg", + Column( + children: [ + SvgPicture.asset( + "assets/images/new/cloudy.svg", + ), + InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: HealthWeatherIndicator(), + ), + ); + }, + child: Padding( + padding: const EdgeInsets.only(top: 10, bottom: 0), + child: Text( + TranslationBase.of(context).moreDetails, + style: TextStyle(fontSize: 12, letterSpacing: -0.72, fontWeight: FontWeight.w600, color: Colors.white, decoration: TextDecoration.underline), + ), + ), + ) + ], ), ], ), diff --git a/lib/pages/ChildVaccines/add_newchild_page.dart b/lib/pages/ChildVaccines/add_newchild_page.dart index 84989ed3..fa526360 100644 --- a/lib/pages/ChildVaccines/add_newchild_page.dart +++ b/lib/pages/ChildVaccines/add_newchild_page.dart @@ -4,15 +4,12 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart'; import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/add_new_child_view_model.dart'; -import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/active_medications/DayCheckBoxDialog.dart'; -import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -72,7 +69,6 @@ class _AddNewChildPageState extends State { @override Widget build(BuildContext context) { - return BaseView( builder: (_, model, w) => AppScaffold( isShowAppBar: true, @@ -254,12 +250,9 @@ class _AddNewChildPageState extends State { width: double.infinity, padding: EdgeInsets.all(16), color: Colors.white, - child: SecondaryButton( - textColor: Colors.white, - color: checkedValue == false ? Colors.white24 : CustomColors.accentColor, - label: TranslationBase.of(context).add, - // - onTap: () async { + child: DefaultButton( + TranslationBase.of(context).add, + () async { newChild.babyName = _firstTextController.text + " " + _secondTextController.text; newChild.gender = checkedValue.toString(); newChild.strDOB = getStartDay(); diff --git a/lib/pages/ChildVaccines/new/child_initial_page.dart b/lib/pages/ChildVaccines/new/child_initial_page.dart index 6069f814..a0deec0c 100644 --- a/lib/pages/ChildVaccines/new/child_initial_page.dart +++ b/lib/pages/ChildVaccines/new/child_initial_page.dart @@ -1,13 +1,12 @@ import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart'; -import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; @@ -126,12 +125,9 @@ class _ChildVaccinesPageState extends State with SingleTickerP }, ), if (checkedValue) mHeight(16), - SecondaryButton( - textColor: Colors.white, - color: CustomColors.accentColor, - label: TranslationBase.of(context).viewListChildren, - // - onTap: () => Navigator.push( + DefaultButton( + TranslationBase.of(context).viewListChildren, + () => Navigator.push( context, FadePage( page: ChildVaccinePage(), diff --git a/lib/pages/ChildVaccines/new/child_vaccine_page.dart b/lib/pages/ChildVaccines/new/child_vaccine_page.dart index cdf4e4e6..81f83798 100644 --- a/lib/pages/ChildVaccines/new/child_vaccine_page.dart +++ b/lib/pages/ChildVaccines/new/child_vaccine_page.dart @@ -1,13 +1,11 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; @@ -56,7 +54,7 @@ class _ChildPageState extends State with SingleTickerProviderS ); }, child: Container( - margin: EdgeInsets.only(left: 16, right: 16,top: index==0?16:0,bottom: index==model.babyInformationModelList.length-1?16:0), + margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 0, bottom: index == model.babyInformationModelList.length - 1 ? 16 : 0), decoration: BoxDecoration( shape: BoxShape.rectangle, borderRadius: BorderRadius.all(Radius.circular(12)), @@ -111,7 +109,7 @@ class _ChildPageState extends State with SingleTickerProviderS color: selectedColor, ), ), - Text(DateUtil.yearMonthDay(model.babyInformationModelList[index].dOB), + Text(" " + DateUtil.getDayMonthYearDateFormatted(model.babyInformationModelList[index].dOB), style: TextStyle( fontSize: 11, color: selectedColor, @@ -175,19 +173,9 @@ class _ChildPageState extends State with SingleTickerProviderS width: double.infinity, padding: EdgeInsets.all(16), color: Colors.white, - child: SecondaryButton( - textColor: Colors.white, - color: checkedValue - ? CustomColors.accentColor - : Color.fromRGBO( - 63, - 72, - 74, - 1, - ), - label: TranslationBase.of(context).addNewChild, - // - onTap: () { + child: DefaultButton( + TranslationBase.of(context).addNewChild, + () { Navigator.push( context, FadePage( diff --git a/lib/pages/insurance/insurance_card_screen.dart b/lib/pages/insurance/insurance_card_screen.dart index 9e95e0fe..b84b63d3 100644 --- a/lib/pages/insurance/insurance_card_screen.dart +++ b/lib/pages/insurance/insurance_card_screen.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; @@ -113,9 +114,7 @@ class _InsuranceCardState extends State { style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), ), Text( - convertDateFormat( - model.insurance[index].cardValidTo, - ), + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.insurance[index].cardValidTo)), style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), ), ], diff --git a/lib/pages/insurance/insurance_card_update_details.dart b/lib/pages/insurance/insurance_card_update_details.dart index c6eccae1..f765d9b7 100644 --- a/lib/pages/insurance/insurance_card_update_details.dart +++ b/lib/pages/insurance/insurance_card_update_details.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; @@ -344,59 +345,6 @@ class InsuranceCardUpdateDetails extends StatelessWidget { ), ], ), - // bottomSheet: Container( - // width: double.infinity, - // height: insuranceCardDetailsModel.isEmpty ? MediaQuery.of(context).size.height * 0.14 : MediaQuery.of(context).size.height * 0.21, - // child: Container( - // margin: EdgeInsets.only(left: 8, right: 8), - // child: Column( - // children: [ - // SizedBox( - // height: 8, - // ), - // if (insuranceCardDetailsModel.isEmpty) - // SecondaryButton( - // textColor: Colors.white, - // label: TranslationBase.of(context).scanNow.toUpperCase(), - // color: Theme.of(context).primaryColor, - // small: true, - // onTap: () async { - // confirmAttachInsuranceCardImageDialogDialog(context: context, name: name, fileNo: patientID.toString(), model: model); - // }, - // ), - // if (insuranceCardDetailsModel.isNotEmpty) - // SecondaryButton( - // textColor: Colors.white, - // label: TranslationBase.of(context).agree.toUpperCase(), - // color: Theme.of(context).primaryColor, - // onTap: () async { - // GifLoaderDialogUtils.showMyDialog(context); - // await model.uploadInsuranceCard(patientIdentificationID: patientIdentificationID, patientID: patientID); - // GifLoaderDialogUtils.hideDialog(context); - // if (model.state == ViewState.ErrorLocal) { - // AppToast.showErrorToast(message: model.error); - // } else { - // AppToast.showSuccessToast(message: TranslationBase.of(context).requestSent); - // } - // }, - // ), - // if (insuranceCardDetailsModel.isNotEmpty) - // SizedBox( - // height: 12, - // ), - // if (insuranceCardDetailsModel.isNotEmpty) - // SecondaryButton( - // textColor: Colors.white, - // label: TranslationBase.of(context).disagree.toUpperCase(), - // color: Colors.grey[800], - // onTap: () async { - // confirmAttachInsuranceCardImageDialogDialog(context: context, name: name, fileNo: patientID.toString(), model: model); - // }, - // ) - // ], - // ), - // ), - // ), ), ); } diff --git a/lib/pages/insurance/insurance_page.dart b/lib/pages/insurance/insurance_page.dart index fb3271fd..22e1b03e 100644 --- a/lib/pages/insurance/insurance_page.dart +++ b/lib/pages/insurance/insurance_page.dart @@ -94,6 +94,7 @@ class InsurancePage extends StatelessWidget { }, child: Container( width: double.infinity, + margin: EdgeInsets.only(top: 12.0), child: Container( decoration: cardRadius(12), child: Padding( diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 21160b61..9498282b 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -512,9 +512,9 @@ class _LandingPageState extends State with WidgetsBindingObserver { Widget build(BuildContext context) { projectViewModel = Provider.of(context); model = Provider.of(context); - + // currentTab == 0 ? 45 : 0.0 return Scaffold( - appBar: PreferredSize( + appBar: currentTab == 0 ? PreferredSize( preferredSize: Size.fromHeight(currentTab == 0 ? 45 : 0.0), child: AppBar( elevation: 0, @@ -598,7 +598,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { ], centerTitle: true, ), - ), + ) : null, drawer: SafeArea(child: AppDrawer()), extendBody: false, body: WillPopScope( diff --git a/lib/pages/livecare/livecare_type_select.dart b/lib/pages/livecare/livecare_type_select.dart index 765d6383..85bae24b 100644 --- a/lib/pages/livecare/livecare_type_select.dart +++ b/lib/pages/livecare/livecare_type_select.dart @@ -170,11 +170,11 @@ class _LiveCareTypeSelectState extends State { ), InkWell( onTap: (){ - // Navigator.pop(context, "schedule"); + Navigator.pop(context, "schedule"); }, child: Container( decoration: BoxDecoration( - color: Colors.grey[400], + color: Colors.grey[600], borderRadius: BorderRadius.all(Radius.circular(10.0))), height: 100.0, margin: EdgeInsets.only(top: 20.0), diff --git a/lib/widgets/others/app_scaffold_widget.dart b/lib/widgets/others/app_scaffold_widget.dart index 45642833..8729fe4a 100644 --- a/lib/widgets/others/app_scaffold_widget.dart +++ b/lib/widgets/others/app_scaffold_widget.dart @@ -197,6 +197,7 @@ class NewAppBarWidget extends StatelessWidget with PreferredSizeWidget { return AppBar( elevation: 0, backgroundColor: showTitle ? Colors.white : Colors.transparent, + // backgroundColor: Colors.red, // automaticallyImplyLeading: false, leading: ArrowBack( onTap: onTap,