on method
Apply the callback function to each change of the document.
Implementation
Gun on(Function(dynamic data, String key) cb) {
final gun = _gun.on(allowInterop(
(dynamic data, key, dynamic msg, dynamic ev) {
cb(jsToDart(data), key);
},
));
return Gun._(gun);
}