Commit 8bc9d1c0 authored by Dirk Steinkopf's avatar Dirk Steinkopf

ADM-66 show keyboard early

parent cbb2f14d
......@@ -59,7 +59,6 @@ class _TueraufHomePageState extends State<TueraufHomePage> with WidgetsBindingOb
bool _isFadedBackground = true;
// _pinEntryEnabled is currently without function
bool _pinEntryEnabled = true; // ignore: unused_field
bool _isConfiguredAndRegistered = false;
bool _inProgress = false;
String _fullVersion;
......@@ -84,7 +83,7 @@ class _TueraufHomePageState extends State<TueraufHomePage> with WidgetsBindingOb
void initState() {
super.initState();
_focusNodePinEntry = new FocusNode();
_setFocus(_isConfiguredAndRegistered);
_setFocus(_userRegistration != null);
UserRegistration.getInstance().then((UserRegistration userRegistration) {
_userRegistration = userRegistration;
// _enablePinEntry(true);
......@@ -173,7 +172,7 @@ class _TueraufHomePageState extends State<TueraufHomePage> with WidgetsBindingOb
),
child: new TextField(
controller: _pinEntryController,
autofocus: _isConfiguredAndRegistered,
autofocus: true,
focusNode: _focusNodePinEntry,
// maxLength: 4,
obscureText: true,
......@@ -238,7 +237,6 @@ class _TueraufHomePageState extends State<TueraufHomePage> with WidgetsBindingOb
} else if (_userRegistration == null || !_userRegistration.registered) {
_resultLabelText = "Nicht registriert.\nBitte auf Zahnrad klicken, Name eingeben und speichern!";
} else {
_isConfiguredAndRegistered = true;
if (_pendingOpenNow) {
_resultLabelText = "Warte, bis du nah genug bist...";
} else if (!_gotGeolocation) {
......@@ -358,7 +356,7 @@ class _TueraufHomePageState extends State<TueraufHomePage> with WidgetsBindingOb
void _setFocus(final bool setFocus) {
debugPrint("_setFocus $setFocus");
if (setFocus && _isConfiguredAndRegistered) {
if (setFocus) {
FocusScope.of(context).autofocus(_focusNodePinEntry);
// FocusScope.of(context).requestFocus(_focusNodePinEntry);
} else {
......
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