TF-2078 Add event options to blue bar
(cherry picked from commit cdd52e6169d0c6b5369e9919b63c6757db2dfde0)
This commit is contained in:
@@ -297,6 +297,7 @@ class EmailView extends GetWidget<SingleEmailController> with AppLoaderMixin {
|
|||||||
children: [
|
children: [
|
||||||
CalendarEventInformationWidget(
|
CalendarEventInformationWidget(
|
||||||
calendarEvent: calendarEvent,
|
calendarEvent: calendarEvent,
|
||||||
|
eventActions: controller.eventActions,
|
||||||
onOpenComposerAction: controller.openNewComposerAction,
|
onOpenComposerAction: controller.openNewComposerAction,
|
||||||
onOpenNewTabAction: controller.openNewTabAction,
|
onOpenNewTabAction: controller.openNewTabAction,
|
||||||
),
|
),
|
||||||
|
|||||||
+4
-2
@@ -9,10 +9,12 @@ import 'package:tmail_ui_user/main/utils/app_utils.dart';
|
|||||||
class CalendarEventActionButtonWidget extends StatelessWidget {
|
class CalendarEventActionButtonWidget extends StatelessWidget {
|
||||||
|
|
||||||
final List<EventAction> eventActions;
|
final List<EventAction> eventActions;
|
||||||
|
final EdgeInsetsGeometry? margin;
|
||||||
|
|
||||||
const CalendarEventActionButtonWidget({
|
const CalendarEventActionButtonWidget({
|
||||||
super.key,
|
super.key,
|
||||||
required this.eventActions
|
required this.eventActions,
|
||||||
|
this.margin,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -20,7 +22,7 @@ class CalendarEventActionButtonWidget extends StatelessWidget {
|
|||||||
final responsiveUtils = Get.find<ResponsiveUtils>();
|
final responsiveUtils = Get.find<ResponsiveUtils>();
|
||||||
return Container(
|
return Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
margin: CalendarEventActionButtonWidgetStyles.margin,
|
margin: margin ?? CalendarEventActionButtonWidgetStyles.margin,
|
||||||
padding: responsiveUtils.isPortraitMobile(context)
|
padding: responsiveUtils.isPortraitMobile(context)
|
||||||
? CalendarEventActionButtonWidgetStyles.paddingMobile
|
? CalendarEventActionButtonWidgetStyles.paddingMobile
|
||||||
: CalendarEventActionButtonWidgetStyles.paddingWeb,
|
: CalendarEventActionButtonWidgetStyles.paddingWeb,
|
||||||
|
|||||||
+14
@@ -4,8 +4,10 @@ import 'package:core/presentation/utils/responsive_utils.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:jmap_dart_client/jmap/mail/calendar/calendar_event.dart';
|
import 'package:jmap_dart_client/jmap/mail/calendar/calendar_event.dart';
|
||||||
|
import 'package:tmail_ui_user/features/email/domain/model/event_action.dart';
|
||||||
import 'package:tmail_ui_user/features/email/presentation/extensions/calendar_event_extension.dart';
|
import 'package:tmail_ui_user/features/email/presentation/extensions/calendar_event_extension.dart';
|
||||||
import 'package:tmail_ui_user/features/email/presentation/styles/calendar_event_information_widget_styles.dart';
|
import 'package:tmail_ui_user/features/email/presentation/styles/calendar_event_information_widget_styles.dart';
|
||||||
|
import 'package:tmail_ui_user/features/email/presentation/widgets/calendar_event/calendar_event_action_button_widget.dart';
|
||||||
import 'package:tmail_ui_user/features/email/presentation/widgets/calendar_event/event_attendee_information_widget.dart';
|
import 'package:tmail_ui_user/features/email/presentation/widgets/calendar_event/event_attendee_information_widget.dart';
|
||||||
import 'package:tmail_ui_user/features/email/presentation/widgets/calendar_event/calendar_date_icon_widget.dart';
|
import 'package:tmail_ui_user/features/email/presentation/widgets/calendar_event/calendar_date_icon_widget.dart';
|
||||||
import 'package:tmail_ui_user/features/email/presentation/widgets/calendar_event/event_location_detail_widget.dart';
|
import 'package:tmail_ui_user/features/email/presentation/widgets/calendar_event/event_location_detail_widget.dart';
|
||||||
@@ -17,12 +19,14 @@ import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
|||||||
class CalendarEventInformationWidget extends StatelessWidget {
|
class CalendarEventInformationWidget extends StatelessWidget {
|
||||||
|
|
||||||
final CalendarEvent calendarEvent;
|
final CalendarEvent calendarEvent;
|
||||||
|
final List<EventAction> eventActions;
|
||||||
final OnOpenNewTabAction? onOpenNewTabAction;
|
final OnOpenNewTabAction? onOpenNewTabAction;
|
||||||
final OnOpenComposerAction? onOpenComposerAction;
|
final OnOpenComposerAction? onOpenComposerAction;
|
||||||
|
|
||||||
const CalendarEventInformationWidget({
|
const CalendarEventInformationWidget({
|
||||||
super.key,
|
super.key,
|
||||||
required this.calendarEvent,
|
required this.calendarEvent,
|
||||||
|
required this.eventActions,
|
||||||
this.onOpenNewTabAction,
|
this.onOpenNewTabAction,
|
||||||
this.onOpenComposerAction,
|
this.onOpenComposerAction,
|
||||||
});
|
});
|
||||||
@@ -112,6 +116,11 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
|||||||
organizer: calendarEvent.organizer!,
|
organizer: calendarEvent.organizer!,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (eventActions.isNotEmpty)
|
||||||
|
CalendarEventActionButtonWidget(
|
||||||
|
eventActions: eventActions,
|
||||||
|
margin: EdgeInsetsDirectional.zero,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -181,6 +190,11 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
|||||||
organizer: calendarEvent.organizer!,
|
organizer: calendarEvent.organizer!,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (eventActions.isNotEmpty)
|
||||||
|
CalendarEventActionButtonWidget(
|
||||||
|
eventActions: eventActions,
|
||||||
|
margin: EdgeInsetsDirectional.zero,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
|
|||||||
Reference in New Issue
Block a user