TF-3952 Change recipient input style
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
+26
-20
@@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:core/presentation/extensions/color_extension.dart';
|
import 'package:core/presentation/extensions/color_extension.dart';
|
||||||
import 'package:core/presentation/resources/image_paths.dart';
|
import 'package:core/presentation/resources/image_paths.dart';
|
||||||
@@ -86,11 +87,12 @@ class _AutocompleteContactTextFieldWithTagsState extends State<AutocompleteConta
|
|||||||
length: listEmailAddress.length,
|
length: listEmailAddress.length,
|
||||||
controller: widget.controller,
|
controller: widget.controller,
|
||||||
focusNodeKeyboard: _focusNodeKeyboard,
|
focusNodeKeyboard: _focusNodeKeyboard,
|
||||||
borderRadius: 12,
|
borderRadius: 10,
|
||||||
backgroundColor: AppColor.colorInputBackgroundCreateMailbox,
|
backgroundColor: Colors.white,
|
||||||
focusedBorderColor: AppColor.colorTextButton,
|
enableBorder: true,
|
||||||
enableBorderColor: AppColor.colorInputBorderCreateMailbox,
|
focusedBorderColor: AppColor.primaryMain,
|
||||||
cursorColor: AppColor.primaryColor,
|
enableBorderColor: AppColor.m3Neutral90,
|
||||||
|
cursorColor: AppColor.primaryMain,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
suggestionPadding: const EdgeInsets.symmetric(vertical: 12),
|
suggestionPadding: const EdgeInsets.symmetric(vertical: 12),
|
||||||
suggestionMargin: const EdgeInsets.symmetric(vertical: 4),
|
suggestionMargin: const EdgeInsets.symmetric(vertical: 4),
|
||||||
@@ -125,18 +127,11 @@ class _AutocompleteContactTextFieldWithTagsState extends State<AutocompleteConta
|
|||||||
emailAddress: EmailAddress(null, value),
|
emailAddress: EmailAddress(null, value),
|
||||||
isClearInput: true
|
isClearInput: true
|
||||||
),
|
),
|
||||||
textStyle: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
textStyle: ThemeUtils.textStyleBodyBody3(color: Colors.black),
|
||||||
color: Colors.black,
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
inputDecoration: InputDecoration(
|
inputDecoration: InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
hintText: AppLocalizations.of(context).hintInputAutocompleteContact,
|
hintText: AppLocalizations.of(context).hintInputAutocompleteContact,
|
||||||
hintStyle: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
hintStyle: ThemeUtils.textStyleBodyBody3(color: AppColor.steelGray400)
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
color: AppColor.colorSettingExplanation,
|
|
||||||
fontSize: 16
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
tagBuilder: (context, index) => ContactInputTagItem(
|
tagBuilder: (context, index) => ContactInputTagItem(
|
||||||
listEmailAddress[index],
|
listEmailAddress[index],
|
||||||
@@ -187,12 +182,23 @@ class _AutocompleteContactTextFieldWithTagsState extends State<AutocompleteConta
|
|||||||
_buildAddRecipientButton(context)
|
_buildAddRecipientButton(context)
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
: Row(
|
: LayoutBuilder(
|
||||||
children: [
|
builder: (context, constraints) {
|
||||||
Expanded(child: itemTagEditor),
|
return Row(
|
||||||
const SizedBox(width: 12),
|
children: [
|
||||||
_buildAddRecipientButton(context)
|
Flexible(
|
||||||
],
|
child: ConstrainedBox(
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
maxWidth: min(404, constraints.maxWidth),
|
||||||
|
),
|
||||||
|
child: itemTagEditor,
|
||||||
|
)
|
||||||
|
),
|
||||||
|
const SizedBox(width: 12),
|
||||||
|
_buildAddRecipientButton(context)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return itemTagEditor;
|
return itemTagEditor;
|
||||||
|
|||||||
Reference in New Issue
Block a user