widgets library
Ready-made Flutter widgets for CocoBase.
Drop these into your widget tree and skip the boilerplate:
import 'package:coco_base_flutter/widgets.dart';
Classes
- CocobaseAuthBuilder
- Rebuilds when the user's auth state changes.
-
CocobaseDocument<
T> - Fetches and displays a single document by ID.
- CocobaseErrorWidget
- Standard error display with an optional retry button.
-
CocobaseFutureBuilder<
T> - Generic typed async wrapper for any CocoBase call.
-
CocobaseInfiniteList<
T> - A list that automatically loads the next page as the user scrolls to the bottom. No buttons needed.
-
CocobaseLiveQuery<
T> - Subscribes to a collection and rebuilds whenever data changes.
-
CocobasePaginatedList<
T> -
CocobaseQuery<
T> - Fetches a list of documents once and rebuilds when data arrives.
- CocobaseUserAvatar
-
Shows the user's avatar from their
datamap, or falls back to initials.
Enums
- PaginationMode
- A paginated list that loads documents page by page.