disable static method

Future<void> disable()

Disables the native tab bar and restores Flutter-only mode.

Call this in State.dispose of the widget that called enable. No-op when the native tab bar is not already enabled.

Implementation

static Future<void> disable() async {
  if (!_isEnabled) {
    return;
  }

  await _channel.invokeMethod('disable');
  _channel.setMethodCallHandler(null);
  _isEnabled = false;
  _onTabSelected = null;
  _onSearchChanged = null;
  _onSearchSubmitted = null;
  _onSearchCancelled = null;
  _onSearchActiveChanged = null;
}