buildPreviewWidget method

Widget buildPreviewWidget(
  1. ThemeableState state,
  2. AnimationController? controller
)

Build preview widget accepting ThemeableState base type. This method handles the generic type cast internally, eliminating the need for dynamic casts in the registry.

Implementation

Widget buildPreviewWidget(ThemeableState state, AnimationController? controller) {
  return previewBuilder(state as T, controller);
}