PullProxy<M extends JSONModel> constructor

PullProxy<M extends JSONModel>(
  1. Map<String, dynamic> _baseJSON,
  2. Http http, {
  3. LinkNotifier<PullLink>? notifier,
  4. Link? decorator,
  5. dynamic callback(
    1. int start,
    2. int size
    )?,
  6. Order order = Order.desc,
  7. int? offset,
  8. int range = 15,
  9. int trigger = 3,
  10. GlobalKey<ScaffoldState>? state,
  11. PullStrategy strategy = PullStrategy.offsetPolicy,
  12. bool initRequest = true,
})

Implementation

PullProxy(this._baseJSON, this.http,
    {LinkNotifier<PullLink>? notifier,
      this.decorator,
      Function(int start, int size)? callback,
      this.order = Order.desc,
      this.offset,
      int range = 15,
      int trigger = 3,
      GlobalKey<ScaffoldState>? state,
      this.strategy = PullStrategy.offsetPolicy,
      bool initRequest = true})
    : _notifier = notifier,
      _callback = callback,
      _range = range,
      _trigger = trigger,
      _state = state {
  if (notifier == null) _notifier = LinkNotifier<PullLink>.empty();
  offset ??= offsetDefault();
  if (strategy == PullStrategy.countPolicy) {
    nextOffset = nextByCount;
  }

  if (initRequest) {
    _request();
  }
}