createObserver method

Widget createObserver(
  1. NotifyData data,
  2. WidgetCallback builder
)

Parses Observer for any Observables inside

Implementation

Widget createObserver(NotifyData data, WidgetCallback builder) {
  _notifyData = data;
  final result = builder();
  if (data.disposers.isEmpty) {
    throw ObserverError();
  }
  _notifyData = null;
  return result;
}