getHostApp static method
Returns the corresponding HostApp enum value for the given DigiaUIHost.
This function maps DigiaUIHost subclasses to their respective HostApp values.
Returns null if the host type is not recognized (though all sealed subclasses are covered).
Implementation
static HostApp? getHostApp(DigiaUIHost? host) {
return switch (host) {
DashboardHost() => HostApp.dashboard,
PreviewHost() => HostApp.preview,
_ => null,
};
}