deinitialize method
void
deinitialize()
Sometimes, when using MVVM/MVC design patterns, you may want to
keep your controller in the root provider or notifier.
In this case, when UI component gets destroyed you will want
your controlller to be aware of that.
This deinitialize
method does just that.
It's called automatically when the editor widget is being disposed, so there's no need to call it explicitly outside.
Implementation
void deinitialize() => _initialized = false;