setSelectedIndex static method

Future<void> setSelectedIndex(
  1. int index
)

Selects the tab at index in the native tab bar.

No-op when the native tab bar is not enabled.

Implementation

static Future<void> setSelectedIndex(int index) async {
  if (!_isEnabled) return;
  await _channel.invokeMethod('setSelectedIndex', {'index': index});
}