A Fast QR Reader widget for Flutter For both Android and iOS

Fast QR Reader View Plugin

With the introduction of better and faster technology, people are now using their devices more than ever. It’s all about accessing everything in a snap and getting the information across from one person to another or from a business to a consumer. One of the trending widgets is the QR code. 
With the development of the value of QR codes, we will discuss a fast QR Reader widget for Flutter for both Android and iOS that allows access to the device’s cameras to scan multiple types of codes (QR, PDF417, CODE39, etc). heavily based on the camera.

qr reader

Red box is a Flutter animation (removable). Low FPS due to GIF


SSome of its outstanding features.

  • Display live camera preview in a widget.
  • Uses native AVFoundation code detection in iOS
  • Uses ML Kit in Android


First, add fast_qr_reader_view as a dependency in your pubspec.yaml file.


Add a row to the ios/Runner/Info.plist with the key Privacy - Camera Usage Description and a usage description.

Or in text format add the key:

<string>Can I use the camera please?</string>


Add Firebase to your project following this step (only that step, not the entire guide).

Change the minimum Android sdk version to 21 (or higher) in your android/app/build.gradle file.

minSdkVersion 21


Here is a small example flutter app displaying a full-screen camera preview.

import 'dart:async';
import 'package:flutter/material.dart';
import 'package:fast_qr_reader_view/fast_qr_reader_view.dart';

List<CameraDescription> cameras;

Future<Null> main() async {
  cameras = await availableCameras();
  runApp(new CameraApp());

class CameraApp extends StatefulWidget {
  _CameraAppState createState() => new _CameraAppState();

class _CameraAppState extends State<CameraApp> {
  QRReaderController controller;

  void initState() {
    controller = new QRReaderController(cameras[0], ResolutionPreset.medium, [CodeFormat.qr], (dynamic value){
        print(value); // the result!
    // ... do something
    // wait 3 seconds then start scanning again.
    new Future.delayed(const Duration(seconds: 3), controller.startScanning);
    controller.initialize().then((_) {
      if (!mounted) {
      setState(() {});

  void dispose() {

  Widget build(BuildContext context) {
    if (!controller.value.isInitialized) {
      return new Container();
    return new AspectRatio(
        child: new QRReaderPreview(controller));

For a more elaborate usage example see here.


Written by James

A Flutter plugin for reading QR Codes with the camera

Pretty QR code with round edges