DefaultContentPlugin class final
The default ContentPlugin implementation for the Vyuh framework.
This plugin is responsible for fetching content from a CMS and rendering content items.
It uses a ContentExtensionBuilder to keep track of the various ContentItem
types.
- Inheritance
-
- Object
- Plugin
- ContentPlugin
- DefaultContentPlugin
Constructors
- DefaultContentPlugin({required ContentProvider provider})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
finalinherited
- provider → ContentProvider
-
The ContentProvider for this plugin
finalinherited
- 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 setteroverride
Methods
-
buildContent(
BuildContext context, ContentItem content) → Widget -
Builds a Widget for the given content
override
-
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.
override
-
dispose(
) → Future< void> -
override
-
fromJson<
T> (Map< String, dynamic> json) → T? -
Converts the given json to a content item of type T
override
-
init(
) → Future< void> -
override
-
isRegistered<
T> (TypeDescriptor< T> descriptor) → dynamic -
Checks if the given type descriptor is registered
override
-
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
override
-
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.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited