I have several controllers in my code (eg. TextEditingControllers, StreamControllers, ScrollControllers). Is there a way to get a warning/error if I ever forget to call the dispose() method on this variables?
I was hoping that there could be a lint for pedantic, but I couldn't find anything.
To clarify:
If initialize a controller
TextEditingController searchFieldController = TextEditingController();
And then forget to call
@override
void dispose() {
searchFieldController.dispose(); // This line
super.dispose();
}
It should generate a warning