Commit efcb1fdc authored by Dirk Steinkopf's avatar Dirk Steinkopf

ADM-66 show keyboard early

parent bd4fb7be
......@@ -84,6 +84,7 @@ class _TueraufHomePageState extends State<TueraufHomePage> with WidgetsBindingOb
void initState() {
super.initState();
_focusNodePinEntry = new FocusNode();
_setFocus(_isConfiguredAndRegistered);
UserRegistration.getInstance().then((UserRegistration userRegistration) {
_userRegistration = userRegistration;
// _enablePinEntry(true);
......@@ -279,7 +280,6 @@ class _TueraufHomePageState extends State<TueraufHomePage> with WidgetsBindingOb
debugPrint("_pinEntryFieldChanged: value = " + pinValue);
if (pinValue.length >= 4) {
debugPrint("4 sind da");
_setFocus(false);
openNow();
}
}
......@@ -293,12 +293,12 @@ class _TueraufHomePageState extends State<TueraufHomePage> with WidgetsBindingOb
final pin = _pinEntryController.value.text;
_pendingOpenNow = false;
_setFocus(false);
if (!_isNear && _isFar) {
debugPrint("no near geolocation - _pendingOpenNow := true");
setState(() {
_pendingOpenNow = true;
_setFocus(false);
_updateResultLabelText(null); // _pendingOpenNow text will be used
});
new Timer(TIME_TO_KEEP_PENDING_OPEN_NOW, () {
......@@ -357,6 +357,7 @@ class _TueraufHomePageState extends State<TueraufHomePage> with WidgetsBindingOb
}
void _setFocus(final bool setFocus) {
debugPrint("_setFocus $setFocus");
if (setFocus && _isConfiguredAndRegistered) {
FocusScope.of(context).autofocus(_focusNodePinEntry);
// FocusScope.of(context).requestFocus(_focusNodePinEntry);
......@@ -477,10 +478,10 @@ class _TueraufHomePageState extends State<TueraufHomePage> with WidgetsBindingOb
(_neverSetGotGeolocation ? "KEINE Ortsbestimmung möglich." : ""));
});
if (!_pendingOpenNow) {
_setFocus(true);
}
if (_isNear) {
if (!_pendingOpenNow) {
_setFocus(true);
}
_geoy = geox;
_geox = geoy;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment