TF-682 Update padding quick search form for tablet landscape
This commit is contained in:
@@ -24,25 +24,26 @@ abstract class BaseMailboxDashBoardView extends GetWidget<MailboxDashBoardContro
|
||||
quickSearchFilter: filter,
|
||||
);
|
||||
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: filter.getBackgroundColor(quickSearchFilterSelected: isQuickSearchFilterSelected)),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
SvgPicture.asset(
|
||||
filter.getIcon(imagePaths, quickSearchFilterSelected: isQuickSearchFilterSelected),
|
||||
width: 16,
|
||||
height: 16,
|
||||
fit: BoxFit.fill),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
filter.getTitle(context, receiveTimeType: controller.searchController.emailReceiveTimeType.value),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: filter.getTextStyle(quickSearchFilterSelected: isQuickSearchFilterSelected),
|
||||
)
|
||||
]));
|
||||
return Chip(
|
||||
labelPadding: const EdgeInsets.only(top: 2, bottom: 2, right: 10),
|
||||
label: Text(
|
||||
filter.getTitle(context, receiveTimeType: controller.searchController.emailReceiveTimeType.value),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: filter.getTextStyle(quickSearchFilterSelected: isQuickSearchFilterSelected),
|
||||
),
|
||||
avatar: SvgPicture.asset(
|
||||
filter.getIcon(imagePaths, quickSearchFilterSelected: isQuickSearchFilterSelected),
|
||||
width: 16,
|
||||
height: 16,
|
||||
fit: BoxFit.fill),
|
||||
labelStyle: filter.getTextStyle(quickSearchFilterSelected: isQuickSearchFilterSelected),
|
||||
backgroundColor: filter.getBackgroundColor(quickSearchFilterSelected: isQuickSearchFilterSelected),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
side: BorderSide(color: filter.getBackgroundColor(quickSearchFilterSelected: isQuickSearchFilterSelected)),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -149,6 +149,7 @@ class SearchController extends BaseController {
|
||||
searchInputController.clear();
|
||||
cleanSearchFilter();
|
||||
searchFocus.unfocus();
|
||||
searchState.value = searchState.value.disableSearchState();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -520,10 +520,7 @@ class MailboxDashBoardView extends BaseMailboxDashBoardView {
|
||||
}
|
||||
},
|
||||
listActionPadding: const EdgeInsets.only(
|
||||
left: 24,
|
||||
top: 24,
|
||||
right: 24,
|
||||
bottom: 16),
|
||||
left: 24, right: 24, top: 20, bottom: 12),
|
||||
titleHeaderRecent: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 8),
|
||||
child: Text(AppLocalizations.of(context).recent,
|
||||
|
||||
+68
-59
@@ -22,66 +22,75 @@ class EmailQuickSearchItemTileWidget extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 14),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 2),
|
||||
child: SvgPicture.asset(
|
||||
_presentationEmail.hasStarred ? imagePath.icStar : imagePath.icUnStar,
|
||||
width: 18, height: 18, fit: BoxFit.fill),
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final maxWidthItem = constraints.maxWidth;
|
||||
log('EmailQuickSearchItemTileWidget::build(): maxWidthItem: $maxWidthItem');
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 14),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 2),
|
||||
child: SvgPicture.asset(
|
||||
_presentationEmail.hasStarred ? imagePath.icStar : imagePath.icUnStar,
|
||||
width: 18, height: 18, fit: BoxFit.fill),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Container(
|
||||
constraints: BoxConstraints(maxWidth: maxWidthItem / 3),
|
||||
child: Text(_getInformationSender(),
|
||||
maxLines: 1,
|
||||
overflow: BuildUtils.isWeb ? null : TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.black)),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
Expanded(
|
||||
child: Text(_presentationEmail.getEmailTitle(),
|
||||
maxLines: 1,
|
||||
overflow: BuildUtils.isWeb ? null : TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Colors.black)),
|
||||
),
|
||||
if (_presentationEmail.hasAttachment == true)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: SvgPicture.asset(imagePath.icAttachment, width: 14, height: 14, fit: BoxFit.fill),
|
||||
),
|
||||
Text(_presentationEmail.getReceivedAt(Localizations.localeOf(context).toLanguageTag()),
|
||||
textAlign: TextAlign.right,
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Colors.black))
|
||||
]),
|
||||
const SizedBox(height: 3),
|
||||
Text(_presentationEmail.getPartialContent(),
|
||||
maxLines: 1,
|
||||
overflow: BuildUtils.isWeb ? null : TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: AppColor.colorContentEmail))
|
||||
]
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Text(_getInformationSender(),
|
||||
maxLines: 1,
|
||||
overflow: BuildUtils.isWeb ? null : TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.black)),
|
||||
const SizedBox(width: 16),
|
||||
Expanded(
|
||||
child: Text(_presentationEmail.getEmailTitle(),
|
||||
maxLines: 1,
|
||||
overflow: BuildUtils.isWeb ? null : TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Colors.black)),
|
||||
),
|
||||
if (_presentationEmail.hasAttachment == true)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: SvgPicture.asset(imagePath.icAttachment, width: 14, height: 14, fit: BoxFit.fill),
|
||||
),
|
||||
Text(_presentationEmail.getReceivedAt(Localizations.localeOf(context).toLanguageTag()),
|
||||
textAlign: TextAlign.right,
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Colors.black))
|
||||
]),
|
||||
const SizedBox(height: 3),
|
||||
Text(_presentationEmail.getPartialContent(),
|
||||
maxLines: 1,
|
||||
overflow: BuildUtils.isWeb ? null : TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: AppColor.colorContentEmail))
|
||||
]
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user