From 8e53a271c8a24a0917e489a6f33b042bb22ccdc3 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Tue, 5 May 2026 10:55:22 +0300 Subject: [PATCH] ui changes --- android/app/src/main/AndroidManifest.xml | 7 +++- ios/Runner.plist/Info.plist | 4 +++ lib/controllers/api_routes/urls.dart | 2 +- .../widgets/progress_fragment.dart | 12 ++----- .../widgets/requests_fragment.dart | 10 +++--- lib/modules/cm_module/cm_detail_page.dart | 6 ++-- .../create_incident_request_page.dart | 24 ++++++------- lib/new_views/app_style/app_color.dart | 14 ++++++++ .../common_widgets/app_text_form_field.dart | 24 ++++++++----- .../single_item_drop_down_menu.dart | 21 +++++------ .../land_page/contact_us_bottom_sheet.dart | 19 +++++++++- .../my_request/all_requests_search_page.dart | 11 +++--- .../my_request/my_requests_page.dart | 32 +++++++++-------- .../widgets/static_filter_buttons.dart | 36 +++++++++++-------- lib/new_views/pages/login_page.dart | 6 ++-- lib/new_views/pages/settings_page.dart | 2 +- lib/views/pages/user/profile_page.dart | 20 ++++++----- .../update_user_contact_info_bottomsheet.dart | 7 ++-- .../widgets/date_and_time/date_picker.dart | 25 +++++++------ lib/views/widgets/dialogs/dialog.dart | 6 ++-- pubspec.lock | 8 ----- pubspec.yaml | 1 - 22 files changed, 171 insertions(+), 126 deletions(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index d597ec1d..70fa7d5b 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -34,7 +34,12 @@ - + + + + + + UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + LSApplicationQueriesSchemes + + tel + UIViewControllerBasedStatusBarAppearance NSSpeechRecognitionUsageDescription diff --git a/lib/controllers/api_routes/urls.dart b/lib/controllers/api_routes/urls.dart index a400d6f3..cc8f79c3 100644 --- a/lib/controllers/api_routes/urls.dart +++ b/lib/controllers/api_routes/urls.dart @@ -4,7 +4,7 @@ class URLs { static const String appReleaseBuildNumber = "40"; // static const host1 = "https://atomsm.hmg.com"; // production url - static const host1 = "https://atomsmdev.hmg.com"; // local DEV url + static const host1 = "https://atomsmdev.hmg.com"; // local DEV urld // static const host1 = "https://atomsmuat.hmg.com"; // local UAT url static final String _baseUrl = "$_host/mobile"; // host local UAT diff --git a/lib/dashboard_latest/widgets/progress_fragment.dart b/lib/dashboard_latest/widgets/progress_fragment.dart index 0e30c087..5114b1d7 100644 --- a/lib/dashboard_latest/widgets/progress_fragment.dart +++ b/lib/dashboard_latest/widgets/progress_fragment.dart @@ -285,16 +285,8 @@ class ProgressFragment extends StatelessWidget { children: [ Text(chartData[i].x, style: AppTextStyles.textStyle9.copyWith(color: AppColor.text9Color(context))) .toShimmer(isShow: snapshot.isAllCountLoading, context: context), - RichText( - text: TextSpan( - text: "${chartData[i].y.toInt()}", - style: AppTextStyles.bodyText.copyWith(color: AppColor.headingTextColor(context)), - children: [ - // TextSpan(text: " | ", style: AppTextStyles.bodyText.copyWith(color: AppColor.headingTextColor(context))), - // TextSpan(text: "${chartData[i].y}", style: AppTextStyles.bodyText.copyWith(color: AppColor.headingTextColor(context))), - ], - ), - ), + Text("${chartData[i].y.toInt()}", style: AppTextStyles.bodyText.copyWith(color: AppColor.headingTextColor(context))) + .toShimmer(isShow: snapshot.isAllCountLoading, context: context), ], ) ], diff --git a/lib/dashboard_latest/widgets/requests_fragment.dart b/lib/dashboard_latest/widgets/requests_fragment.dart index fafe5477..6eb64f7e 100644 --- a/lib/dashboard_latest/widgets/requests_fragment.dart +++ b/lib/dashboard_latest/widgets/requests_fragment.dart @@ -51,7 +51,7 @@ class RequestsFragment extends StatelessWidget { padding: const EdgeInsets.only(left: 16, right: 16, bottom: 16), physics: const NeverScrollableScrollPhysics(), shrinkWrap: true, - gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 4, childAspectRatio: 85 / 85, crossAxisSpacing: 8, mainAxisSpacing: 8), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: context.isTablet() ? 5 : 4, childAspectRatio: 85 / 85, crossAxisSpacing: 8, mainAxisSpacing: 8), children: [ listItem( data.dashboardCount?.data?.countHighPriority ?? 0, @@ -79,16 +79,16 @@ class RequestsFragment extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.end, - spacing: 16, + spacing: 0, children: [ - (icon ?? "").toSvgAsset(height: 26, width: 26, color: iconColor).toShimmer(isShow: isLoading, context: context), + (icon ?? "").toSvgAsset(height: 26, width: 26, color: iconColor).toShimmer(isShow: isLoading, context: context).center.expanded, Text( title, textAlign: TextAlign.center, - style: AppTextStyles.tinyFont2.copyWith(color: AppColor.headingTextColor(context)), + style: AppTextStyles.textStyle9.copyWith(color: AppColor.headingTextColor(context)), ).toShimmer(isShow: isLoading, context: context), ], - ).toShadowContainer(context, borderRadius: 16, paddingObject: const EdgeInsets.symmetric(horizontal: 12, vertical: 16)), + ).toShadowContainer(context, borderRadius: 16, paddingObject: const EdgeInsets.symmetric(horizontal: 12, vertical: 12)), ) .onPress(isLoading ? null diff --git a/lib/modules/cm_module/cm_detail_page.dart b/lib/modules/cm_module/cm_detail_page.dart index 452f3138..7059fff1 100644 --- a/lib/modules/cm_module/cm_detail_page.dart +++ b/lib/modules/cm_module/cm_detail_page.dart @@ -142,14 +142,14 @@ class _CMDetailPageState extends State { return Container( padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 6), margin: const EdgeInsets.only(left: 2), - decoration: BoxDecoration(color: context.isDark ? AppColor.neutral50 : AppColor.neutral30, borderRadius: BorderRadius.circular(16)), + decoration: BoxDecoration(color: AppColor.background(context) ,border: Border.all(color: AppColor.border2Color(context)), borderRadius: BorderRadius.circular(16)), child: Row( mainAxisSize: MainAxisSize.min, children: [ - const Icon(Icons.add, size: 20, color: AppColor.black1E), + Icon(Icons.add, size: 20, color:AppColor.textStyleColor(context)), Text( "Loan", - style: AppTextStyles.bodyText2.copyWith(color: AppColor.black1E), + style: AppTextStyles.bodyText2.copyWith(color: AppColor.textStyleColor(context)), ), 4.width, ], diff --git a/lib/modules/incident_module/create_incident_request_page.dart b/lib/modules/incident_module/create_incident_request_page.dart index 2c1fc2cd..7a96f8e7 100644 --- a/lib/modules/incident_module/create_incident_request_page.dart +++ b/lib/modules/incident_module/create_incident_request_page.dart @@ -117,7 +117,7 @@ class _CreateIncidentRequestPageState extends State { ...incidentInfoSection(), if (incidentType?.value == 1) ...[ 16.height, - "Asset Details".bodyText(context).custom(color: AppColor.black10), + "Asset Details".bodyText(context).custom(color: AppColor.textStyleColor(context)), 8.height, AssetPicker( device: device, @@ -147,7 +147,7 @@ class _CreateIncidentRequestPageState extends State { 16.height, ...optionQuestions(), 16.height, - "Attachments".bodyText(context).custom(color: AppColor.black10), + "Attachments".bodyText(context).custom(color: AppColor.textStyleColor(context)), 8.height, AttachmentPicker( label: context.translation.attachments, @@ -181,7 +181,7 @@ class _CreateIncidentRequestPageState extends State { List optionQuestions() { return [ - 'Additional Information & Comments'.addTranslation.bodyText(context).custom(color: AppColor.black10), + 'Additional Information & Comments'.addTranslation.bodyText(context).custom(color: AppColor.textStyleColor(context)), 8.height, AppTextFormField( initialValue: "", @@ -202,7 +202,7 @@ class _CreateIncidentRequestPageState extends State { List siteSection() { return [ - 'Site Details'.addTranslation.bodyText(context).custom(color: AppColor.black10), + 'Site Details'.addTranslation.bodyText(context).custom(color: AppColor.textStyleColor(context)), 8.height, SingleItemDropDownMenu( context: context, @@ -330,7 +330,7 @@ class _CreateIncidentRequestPageState extends State { List incidentInfoSection() { return [ - "Incident Details".bodyText(context).custom(color: AppColor.black10), + "Incident Details".bodyText(context).custom(color: AppColor.textStyleColor(context)), 8.height, SingleItemDropDownMenu( context: context, @@ -452,7 +452,7 @@ class _CreateIncidentRequestPageState extends State { if ((value ?? "").isEmpty) return "Mandatory"; return null; }, - suffixIcon: const Icon(Icons.info_outline_rounded, color: AppColor.neutral120).paddingOnly(end: 8).onPress(() { + suffixIcon: Icon(Icons.info_outline_rounded, color: AppColor.icon2Color(context)).paddingOnly(end: 8).onPress(() { context.showInfoDialog("Brief explanation of the incident, e.g., “Damaged patient monitor screen“"); }), style: Theme.of(context).textTheme.titleMedium, @@ -473,7 +473,7 @@ class _CreateIncidentRequestPageState extends State { if ((value ?? "").isEmpty) return "Mandatory"; return null; }, - suffixIcon: const Icon(Icons.info_outline_rounded, color: AppColor.neutral120).paddingOnly(end: 8).onPress(() { + suffixIcon: Icon(Icons.info_outline_rounded, color: AppColor.icon2Color(context)).paddingOnly(end: 8).onPress(() { context.showInfoDialog( "Provide a clear and factual description of the incident, including how the issue was identified. Ex. “The ECG cable connector was damaged due to continuos forcfull disconnetionnby end-users. Multiple bent pins were noted during inspection after repeated complains of poor signal quality“"); }), @@ -492,7 +492,7 @@ class _CreateIncidentRequestPageState extends State { List detailsSection() { return [ - 'Details'.addTranslation.bodyText(context).custom(color: AppColor.black10), + 'Details'.addTranslation.bodyText(context).custom(color: AppColor.textStyleColor(context)), 8.height, SingleItemDropDownMenu( context: context, @@ -535,7 +535,7 @@ class _CreateIncidentRequestPageState extends State { return null; }, style: Theme.of(context).textTheme.titleMedium, - backgroundColor: AppColor.fieldBgColor(context), + // backgroundColor: AppColor.fieldBgColor(context), labelStyle: AppTextStyles.textFieldLabelStyle.copyWith(color: AppColor.textColor(context)), showShadow: false, textInputType: TextInputType.name, @@ -559,7 +559,7 @@ class _CreateIncidentRequestPageState extends State { infoCallback: () { context.showInfoDialog("Ensure to provide information of person in Charge (e.g., Charge Nurse, Unit Team Leader), not a general staff member.", content: []); }, - backgroundColor: AppColor.fieldBgColor(context), + // backgroundColor: AppColor.fieldBgColor(context), showAsBottomSheet: true, onSelect: (value) { involvedPerson = value; @@ -592,7 +592,7 @@ class _CreateIncidentRequestPageState extends State { if (involvedPerson?.value == 3 && (value ?? "").isEmpty) return "Mandatory"; return null; }, - suffixIcon: const Icon(Icons.info_outline_rounded, color: AppColor.neutral120).paddingOnly(end: 8).onPress(() { + suffixIcon: Icon(Icons.info_outline_rounded, color: AppColor.icon2Color(context)).paddingOnly(end: 8).onPress(() { context.showInfoDialog( "Required if the person is an Employee. Ensure the correct Employee ID of the Person in Charge (e.g., Charge Nurse, Unit Team Leader) is provided, not a general staff member. (Ex. 34567)"); }), @@ -614,7 +614,7 @@ class _CreateIncidentRequestPageState extends State { if (involvedPerson?.value == 3 && (value ?? "").isEmpty) return "Mandatory"; return null; }, - suffixIcon: const Icon(Icons.info_outline_rounded, color: AppColor.neutral120).paddingOnly(end: 8).onPress(() { + suffixIcon: Icon(Icons.info_outline_rounded, color: AppColor.icon2Color(context)).paddingOnly(end: 8).onPress(() { context.showInfoDialog("State the end-user Employee/Patient Full name. Required if the person is an Employee. (Ex. Mary-Anne Joseph)"); }), style: Theme.of(context).textTheme.titleMedium, diff --git a/lib/new_views/app_style/app_color.dart b/lib/new_views/app_style/app_color.dart index c2b9b5cb..50f5480b 100644 --- a/lib/new_views/app_style/app_color.dart +++ b/lib/new_views/app_style/app_color.dart @@ -35,6 +35,7 @@ class AppColor { static const Color neutral150 = Color(0xffA1A1A1); static const Color neutral160 = Color(0xffE5E5E5); static const Color neutral170 = Color(0xff6E6E6E); + static const Color disableDark = Color(0xff444756); //background static const Color backgroundLight = Color(0xfff5f6fc); @@ -43,6 +44,7 @@ class AppColor { static const Color containerDark = Color(0xff161A2D); static const Color containerBorderDark = Color(0xff3B3F56); static const Color containerBorderLight = Color(0xffEFEFEF); + static const Color dropDownDark = Color(0xff1F2134); //white static const Color white10 = Color(0xffFFFFFF); @@ -112,6 +114,10 @@ class AppColor { static Color scaffoldBackground(BuildContext context) => context.isDark ? backgroundDark : backgroundLight; + static Color dropDownBackground(BuildContext context) => context.isDark ? dropDownDark : backgroundLight; + + static Color scaffold2Background(BuildContext context) => context.isDark ? backgroundDark : white20; + static Color assetGroupBackground(BuildContext context) => context.isDark ? containerDark : Colors.white30; static Color backgroundTabBarColor(BuildContext context) => context.isDark ? backgroundTabBarDark : Colors.white; @@ -122,6 +128,8 @@ class AppColor { static Color borderColor(BuildContext context) => context.isDark ? containerBorderDark : containerBorderLight; + static Color border2Color(BuildContext context) => context.isDark ? containerBorderDark : neutral30; + static Color textColor(BuildContext context) => context.isDark ? neutral30 : neutral50; static Color headingTextColor(BuildContext context) => context.isDark ? white10 : white936; @@ -134,6 +142,12 @@ class AppColor { static Color icon2Color(BuildContext context) => context.isDark ? white10 : neutral50; + static Color textStyleColor(BuildContext context) => context.isDark ? white10 : neutral50; + + static Color labelTextStyleColor(BuildContext context) => context.isDark ? white10 : neutral50; + + static Color floatingTextStyleColor(BuildContext context) => context.isDark ? white10 : neutral120; + static Color fieldBgColor(BuildContext context) => context.isDark ? neutral20 : neutral100; static Color selectedButtonColor(BuildContext context) => context.isDark ? neutral60 : neutral30; diff --git a/lib/new_views/common_widgets/app_text_form_field.dart b/lib/new_views/common_widgets/app_text_form_field.dart index 4af550da..ba70ef28 100644 --- a/lib/new_views/common_widgets/app_text_form_field.dart +++ b/lib/new_views/common_widgets/app_text_form_field.dart @@ -191,10 +191,12 @@ class _AppTextFormFieldState extends State { ? 4 : 1, obscuringCharacter: "*", - controller: widget.controller, + controller: widget.controller,cursorColor: AppColor.loadingColor(context), textInputAction: widget.textInputType == TextInputType.multiline ? null : widget.textInputAction ?? TextInputAction.next, onEditingComplete: widget.onAction ?? () => FocusScope.of(context).nextFocus(), - style: widget.style ?? AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.white10 : AppColor.black10), + style: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 14, color: AppColor.textStyleColor(context)), + + // style: widget.style ?? AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.white10 : AppColor.black10), onTap: widget.onTap, decoration: InputDecoration( alignLabelWithHint: widget.alignLabelWithHint, @@ -207,20 +209,24 @@ class _AppTextFormFieldState extends State { constraints: const BoxConstraints(), suffixIconConstraints: const BoxConstraints(minWidth: 0), filled: true, - fillColor: widget.backgroundColor ?? + fillColor: (context.isDark && !widget.enable - ? AppColor.neutral50 + ? AppColor.neutral50 : !widget.enable - ? (widget.enableColor ?? AppColor.neutral40) - : AppColor.scaffoldBackground(context)), + ? (widget.enableColor ?? AppColor.disableDark) + : AppColor.dropDownBackground(context)), errorStyle: AppTextStyle.tiny.copyWith(color: context.isDark ? AppColor.red50 : AppColor.red30), - floatingLabelStyle: widget.floatingLabelStyle ?? AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.white10 : AppColor.neutral20), + + // floatingLabelStyle: widget.floatingLabelStyle ?? AppTextStyle.body1.copyWith(fontWeight: FontWeight.w500, color: context.isDark ? AppColor.white10 : AppColor.neutral20), + + floatingLabelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: AppColor.floatingTextStyleColor(context)), + labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: AppColor.labelTextStyleColor(context)), hintText: widget.hintText ?? "", // labelText: (widget.showSpeechToText && _speechToText.isListening) ? "Listening..." : widget.labelText ?? "", label: Text( (widget.showSpeechToText && _speechToText.isListening) ? "Listening..." : widget.labelText ?? "", ), - labelStyle: widget.labelStyle, + // labelStyle: widget.labelStyle, hintStyle: widget.labelStyle, prefixIcon: widget.prefixIcon ?? (widget.prefixIconData == null @@ -253,7 +259,7 @@ class _AppTextFormFieldState extends State { return Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(16), - border: widget.showBorder ? Border.all(color: AppColor.borderColor(context), width: 1) : null, + border: widget.showBorder ? Border.all(color: AppColor.border2Color(context), width: 1) : null, boxShadow: widget.showShadow ? [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 10)] : null, ), child: textField); diff --git a/lib/new_views/common_widgets/single_item_drop_down_menu.dart b/lib/new_views/common_widgets/single_item_drop_down_menu.dart index d40e47fc..66d8a1b8 100644 --- a/lib/new_views/common_widgets/single_item_drop_down_menu.dart +++ b/lib/new_views/common_widgets/single_item_drop_down_menu.dart @@ -229,16 +229,14 @@ class _SingleItemDropDownMenuState( value: _selectedItem, @@ -340,7 +337,7 @@ class _SingleItemDropDownMenuState { labelText: search!.searchBySelectedValue?.label, textInputType: search!.searchBySelectedValue?.inputType, // labelStyle: AppTextStyles.bodyText2, - style: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), - floatingLabelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), - labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff767676)), - - showBorder: true, + // style: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), + // floatingLabelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), + // labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff767676)), + labelStyle: AppTextStyles.textFieldLabelStyle, + hintStyle: AppTextStyles.textFieldLabelStyle, + // showBorder: true, onChange: (text) { search!.searchBySelectedValue?.controller?.text = text; search!.searchBySelectedValue?.controller?.selection = TextSelection.fromPosition(TextPosition(offset: search!.searchBySelectedValue!.controller!.text.length)); diff --git a/lib/new_views/pages/land_page/my_request/my_requests_page.dart b/lib/new_views/pages/land_page/my_request/my_requests_page.dart index 26dcd7bc..d076a9fb 100644 --- a/lib/new_views/pages/land_page/my_request/my_requests_page.dart +++ b/lib/new_views/pages/land_page/my_request/my_requests_page.dart @@ -191,25 +191,29 @@ class _MyRequestsPageState extends State { padding: const EdgeInsets.only(top: 16, right: 16, left: 16), itemBuilder: (cxt, index) => Container( alignment: Alignment.center, - padding: const EdgeInsets.symmetric(horizontal: 8), - foregroundDecoration: selectedRequest != index - ? null - : ShapeDecoration( - color: (context.isDark ? AppColor.neutral30 : AppColor.neutral50).withOpacity(0.1), - shape: RoundedRectangleBorder( - side: BorderSide(width: 1, color: AppColor.blueStatus(context)), - borderRadius: BorderRadius.circular(7), - ), - ), + padding: const EdgeInsets.symmetric(horizontal: 12), + // foregroundDecoration: selectedRequest != index + // ? null + // : ShapeDecoration( + // color: (AppColor.red20), + // shape: RoundedRectangleBorder( + // side: BorderSide(width: 1, color: AppColor.blueStatus(context)), + // borderRadius: BorderRadius.circular(7), + // ), + // ), decoration: ShapeDecoration( - color: selectedRequest == index ? AppColor.selectedButtonColor(context) : AppColor.unSelectedButtonColor(context).withOpacity(snapshot.isAllLoading ? 0.7 : 1), + color: //selectedRequest == index ? + AppColor.background(context) ,//: AppColor.unSelectedButtonColor(context).withOpacity(snapshot.isAllLoading ? 0.7 : 1), shape: RoundedRectangleBorder( - side: selectedRequest == index ? BorderSide(width: 1, color: AppColor.blueStatus(context)) : BorderSide.none, - borderRadius: BorderRadius.circular(7), + side: BorderSide(width: 1, color: selectedRequest == index ? AppColor.primary10 : AppColor.borderColor(context)), + borderRadius: BorderRadius.circular(6), ), shadows: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 14, offset: const Offset(0, 0), spreadRadius: 0)], ), - child: Text(requestsList[index].value, style: AppTextStyles.bodyText2.copyWith(height: 1, color: AppColor.filterButtonTextColor(context))), + child: Text( + requestsList[index].value, + style: AppTextStyles.tinyFont.copyWith(height: 1, color: selectedRequest == index ? AppColor.primary10 : AppColor.filterButtonTextColor(context)), + ), ).onPress(() { if (snapshot.isAllLoading) { return; diff --git a/lib/new_views/pages/land_page/widgets/static_filter_buttons.dart b/lib/new_views/pages/land_page/widgets/static_filter_buttons.dart index 77b3bcf2..04becf6d 100644 --- a/lib/new_views/pages/land_page/widgets/static_filter_buttons.dart +++ b/lib/new_views/pages/land_page/widgets/static_filter_buttons.dart @@ -11,7 +11,7 @@ class RequestsTypeFilter extends StatefulWidget { final Map items; final List initialValues; - const RequestsTypeFilter({Key? key, required this.items,required this.initialValues,required this.onSelect}) : super(key: key); + const RequestsTypeFilter({Key? key, required this.items, required this.initialValues, required this.onSelect}) : super(key: key); @override State createState() => _RequestsTypeFilterState(); @@ -23,7 +23,7 @@ class _RequestsTypeFilterState extends State { @override void initState() { _selected.addAll(widget.initialValues); - super.initState(); + super.initState(); } @override @@ -45,24 +45,30 @@ class _RequestsTypeFilterState extends State { .map( (data) => Container( padding: EdgeInsets.symmetric(vertical: 8.toScreenHeight, horizontal: (_selected.contains(widget.items[data]) ? 12 : 8).toScreenWidth), - foregroundDecoration: !_selected.contains(widget.items[data]) - ? null - : ShapeDecoration( - color: (context.isDark ? AppColor.neutral30 : AppColor.neutral50).withOpacity(0.1), - shape: RoundedRectangleBorder( - side: BorderSide(width: 1, color: AppColor.blueStatus(context)), - borderRadius: BorderRadius.circular(7), - ), - ), + // foregroundDecoration: !_selected.contains(widget.items[data]) + // ? null + // : ShapeDecoration( + // color: (context.isDark ? AppColor.neutral30 : AppColor.neutral50).withOpacity(0.1), + // shape: RoundedRectangleBorder( + // side: BorderSide(width: 1, color: AppColor.blueStatus(context)), + // borderRadius: BorderRadius.circular(7), + // ), + // ), decoration: ShapeDecoration( - color: _selected.contains(widget.items[data]) ? AppColor.selectedButtonColor(context) : AppColor.unSelectedButtonColor(context), + color: AppColor.background(context), + // _selected.contains(widget.items[data]) ? AppColor.selectedButtonColor(context) : AppColor.unSelectedButtonColor(context), shape: RoundedRectangleBorder( - side: _selected.contains(widget.items[data]) ? BorderSide(width: 1, color: AppColor.blueStatus(context)) : BorderSide.none, - borderRadius: BorderRadius.circular(7), + side: BorderSide(width: 1, color: _selected.contains(widget.items[data]) ? AppColor.primary10 : AppColor.border2Color(context)), + + // side: _selected.contains(widget.items[data]) ? BorderSide(width: 1, color: AppColor.loadingColor(context)) : BorderSide.none, + borderRadius: BorderRadius.circular(6), ), shadows: [BoxShadow(color: Colors.black.withOpacity(0.05), blurRadius: 14, offset: const Offset(0, 0), spreadRadius: 0)], ), - child: data.tinyFont(context).custom(color: AppColor.filterButtonTextColor(context)), + child: data.tinyFont(context).custom(color: _selected.contains(widget.items[data]) ? AppColor.primary10 : AppColor.filterButtonTextColor(context) + + // AppColor.filterButtonTextColor(context) + ), ).onPress( () { if (_selected.contains(widget.items[data])) { diff --git a/lib/new_views/pages/login_page.dart b/lib/new_views/pages/login_page.dart index a962bcdc..1c6a83bd 100644 --- a/lib/new_views/pages/login_page.dart +++ b/lib/new_views/pages/login_page.dart @@ -115,9 +115,9 @@ class _LoginPageState extends State { // backgroundColor: AppColor.fieldBgColor(context), validator: (value) => Validator.hasValue(value!) ? null : context.translation.requiredField, labelText: context.translation.username, - style: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), - floatingLabelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff3B3D4A)), - labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: context.isDark ? Colors.white : const Color(0xff767676)), + // style: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 14, color: AppColor.textStyleColor(context)), + // floatingLabelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: AppColor.floatingTextStyleColor(context)), + // labelStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: context.isTablet() ? 16 : 12, color: AppColor.labelTextStyleColor(context)), textInputType: TextInputType.text, // showWithoutDecoration: true, contentPadding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 12.toScreenHeight), diff --git a/lib/new_views/pages/settings_page.dart b/lib/new_views/pages/settings_page.dart index ddb449c6..52c214c3 100644 --- a/lib/new_views/pages/settings_page.dart +++ b/lib/new_views/pages/settings_page.dart @@ -165,7 +165,7 @@ class _SettingsPageState extends State { ); }), ], - ).toShadowContainer(context).paddingAll(16), + ).toShadowContainer(context, borderRadius: 16).paddingAll(16), ); } diff --git a/lib/views/pages/user/profile_page.dart b/lib/views/pages/user/profile_page.dart index 38184ab6..8c86ed1c 100644 --- a/lib/views/pages/user/profile_page.dart +++ b/lib/views/pages/user/profile_page.dart @@ -139,6 +139,10 @@ class _ProfilePageState extends State { ); }), 8.height, + Text( + "Work Order Status".addTranslation, + style: AppTextStyles.heading3.copyWith(color: AppColor.headingTextColor(context)), + ), (_user.username ?? "").heading3(context).custom(fontWeight: FontWeight.w600, color: context.isDark ? AppColor.neutral10 : AppColor.neutral50), ], ), @@ -146,15 +150,15 @@ class _ProfilePageState extends State { 16.height, Text( '${context.translation.email}: ${_user.email ?? "-"}', - style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), + style: AppTextStyles.bodyText.copyWith(color: AppColor.lightTextColor(context)), ), Text( '${context.translation.phoneNumber}: ${_user.phoneNumber ?? "-"}', - style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), + style: AppTextStyles.bodyText.copyWith(color: AppColor.lightTextColor(context)), ), Text( '${context.translation.extensionNo}: ${_user.extensionNo ?? "-"}', - style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), + style: AppTextStyles.bodyText.copyWith(color: AppColor.lightTextColor(context)), ), // if ((_user.phoneNumber ?? "").isNotEmpty) ...[ // const Divider().defaultStyle(context), @@ -177,7 +181,7 @@ class _ProfilePageState extends State { itemBuilder: (context, index) { return Text( _user.departmentName![index] ?? "N/A", - style: AppTextStyles.bodyText.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral120), + style: AppTextStyles.bodyText.copyWith(color: AppColor.lightTextColor(context)), ).paddingOnly(top: 2, bottom: 2); }, ), @@ -197,7 +201,7 @@ class _ProfilePageState extends State { width: MediaQuery.sizeOf(context).width / 2, padding: EdgeInsets.all(4), icon: isLoading - ? SizedBox(height: 16, width: 16, child: CircularProgressIndicator(color: AppColor.loadingColor(context), strokeWidth: 2)) + ? SizedBox(height: 16, width: 16, child: CircularProgressIndicator(color: AppColor.loadingColor(context), strokeWidth: 2)) : 'attachment_icon'.toSvgAsset(height: 24, width: 24), buttonColor: AppColor.primary10, onPressed: () async { @@ -229,7 +233,7 @@ class _ProfilePageState extends State { ).center; }) ], - ).toShadowContainer(context), + ).toShadowContainer(context, borderRadius: 16), if (context.settingProvider.isUserFlowMedical) Container( margin: const EdgeInsets.only(top: 16), @@ -242,7 +246,7 @@ class _ProfilePageState extends State { children: [ Text( "Rota Details", - style: AppTextStyles.heading6.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.black10), + style: AppTextStyles.heading6.copyWith(color: AppColor.icon2Color(context)), ), 8.width, Container( @@ -263,7 +267,7 @@ class _ProfilePageState extends State { ), (isTodayRota ? todayRotaWidget() : monthRotaWidget()) ], - ).toShadowContainer(context), + ).toShadowContainer(context, borderRadius: 16), ), ], ).expanded, diff --git a/lib/views/pages/user/update_user_contact_info_bottomsheet.dart b/lib/views/pages/user/update_user_contact_info_bottomsheet.dart index e2be6855..fdbb5414 100644 --- a/lib/views/pages/user/update_user_contact_info_bottomsheet.dart +++ b/lib/views/pages/user/update_user_contact_info_bottomsheet.dart @@ -50,9 +50,10 @@ class _UpdateUserContactInfoBottomSheetState extends State[ TextButton( // child: Text(_subtitle.confirm), - child: Text(context.translation.confirm, style: AppTextStyles.bodyText), + child: Text(context.translation.confirm, style: AppTextStyles.bodyText.copyWith(color: AppColor.loadingColor(context))), onPressed: () { Navigator.of(context).pop(true); }, ), TextButton( // child: Text(_subtitle.cancel), - child: Text(context.translation.cancel, style: AppTextStyles.bodyText), + child: Text(context.translation.cancel, style: AppTextStyles.bodyText.copyWith(color: AppColor.loadingColor(context))), onPressed: () { Navigator.of(context).pop(false); }, diff --git a/pubspec.lock b/pubspec.lock index 8626a470..937cec84 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -185,14 +185,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.2" - clipboard: - dependency: "direct main" - description: - name: clipboard - sha256: c0ba5e7214035b824549473fa134870bc544fff0d7b89170d4756c0ac2c0239d - url: "https://pub.dev" - source: hosted - version: "3.0.14" clock: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 8fde8f23..f877f774 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -101,7 +101,6 @@ dependencies: just_audio: ^0.9.46 safe_device: ^1.3.8 toggle_switch: ^2.3.0 - clipboard: ^3.0.14 tree_view_flutter: ^1.0.2 audio_waveforms: ^1.3.0 signalr_netcore: ^1.4.4