setStrength method

Future<void> setStrength(
  1. int strength
)

Sets the torch strength level. strength should be between 0 and getMaxStrength(). Throws an error if not supported by the device.

Implementation

Future<void> setStrength(int strength) async {
  await TorchFlashlight.setTorchStrength(strength);
}