currentKey property
K?
currentKey
The key of the currently selected tab.
Implementation
K? get currentKey {
final index = this.index;
return index >= 0 && index < _keys.length ? _keys[index] : null;
}
void
currentKey=(K? value)
Implementation
set currentKey(K? value) {
if (value == null) {
_indexedController.index = 0;
return;
}
final index = _keys.indexOf(value);
if (index == -1) {
throw ArgumentError('Key $value is not among $_keys');
}
_indexedController.index = index;
}