append<T> method

T append<T>(
  1. NotifyData data,
  2. T builder()
)

Appends data to the provided data and executes the builder function.

Implementation

T append<T>(NotifyData data, T Function() builder) {
  _notifyData = data;
  final T result = builder();

  switch ((data.disposers.isEmpty, data.throwException)) {
    case (true, true):
      throw ObxError();
    case _:
      break;
  }

  _notifyData = null;
  return result;
}