setPanelVisible method
Set the panel visibility.
Implementation
void setPanelVisible(TideId panelId, bool visible) {
final currentState = state.value;
if (panelId.id.isEmpty && currentState.panels.length > 1) {
throw ArgumentError(
'Tide: TideWorkbenchLayoutService.setPanelVisible panelId cannot be empty');
}
TidePanel? newPanel;
final panel = currentState.getPanel(panelId);
if (panel != null) {
newPanel = panel.copyWith(isVisible: visible);
}
if (newPanel != null) {
replacePanel(newPanel);
}
}