TF-1958 Fix "To" and "Cc" fields are not displayed in the single line on RTL mode
(cherry picked from commit c48dff29e37a0d9562b1ba7ce744d57cdae5ebaf)
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:core/presentation/extensions/color_extension.dart';
|
|||||||
import 'package:core/presentation/resources/image_paths.dart';
|
import 'package:core/presentation/resources/image_paths.dart';
|
||||||
import 'package:core/presentation/utils/responsive_utils.dart';
|
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||||
import 'package:core/presentation/utils/style_utils.dart';
|
import 'package:core/presentation/utils/style_utils.dart';
|
||||||
|
import 'package:core/utils/direction_utils.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -41,16 +42,25 @@ class EmailReceiverBuilder extends StatelessWidget {
|
|||||||
return Obx(() => Row(
|
return Obx(() => Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Expanded(child: _buildEmailAddressOfReceiver(
|
Expanded(child: Padding(
|
||||||
context,
|
padding: EdgeInsets.only(top: controller.isDisplayFullEmailAddress
|
||||||
emailSelected,
|
? DirectionUtils.isDirectionRTLByLanguage(context) ? 3 : 5.5
|
||||||
controller.isDisplayFullEmailAddress,
|
: 0),
|
||||||
maxWidth
|
child: _buildEmailAddressOfReceiver(
|
||||||
|
context,
|
||||||
|
emailSelected,
|
||||||
|
controller.isDisplayFullEmailAddress,
|
||||||
|
maxWidth
|
||||||
|
),
|
||||||
)),
|
)),
|
||||||
if (controller.isDisplayFullEmailAddress)
|
if (controller.isDisplayFullEmailAddress)
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 8),
|
padding: EdgeInsets.symmetric(
|
||||||
|
vertical: DirectionUtils.isDirectionRTLByLanguage(context) ? 0 : 6),
|
||||||
child: MaterialTextButton(
|
child: MaterialTextButton(
|
||||||
|
padding: DirectionUtils.isDirectionRTLByLanguage(context)
|
||||||
|
? const EdgeInsets.symmetric(horizontal: 8, vertical: 4)
|
||||||
|
: null,
|
||||||
onTap: controller.collapseEmailAddress,
|
onTap: controller.collapseEmailAddress,
|
||||||
label: AppLocalizations.of(context).hide,
|
label: AppLocalizations.of(context).hide,
|
||||||
)
|
)
|
||||||
@@ -142,37 +152,29 @@ class EmailReceiverBuilder extends StatelessWidget {
|
|||||||
PrefixEmailAddress prefixEmailAddress,
|
PrefixEmailAddress prefixEmailAddress,
|
||||||
bool isDisplayFull
|
bool isDisplayFull
|
||||||
) {
|
) {
|
||||||
return Padding(
|
return Row(
|
||||||
padding: const EdgeInsets.only(top: 4),
|
children: [
|
||||||
child: Row(
|
Text(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
'${prefixEmailAddress.asName(context)}:',
|
||||||
mainAxisSize: MainAxisSize.min,
|
style: const TextStyle(
|
||||||
children: [
|
fontSize: 16,
|
||||||
Padding(
|
fontWeight: FontWeight.w500,
|
||||||
padding: const EdgeInsets.only(top: 5),
|
color: AppColor.colorEmailAddressFull
|
||||||
child: Text(
|
)
|
||||||
'${prefixEmailAddress.asName(context)}:',
|
),
|
||||||
style: const TextStyle(
|
if (!isDisplayFull && presentationEmail.numberOfAllEmailAddress() > 1)
|
||||||
fontSize: 16,
|
_buildListEmailAddressWidget(
|
||||||
fontWeight: FontWeight.w500,
|
context,
|
||||||
color: AppColor.colorEmailAddressFull
|
prefixEmailAddress.listEmailAddress(presentationEmail),
|
||||||
)
|
isDisplayFull
|
||||||
),
|
)
|
||||||
),
|
else
|
||||||
if (!isDisplayFull && presentationEmail.numberOfAllEmailAddress() > 1)
|
Expanded(child: _buildListEmailAddressWidget(
|
||||||
_buildListEmailAddressWidget(
|
context,
|
||||||
context,
|
prefixEmailAddress.listEmailAddress(presentationEmail),
|
||||||
prefixEmailAddress.listEmailAddress(presentationEmail),
|
isDisplayFull
|
||||||
isDisplayFull
|
))
|
||||||
)
|
]
|
||||||
else
|
|
||||||
Expanded(child: _buildListEmailAddressWidget(
|
|
||||||
context,
|
|
||||||
prefixEmailAddress.listEmailAddress(presentationEmail),
|
|
||||||
isDisplayFull
|
|
||||||
))
|
|
||||||
]
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -109,7 +109,7 @@ class ChangeLanguageButtonWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
color: AppColor.colorItemSelected,
|
color: AppColor.colorItemSelected,
|
||||||
),
|
),
|
||||||
padding: const EdgeInsets.only(left: 12, right: 10),
|
padding: const EdgeInsetsDirectional.only(start: 12, end: 10),
|
||||||
child: Row(children: [
|
child: Row(children: [
|
||||||
Expanded(child: Text(
|
Expanded(child: Text(
|
||||||
_controller.languageSelected.value.getLanguageNameByCurrentLocale(context),
|
_controller.languageSelected.value.getLanguageNameByCurrentLocale(context),
|
||||||
|
|||||||
Reference in New Issue
Block a user