closeOtherTabs method

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

Close all tabs other than the one having id. Locked tabs are not closed.

Implementation

@action
void closeOtherTabs(String id) {
  tabs.removeWhere((t) => !t.locked && t.id != id);
  selectedTab = tabs.indexWhere((t) => t.id == id);
}