SkeletonRegistry class

Registry for custom skeleton builders.

Allows developers to register custom skeleton builders for their widgets.

Example:

SkeletonRegistry.register<MyCustomWidget>(
  (widget, config, context) {
    return MyCustomSkeleton(config: config);
  },
);

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Static Properties

count int
Returns the number of registered builders.
no setter
registeredTypes List<Type>
Returns all registered widget types.
no setter

Static Methods

clear() → void
Clears all registered builders.
getBuilder(Type widgetType) SkeletonBuilder?
Gets the skeleton builder for a specific widget type.
hasBuilder(Type widgetType) bool
Checks if a builder is registered for a widget type.
register<T extends Widget>(SkeletonBuilder builder) → void
Registers a skeleton builder for a specific widget type.
unregister<T extends Widget>() → void
Unregisters a skeleton builder for a specific widget type.