我想更改底部工作表对话框内文本小部件中的值,但找不到方法
showBottomDialog(
context: context,
allowBackNavigation: true,
title: "Modifier la photo de profile",
content: 'Contain TextFormField',
actions: [
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
TextFormField(
decoration: InputDecoration(
labelText: 'Nom',
labelStyle: TextStyle(
fontFamily: 'Montserrat',
fontWeight: FontWeight.bold,
color: Colors.grey,
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: kPrimaryColor,
),
),
),
controller: _nom,
onChanged: (value){
setStat(){
_new_name = value;
}
},
validator: (value) {
if (value == null || value.isEmpty) {
return 'Veuillez remplir ce champ';
}
return null;
},
),
SizedBox(height: 10.0),
Text(_new_name);
])])
我想知道在 TextFormField 中输入内容后是否有办法在颤动中更改 showModalBottomSheet 中的文本。否则,我需要为 TextFormField 中的每次更改实时更新 Text Widget 中的值。
请帮帮我