DropinityPagifyData<FullResponse, Model> class
main class to Pagify data
Constructors
-
DropinityPagifyData({required Future<
FullResponse> asyncCall(BuildContext context, int page), required PagifyData<Model> mapper(FullResponse response), required PagifyErrorMapper errorMapper, required Widget itemBuilder(BuildContext context, List<Model> data, int index, Model element), PagifyController<Model> ? controller, EdgeInsetsGeometry padding = const EdgeInsets.all(0), double? itemExtent, FutureOr<void> onUpdateStatus(PagifyAsyncCallStatus)?, FutureOr<void> onLoading()?, FutureOr<void> onSuccess(BuildContext, List)?, FutureOr<void> onError(BuildContext, int, PagifyException)?, bool ignoreErrorBuilderWhenErrorOccursAndListIsNotEmpty = true, bool showNoDataAlert = false, Widget? loadingBuilder, Widget errorBuilder(PagifyException)?, String? cacheKey, Map<String, dynamic> cacheToJson(Model item)?, Model cacheFromJson(Map<String, dynamic> json)?, void onSaveCache(String key, List<Map< items)?, List<String, dynamic> >Map< ? onReadCache(String key)?})String, dynamic> > - constructor for DropinityPagifyData
Properties
-
asyncCall
↔ Future<
FullResponse> Function(BuildContext context, int page) -
pagify main api request comes from
Pagifypackagegetter/setter pair -
cacheFromJson
↔ Model Function(Map<
String, dynamic> json)? -
Converts a cached JSON map back to a
Modelitem.getter/setter pair - cacheKey ↔ String?
-
Optional cache key for offline support.
Must be provided together with cacheToJson, cacheFromJson, onSaveCache, and onReadCache.
getter/setter pair
-
cacheToJson
↔ Map<
String, dynamic> Function(Model item)? -
Converts a
Modelitem to a JSON map for caching.getter/setter pair -
controller
→ PagifyController<
Model> ? -
pagify controller comes from
Pagifypackagefinal - emptyListView ↔ Widget?
-
custom empty list view Widget comes from
Pagifypackagegetter/setter pair - errorBuilder ↔ Widget Function(PagifyException)?
-
custom error Widget comes from
Pagifypackagegetter/setter pair - errorMapper ↔ PagifyErrorMapper
-
pagify error mapper comes from
Pagifypackagegetter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- ignoreErrorBuilderWhenErrorOccursAndListIsNotEmpty ↔ bool
-
keep current view when error bool comes from
Pagifypackagegetter/setter pair -
itemBuilder
↔ Widget Function(BuildContext context, List<
Model> data, int index, Model element) -
pagify item builder comes from
Pagifypackagegetter/setter pair - itemExtent ↔ double?
-
item extent double to single element
widgetgetter/setter pair - loadingBuilder ↔ Widget?
-
custom loader Widget comes from
Pagifypackagegetter/setter pair -
mapper
↔ PagifyData<
Model> Function(FullResponse response) -
pagify mapper comes from
Pagifypackagegetter/setter pair - noConnectionText ↔ String?
-
custom text when there is no internet connection String comes from
Pagifypackagegetter/setter pair -
onError
↔ FutureOr<
void> Function(BuildContext, int, PagifyException)? -
on error call back comes from
Pagifypackagegetter/setter pair -
onLoading
↔ FutureOr<
void> Function()? -
on loading call back comes from
Pagifypackagegetter/setter pair -
onReadCache
↔ List<
Map< ? Function(String key)?String, dynamic> > -
Called to restore items from cache when a request fails.
Return
nullor an empty list if no cache exists.getter/setter pair -
onSaveCache
↔ void Function(String key, List<
Map< items)?String, dynamic> > -
Called to persist the fetched items list when a request succeeds.
getter/setter pair
-
onSuccess
↔ FutureOr<
void> Function(BuildContext, List)? -
on success call back comes from
Pagifypackagegetter/setter pair -
onUpdateStatus
↔ FutureOr<
void> Function(PagifyAsyncCallStatus)? -
update status callback comes from
Pagifypackage to show current statePagifyAsyncCallStatusgetter/setter pair - padding ↔ EdgeInsetsGeometry
-
list padding padding
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showNoDataAlert ↔ bool
-
show no data alert when there is no more data bool comes from
Pagifypackagegetter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited