Fix UserAdd IconButton alignment
This commit is contained in:
@@ -67,72 +67,75 @@ class ChipInputTextFieldState<T> extends State<ChipsInputTextField<T>> {
|
|||||||
child: Container(
|
child: Container(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(16, 16, 16, 16),
|
padding: const EdgeInsets.fromLTRB(16, 16, 16, 16),
|
||||||
child: Row(
|
child: IntrinsicHeight(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Row(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Padding(
|
children: [
|
||||||
padding: const EdgeInsets.symmetric(vertical: 4.0),
|
Padding(
|
||||||
child: Text(
|
padding: const EdgeInsets.symmetric(vertical: 4.0),
|
||||||
'TO:',
|
child: Text(
|
||||||
style: TextStyle(
|
'TO:',
|
||||||
color: Colors.black.withOpacity(0.5),
|
style: TextStyle(
|
||||||
|
color: Colors.black.withOpacity(0.5),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(width: 12),
|
||||||
SizedBox(width: 12),
|
Expanded(
|
||||||
Expanded(
|
child: Column(
|
||||||
child: Column(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisSize: MainAxisSize.min,
|
children: [
|
||||||
children: [
|
Wrap(
|
||||||
Wrap(
|
spacing: 8.0,
|
||||||
spacing: 8.0,
|
runSpacing: 4.0,
|
||||||
runSpacing: 4.0,
|
children: _chips.map((item) {
|
||||||
children: _chips.map((item) {
|
return widget.chipBuilder(context, item);
|
||||||
return widget.chipBuilder(context, item);
|
}).toList(),
|
||||||
}).toList(),
|
),
|
||||||
),
|
if (!_pauseItemAddition)
|
||||||
if (!_pauseItemAddition) ...[
|
TextField(
|
||||||
TextField(
|
controller: widget.controller,
|
||||||
controller: widget.controller,
|
onChanged: widget.onInputChanged,
|
||||||
onChanged: widget.onInputChanged,
|
focusNode: widget.focusNode,
|
||||||
focusNode: widget.focusNode,
|
decoration: InputDecoration(
|
||||||
decoration: InputDecoration(
|
isDense: true,
|
||||||
isDense: true,
|
border: InputBorder.none,
|
||||||
border: InputBorder.none,
|
focusedBorder: InputBorder.none,
|
||||||
focusedBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
enabledBorder: InputBorder.none,
|
errorBorder: InputBorder.none,
|
||||||
errorBorder: InputBorder.none,
|
disabledBorder: InputBorder.none,
|
||||||
disabledBorder: InputBorder.none,
|
contentPadding: const EdgeInsets.only(top: 4.0),
|
||||||
contentPadding: const EdgeInsets.only(top: 4.0),
|
hintText: widget.hint,
|
||||||
hintText: widget.hint,
|
hintStyle: TextStyle(
|
||||||
hintStyle: TextStyle(
|
color: Colors.black.withOpacity(0.5),
|
||||||
color: Colors.black.withOpacity(0.5),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
]
|
),
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
SizedBox(width: 12),
|
||||||
IconButton(
|
Align(
|
||||||
icon: Icon(
|
alignment: Alignment.bottomCenter,
|
||||||
_chips.isEmpty ? StreamIcons.user : StreamIcons.user_add,
|
child: IconButton(
|
||||||
color: Colors.black.withOpacity(0.5),
|
icon: Icon(
|
||||||
|
_chips.isEmpty ? StreamIcons.user : StreamIcons.user_add,
|
||||||
|
color: Colors.black.withOpacity(0.5),
|
||||||
|
),
|
||||||
|
onPressed: !_pauseItemAddition ? null : resumeItemAddition,
|
||||||
|
alignment: Alignment.topRight,
|
||||||
|
visualDensity: VisualDensity.compact,
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
|
splashRadius: 24,
|
||||||
|
constraints: BoxConstraints.tightFor(
|
||||||
|
height: 24,
|
||||||
|
width: 24,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
onPressed: () {
|
],
|
||||||
resumeItemAddition();
|
),
|
||||||
},
|
|
||||||
alignment: Alignment.topRight,
|
|
||||||
visualDensity: VisualDensity.compact,
|
|
||||||
padding: const EdgeInsets.all(0),
|
|
||||||
splashRadius: 24,
|
|
||||||
constraints: BoxConstraints.tightFor(
|
|
||||||
height: 24,
|
|
||||||
width: 24,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user