buildPreviewWidget method
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);
}