TextEditingController titleC = TextEditingController();
TextEditingController detailsC = TextEditingController();
// in dispose how can in dispose or clear my controller after submitting
@override
void dispose() {
titleC.clear();
titleC.dispose();
detailsC.clear();
detailsC.dispose();
super.dispose();
}
// for TextEditingController create:
final TextEditingController _emailController = TextEditingController();
// for TextEditingController dispose:
@override
void dispose() {
/* Discards any resources used by the object. After this is called,
the object is not in a usable state and should be discarded
(calls to addListener will throw after the object is disposed) */
_emailController.dispose();
super.dispose();
}