FlarkEditRecorder constructor

FlarkEditRecorder(
  1. FlarkEditor editor, {
  2. int capacity = 2000,
})

Records editor's calls from now on, as its FlarkEditor.onCall. An editor serves one observer at a time: one that has another throws a StateError.

Implementation

FlarkEditRecorder(this.editor, {this.capacity = 2000}) {
  if (capacity < 1) throw ArgumentError.value(capacity, 'capacity');
  if (editor.onCall != null) {
    throw StateError('the editor already has a call observer');
  }
  _restart();
  editor.onCall = _observer;
}