How to change text inside bottom sheet dialog in flutter?
I want to change the value in text widget inside the bottom sheet dialog but I can't find a way to do it
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);
])])
I want to know if there is a way to change a text inside showModalBottomSheet in flutter after typing something in TextFormField. Otherwise, I need to update the value in the Text Widget for every change in the TextFormField in realtime.
HELP me please
from Recent Questions - Stack Overflow https://ift.tt/3o3nBRz
https://ift.tt/eA8V8J
Comments
Post a Comment