selectTab method
Selects a tab by its value.
This will notify all listeners and update any widgets using this controller.
Implementation
Future<void> selectTab(T value) async {
if (beforeChange != null && this.value != value) {
final allowed = await beforeChange!(this.value, value);
if (!allowed) return;
}
this.value = value;
}