setEnabled method

Future<void> setEnabled(
  1. bool enabled
)

Enables or disables user interaction on the native switch.

Implementation

Future<void> setEnabled(bool enabled) async {
  final channel = _channel;
  if (channel == null) return;
  await channel.invokeMethod('setEnabled', {'enabled': enabled});
}