selected property

int selected
getter/setter pair

Implementation

late int selected = component.tabs.isEmpty
    ? 0
    : component.initialIndex.clamp(0, component.tabs.length - 1);