TF-1857 Display calendar event icon in item list email
(cherry picked from commit 6c938a7971fc7ac443ff2a800a292bdc75912d31)
This commit is contained in:
@@ -330,4 +330,16 @@ mixin BaseEmailItemTile {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Widget buildCalendarEventIcon({required PresentationEmail presentationEmail}) {
|
||||
return SvgPicture.asset(
|
||||
imagePaths.icCalendarEvent,
|
||||
width: 20,
|
||||
height: 20,
|
||||
fit: BoxFit.fill,
|
||||
colorFilter: presentationEmail.hasRead
|
||||
? AppColor.colorCalendarEventRead.asFilter()
|
||||
: AppColor.colorCalendarEventUnread.asFilter(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -107,6 +107,11 @@ class EmailTileBuilder with BaseEmailItemTile {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (_presentationEmail.hasCalendarEvent)
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.only(end: 8),
|
||||
child: buildCalendarEventIcon(presentationEmail: _presentationEmail),
|
||||
),
|
||||
Expanded(child: buildEmailTitle(
|
||||
_context,
|
||||
_presentationEmail,
|
||||
|
||||
@@ -172,6 +172,11 @@ class EmailTileBuilder with BaseEmailItemTile {
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (_presentationEmail.hasCalendarEvent)
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.only(end: 8),
|
||||
child: buildCalendarEventIcon(presentationEmail: _presentationEmail),
|
||||
),
|
||||
Expanded(child: buildEmailTitle(
|
||||
_context,
|
||||
_presentationEmail,
|
||||
@@ -255,6 +260,11 @@ class EmailTileBuilder with BaseEmailItemTile {
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (_presentationEmail.hasCalendarEvent)
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.only(end: 8),
|
||||
child: buildCalendarEventIcon(presentationEmail: _presentationEmail),
|
||||
),
|
||||
Expanded(child: buildEmailTitle(
|
||||
_context,
|
||||
_presentationEmail,
|
||||
@@ -509,6 +519,11 @@ class EmailTileBuilder with BaseEmailItemTile {
|
||||
Widget _buildSubjectAndContent() {
|
||||
return LayoutBuilder(builder: (context, constraints) {
|
||||
return Row(children: [
|
||||
if (_presentationEmail.hasCalendarEvent)
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.only(end: 8),
|
||||
child: buildCalendarEventIcon(presentationEmail: _presentationEmail),
|
||||
),
|
||||
if (_presentationEmail.getEmailTitle().isNotEmpty)
|
||||
Container(
|
||||
constraints: BoxConstraints(maxWidth: constraints.maxWidth / 2),
|
||||
|
||||
Reference in New Issue
Block a user