Variable WidgetBundle Configurations possible?

I am trying to implement a variable configuration for my WidgetBundle. For example, I would like to have a widget only available for certain customers. The general idea would be some like this like:
Code Block Swift
@main
struct Widgets: WidgetBundle {
    @WidgetBundleBuilder
    var body: some Widget {
if Membership.active? {
WidgetA()
WidgetB()
WidgetPremium()
    } else {
WidgetA()
WidgetB()
}
}
}

I realize that this particular syntax is invalid, but I've tried all manner of Function builder syntaxes I could think of to make something like this work but haven't been able to get any to work for widgets. In SwiftUI we have the conditional function builders, but I can't quite discover if they don't exist here or I'm just missing them.

Is this type of configurability possible? Thank you!
This isn't possible—the configuration returned in a WidgetBundle or Widget is best considered static. If you have a use case that we don't currently support please do let us know via Feedback Assistant!
I definitely see a use case for it and submitted a feedback! In my case, I have a HealthKit-based widget that isn't functional on iPads, so I'd like to only expose it to iPhone users.

Feedback ID: FB8454119

I found a workaround

https://www.avanderlee.com/swiftui/variable-widgetbundle-configuration/

@main
struct StockAnalyzerWidgets: WidgetBundle {
    @WidgetBundleBuilder
    var body: some Widget {
        widgets()
    }

    func widgets() -> some Widget {
        if #available(iOS 16.0, *) {
            return WidgetBundleBuilder.buildBlock(StockAnalyzerWatchlistWidgets(), StockAnalyzerSymbolWidgets())
        } else {
            return StockAnalyzerWatchlistWidgets()
        }
    }
}

Any body using this in production environment?

@UnderscoreDS did you solve it?

Variable WidgetBundle Configurations possible?
 
 
Q