Settings
This commit is contained in:
parent
79da0b0afc
commit
c5c6150ffb
|
|
@ -136,7 +136,7 @@ class AppBuilderState extends State<AppBuilder> {
|
||||||
child: widget.builder(context),
|
child: widget.builder(context),
|
||||||
focusNode: _focusNode,
|
focusNode: _focusNode,
|
||||||
onKey: (event) {
|
onKey: (event) {
|
||||||
if (kReleaseMode) {
|
if (true || kReleaseMode) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
print(
|
print(
|
||||||
|
|
|
||||||
|
|
@ -36,16 +36,24 @@ class EntityDropdown extends StatefulWidget {
|
||||||
|
|
||||||
class _EntityDropdownState extends State<EntityDropdown> {
|
class _EntityDropdownState extends State<EntityDropdown> {
|
||||||
final _textController = TextEditingController();
|
final _textController = TextEditingController();
|
||||||
|
final _focusNode = FocusNode();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_textController.text = widget.initialValue;
|
_textController.text = widget.initialValue;
|
||||||
|
_focusNode.addListener(() {
|
||||||
|
print('## DOCUS EVENT: hasFocus: ${_focusNode.hasFocus}##');
|
||||||
|
if (_focusNode.hasFocus) {
|
||||||
|
_showOptions();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_textController.dispose();
|
_textController.dispose();
|
||||||
|
_focusNode.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -74,6 +82,8 @@ class _EntityDropdownState extends State<EntityDropdown> {
|
||||||
onTap: () => _showOptions(),
|
onTap: () => _showOptions(),
|
||||||
child: IgnorePointer(
|
child: IgnorePointer(
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
|
focusNode: _focusNode,
|
||||||
|
readOnly: true,
|
||||||
validator: widget.validator,
|
validator: widget.validator,
|
||||||
autovalidate: widget.autoValidate,
|
autovalidate: widget.autoValidate,
|
||||||
controller: _textController,
|
controller: _textController,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue