addDefaultPane method

void addDefaultPane(
  1. String paneId
)

This method is called when it is known for sure that removing a given pane will result in no more panes being left (which is an erroneous state) and therefore a default, empty pane given by paneId is requested to be added.

Implementation

void addDefaultPane(String paneId) {
  api.workspace.workspaceConfigs.panesLayout = SinglePaneList(
    paneId,
    width: (api.workspace.workspaceConfigs.isPrimaryBarExpanded
            ? api.workspace.workspaceConfigs.stylingConfigs.windowWidth -
                (utils.AffogatoConstants.primaryBarExpandedWidth +
                    utils.AffogatoConstants.primaryBarClosedWidth)
            : api.workspace.workspaceConfigs.stylingConfigs.windowWidth -
                utils.AffogatoConstants.primaryBarClosedWidth) -
        3,
    height: api.workspace.workspaceConfigs.stylingConfigs.windowHeight -
        utils.AffogatoConstants.statusBarHeight,
  );
}