小编Pra*_*gat的帖子

如何将请求焦点转移到 Jetpack 撰写中的下一个文本字段

我的要求是,当我在文本字段中输入 1 位数字后,应将其转移到下一个文本字段。我到处都得到这样的答案。

简而言之,我正在寻找类似的功能,例如 android 中的 onTextChangeListener

请求关注 jetpack compose 中的 TextField

focus android-jetpack-compose

3
推荐指数
1
解决办法
4299
查看次数

TextFormField:在构建过程中调用的setState()或markNeedsBuild()

我正在尝试将首次按钮设置为禁用,并且当用户输入金额时将其启用,按钮禁用效果很好,但是当我在TextFormField中输入金额时,它给出以下错误。

   I/flutter (29519): ??? EXCEPTION CAUGHT BY WIDGETS LIBRARY 
   ????????????????????????????????????????????????????????????
   I/flutter (29519): The following assertion was thrown building 
   TextFormField(dirty, state: _TextFormFieldState#b89da):
   I/flutter (29519): setState() or markNeedsBuild() called during build.
   I/flutter (29519): This HomePage widget cannot be marked as needing to 
   build because the framework is already in the
   I/flutter (29519): process of building widgets. A widget can be marked as 
   needing to be built during the build phase
   I/flutter (29519): only if one of its ancestors is currently building. 
   This …
Run Code Online (Sandbox Code Playgroud)

dart flutter

2
推荐指数
1
解决办法
2323
查看次数

标签 统计

android-jetpack-compose ×1

dart ×1

flutter ×1

focus ×1