Fix overlay title composer on tablet/ipad device
This commit is contained in:
@@ -43,7 +43,7 @@ class ComposerView extends GetWidget<ComposerController> {
|
||||
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<ComposerController> {
|
||||
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,
|
||||
|
||||
@@ -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);
|
||||
})
|
||||
),
|
||||
|
||||
@@ -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(
|
||||
|
||||
+7
-8
@@ -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<ImagePaths>();
|
||||
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user