CollectionWidget<T> constructor
const
CollectionWidget<T> ({
- Key? key,
- required Databases database,
- required String collectionId,
- required int itemsPerPage,
- bool realtime = true,
- CollectionPageController? pageController,
- int timeout = 10000,
- List? queries,
- List<
String> ? orderTypes, - List<
String> ? orderAttributes, - required Widget onData(
- List<
T> data
- List<
- Widget? onEmpty,
- Widget? onWaiting,
- Widget? onTimeout,
- Widget onError(
- Object? error,
- StackTrace? stackTrace
- Widget fallback = const SizedBox.shrink(),
- void onStartCallback(
- List<
T> data
- List<
- void onEndCallback(
- List<
T> data
- List<
A CollectionWidget allows for refined handling of an
Appwrite collection query and how we display that result
in the UI; depending on the state of the query and the
result itself.
It also provides options for pagination, realtime, start & end bumpers, error handling and your usual appwrite query abilities.
See the README for examples.
Implementation
const CollectionWidget(
{Key? key,
required this.database,
required this.collectionId,
required this.itemsPerPage,
this.realtime = true,
this.pageController,
this.timeout = 10000,
this.queries,
this.orderTypes,
this.orderAttributes,
required this.onData,
this.onEmpty,
this.onWaiting,
this.onTimeout,
this.onError,
this.fallback = const SizedBox.shrink(),
this.onStartCallback,
this.onEndCallback})
: super(key: key);