TorchController class

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.
no setterinherited
hasTorch Future<bool?>
Return a bool if the current device is able to use torch methods.
no setter
isTorchActive Future<bool?>
Return a bool that checks the torch state nativelly.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
torchIntensity double
Get current active torch intensity. Only relevant on iOS
no setter

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 nonexistent 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