TF-2540 Fix selected Email address at to/cc/bcc fields are moving too close to the bottom of input field
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -13,6 +13,7 @@ abstract class PlatformInfo {
|
||||
static bool get isAndroid => !kIsWeb && Platform.isAndroid;
|
||||
static bool get isMobile => isAndroid || isIOS;
|
||||
static bool get isDesktop => isLinux || isWindows || isMacOS;
|
||||
static bool get isWebMobile => kIsWeb && (defaultTargetPlatform == TargetPlatform.iOS || defaultTargetPlatform == TargetPlatform.android);
|
||||
|
||||
static String get platformNameOS {
|
||||
var platformName = '';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:core/utils/platform_info.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class RecipientTagItemWidgetStyle {
|
||||
@@ -9,7 +8,9 @@ class RecipientTagItemWidgetStyle {
|
||||
static const EdgeInsetsGeometry padding = EdgeInsetsDirectional.only(start: 4);
|
||||
static const EdgeInsetsGeometry counterPadding = EdgeInsetsDirectional.symmetric(vertical: 5, horizontal: 8);
|
||||
static const EdgeInsetsGeometry mobileCounterPadding = EdgeInsetsDirectional.symmetric(vertical: 8, horizontal: 8);
|
||||
static const EdgeInsetsGeometry counterMargin = EdgeInsetsDirectional.only(top: PlatformInfo.isWeb ? 8 : 0, start: 8);
|
||||
static const EdgeInsetsGeometry counterMargin = EdgeInsetsDirectional.only(start: 8);
|
||||
static const EdgeInsetsGeometry webMobileCounterMargin = EdgeInsetsDirectional.only(start: 8);
|
||||
static const EdgeInsetsGeometry webCounterMargin = EdgeInsetsDirectional.only(top: 8, start: 8);
|
||||
|
||||
static const TextStyle labelTextStyle = TextStyle(
|
||||
color: Colors.black,
|
||||
|
||||
@@ -56,7 +56,9 @@ class RecipientTagItemWidget extends StatelessWidget {
|
||||
if (PlatformInfo.isWeb)
|
||||
Flexible(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.only(top: 8),
|
||||
padding: EdgeInsetsDirectional.only(
|
||||
top: PlatformInfo.isWebMobile ? 0 : 8
|
||||
),
|
||||
child: InkWell(
|
||||
onTap: () => isCollapsed
|
||||
? onShowFullAction?.call(prefix)
|
||||
@@ -140,7 +142,7 @@ class RecipientTagItemWidget extends StatelessWidget {
|
||||
),
|
||||
if (isCollapsed)
|
||||
TMailButtonWidget.fromText(
|
||||
margin: RecipientTagItemWidgetStyle.counterMargin,
|
||||
margin: _counterMargin,
|
||||
text: '+$countRecipients',
|
||||
onTapActionCallback: () => onShowFullAction?.call(prefix),
|
||||
borderRadius: RecipientTagItemWidgetStyle.radius,
|
||||
@@ -155,6 +157,16 @@ class RecipientTagItemWidget extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
EdgeInsetsGeometry? get _counterMargin {
|
||||
if (PlatformInfo.isWebMobile) {
|
||||
return RecipientTagItemWidgetStyle.webMobileCounterMargin;
|
||||
} else if (PlatformInfo.isWeb) {
|
||||
return RecipientTagItemWidgetStyle.webCounterMargin;
|
||||
} else {
|
||||
return RecipientTagItemWidgetStyle.counterMargin;
|
||||
}
|
||||
}
|
||||
|
||||
int get countRecipients => currentListEmailAddress.length - collapsedListEmailAddress.length;
|
||||
|
||||
Color _getTagBackgroundColor() {
|
||||
|
||||
Reference in New Issue
Block a user