I am curious if creation of new objects removes all attached listeners. Here it is simple code:
class Notifier extends ChangeNotifier {}
final notifier = Notifier();
for (int i = 0; i < 2; i++) {
// Should I remove listeners before creation new instance of `Notifier`?
// Or new instantiaion assumes that all listeners attached to object will be removed?
notifier?.removeListener(_listener);
notifier = Notifier();
notifier.addListener(_listener);
}
void _listener() {}