Flutter (Android TV) - мягкая перекрытие клавиатуры/скрывает TextformfieldAndroid

Форум для тех, кто программирует под Android
Ответить
Anonymous
 Flutter (Android TV) - мягкая перекрытие клавиатуры/скрывает Textformfield

Сообщение Anonymous »

Проблема: < /strong>
Я создаю экран входа в систему для приложения Android TV. Макет-это двухколонный панель (слева: QR, справа: форма электронной почты/пароль). Когда появляется клавиатура на экране, поле электронной почты
остается видимым над клавиатурой, но поле Password (которое ниже) перекрывается/скрыто клавиатурой. Как я могу сохранить сфокусированное поле видимым на Android TV? мой макет телевизора.
Соответствующий код (упрощенный):

Код: Выделить всё

Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.transparent,
body: Column(
children: [
_showTopBar(),
Expanded(
child: Center(
child: Stack(
children: [
_showForm(),
_showCircularProgress(),
],
),
),
),
],
),
);
}

Widget _showForm() {
return Column(
children: [
Expanded(
child: Center(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 8),
child: Container(
child: Column(
children: [
// ... left column (QR) and divider ...
// Right: email/password column
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 24),
child: Center(
child: Form(
key: _formKey,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text("Login with Email"),
SizedBox(height: 20),
showEmailInput(),       // TextFormField with focusNode _emailFocus
SizedBox(height: 16),
showPasswordInput(),    // TextFormField with focusNode _passwordFocus
SizedBox(height: 24),
showPrimaryButton(),
],
),
),
),
),
),
],
),
),
),
),
),
],
);
}

Widget showEmailInput() => TextFormField(
keyboardType: TextInputType.emailAddress,
focusNode: _emailFocus,
onFieldSubmitted: (_) {
_emailFocus.unfocus();
FocusScope.of(context).requestFocus(_passwordFocus);
},
...
);

Widget showPasswordInput() => TextFormField(
obscureText: true,
focusNode: _passwordFocus,
...
);
среда
  • Flutter на Android TV
что я пробовал, но не работал
  • . (VISE-Eversa) Внутри каркаса сборки виджета
  • Добавление SingleChildScrollview и установить физическое свойство в BouncingScrollphysics


Подробнее здесь: https://stackoverflow.com/questions/797 ... tformfield
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Android»