【发布时间】:2021-08-29 01:31:37
【问题描述】:
嗨,我正在学习颤振和编程新手
更改撰写区域内的内容可能会导致 输入法行为怪异,因此不鼓励。看 https://github.com/flutter/flutter/issues/78827了解更多详情 W/ListenableEditingState(9055): 一个监听器被添加到 EditingState 在使用 IInputConnectionWrapper(9055)进行批量编辑时: 非活动 InputConnection E/FlutterView(9055)上的 getSelectedText: dispatchKeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_A, scanCode=30, metaState=0, flags=0x8, repeatCount=0, eventTime=9164435, downTime=9164435, deviceId=0, source=0x101 }`
import 'package:flutter/material.dart';
import 'class_object.dart';
import 'package:flash_chat/constants.dart';
class RegistrationScreen extends StatefulWidget {
static const String id = 'registration_Screen';
@override
_RegistrationScreenState createState() => _RegistrationScreenState();
}
class _RegistrationScreenState extends State<RegistrationScreen> {
String email;
String password;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Hero(
tag: 'logo',
child: Container(
height: 200.0,
child: Image.asset('images/logo.png'),
),
),
SizedBox(
height: 48.0,
),
TextFormField(
onChanged: (value) {
//Do something with the user input.
email = value;
},
decoration: kTextFieldDecoration.copyWith(
hintText: 'Enter Your Password'
),
),
SizedBox(
height: 8.0,
),
TextFormField(
onChanged: (value) {
//Do something with the user input.
password=value;
},
decoration: kTextFieldDecoration.copyWith(
hintText: 'Enter Your Email'
)
),
SizedBox(
height: 24.0,
),
RoundButton(
Lable: 'Register',
Colour: Colors.blue,
onPress: () {
print(email);
print(password);
// Go to the Registration Screen
Navigator.pushNamed(context, RegistrationScreen.id);
},
),
],
),
),
),
);
}
}
W/IInputConnectionWrapper(9055):beginBatchEdit 处于非活动状态 InputConnection W/IInputConnectionWrapper(9055):getTextBeforeCursor 在非活动 InputConnection W/IInputConnectionWrapper(9055): 非活动 InputConnection 上的 getTextAfterCursor W/IInputConnectionWrapper(9055):getSelectedText 处于非活动状态 InputConnection W/IInputConnectionWrapper(9055):endBatchEdit on 带 IInputConnectionWrapper 的非活动 InputConnection(9055): beginBatchEdit 在非活动 InputConnection W/IInputConnectionWrapper( 9055): 非活动 InputConnection 上的 getTextBeforeCursor W/IInputConnectionWrapper(9055):endBatchEdit 处于非活动状态 输入连接
【问题讨论】: