PullProxy<M extends JSONModel> constructor
PullProxy<M extends JSONModel> (
- Map<
String, dynamic> _baseJSON, - Http http, {
- LinkNotifier<
PullLink> ? notifier, - Link? decorator,
- dynamic callback()?,
- Order order = Order.desc,
- int? offset,
- int range = 15,
- int trigger = 3,
- GlobalKey<
ScaffoldState> ? state, - PullStrategy strategy = PullStrategy.offsetPolicy,
- 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();
}
}