TF-524 Add Show all result button action

This commit is contained in:
dab246
2022-05-24 02:48:01 +07:00
committed by Dat H. Pham
parent acf6566924
commit 5db7390117
4 changed files with 46 additions and 4 deletions
@@ -66,7 +66,7 @@ extension AppColor on Color {
static const buttonActionToastWithActionColor = Color(0xFF7ADCF8); static const buttonActionToastWithActionColor = Color(0xFF7ADCF8);
static const backgroundCountAttachment = Color(0x681C1C1C); static const backgroundCountAttachment = Color(0x681C1C1C);
static const bgStatusResultSearch = Color(0xFFF5F5F7); static const bgStatusResultSearch = Color(0xFFF5F5F7);
static const bgWordSearch = Color(0xFFD7D6FC); static const bgWordSearch = Color(0x3D007AFF);
static const lineItemListColor = Color(0xFF99A2AD); static const lineItemListColor = Color(0xFF99A2AD);
static const colorNameEmail = Color(0xFF000000); static const colorNameEmail = Color(0xFF000000);
static const colorContentEmail = Color(0xFF6D7885); static const colorContentEmail = Color(0xFF6D7885);
@@ -468,15 +468,45 @@ class MailboxDashBoardView extends BaseMailboxDashBoardView {
return controller.selectQuickSearchFilter(filterAction); return controller.selectQuickSearchFilter(filterAction);
} }
}, },
listActionPadding: const EdgeInsets.only(left: 24, top: 24, right: 24, bottom: 20), listActionPadding: const EdgeInsets.only(left: 24, top: 24, right: 24, bottom: 16),
titleHeaderRecent: Padding( titleHeaderRecent: Padding(
padding: const EdgeInsets.only(left: 24, right: 24, bottom: 8), padding: const EdgeInsets.only(left: 24, right: 24, bottom: 8, top: 8),
child: Text(AppLocalizations.of(context).recent, child: Text(AppLocalizations.of(context).recent,
style: const TextStyle(fontSize: 13.0, style: const TextStyle(fontSize: 13.0,
color: AppColor.colorTextButtonHeaderThread, color: AppColor.colorTextButtonHeaderThread,
fontWeight: FontWeight.w500) fontWeight: FontWeight.w500)
) )
), ),
buttonShowAllResult: (context, keyword) {
if (keyword is String) {
return InkWell(
onTap: () {
if (keyword.trim().isNotEmpty) {
controller.saveRecentSearch(RecentSearch(keyword, DateTime.now()));
}
controller.searchEmail(context, keyword);
},
child: Padding(
padding: const EdgeInsets.only(left: 24, right: 24, top: 14, bottom: 14),
child: Row(children: [
Text(AppLocalizations.of(context).showingResultsFor,
style: const TextStyle(fontSize: 13.0,
color: AppColor.colorTextButtonHeaderThread,
fontWeight: FontWeight.w500)
),
const SizedBox(width: 4),
Expanded(child: Text('"$keyword"',
style: const TextStyle(
fontSize: 13.0,
color: Colors.black,
fontWeight: FontWeight.w500)))
])
),
);
} else {
return const SizedBox.shrink();
}
},
loadingBuilder: (context) => Padding( loadingBuilder: (context) => Padding(
padding: const EdgeInsets.only(bottom: 16), padding: const EdgeInsets.only(bottom: 16),
child: loadingWidget, child: loadingWidget,
+7 -1
View File
@@ -1,5 +1,5 @@
{ {
"@@last_modified": "2022-05-23T18:43:32.474820", "@@last_modified": "2022-05-24T02:47:33.512669",
"initializing_data": "Initializing data...", "initializing_data": "Initializing data...",
"@initializing_data": { "@initializing_data": {
"type": "text", "type": "text",
@@ -1317,5 +1317,11 @@
"type": "text", "type": "text",
"placeholders_order": [], "placeholders_order": [],
"placeholders": {} "placeholders": {}
},
"showingResultsFor": "Showing results for:",
"@showingResultsFor": {
"type": "text",
"placeholders_order": [],
"placeholders": {}
} }
} }
@@ -1350,4 +1350,10 @@ class AppLocalizations {
'Recent', 'Recent',
name: 'recent'); name: 'recent');
} }
String get showingResultsFor {
return Intl.message(
'Showing results for:',
name: 'showingResultsFor');
}
} }