addListener method

  1. @protected
  2. @Deprecated('Use addStrongRefListener to make the contract explicit.')
  3. @override
void addListener(
  1. VoidCallback listener
)
override

Implements the Listenable interface.

Use addStrongRefListener instead, as this method's name can be misleading about the weak reference behavior.

Implementation

@protected
@Deprecated('Use addStrongRefListener to make the contract explicit.')
@override
void addListener(VoidCallback listener) {
  addStrongRefListener(strongRefListener: listener);
}