addListener method Null safety

void addListener(
  1. VoidCallback listener
)

Register a closure to be called when the object notifies its listeners.

Implementation

void addListener(VoidCallback listener);