closeTab method

  1. @action
void closeTab(
  1. String id
)

Close the tab with the id. This does not respect the locked values

Implementation

@action
void closeTab(String id) {
  tabs.removeWhere((t) => t.id == id);
  selectedTab = tabs.isNotEmpty ? min(selectedTab, tabs.length - 1) : 0;
}