@model OrchardCore.Flows.ViewModels.FlowPartViewModel
@inject OrchardCore.ContentManagement.Display.IContentItemDisplayManager ContentItemDisplayManager

@foreach (var widget in Model.FlowPart.Widgets)
{
    var widgetContent = await ContentItemDisplayManager.BuildDisplayAsync(
        widget,
        Model.BuildPartDisplayContext.Updater,
        Model.BuildPartDisplayContext.DisplayType,
        Model.BuildPartDisplayContext.GroupId);
        
    @await DisplayAsync(widgetContent)
}