TorchController class Null safety

The TorchController class presents a global controller to use native torch/flash resources

Constructors

TorchController()
factory

Properties

hashCode int
The hash code for this object.
read-onlyinherited
hasTorch Future<bool?>
Return a bool if the current device is able to use torch methods.
read-only
isTorchActive Future<bool?>
Return a bool that checks the torch state nativelly.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
torchIntensity double
Get current active torch intensity. Only relevant on iOS
read-only

Methods

initialize({double intensity = 1.0, bool debug = false, bool suppressTorchErrors = false}) → void
Initialize configurations that you want to initialize your controller.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toggle({double? intensity}) Future<bool?>
Execute the action to toggle torch on/off. Returns the current torch state.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited