buildPreview static method

Widget? buildPreview(
  1. ComponentType type,
  2. ThemeableState state,
  3. AnimationController? controller
)

Build a preview widget for a component, handling type casting internally. Returns null if the component type is not registered.

Implementation

static Widget? buildPreview(
  ComponentType type,
  ThemeableState state,
  AnimationController? controller,
) {
  final definition = _components[type];
  if (definition == null) return null;
  // Use wrapper method that handles generic type cast internally
  return definition.buildPreviewWidget(state, controller);
}