I've been trying to access the flashlight and other sensors using Flutter on my device. However, for the time being, I need the access to the flashlight only (just for the turn-on ad turn-off event), but the packages available on pub.dev are not null-safe due to which the compiler is throwing errors while using those packages. Is there a way to access the flashlight directly without using a package?
Ps. I have come across some answers that suggested the use of MethodChannel() but I couldn't understand how to implement them for my use.