Set padding for email address tag in input field
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
-5
@@ -3,12 +3,7 @@ import 'package:core/presentation/utils/theme_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AutoCompleteTagItemWebStyle {
|
||||
static const double paddingTop = 3.0;
|
||||
static const double paddingEnd = 40.0;
|
||||
static const double labelPaddingHorizontal = 4.0;
|
||||
static const EdgeInsetsGeometry collapsedPadding = EdgeInsetsDirectional.symmetric(vertical: 4, horizontal: 8);
|
||||
|
||||
static const EdgeInsetsGeometry marginCollapsed = EdgeInsets.only(top: 3);
|
||||
|
||||
static const BorderRadius shapeBorderRadius = BorderRadius.all(Radius.circular(10.0));
|
||||
|
||||
|
||||
+21
-13
@@ -7,29 +7,37 @@ import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||
class AdvancedSearchFieldWidget extends StatelessWidget {
|
||||
final FilterField filterField;
|
||||
final Widget child;
|
||||
final bool useHeight;
|
||||
|
||||
const AdvancedSearchFieldWidget({
|
||||
super.key,
|
||||
required this.filterField,
|
||||
required this.child,
|
||||
this.useHeight = true,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: AdvancedSearchInputFormStyle.inputFieldHeight,
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: AdvancedSearchInputFormStyle.labelMaxWidth,
|
||||
child: LabelAdvancedSearchFieldWidget(
|
||||
name: filterField.getTitle(AppLocalizations.of(context)),
|
||||
),
|
||||
final bodyWidget = Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: AdvancedSearchInputFormStyle.labelMaxWidth,
|
||||
child: LabelAdvancedSearchFieldWidget(
|
||||
name: filterField.getTitle(AppLocalizations.of(context)),
|
||||
),
|
||||
const SizedBox(width: AdvancedSearchInputFormStyle.labelSpace),
|
||||
Expanded(child: child),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(width: AdvancedSearchInputFormStyle.labelSpace),
|
||||
Expanded(child: child),
|
||||
],
|
||||
);
|
||||
|
||||
if (useHeight) {
|
||||
return SizedBox(
|
||||
height: AdvancedSearchInputFormStyle.inputFieldHeight,
|
||||
child: bodyWidget,
|
||||
);
|
||||
} else {
|
||||
return bodyWidget;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -23,6 +23,7 @@ class AdvancedSearchInputForm extends GetWidget<AdvancedFilterController> {
|
||||
children: [
|
||||
AdvancedSearchFieldWidget(
|
||||
filterField: FilterField.from,
|
||||
useHeight: false,
|
||||
child: Obx(() => DefaultAutocompleteInputFieldWidget(
|
||||
field: FilterField.from,
|
||||
listEmailAddress: controller.listFromEmailAddress,
|
||||
@@ -44,6 +45,7 @@ class AdvancedSearchInputForm extends GetWidget<AdvancedFilterController> {
|
||||
const SizedBox(height: 12),
|
||||
AdvancedSearchFieldWidget(
|
||||
filterField: FilterField.to,
|
||||
useHeight: false,
|
||||
child: Obx(() => DefaultAutocompleteInputFieldWidget(
|
||||
field: FilterField.to,
|
||||
listEmailAddress: controller.listToEmailAddress,
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:core/presentation/extensions/color_extension.dart';
|
||||
import 'package:core/presentation/extensions/string_extension.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/styles/avatar_tag_item_style.dart';
|
||||
|
||||
@@ -27,7 +28,7 @@ class AvatarTagItemWidget extends StatelessWidget {
|
||||
)
|
||||
),
|
||||
child: Text(
|
||||
tagName.isNotEmpty ? tagName[0].toUpperCase() : '',
|
||||
tagName.firstCharacterToUpperCase,
|
||||
style: AvatarTagItemStyle.labelTextStyle
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user