append<T> method

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

Executes a builder function with reactive tracking.

Implementation

T append<T>(NotifyData data, T Function() builder) {
  final prev = _notifyData;
  _notifyData = data;
  try {
    final result = builder();
    if (data._subscribedNotifiers.isEmpty && data.throwException) {
      throw const ObxError();
    }
    return result;
  } finally {
    _notifyData = prev;
  }
}