improvements

main_production_asset_tracking
Sikander Saleem 3 weeks ago
parent 2f2b13c2b0
commit 99f19e0013

@ -56,34 +56,35 @@ class _AssetTrackingPageState extends State<AssetTrackingPage> 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<AssetTrackingSearchModel>(
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<AssetTrackingSearchModel>(
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<AssetTrackingPage> with SingleTicker
(_searchModel?.startDate != null && _searchModel!.startDate!.isNotEmpty) ||
(_searchModel?.endDate != null && _searchModel!.endDate!.isNotEmpty);
}
}

Loading…
Cancel
Save