📜  如何在颤动中将焦点转移到下一个文本字段? - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:16.590000             🧑  作者: Mango

代码示例1
@override
Widget build(BuildContext context) {
  return Scaffold(
    body: Column(
      children: [
        TextField(
          decoration: InputDecoration(hintText: 'TextField A'),
          textInputAction: TextInputAction.next, // Moves focus to next.
        ),
        TextField(
          decoration: InputDecoration(hintText: 'TextField B'),
          textInputAction: TextInputAction.next, // Moves focus to next.
        ),
        TextField(
          decoration: InputDecoration(hintText: 'TextField C'),
          textInputAction: TextInputAction.done, // Hides the keyboard.
        ),
      ],
    ),
  );
}