Reputation: 159
I have a textField
in showModalBottomSheet
. What i want if user fill the value in textField
and close the bottom sheet and reopen it the value must not be lost. The same value in textField
must be shown. How can i preserve the value in modal bottom Sheet?
Upvotes: 0
Views: 177
Reputation: 2521
create variable for value: _value
set new value for _value
on onTextChanged()
When open bottom sheet, init value for textField
TextEditingController _controller = TextEditingController(text: _value)
Upvotes: 1