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