I have a switch. I want to bind the switch state (enabled/disabled) to the state of the device's Bluetooth adapter.
This should be a two way binding, where the switch can toggle the Bluetooth adapter and vice versa.
e.g. When the app starts, the switch should mirror the state of the Bluetooth adapter.
If the switch is toggled, the Bluetooth adapter should mirror the state of the switch.
I have implemented a messy version of this where I use a dependency service to check the state of the adapter when the page is created and then call a another dependency service when the switch is toggled.
Is there a simpler way to just set a binding which allows platform specific calls to get/set the state of the adapter?