diff --git a/lib/features/composer/presentation/composer_view.dart b/lib/features/composer/presentation/composer_view.dart index 084e0084d..abb7655cc 100644 --- a/lib/features/composer/presentation/composer_view.dart +++ b/lib/features/composer/presentation/composer_view.dart @@ -43,7 +43,7 @@ class ComposerView extends GetWidget { onCloseViewAction: () => controller.handleClickCloseComposer(context), onClearFocusAction: () => controller.clearFocus(context), backgroundColor: MobileAppBarComposerWidgetStyle.backgroundColor, - childBuilder: (context, constraints) => SafeArea( + childBuilder: (_, constraints) => SafeArea( left: !controller.responsiveUtils.isLandscapeMobile(context), right: !controller.responsiveUtils.isLandscapeMobile(context), child: Container( @@ -297,11 +297,12 @@ class ComposerView extends GetWidget { keyboardRichTextController: controller.richTextMobileTabletController!.richTextController, onCloseViewAction: () => controller.handleClickCloseComposer(context), onClearFocusAction: () => controller.clearFocus(context), - childBuilder: (context, constraints) => Container( + childBuilder: (_, constraints) => ColoredBox( color: ComposerStyle.mobileBackgroundColor, child: Column( children: [ Obx(() => TabletAppBarComposerWidget( + imagePaths: controller.imagePaths, emailSubject: controller.subjectEmail.value ?? '', onCloseViewAction: () => controller.handleClickCloseComposer(context), constraints: constraints, diff --git a/lib/features/composer/presentation/view/mobile/mobile_container_view.dart b/lib/features/composer/presentation/view/mobile/mobile_container_view.dart index 19819a58e..bcf8477ab 100644 --- a/lib/features/composer/presentation/view/mobile/mobile_container_view.dart +++ b/lib/features/composer/presentation/view/mobile/mobile_container_view.dart @@ -32,7 +32,7 @@ class MobileContainerView extends StatelessWidget { child: Scaffold( backgroundColor: backgroundColor ?? MobileContainerViewStyle.outSideBackgroundColor, resizeToAvoidBottomInset: false, - body: LayoutBuilder(builder: (context, constraints) { + body: LayoutBuilder(builder: (_, constraints) { return childBuilder(context, constraints); }) ), diff --git a/lib/features/composer/presentation/view/mobile/tablet_container_view.dart b/lib/features/composer/presentation/view/mobile/tablet_container_view.dart index c15bd055b..9bad8e386 100644 --- a/lib/features/composer/presentation/view/mobile/tablet_container_view.dart +++ b/lib/features/composer/presentation/view/mobile/tablet_container_view.dart @@ -47,7 +47,7 @@ class TabletContainerView extends StatelessWidget { child: Scaffold( backgroundColor: TabletContainerViewStyle.outSideBackgroundColor, body: SafeArea( - child: LayoutBuilder(builder: (context, constraints) { + child: LayoutBuilder(builder: (_, constraints) { return KeyboardRichText( richTextController: keyboardRichTextController, keyBroadToolbar: RichTextKeyboardToolBar( diff --git a/lib/features/composer/presentation/widgets/mobile/tablet_app_bar_composer_widget.dart b/lib/features/composer/presentation/widgets/mobile/tablet_app_bar_composer_widget.dart index 09686971c..897d4c571 100644 --- a/lib/features/composer/presentation/widgets/mobile/tablet_app_bar_composer_widget.dart +++ b/lib/features/composer/presentation/widgets/mobile/tablet_app_bar_composer_widget.dart @@ -1,7 +1,6 @@ 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/model/screen_display_mode.dart'; import 'package:tmail_ui_user/features/composer/presentation/styles/app_bar_composer_widget_style.dart'; import 'package:tmail_ui_user/features/composer/presentation/widgets/title_composer_widget.dart'; @@ -10,6 +9,7 @@ import 'package:tmail_ui_user/main/localizations/app_localizations.dart'; class TabletAppBarComposerWidget extends StatelessWidget { final String emailSubject; + final ImagePaths imagePaths; final VoidCallback onCloseViewAction; final ScreenDisplayMode? displayMode; final BoxConstraints? constraints; @@ -17,10 +17,9 @@ class TabletAppBarComposerWidget extends StatelessWidget { final VoidCallback insertImageAction; final bool isNetworkConnectionAvailable; - final _imagePaths = Get.find(); - - TabletAppBarComposerWidget({ + const TabletAppBarComposerWidget({ super.key, + required this.imagePaths, required this.emailSubject, required this.onCloseViewAction, required this.attachFileAction, @@ -41,7 +40,7 @@ class TabletAppBarComposerWidget extends StatelessWidget { Center( child: Container( constraints: constraints != null - ? BoxConstraints(maxWidth: constraints!.maxWidth / 2) + ? BoxConstraints(maxWidth: constraints!.maxWidth / 2 - 80) : null, child: TitleComposerWidget(emailSubject: emailSubject), ), @@ -54,7 +53,7 @@ class TabletAppBarComposerWidget extends StatelessWidget { if (isNetworkConnectionAvailable) ...[ TMailButtonWidget.fromIcon( - icon: _imagePaths.icAttachFile, + icon: imagePaths.icAttachFile, iconColor: AppBarComposerWidgetStyle.iconColor, backgroundColor: Colors.transparent, iconSize: AppBarComposerWidgetStyle.iconSize, @@ -63,7 +62,7 @@ class TabletAppBarComposerWidget extends StatelessWidget { ), const SizedBox(width: AppBarComposerWidgetStyle.space), TMailButtonWidget.fromIcon( - icon: _imagePaths.icInsertImage, + icon: imagePaths.icInsertImage, iconColor: AppBarComposerWidgetStyle.iconColor, backgroundColor: Colors.transparent, iconSize: AppBarComposerWidgetStyle.iconSize, @@ -73,7 +72,7 @@ class TabletAppBarComposerWidget extends StatelessWidget { const SizedBox(width: AppBarComposerWidgetStyle.space), ], TMailButtonWidget.fromIcon( - icon: _imagePaths.icCancel, + icon: imagePaths.icCancel, backgroundColor: Colors.transparent, tooltipMessage: AppLocalizations.of(context).saveAndClose, iconSize: AppBarComposerWidgetStyle.iconSize,