coco_base_flutter library
Classes
- AggregateResponse
- AppUser
- AppUserList
- Response containing a list of users from auth collection
- AuthCallbacks
- Authentication callbacks container
- AuthHandler
- Authentication handler for Cocobase client.
- AuthStore
- ALLOWS USER TO IMPLEMENT CUSTOM AUTH STORAGE MECHANISMS
-
BatchCreateResponse<
T> - BatchDeleteResponse
- BatchUpdateResponse
- CloudFunction
- CloudFunction client for executing server-side functions.
- Cocobase
- Main Cocobase client for interacting with the Cocobase backend API.
- CocobaseAuthBuilder
- Rebuilds when the user's auth state changes.
- CocobaseConfig
- CocobaseConverters
- Registry for automatic model converters
-
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.
-
CocobaseModel<
T> - Base class for auto-convertible models
-
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. - Collection
- CollectionWatcher
- Collection watcher for real-time document updates
- Connection
- CountResponse
-
Document<
T> -
FunctionResponse<
T> - Response from a cloud function execution
- GroupByItem
- GroupByResponse
- MessageEvent
- Message event wrapper
-
Page<
T> - A page of results returned by Paginator.
-
Paginator<
T> - Stateful paginator returned by Cocobase.paginate.
- ProjectBroadcast
- Project-wide broadcast for real-time messaging
- QueryBuilder
- QueryBuilder class for building complex queries with operators and relationships
- RealtimeHelpers
- Helper class for realtime WebSocket connections
- ReconnectingWebSocket
- Reconnecting WebSocket implementation with automatic reconnection
- RoomChat
- Room-based chat for real-time communication
- SchemaField
- SchemaResponse
- TokenResponse
Enums
- AggregateOperation
- Aggregate operations for document queries
- AuthPlatform
- Platform types for Google authentication
- ExportFormat
- Export formats for collection data
- FunctionMethod
- HTTP methods supported for cloud function execution
- PaginationMode
- A paginated list that loads documents page by page.
Constants
- CLOUD_BASEURL → const String
- DEFAULT_BASEURL → const String
Functions
-
createHttpError(
{required int statusCode, required String url, required String method, required dynamic detail, required String suggestion}) → CocobaseError - Factory that maps HTTP status codes to typed error classes.
-
listRooms(
String apiKey, {String baseURL = 'https://api.cocobase.cc'}) → Future< List> - List all available rooms
Typedefs
-
Listener
= void Function(Map<
String, dynamic> data) - OnAuthStateChangeCallback = void Function(AppUser? user, String? token)
- OnLoginCallback = void Function(AppUser user, String token)
- Callback type definitions for authentication events
- OnLogoutCallback = void Function()
- OnRegisterCallback = void Function(AppUser user, String token)
- OnTokenChangeCallback = void Function(String? token)
- OnUserUpdateCallback = void Function(AppUser user)
- VoidCallback = void Function()