set controller to null on dispose to prevent any attempts at use after the widget was disposed

This commit is contained in:
julian 2023-04-11 10:12:26 -06:00
parent 2004abdfcc
commit 2e72a846a9

View file

@ -64,6 +64,7 @@ class _CustomTextButtonState extends State<_CustomTextButton>
@override
void dispose() {
controller?.dispose();
controller = null;
super.dispose();
}