delegate property Null safety

DiffDelegate delegate

A complex class might implement DiffDelegate, this copies values into a simple implementation so it can more easily cross isolate boundaries

Implementation

DiffDelegate get delegate {
  final self = this;
  if (self == null) {
    return nullDelegate;
  }
  return _DiffDelegate(self.diffKey, self.diffSource);
}