addObserver method

void addObserver(
  1. dynamic key,
  2. String postName,
  3. dynamic notification(
    1. dynamic value
    )
)

Implementation

void addObserver(dynamic key, String postName, Function(dynamic value) notification) {
  var list = _notificationMap[postName] ?? [];
  list.add(GTFNotificationModel(key, notification));
  _notificationMap[postName] = list;
}