From 99f19e0013be86d3067288ffac4989a9dd11f60b Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Thu, 24 Sep 2026 14:06:07 +0300 Subject: [PATCH] improvements --- .../asset_tracking/asset_tracking_page.dart | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/lib/modules/asset_tracking/asset_tracking_page.dart b/lib/modules/asset_tracking/asset_tracking_page.dart index a6c09649..f371af00 100644 --- a/lib/modules/asset_tracking/asset_tracking_page.dart +++ b/lib/modules/asset_tracking/asset_tracking_page.dart @@ -56,34 +56,35 @@ class _AssetTrackingPageState extends State with SingleTicker appBar: DefaultAppBar( title: "Live Asset Tracking", actions: [ - IconButton( - icon: Icon(Icons.search, color: AppColor.icon2Color(context)), - padding: EdgeInsets.zero, - iconSize: 20, - visualDensity: VisualDensity.compact, - tooltip: "Search", - onPressed: () async { - final result = await Navigator.push( - context, - CupertinoPageRoute( - fullscreenDialog: true, - builder: (context) => AssetTrackingSearchScreen( - searchModel: _searchModel, + if (selectedIndex != 3) + IconButton( + icon: Icon(Icons.search, color: AppColor.icon2Color(context)), + padding: EdgeInsets.zero, + iconSize: 20, + visualDensity: VisualDensity.compact, + tooltip: "Search", + onPressed: () async { + final result = await Navigator.push( + context, + CupertinoPageRoute( + fullscreenDialog: true, + builder: (context) => AssetTrackingSearchScreen( + searchModel: _searchModel, + ), ), - ), - ); - - if (result != null) { - assetTrackingProvider.reset(); - setState(() { - _searchModel = result; - }); - await assetTrackingProvider.getAssetsFromPenguin( - searchModel: result, ); - } - }, - ), + + if (result != null) { + assetTrackingProvider.reset(); + setState(() { + _searchModel = result; + }); + await assetTrackingProvider.getAssetsFromPenguin( + searchModel: result, + ); + } + }, + ), ], ), body: Column( @@ -462,5 +463,4 @@ class _AssetTrackingPageState extends State with SingleTicker (_searchModel?.startDate != null && _searchModel!.startDate!.isNotEmpty) || (_searchModel?.endDate != null && _searchModel!.endDate!.isNotEmpty); } - }