From 7f993490679a84bec214ab044fe9f5af41e4dbaf Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Wed, 6 May 2026 11:12:45 +0300 Subject: [PATCH] tab bar ui changes --- .../pages/asset_delivery_stage_tab_page.dart | 13 ++++++++++--- .../pages/asset_inventory_page.dart | 12 ++++++++++-- .../maintenance_request_main.dart | 12 +++++++----- .../loan_module/pages/pullout_detail_page.dart | 12 ++++++++++-- .../pm_module/ppm_wo/update_ppm/update_ppm.dart | 12 +++++++----- 5 files changed, 44 insertions(+), 17 deletions(-) diff --git a/lib/modules/asset_delivery_module/pages/asset_delivery_stage_tab_page.dart b/lib/modules/asset_delivery_module/pages/asset_delivery_stage_tab_page.dart index 959beffc..47c0c51c 100644 --- a/lib/modules/asset_delivery_module/pages/asset_delivery_stage_tab_page.dart +++ b/lib/modules/asset_delivery_module/pages/asset_delivery_stage_tab_page.dart @@ -42,7 +42,11 @@ class _AssetDeliveryStageTabPageState extends State { children: [ Container( margin: EdgeInsets.only(left: 16.toScreenWidth, right: 16.toScreenWidth, top: 12.toScreenHeight), - decoration: BoxDecoration(color: context.isDark ? AppColor.neutral50 : AppColor.white10, borderRadius: BorderRadius.circular(10)), + decoration: BoxDecoration( + color: AppColor.tabBarBackground(context), + border: Border.all(color: AppColor.tabBarBorder(context)), + borderRadius: BorderRadius.circular(20), + ), child: TabBar( padding: EdgeInsets.symmetric(vertical: 4.toScreenHeight, horizontal: 4.toScreenWidth), labelColor: context.isDark ? AppColor.neutral30 : AppColor.black20, @@ -52,7 +56,11 @@ class _AssetDeliveryStageTabPageState extends State { indicatorPadding: EdgeInsets.zero, indicatorSize: TabBarIndicatorSize.tab, dividerColor: Colors.transparent, - indicator: BoxDecoration(color: context.isDark ? AppColor.neutral60 : AppColor.neutral110, borderRadius: BorderRadius.circular(7)), + overlayColor: WidgetStateProperty.all(Colors.transparent), + indicator: BoxDecoration( + color: AppColor.background(context), + borderRadius: BorderRadius.circular(15), + boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.03), blurRadius: 5, offset: const Offset(0, 0), spreadRadius: 0)]), tabs: [ Tab(text: context.translation.details, height: 57.toScreenHeight), Tab(text: context.translation.historyLogs, height: 57.toScreenHeight), @@ -73,7 +81,6 @@ class _AssetDeliveryStageTabPageState extends State { )); } - String getPageTitle({AssetDeliveryStageEnum? deliveryStage}) { if (deliveryStage == AssetDeliveryStageEnum.deliveryInspection) { return 'Delivery Inspection'.addTranslation; diff --git a/lib/modules/asset_inventory_module/pages/asset_inventory_page.dart b/lib/modules/asset_inventory_module/pages/asset_inventory_page.dart index f48ff848..f33b961f 100644 --- a/lib/modules/asset_inventory_module/pages/asset_inventory_page.dart +++ b/lib/modules/asset_inventory_module/pages/asset_inventory_page.dart @@ -77,7 +77,11 @@ class _AssetInventoryPageState extends State { children: [ Container( margin: EdgeInsets.only(left: 16.toScreenWidth, right: 16.toScreenWidth, top: 12.toScreenHeight), - decoration: BoxDecoration(color: context.isDark ? AppColor.neutral50 : AppColor.white10, borderRadius: BorderRadius.circular(10)), + decoration: BoxDecoration( + color: AppColor.tabBarBackground(context), + border: Border.all(color: AppColor.tabBarBorder(context)), + borderRadius: BorderRadius.circular(20), + ), child: TabBar( padding: EdgeInsets.symmetric(vertical: 4.toScreenHeight, horizontal: 4.toScreenWidth), labelColor: context.isDark ? AppColor.neutral30 : AppColor.black20, @@ -87,7 +91,11 @@ class _AssetInventoryPageState extends State { indicatorPadding: EdgeInsets.zero, indicatorSize: TabBarIndicatorSize.tab, dividerColor: Colors.transparent, - indicator: BoxDecoration(color: context.isDark ? AppColor.neutral60 : AppColor.neutral110, borderRadius: BorderRadius.circular(7)), + overlayColor: WidgetStateProperty.all(Colors.transparent), + indicator: BoxDecoration( + color: AppColor.background(context), + borderRadius: BorderRadius.circular(15), + boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.03), blurRadius: 5, offset: const Offset(0, 0), spreadRadius: 0)]), onTap: (index) {}, tabs: [ Tab(text: 'Session Details'.addTranslation, height: 57.toScreenHeight), diff --git a/lib/modules/cm_module/views/forms/maintenance_request/maintenance_request_main.dart b/lib/modules/cm_module/views/forms/maintenance_request/maintenance_request_main.dart index af231ecd..1fdbea57 100644 --- a/lib/modules/cm_module/views/forms/maintenance_request/maintenance_request_main.dart +++ b/lib/modules/cm_module/views/forms/maintenance_request/maintenance_request_main.dart @@ -70,8 +70,9 @@ class _MaintenanceRequestFormState extends State with Si Container( margin: EdgeInsets.only(left: 16.toScreenWidth, right: 16.toScreenWidth, top: 12.toScreenHeight), decoration: BoxDecoration( - color: context.isDark ? AppColor.neutral50 : AppColor.white10, - borderRadius: BorderRadius.circular(10), + color: AppColor.tabBarBackground(context), + border: Border.all(color: AppColor.tabBarBorder(context)), + borderRadius: BorderRadius.circular(20), ), child: TabBar( padding: EdgeInsets.symmetric(vertical: 4.toScreenHeight, horizontal: 4.toScreenWidth), @@ -82,10 +83,11 @@ class _MaintenanceRequestFormState extends State with Si indicatorPadding: EdgeInsets.zero, indicatorSize: TabBarIndicatorSize.tab, dividerColor: Colors.transparent, + overlayColor: WidgetStateProperty.all(Colors.transparent), indicator: BoxDecoration( - color: context.isDark ? AppColor.neutral60 : AppColor.neutral110, - borderRadius: BorderRadius.circular(7), - ), + color: AppColor.background(context), + borderRadius: BorderRadius.circular(15), + boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.03), blurRadius: 5, offset: const Offset(0, 0), spreadRadius: 0)]), tabs: [ Tab(text: context.translation.internal, height: 57.toScreenHeight), Tab(text: context.translation.external, height: 57.toScreenHeight), diff --git a/lib/modules/loan_module/pages/pullout_detail_page.dart b/lib/modules/loan_module/pages/pullout_detail_page.dart index 9992ba8c..a2b95fea 100644 --- a/lib/modules/loan_module/pages/pullout_detail_page.dart +++ b/lib/modules/loan_module/pages/pullout_detail_page.dart @@ -29,7 +29,11 @@ class PullOutDetailsPage extends StatelessWidget { children: [ Container( margin: EdgeInsets.only(left: 16.toScreenWidth, right: 16.toScreenWidth, top: 12.toScreenHeight), - decoration: BoxDecoration(color: context.isDark ? AppColor.neutral50 : AppColor.white10, borderRadius: BorderRadius.circular(10)), + decoration: BoxDecoration( + color: AppColor.tabBarBackground(context), + border: Border.all(color: AppColor.tabBarBorder(context)), + borderRadius: BorderRadius.circular(20), + ), child: TabBar( padding: EdgeInsets.symmetric(vertical: 4.toScreenHeight, horizontal: 4.toScreenWidth), labelColor: context.isDark ? AppColor.neutral30 : AppColor.black20, @@ -39,7 +43,11 @@ class PullOutDetailsPage extends StatelessWidget { indicatorPadding: EdgeInsets.zero, indicatorSize: TabBarIndicatorSize.tab, dividerColor: Colors.transparent, - indicator: BoxDecoration(color: context.isDark ? AppColor.neutral60 : AppColor.neutral110, borderRadius: BorderRadius.circular(7)), + overlayColor: WidgetStateProperty.all(Colors.transparent), + indicator: BoxDecoration( + color: AppColor.background(context), + borderRadius: BorderRadius.circular(15), + boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.03), blurRadius: 5, offset: const Offset(0, 0), spreadRadius: 0)]), onTap: (index) { // setState(() {}); }, diff --git a/lib/modules/pm_module/ppm_wo/update_ppm/update_ppm.dart b/lib/modules/pm_module/ppm_wo/update_ppm/update_ppm.dart index 0c375db8..a61a8efd 100644 --- a/lib/modules/pm_module/ppm_wo/update_ppm/update_ppm.dart +++ b/lib/modules/pm_module/ppm_wo/update_ppm/update_ppm.dart @@ -148,8 +148,9 @@ class _UpdatePpmState extends State with TickerProviderStateMixin { Container( margin: EdgeInsets.only(left: 16.toScreenWidth, right: 16.toScreenWidth, top: 16.toScreenHeight, bottom: 8), decoration: BoxDecoration( - color: context.isDark ? AppColor.neutral50 : AppColor.white10, - borderRadius: BorderRadius.circular(10), + color: AppColor.tabBarBackground(context), + border: Border.all(color: AppColor.tabBarBorder(context)), + borderRadius: BorderRadius.circular(20), ), child: TabBar( padding: EdgeInsets.symmetric(vertical: 4.toScreenHeight, horizontal: 4.toScreenWidth), @@ -160,10 +161,11 @@ class _UpdatePpmState extends State with TickerProviderStateMixin { indicatorPadding: EdgeInsets.zero, indicatorSize: TabBarIndicatorSize.tab, dividerColor: Colors.transparent, + overlayColor: WidgetStateProperty.all(Colors.transparent), indicator: BoxDecoration( - color: context.isDark ? AppColor.neutral60 : AppColor.neutral110, - borderRadius: BorderRadius.circular(7), - ), + color: AppColor.background(context), + borderRadius: BorderRadius.circular(15), + boxShadow: [BoxShadow(color: Colors.black.withOpacity(0.03), blurRadius: 5, offset: const Offset(0, 0), spreadRadius: 0)]), onTap: (index) { tabIndex = index; if (tabIndex == 0) {