From ed256dac7c84b7ec51664ff59f889d10d45d31c6 Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Wed, 24 Jul 2024 09:29:30 +0300 Subject: [PATCH] improvements. --- .../pages/device_transfer/search_asset_page.dart | 2 +- .../pages/user/requests/pending_requests_screen.dart | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/views/pages/device_transfer/search_asset_page.dart b/lib/views/pages/device_transfer/search_asset_page.dart index a9a10b70..53425d5b 100644 --- a/lib/views/pages/device_transfer/search_asset_page.dart +++ b/lib/views/pages/device_transfer/search_asset_page.dart @@ -99,7 +99,7 @@ class _SearchAssetPageState extends State { controller: _searchController, textInputAction: TextInputAction.search, labelText: "${context.translation.searchBy} ${searchBy[_selectedIndex]}", - //onAction: _search, + onAction: _search, onChange: (text) { _searchController.text = text; _searchController.selection = TextSelection.fromPosition(TextPosition(offset: _searchController.text.length)); diff --git a/lib/views/pages/user/requests/pending_requests_screen.dart b/lib/views/pages/user/requests/pending_requests_screen.dart index fff2ac7a..30737d59 100644 --- a/lib/views/pages/user/requests/pending_requests_screen.dart +++ b/lib/views/pages/user/requests/pending_requests_screen.dart @@ -50,11 +50,13 @@ class PendingServiceRequestScreen extends StatelessWidget { audio: URLs.getFileUrl(pendingAssetServiceRequest.details[index].voiceNote), ), ], - 4.height, - Text( - "Created By: ${pendingAssetServiceRequest.details[index].createdBy}", - style: Theme.of(context).textTheme.bodyMedium, - ), + if((pendingAssetServiceRequest.details[index].createdBy ?? "").isNotEmpty)...[ + 4.height, + Text( + "Created By: ${pendingAssetServiceRequest.details[index].createdBy}", + style: Theme.of(context).textTheme.bodyMedium, + ), + ] ], ).expanded, 8.width,