15
6
DO call super.dispose() at the end of the dispose method.
super.dispose()
dispose
@override void dispose() { super.dispose(); _dispose(); }
@override void dispose() { _dispose(); super.dispose(); }
To enable the proper_super_dispose rule, add proper_super_dispose under custom_lint > rules in your analysis_options.yaml file:
proper_super_dispose
analysis_options.yaml
custom_lint: rules: - proper_super_dispose