notifyData method Null safety

void notifyData(
  1. dynamic data
)

Notify all subscriptions on addMessages

Implementation

void notifyData(dynamic data) {
  for (var item in _onMessages!) {
    item(data);
  }
  if (data is String) {
    _tryOn(data);
  }
}