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

attach(ExtensionBuilder<ExtensionDescriptor> extBuilder) → void
Sets up the plugin with the ContentExtensionBuilder. The plugin relies on the ContentExtensionBuilder to do its work.
buildContent<T extends ContentItem>(BuildContext context, T content, {LayoutConfiguration<T>? layout}) Widget
Builds a Widget for the given content. You can pass in an optional layout to override the default layout
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
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited