Get the current position (int) of the Switch.
var position = await mySwitch.getPosition();
For more information, see Switch component.
Future<int> getPosition({Map<String, dynamic>? extra});