TF-3449 Add Mark as important option in context menu
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
+25
-8
@@ -1,27 +1,30 @@
|
||||
import 'package:core/presentation/resources/image_paths.dart';
|
||||
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/styles/mobile/tablet_bottom_bar_composer_widget_style.dart';
|
||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
|
||||
class TabletBottomBarComposerWidget extends StatelessWidget {
|
||||
|
||||
final ImagePaths imagePaths;
|
||||
final bool hasReadReceipt;
|
||||
final bool isMarkAsImportant;
|
||||
final VoidCallback deleteComposerAction;
|
||||
final VoidCallback saveToDraftAction;
|
||||
final VoidCallback sendMessageAction;
|
||||
final VoidCallback requestReadReceiptAction;
|
||||
final VoidCallback toggleMarkAsImportantAction;
|
||||
|
||||
final _imagePaths = Get.find<ImagePaths>();
|
||||
|
||||
TabletBottomBarComposerWidget({
|
||||
const TabletBottomBarComposerWidget({
|
||||
super.key,
|
||||
required this.imagePaths,
|
||||
required this.hasReadReceipt,
|
||||
required this.isMarkAsImportant,
|
||||
required this.deleteComposerAction,
|
||||
required this.saveToDraftAction,
|
||||
required this.sendMessageAction,
|
||||
required this.requestReadReceiptAction,
|
||||
required this.toggleMarkAsImportantAction,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -33,7 +36,7 @@ class TabletBottomBarComposerWidget extends StatelessWidget {
|
||||
children: [
|
||||
const Spacer(),
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: _imagePaths.icDeleteMailbox,
|
||||
icon: imagePaths.icDeleteMailbox,
|
||||
borderRadius: TabletBottomBarComposerWidgetStyle.iconRadius,
|
||||
padding: TabletBottomBarComposerWidgetStyle.iconPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
@@ -42,7 +45,21 @@ class TabletBottomBarComposerWidget extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: TabletBottomBarComposerWidgetStyle.space),
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: _imagePaths.icReadReceipt,
|
||||
icon: imagePaths.icMarkAsImportant,
|
||||
borderRadius: TabletBottomBarComposerWidgetStyle.iconRadius,
|
||||
padding: TabletBottomBarComposerWidgetStyle.iconPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
iconColor: isMarkAsImportant
|
||||
? TabletBottomBarComposerWidgetStyle.selectedIconColor
|
||||
: TabletBottomBarComposerWidgetStyle.iconColor,
|
||||
tooltipMessage: isMarkAsImportant
|
||||
? AppLocalizations.of(context).turnOffMarkAsImportant
|
||||
: AppLocalizations.of(context).turnOnMarkAsImportant,
|
||||
onTapActionCallback: toggleMarkAsImportantAction,
|
||||
),
|
||||
const SizedBox(width: TabletBottomBarComposerWidgetStyle.space),
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: imagePaths.icReadReceipt,
|
||||
borderRadius: TabletBottomBarComposerWidgetStyle.iconRadius,
|
||||
padding: TabletBottomBarComposerWidgetStyle.iconPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
@@ -56,7 +73,7 @@ class TabletBottomBarComposerWidget extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: TabletBottomBarComposerWidgetStyle.space),
|
||||
TMailButtonWidget.fromIcon(
|
||||
icon: _imagePaths.icSaveToDraft,
|
||||
icon: imagePaths.icSaveToDraft,
|
||||
borderRadius: TabletBottomBarComposerWidgetStyle.iconRadius,
|
||||
padding: TabletBottomBarComposerWidgetStyle.iconPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
@@ -66,7 +83,7 @@ class TabletBottomBarComposerWidget extends StatelessWidget {
|
||||
const SizedBox(width: TabletBottomBarComposerWidgetStyle.sendButtonSpace),
|
||||
TMailButtonWidget(
|
||||
text: AppLocalizations.of(context).send,
|
||||
icon: _imagePaths.icSend,
|
||||
icon: imagePaths.icSend,
|
||||
iconAlignment: TextDirection.rtl,
|
||||
padding: TabletBottomBarComposerWidgetStyle.sendButtonPadding,
|
||||
iconSize: TabletBottomBarComposerWidgetStyle.iconSize,
|
||||
|
||||
Reference in New Issue
Block a user