LiveContentProvider class abstract

An interface for plugins that provide live content.

Live content providers are used in conjunction with the content system to provide content that is fetched and updated in real-time. It supports all modes of fetching content: by ID, by query, or by route.

Implementers

Constructors

LiveContentProvider.new({required String title})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String
The title of the live content provider.
final

Methods

dispose() Future<void>
fetchById<T>(String id, {required FromJsonConverter<T> fromJson, bool includeDrafts = false}) Stream<T?>
Fetches content by ID.
fetchMultiple<T>(String query, {required FromJsonConverter<T> fromJson, Map<String, String>? queryParams, bool includeDrafts = false}) Stream<List<T>?>
Fetches content by query, returning a list of items.
fetchRoute({String? path, String? routeId, bool includeDrafts = false}) Stream<RouteBase?>
Fetches content by route.
fetchSingle<T>(String query, {required FromJsonConverter<T> fromJson, Map<String, String>? queryParams, bool includeDrafts = false}) Stream<T?>
Fetches content by query, returning a single item.
init() Future<void>
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