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: [
|
||||
CalendarEventInformationWidget(
|
||||
calendarEvent: calendarEvent,
|
||||
eventActions: controller.eventActions,
|
||||
onOpenComposerAction: controller.openNewComposerAction,
|
||||
onOpenNewTabAction: controller.openNewTabAction,
|
||||
),
|
||||
|
||||
+4
-2
@@ -9,10 +9,12 @@ import 'package:tmail_ui_user/main/utils/app_utils.dart';
|
||||
class CalendarEventActionButtonWidget extends StatelessWidget {
|
||||
|
||||
final List<EventAction> eventActions;
|
||||
final EdgeInsetsGeometry? margin;
|
||||
|
||||
const CalendarEventActionButtonWidget({
|
||||
super.key,
|
||||
required this.eventActions
|
||||
required this.eventActions,
|
||||
this.margin,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -20,7 +22,7 @@ class CalendarEventActionButtonWidget extends StatelessWidget {
|
||||
final responsiveUtils = Get.find<ResponsiveUtils>();
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
margin: CalendarEventActionButtonWidgetStyles.margin,
|
||||
margin: margin ?? CalendarEventActionButtonWidgetStyles.margin,
|
||||
padding: responsiveUtils.isPortraitMobile(context)
|
||||
? CalendarEventActionButtonWidgetStyles.paddingMobile
|
||||
: CalendarEventActionButtonWidgetStyles.paddingWeb,
|
||||
|
||||
+14
@@ -4,8 +4,10 @@ import 'package:core/presentation/utils/responsive_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.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/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/calendar_date_icon_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 {
|
||||
|
||||
final CalendarEvent calendarEvent;
|
||||
final List<EventAction> eventActions;
|
||||
final OnOpenNewTabAction? onOpenNewTabAction;
|
||||
final OnOpenComposerAction? onOpenComposerAction;
|
||||
|
||||
const CalendarEventInformationWidget({
|
||||
super.key,
|
||||
required this.calendarEvent,
|
||||
required this.eventActions,
|
||||
this.onOpenNewTabAction,
|
||||
this.onOpenComposerAction,
|
||||
});
|
||||
@@ -112,6 +116,11 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
||||
organizer: calendarEvent.organizer!,
|
||||
),
|
||||
),
|
||||
if (eventActions.isNotEmpty)
|
||||
CalendarEventActionButtonWidget(
|
||||
eventActions: eventActions,
|
||||
margin: EdgeInsetsDirectional.zero,
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
@@ -181,6 +190,11 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
||||
organizer: calendarEvent.organizer!,
|
||||
),
|
||||
),
|
||||
if (eventActions.isNotEmpty)
|
||||
CalendarEventActionButtonWidget(
|
||||
eventActions: eventActions,
|
||||
margin: EdgeInsetsDirectional.zero,
|
||||
),
|
||||
],
|
||||
),
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user