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),
|
onCloseViewAction: () => controller.handleClickCloseComposer(context),
|
||||||
onClearFocusAction: () => controller.clearFocus(context),
|
onClearFocusAction: () => controller.clearFocus(context),
|
||||||
backgroundColor: MobileAppBarComposerWidgetStyle.backgroundColor,
|
backgroundColor: MobileAppBarComposerWidgetStyle.backgroundColor,
|
||||||
childBuilder: (context, constraints) => SafeArea(
|
childBuilder: (_, constraints) => SafeArea(
|
||||||
left: !controller.responsiveUtils.isLandscapeMobile(context),
|
left: !controller.responsiveUtils.isLandscapeMobile(context),
|
||||||
right: !controller.responsiveUtils.isLandscapeMobile(context),
|
right: !controller.responsiveUtils.isLandscapeMobile(context),
|
||||||
child: Container(
|
child: Container(
|
||||||
@@ -297,11 +297,12 @@ class ComposerView extends GetWidget<ComposerController> {
|
|||||||
keyboardRichTextController: controller.richTextMobileTabletController!.richTextController,
|
keyboardRichTextController: controller.richTextMobileTabletController!.richTextController,
|
||||||
onCloseViewAction: () => controller.handleClickCloseComposer(context),
|
onCloseViewAction: () => controller.handleClickCloseComposer(context),
|
||||||
onClearFocusAction: () => controller.clearFocus(context),
|
onClearFocusAction: () => controller.clearFocus(context),
|
||||||
childBuilder: (context, constraints) => Container(
|
childBuilder: (_, constraints) => ColoredBox(
|
||||||
color: ComposerStyle.mobileBackgroundColor,
|
color: ComposerStyle.mobileBackgroundColor,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Obx(() => TabletAppBarComposerWidget(
|
Obx(() => TabletAppBarComposerWidget(
|
||||||
|
imagePaths: controller.imagePaths,
|
||||||
emailSubject: controller.subjectEmail.value ?? '',
|
emailSubject: controller.subjectEmail.value ?? '',
|
||||||
onCloseViewAction: () => controller.handleClickCloseComposer(context),
|
onCloseViewAction: () => controller.handleClickCloseComposer(context),
|
||||||
constraints: constraints,
|
constraints: constraints,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class MobileContainerView extends StatelessWidget {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: backgroundColor ?? MobileContainerViewStyle.outSideBackgroundColor,
|
backgroundColor: backgroundColor ?? MobileContainerViewStyle.outSideBackgroundColor,
|
||||||
resizeToAvoidBottomInset: false,
|
resizeToAvoidBottomInset: false,
|
||||||
body: LayoutBuilder(builder: (context, constraints) {
|
body: LayoutBuilder(builder: (_, constraints) {
|
||||||
return childBuilder(context, constraints);
|
return childBuilder(context, constraints);
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class TabletContainerView extends StatelessWidget {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: TabletContainerViewStyle.outSideBackgroundColor,
|
backgroundColor: TabletContainerViewStyle.outSideBackgroundColor,
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: LayoutBuilder(builder: (context, constraints) {
|
child: LayoutBuilder(builder: (_, constraints) {
|
||||||
return KeyboardRichText(
|
return KeyboardRichText(
|
||||||
richTextController: keyboardRichTextController,
|
richTextController: keyboardRichTextController,
|
||||||
keyBroadToolbar: RichTextKeyboardToolBar(
|
keyBroadToolbar: RichTextKeyboardToolBar(
|
||||||
|
|||||||
+7
-8
@@ -1,7 +1,6 @@
|
|||||||
import 'package:core/presentation/resources/image_paths.dart';
|
import 'package:core/presentation/resources/image_paths.dart';
|
||||||
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
import 'package:core/presentation/views/button/tmail_button_widget.dart';
|
||||||
import 'package:flutter/material.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/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/styles/app_bar_composer_widget_style.dart';
|
||||||
import 'package:tmail_ui_user/features/composer/presentation/widgets/title_composer_widget.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 {
|
class TabletAppBarComposerWidget extends StatelessWidget {
|
||||||
|
|
||||||
final String emailSubject;
|
final String emailSubject;
|
||||||
|
final ImagePaths imagePaths;
|
||||||
final VoidCallback onCloseViewAction;
|
final VoidCallback onCloseViewAction;
|
||||||
final ScreenDisplayMode? displayMode;
|
final ScreenDisplayMode? displayMode;
|
||||||
final BoxConstraints? constraints;
|
final BoxConstraints? constraints;
|
||||||
@@ -17,10 +17,9 @@ class TabletAppBarComposerWidget extends StatelessWidget {
|
|||||||
final VoidCallback insertImageAction;
|
final VoidCallback insertImageAction;
|
||||||
final bool isNetworkConnectionAvailable;
|
final bool isNetworkConnectionAvailable;
|
||||||
|
|
||||||
final _imagePaths = Get.find<ImagePaths>();
|
const TabletAppBarComposerWidget({
|
||||||
|
|
||||||
TabletAppBarComposerWidget({
|
|
||||||
super.key,
|
super.key,
|
||||||
|
required this.imagePaths,
|
||||||
required this.emailSubject,
|
required this.emailSubject,
|
||||||
required this.onCloseViewAction,
|
required this.onCloseViewAction,
|
||||||
required this.attachFileAction,
|
required this.attachFileAction,
|
||||||
@@ -41,7 +40,7 @@ class TabletAppBarComposerWidget extends StatelessWidget {
|
|||||||
Center(
|
Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
constraints: constraints != null
|
constraints: constraints != null
|
||||||
? BoxConstraints(maxWidth: constraints!.maxWidth / 2)
|
? BoxConstraints(maxWidth: constraints!.maxWidth / 2 - 80)
|
||||||
: null,
|
: null,
|
||||||
child: TitleComposerWidget(emailSubject: emailSubject),
|
child: TitleComposerWidget(emailSubject: emailSubject),
|
||||||
),
|
),
|
||||||
@@ -54,7 +53,7 @@ class TabletAppBarComposerWidget extends StatelessWidget {
|
|||||||
if (isNetworkConnectionAvailable)
|
if (isNetworkConnectionAvailable)
|
||||||
...[
|
...[
|
||||||
TMailButtonWidget.fromIcon(
|
TMailButtonWidget.fromIcon(
|
||||||
icon: _imagePaths.icAttachFile,
|
icon: imagePaths.icAttachFile,
|
||||||
iconColor: AppBarComposerWidgetStyle.iconColor,
|
iconColor: AppBarComposerWidgetStyle.iconColor,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
iconSize: AppBarComposerWidgetStyle.iconSize,
|
iconSize: AppBarComposerWidgetStyle.iconSize,
|
||||||
@@ -63,7 +62,7 @@ class TabletAppBarComposerWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: AppBarComposerWidgetStyle.space),
|
const SizedBox(width: AppBarComposerWidgetStyle.space),
|
||||||
TMailButtonWidget.fromIcon(
|
TMailButtonWidget.fromIcon(
|
||||||
icon: _imagePaths.icInsertImage,
|
icon: imagePaths.icInsertImage,
|
||||||
iconColor: AppBarComposerWidgetStyle.iconColor,
|
iconColor: AppBarComposerWidgetStyle.iconColor,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
iconSize: AppBarComposerWidgetStyle.iconSize,
|
iconSize: AppBarComposerWidgetStyle.iconSize,
|
||||||
@@ -73,7 +72,7 @@ class TabletAppBarComposerWidget extends StatelessWidget {
|
|||||||
const SizedBox(width: AppBarComposerWidgetStyle.space),
|
const SizedBox(width: AppBarComposerWidgetStyle.space),
|
||||||
],
|
],
|
||||||
TMailButtonWidget.fromIcon(
|
TMailButtonWidget.fromIcon(
|
||||||
icon: _imagePaths.icCancel,
|
icon: imagePaths.icCancel,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
tooltipMessage: AppLocalizations.of(context).saveAndClose,
|
tooltipMessage: AppLocalizations.of(context).saveAndClose,
|
||||||
iconSize: AppBarComposerWidgetStyle.iconSize,
|
iconSize: AppBarComposerWidgetStyle.iconSize,
|
||||||
|
|||||||
Reference in New Issue
Block a user