ContentPlugin class abstract
The base class for a Content Plugin
- Inheritance
- Implementers
Constructors
- ContentPlugin({required ContentProvider provider, required String name, required String title})
- Creates a new ContentPlugin with the given provider, name, and title
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
finalinherited
- provider → ContentProvider
-
The ContentProvider for this plugin
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String
-
finalinherited
-
typeRegistry
→ Map<
Type, Map< String, TypeDescriptor> > -
The type registry that maps types to their descriptors
no setter
Methods
-
buildContent(
BuildContext context, ContentItem content) → Widget - Builds a Widget for the given content
-
buildRoute(
BuildContext context, {Uri? url, String? routeId}) → Widget - Builds a Widget for the given route url or id. This is used for top-level documents called routes. These could represent a page, dialog or a conditional-route.
-
dispose(
) → Future< void> -
inherited
-
fromJson<
T> (Map< String, dynamic> json) → T? - Converts the given json to a content item of type T
-
init(
) → Future< void> -
inherited
-
isRegistered<
T> (TypeDescriptor< T> descriptor) → dynamic - Checks if the given type descriptor is registered
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register<
T> (TypeDescriptor< T> descriptor) → dynamic - Registers the given type descriptor
-
setup(
List< FeatureDescriptor> features) → void - Sets up the plugin with the given features. The plugin scans the features to extract all the content items. This plugin relies on the ContentExtensionBuilder to do its work.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited