facundomedica / fast_qr_reader_view

A Fast QR Reader widget for Flutter. For both Android and iOS
MIT License
295 stars 163 forks source link

Enable flash #10

Closed allanwolski closed 2 years ago

allanwolski commented 5 years ago

Good job, I was looking for this.

Is there a way to enable flash?

victoraugustolls commented 5 years ago

I tried using a package for controlling the flash outside:

https://github.com/clovisnicolas/flutter_lamp

The problem is, it reserves the camera, so the preview won't open. So is there anyway to enable flash in this package? @facundomedica

allanwolski commented 5 years ago

I also tried using this package without success.

facundomedica commented 5 years ago

In order of priorities I would like to change Firebase MLKit for something else first, but I'm open to PRs.

allanwolski commented 5 years ago

I like Firebase MLKit and I need it for other things, like scanning the QR-Code from an image.

victoraugustolls commented 5 years ago

Same here, and it is really fast compared to other alternatives that I have tried. So if removing firebase causes a decrease in speed, it might not be worth it. On 2 Nov 2018 21:27 -0300, allanwolski notifications@github.com, wrote:

I like Firebase MLKit and I need it for other things, like scanning the QR-Code from an image. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

josenicolas0105 commented 5 years ago

@facundomedica estimado existe una forma de usar el flash de la camara ??... quedo atento a sus comentarios.

adlanarifzr commented 5 years ago

I've submitted PR for this issue.

douglaswender commented 4 years ago

how to use toggle flash?

douglaswender commented 4 years ago

I need it

douglaswender commented 4 years ago

I did, I was using the dependencies in the pub version

kaifigirdhar commented 4 years ago

@douglaswender Can you please elaborate how you resolve this

douglaswender commented 4 years ago

I used dependencies for git. then I realized that he has a new method that is toogleFlash(), I just created a method to change the application state with the icon on and off.

Dependencies:

fast_qr_reader_view:
    git:
      url: git://github.com/facundomedica/fast_qr_reader_view.git

Method:

Future _turnFlash() async {
    controller.toggleFlash();
    controller.startScanning();
    setState(() {
      isOn = !isOn;
    });
  }
kaifigirdhar commented 4 years ago

I am getting this error: [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method toggleFlash on channel fast_qr_reader_view)

douglaswender commented 4 years ago

Did you add the dependencies to pubspec.yalm? If not added add, if added use the flutter pub getcommand.

facundomedica commented 2 years ago

Fixed!

douglaswender commented 2 years ago

Thanks, are you doing null safety update? I'll probably need in next project ☺️

facundomedica commented 2 years ago

@douglaswender I think it's already in. I'm not a 100% sure, but seems like it. I work as a backend engineer, so it's been a while since I used Flutter 😅