toggle method
Toggles the torch (flashlight) on/off.
Implementation
Future<void> toggle() async {
if (_isEnabled) {
await disable();
} else {
await enable();
}
}
Toggles the torch (flashlight) on/off.
Future<void> toggle() async {
if (_isEnabled) {
await disable();
} else {
await enable();
}
}