Fixed width

This commit is contained in:
konrad 2019-03-22 20:46:42 +01:00
parent b666c85b0e
commit 8c4d1c8b89
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 24 additions and 21 deletions

View File

@ -242,27 +242,30 @@ class _TaskEditPageState extends State<TaskEditPage> {
}).toList()),
Row(
children: <Widget>[
TypeAheadFormField(
textFieldConfiguration: TextFieldConfiguration(
controller: _labelTypeAheadController,
onChanged: (value) => _labelSearchText = value,
decoration:
InputDecoration(labelText: 'Add a new label')),
suggestionsCallback: (pattern) {
return _searchLabel(pattern);
},
itemBuilder: (context, suggestion) {
return ListTile(
title: Text(suggestion),
);
},
transitionBuilder:
(context, suggestionsBox, controller) {
return suggestionsBox;
},
onSuggestionSelected: (suggestion) {
_addLabel(suggestion);
},
Container(
width: MediaQuery.of(context).size.width - 80,
child: TypeAheadFormField(
textFieldConfiguration: TextFieldConfiguration(
controller: _labelTypeAheadController,
onChanged: (value) => _labelSearchText = value,
decoration: InputDecoration(
labelText: 'Add a new label')),
suggestionsCallback: (pattern) {
return _searchLabel(pattern);
},
itemBuilder: (context, suggestion) {
return ListTile(
title: Text(suggestion),
);
},
transitionBuilder:
(context, suggestionsBox, controller) {
return suggestionsBox;
},
onSuggestionSelected: (suggestion) {
_addLabel(suggestion);
},
),
),
IconButton(
onPressed: () {