Giter Club home page Giter Club logo

mobile_scanner's Introduction

mobile_scanner

pub package style: lint mobile_scanner GitHub Sponsors

A universal scanner for Flutter based on MLKit. Uses CameraX on Android and AVFoundation on iOS.

Breaking Changes v5.0.0

Version 5.0.0 brings some breaking changes. However, some are reverted in version 5.1.0. Please see the list below for all breaking changes, and Changelog.md for a more detailed list.

  • The autoStart attribute has been removed from the MobileScannerController. The controller should be manually started on-demand. (Reverted in version 5.1.0)
  • A controller is now required for the MobileScanner widget. (Reverted in version 5.1.0)
  • The onDetect method has been removed from the MobileScanner widget. Instead, listen to MobileScannerController.barcodes directly. (Reverted in version 5.1.0)
  • The width and height of BarcodeCapture have been removed, in favor of size.
  • The raw attribute is now Object? instead of dynamic, so that it participates in type promotion.
  • The MobileScannerArguments class has been removed from the public API, as it is an internal type.
  • The cameraFacingOverride named argument for the start() method has been renamed to cameraDirection.
  • The analyzeImage function now correctly returns a BarcodeCapture? instead of a boolean.
  • The formats attribute of the MobileScannerController is now non-null.
  • The MobileScannerState enum has been renamed to MobileScannerAuthorizationState.
  • The various ValueNotifiers for the camera state have been removed. Use the value of the MobileScannerController instead.
  • The hasTorch getter has been removed. Instead, use the torch state of the controller's value.
  • The TorchState enum now provides a new value for unavailable flashlights.
  • The onPermissionSet, onStart and onScannerStarted methods have been removed from the MobileScanner widget. Instead, await MobileScannerController.start().
  • The startDelay has been removed from the MobileScanner widget. Instead, use a delay between manual starts of one or more controllers.
  • The overlay widget of the MobileScanner has been replaced by a new property, overlayBuilder, which provides the constraints for the overlay.
  • The torch can no longer be toggled on the web, as this is only available for image tracks and not video tracks. As a result the torch state for the web will always be TorchState.unavailable.
  • The zoom scale can no longer be modified on the web, as this is only available for image tracks and not video tracks. As a result, the zoom scale will always be 1.0.

Features Supported

See the example app for detailed implementation information.

Features Android iOS macOS Web
analyzeImage (Gallery) ✔️ ✔️
returnImage ✔️ ✔️
scanWindow ✔️ ✔️ ✔️

Platform Support

Android iOS macOS Web Linux Windows

Platform specific setup

Android

This package uses by default the bundled version of MLKit Barcode-scanning for Android. This version is immediately available to the device. But it will increase the size of the app by approximately 3 to 10 MB.

The alternative is to use the unbundled version of MLKit Barcode-scanning for Android. This version is downloaded on first use via Google Play Services. It increases the app size by around 600KB.

You can read more about the difference between the two versions here.

To use the unbundled version of the MLKit Barcode-scanning, add the following line to your /android/gradle.properties file:

dev.steenbakker.mobile_scanner.useUnbundled=true

iOS

Add the following keys to your Info.plist file, located in /ios/Runner/Info.plist: NSCameraUsageDescription - describe why your app needs access to the camera. This is called Privacy - Camera Usage Description in the visual editor.

If you want to use the local gallery feature from image_picker NSPhotoLibraryUsageDescription - describe why your app needs permission for the photo library. This is called Privacy - Photo Library Usage Description in the visual editor.

Example,

<key>NSCameraUsageDescription</key>
<string>This app needs camera access to scan QR codes</string>

<key>NSPhotoLibraryUsageDescription</key>
<string>This app needs photos access to get QR code from photo library</string>

macOS

Ensure that you granted camera permission in XCode -> Signing & Capabilities:

Screenshot of XCode where Camera is checked

Web

As of version 5.0.0 adding the library to the index.html is no longer required, as the library is automatically loaded on first use.

Providing a mirror for the barcode scanning library

If a different mirror is needed to load the barcode scanning library, the source URL can be set beforehand.

import 'package:flutter/foundation.dart';
import 'package:mobile_scanner/mobile_scanner.dart';

final String scriptUrl = // ...

if (kIsWeb) {
  MobileScannerPlatform.instance.setBarcodeLibraryScriptUrl(scriptUrl);
}

Usage

Import the package with package:mobile_scanner/mobile_scanner.dart.

Create a new MobileScannerController controller, using the required options. Provide a StreamSubscription for the barcode events.

final MobileScannerController controller = MobileScannerController(
  // required options for the scanner
);

StreamSubscription<Object?>? _subscription;

Ensure that your State class mixes in WidgetsBindingObserver, to handle lifecyle changes:

class MyState extends State<MyStatefulWidget> with WidgetsBindingObserver {
  // ...

  @override
  void didChangeAppLifecycleState(AppLifecycleState state) {
    // If the controller is not ready, do not try to start or stop it.
    // Permission dialogs can trigger lifecycle changes before the controller is ready.
    if (!controller.value.isInitialized) {
      return;
    }

    switch (state) {
      case AppLifecycleState.detached:
      case AppLifecycleState.hidden:
      case AppLifecycleState.paused:
        return;
      case AppLifecycleState.resumed:
        // Restart the scanner when the app is resumed.
        // Don't forget to resume listening to the barcode events.
        _subscription = controller.barcodes.listen(_handleBarcode);

        unawaited(controller.start());
      case AppLifecycleState.inactive:
        // Stop the scanner when the app is paused.
        // Also stop the barcode events subscription.
        unawaited(_subscription?.cancel());
        _subscription = null;
        unawaited(controller.stop());
    }
  }

  // ...
}

Then, start the scanner in void initState():

@override
void initState() {
  super.initState();
  // Start listening to lifecycle changes.
  WidgetsBinding.instance.addObserver(this);

  // Start listening to the barcode events.
  _subscription = controller.barcodes.listen(_handleBarcode);

  // Finally, start the scanner itself.
  unawaited(controller.start());
}

Finally, dispose of the the MobileScannerController when you are done with it.

@override
Future<void> dispose() async {
  // Stop listening to lifecycle changes.
  WidgetsBinding.instance.removeObserver(this);
  // Stop listening to the barcode events.
  unawaited(_subscription?.cancel());
  _subscription = null;
  // Dispose the widget itself.
  super.dispose();
  // Finally, dispose of the controller.
  await controller.dispose();
}

To display the camera preview, pass the controller to a MobileScanner widget.

See the examples for runnable examples of various usages, such as the basic usage, applying a scan window, or retrieving images from the barcodes.

mobile_scanner's People

Contributors

brandsimon avatar casvanluijtelaar avatar dependabot[bot] avatar djpnewton avatar earminjon avatar flockiix avatar goerlitz avatar hazzo avatar jakubpatrik avatar jorgenpt avatar juliansteenbakker avatar mastermind-sap avatar mbulli avatar monsieurtanuki avatar moria-euc avatar myoganugraha avatar navaronbracke avatar neel-sharma avatar nilsreichardt avatar ob-juliandixon avatar p-mazhnik avatar penkzhou avatar ryanduffyegov avatar ryanduffyne avatar ryuta46 avatar sdkysfzai avatar svenopdehipt avatar teolemon avatar vbuberen avatar yuchan2215 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mobile_scanner's Issues

App is crashing when i restart the app

Restarted application in 4,055ms.
I/flutter (16870): Scan something!
D/AndroidRuntime(16870): Shutting down VM
E/AndroidRuntime(16870): FATAL EXCEPTION: main
E/AndroidRuntime(16870): Process: dev.steenbakker.mobile_scanner_example, PID: 16870
E/AndroidRuntime(16870): java.lang.IllegalArgumentException: No supported surface combination is found for camera device - Id : 0. May be attempting to bind too many use cases. Existing surfaces: [SurfaceConfig{configType=PRIV, configSize=PREVIEW}, SurfaceConfig{configType=YUV, configSize=ANALYSIS}] New configs: [androidx.camera.core.impl.ImageAnalysisConfig@4c34bff, androidx.camera.core.impl.PreviewConfig@18eb71e]
E/AndroidRuntime(16870): at androidx.camera.lifecycle.LifecycleCameraRepository.bindToLifecycleCamera(LifecycleCameraRepository.java:280)
E/AndroidRuntime(16870): at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime(16870): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(16870): at android.os.Looper.loop(Looper.java:148)
E/AndroidRuntime(16870): at android.app.ActivityThread.main(ActivityThread.java:5539)
E/AndroidRuntime(16870): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(16870): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
E/AndroidRuntime(16870): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
D/AppTracker(16870): App Event: crash
E/RequestThread-0(16870): Timed out while waiting for request to complete.
W/CaptureCollector(16870): Preview buffers dropped for request: 0

Scanning onDetect runs multiple times

i have allowDuplicates: false, but it stills triggers constantly when scanned

MobileScanner(
          allowDuplicates: false,
          onDetect: (barcode, args) {
            final code = barcode.rawValue;
            print(code);
          },
        ),

support for barcode reading in specific regions

I'm migrating a project from qr_code_scanner to this but I'm missing the support for searching in a specific camera area. I'd like use my custom overlay like show below and actually limit the scan area to any desired rect.

54BD44A1-39FB-4D43-BAF1-8ED7C316ECE7

APP crashes when I turn on debug or profile mode

APP crashes when I turn on debug or profile mode.

Version:
mobile_scanner:0.2.0
flutter:2.10.3 And 2.8.1 (Both versions 2.10.3 and 2.8.1 have appeared, and other Flutter versions have not been tested yet.)

My Code :

import 'package:flutter/material.dart';
import 'package:miffy_tuya_smart_sdk_example/component/MiffyScreen.dart';
import 'package:mobile_scanner/mobile_scanner.dart';

class Scan extends StatelessWidget {
  final MobileScannerController _controller =
      MobileScannerController(torchEnabled: false);
  @override
  Widget build(BuildContext context) {
    return ConstrainedBox(
        constraints: const BoxConstraints.expand(),
        child: Stack(
          alignment: Alignment.topCenter,
          children: [
            MobileScanner(
                controller: _controller,
                onDetect: (barcode, args) {
                  final String? code = barcode.rawValue;
                  debugPrint('Barcode found! $code');
                  _controller.dispose();
                  Navigator.pop(context);
                }),
          ],
        ));
  }
}

Crash Log:

D/ViewRootImpl( 9140): enqueueInputEventMotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=568.0, y[0]=2323.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1082620301, downTime=1082620301, deviceId=3, source=0x1002, displayId=0 }
D/ViewRootImpl[MainActivity]( 9140): processMotionEvent MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=568.0, y[0]=2323.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1082620301, downTime=1082620301, deviceId=3, source=0x1002, displayId=0 }
D/ViewRootImpl[MainActivity]( 9140): dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=568.0, y[0]=2323.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1082620301, downTime=1082620301, deviceId=3, source=0x1002, displayId=0 }
D/ViewRootImpl[MainActivity]( 9140): processMotionEvent MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=568.0, y[0]=2323.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1082620342, downTime=1082620301, deviceId=3, source=0x1002, displayId=0 }
D/ViewRootImpl[MainActivity]( 9140): dispatchPointerEvent handled=true, event=MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=568.0, y[0]=2323.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1082620342, downTime=1082620301, deviceId=3, source=0x1002, displayId=0 }
I/OplusCameraManager( 9140): saveOpPackageName, mOpPackageName: com.smart.happy
I/OplusCameraManagerGlobal( 9140): setClientInfo, packageName: com.smart.happy, uid: 10392, pid: 9140
I/OplusCameraManagerGlobal( 9140): Connecting to camera service
I/CameraManagerGlobal( 9140): Connecting to camera service
E/libc    ( 9140): Access denied finding property "vendor.camera.aux.packagelist"
I/chatty  ( 9140): uid=10392(com.smart.happy) CameraX-core_ca identical 1 line
E/libc    ( 9140): Access denied finding property "vendor.camera.aux.packagelist"
E/libc    ( 9140): Access denied finding property "vendor.camera.aux.packagelist"
E/libc    ( 9140): Access denied finding property "vendor.camera.aux.packagelist"
W/CameraManagerGlobal( 9140): ignore the torch status update of camera: 2
E/libc    ( 9140): Access denied finding property "vendor.camera.aux.packagelist"
W/CameraManagerGlobal( 9140): ignore the torch status update of camera: 3
E/libc    ( 9140): Access denied finding property "vendor.camera.aux.packagelist"
W/CameraManagerGlobal( 9140): ignore the torch status update of camera: 4
I/OplusCameraManagerGlobal( 9140): setClientInfo, packageName: com.smart.happy, uid: 10392, pid: 9140
I/chatty  ( 9140): uid=10392(com.smart.happy) CameraX-core_ca identical 4 lines
I/OplusCameraManagerGlobal( 9140): setClientInfo, packageName: com.smart.happy, uid: 10392, pid: 9140
D/CameraRepository( 9140): Added camera: 0
I/Camera2CameraInfo( 9140): Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_3
I/OplusCameraManagerGlobal( 9140): setClientInfo, packageName: com.smart.happy, uid: 10392, pid: 9140
D/CameraRepository( 9140): Added camera: 1
I/Camera2CameraInfo( 9140): Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_3
I/OplusCameraManagerGlobal( 9140): setClientInfo, packageName: com.smart.happy, uid: 10392, pid: 9140
D/CameraValidator( 9140): Verifying camera lens facing on RMX3161CN, lensFacingInteger: null
D/DeferrableSurface( 9140): Surface created[total_surfaces=1, used_surfaces=0](androidx.camera.core.SurfaceRequest$2@5331dae}
D/CameraOrientationUtil( 9140): getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
I/chatty  ( 9140): uid=10392(com.smart.happy) identical 1 line
D/CameraOrientationUtil( 9140): getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
D/DeferrableSurface( 9140): Surface created[total_surfaces=2, used_surfaces=0](androidx.camera.core.impl.ImmediateSurface@be9ebe5}
D/Camera2CameraImpl( 9140): {Camera@4acbb13[id=0]} Use case androidx.camera.core.Preview-96105928-e476-4b12-a90d-e1b4453c95fb38840790 ACTIVE
D/CameraOrientationUtil( 9140): getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
D/UseCaseAttachState( 9140): Active and attached use case: [] for camera: 0
D/CameraOrientationUtil( 9140): getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
I/LOG     ( 9140): Analyzer: 640x480
I/LOG     ( 9140): Preview: 1600x1200
D/CameraOrientationUtil( 9140): getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
D/CameraOrientationUtil( 9140): getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
D/Camera2CameraImpl( 9140): {Camera@4acbb13[id=0]} Use case androidx.camera.core.ImageAnalysis-ffe93fde-7004-46d4-970a-a221c124a63926981463 ACTIVE
D/UseCaseAttachState( 9140): Active and attached use case: [] for camera: 0
D/Camera2CameraImpl( 9140): {Camera@4acbb13[id=0]} Use cases [androidx.camera.core.Preview-96105928-e476-4b12-a90d-e1b4453c95fb38840790, androidx.camera.core.ImageAnalysis-ffe93fde-7004-46d4-970a-a221c124a63926981463] now ATTACHED
D/UseCaseAttachState( 9140): All use case: [androidx.camera.core.Preview-96105928-e476-4b12-a90d-e1b4453c95fb38840790, androidx.camera.core.ImageAnalysis-ffe93fde-7004-46d4-970a-a221c124a63926981463] for camera: 0
D/UseCaseAttachState( 9140): Active and attached use case: [androidx.camera.core.Preview-96105928-e476-4b12-a90d-e1b4453c95fb38840790, androidx.camera.core.ImageAnalysis-ffe93fde-7004-46d4-970a-a221c124a63926981463] for camera: 0
E/com.smart.happ( 9140): [SurfaceTexture-0-9140-0] attachToContext: invalid current EGLDisplay
E/flutter ( 9140): [ERROR:flutter/fml/platform/android/jni_util.cc(211)] java.lang.RuntimeException: Error during attachToGLContext (see logcat for details)
E/flutter ( 9140): 	at android.graphics.SurfaceTexture.attachToGLContext(SurfaceTexture.java:295)
E/flutter ( 9140): 	at io.flutter.embedding.engine.renderer.SurfaceTextureWrapper.attachToGLContext(SurfaceTextureWrapper.java:71)
E/flutter ( 9140):
F/flutter ( 9140): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1301)] Check failed: fml::jni::CheckException(env).
F/libc    ( 9140): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 9237 (1.raster), pid 9140 (com.smart.happy)
Process name is com.smart.happy, not key_process
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'realme/RMX3161/RMX3161CN:11/RKQ1.201217.002/1639934812003:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2022-03-08 15:55:47+0800
pid: 9140, tid: 9237, name: 1.raster  >>> com.smart.happy <<<
uid: 10392
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1301)] Check failed: fml::jni::CheckException(env).
'
    x0  0000000000000000  x1  0000000000002415  x2  0000000000000006  x3  0000007034e4ab00
    x4  fefeff091f2d2875  x5  fefeff091f2d2875  x6  fefeff091f2d2875  x7  7f7f7f7f7f7f7f7f
    x8  00000000000000f0  x9  8b59b306532be312  x10 0000000000000000  x11 ffffffc0fffffbdf
    x12 0000000000000001  x13 000000000000007e  x14 000c656d2705769f  x15 0000000034155555
    x16 000000712ace87e0  x17 000000712acc7da0  x18 000000702ff94000  x19 00000000000023b4
    x20 0000000000002415  x21 00000000ffffffff  x22 b400007087fd3518  x23 b4000070190cc0e8
    x24 0000000000000000  x25 0000000000000000  x26 0000000000000000  x27 b400007087e41f58
    x28 0000000000000001  x29 0000007034e4ab80
    lr  000000712ac7b460  sp  0000007034e4aae0  pc  000000712ac7b48c  pst 0000000000001000
backtrace:
      #00 pc 000000000007848c  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: e81bf516b888e895d4e757da439c8117)
      #01 pc 00000000006aae14  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #02 pc 00000000006cef94  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #03 pc 00000000006bde3c  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #04 pc 00000000006abfc4  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #05 pc 00000000009138bc  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #06 pc 0000000000910518  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #07 pc 0000000000913a88  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #08 pc 0000000000910518  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #09 pc 0000000000913a88  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #10 pc 0000000000910518  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #11 pc 000000000090faa8  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #12 pc 0000000000910518  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #13 pc 0000000000913a88  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #14 pc 0000000000910518  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #15 pc 0000000000913a88  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #16 pc 0000000000910518  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #17 pc 0000000000912d74  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #18 pc 0000000000910518  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #19 pc 0000000000913a88  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #20 pc 0000000000910518  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #21 pc 000000000090e6f0  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #22 pc 00000000009201b8  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #23 pc 000000000091febc  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #24 pc 00000000009210b0  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #25 pc 0000000000920ad4  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #26 pc 000000000092928c  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #27 pc 00000000006cfbc0  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #28 pc 00000000006d34c4  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #29 pc 0000000000019da8  /system/lib64/libutils.so (android::Looper::pollInner(int)+916) (BuildId: 85aad54dcf3341150498b846bfca7931)
      #30 pc 00000000000199ac  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+112) (BuildId: 85aad54dcf3341150498b846bfca7931)
      #31 pc 0000000000012c74  /system/lib64/libandroid.so (ALooper_pollOnce+100) (BuildId: 35fcec94a508276f883368d9eaad1c96)
      #32 pc 00000000006d35d4  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #33 pc 00000000006d1890  /data/app/~~pqTss0DWkbeEv6LjNlQ-oQ==/com.smart.happy-IxCucnU6giwbnd-6MigAZw==/lib/arm64/libflutter.so (BuildId: 3ff4e11779799bd3186efb7b5dc7e19692fe982e)
      #34 pc 00000000000da278  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: e81bf516b888e895d4e757da439c8117)
      #35 pc 000000000007a448  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: e81bf516b888e895d4e757da439c8117)
Lost connection to device.
Exited (sigterm)

API for Permission Handling

Hey!
I hope that I'm not missing something but as far as I see it, there is currently no possibility to react to permission-issues. This would be good for the following use case:

  1. I have a full-screen QR scanner view
  2. The user opens it for the first time and does not grant the app permission to use the camera
  3. In that case, I want to close the view and display a dialog that tells users that they cannot use that view without granting the camera permission.

Thanks!

Camera not working after deploying - Flutter web on mobile browser

Hi, thank you for your great work, I've tried to the deploy the example on Firebase Hosting and the camera is not working, neither on desktop browser nor mobile, which I'm more interested. thank you

[edited] thought safari console I was able to catch this error:
NoSuchMethodError: method not found: 'getUserMedia' (a.getUserMedia is not a function. (In 'a.getUserMedia(b,A.dm(c,1),A.dm(d,1))', 'a.getUserMedia' is undefined))

[Flutter Web (MacOS)] Error: MissingPluginException

MissingPluginException(No implementation found for method checkPermissionStatus on channel flutter.baseflow.com/permissions/methods).

Dart code:

child: MobileScanner( controller: MobileScannerController( facing: CameraFacing.back, formats: [BarcodeFormat.qrCode], ), onDetect: (barcode, args) {}, ),

index.html code:

`

<title>Example Web</title> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jsQR.min.js"></script> <script> var serviceWorkerVersion = null; var scriptLoaded = false; function loadMainDartJs() { if (scriptLoaded) { return; } scriptLoaded = true; var scriptTag = document.createElement('script'); scriptTag.src = 'main.dart.js'; scriptTag.type = 'application/javascript'; document.body.append(scriptTag); }
if ('serviceWorker' in navigator) {
  // Service workers are supported. Use them.
  window.addEventListener('load', function () {
    // Wait for registration to finish before dropping the <script> tag.
    // Otherwise, the browser will load the script multiple times,
    // potentially different versions.
    var serviceWorkerUrl = 'flutter_service_worker.js?v=' + serviceWorkerVersion;
    navigator.serviceWorker.register(serviceWorkerUrl)
      .then((reg) => {
        function waitForActivation(serviceWorker) {
          serviceWorker.addEventListener('statechange', () => {
            if (serviceWorker.state == 'activated') {
              console.log('Installed new service worker.');
              loadMainDartJs();
            }
          });
        }
        if (!reg.active && (reg.installing || reg.waiting)) {
          // No active web worker and we have installed or are installing
          // one for the first time. Simply wait for it to activate.
          waitForActivation(reg.installing || reg.waiting);
        } else if (!reg.active.scriptURL.endsWith(serviceWorkerVersion)) {
          // When the app updates the serviceWorkerVersion changes, so we
          // need to ask the service worker to update.
          console.log('New service worker available.');
          reg.update();
          waitForActivation(reg.installing);
        } else {
          // Existing service worker is still good.
          console.log('Loading app from service worker.');
          loadMainDartJs();
        }
      });

    // If service worker doesn't succeed in a reasonable amount of time,
    // fallback to plaint <script> tag.
    setTimeout(() => {
      if (!scriptLoaded) {
        console.warn(
          'Failed to load app from service worker. Falling back to plain <script> tag.',
        );
        loadMainDartJs();
      }
    }, 4000);
  });
} else {
  // Service workers not supported. Just drop the <script> tag.
  loadMainDartJs();
}
</script> `

Linux Support

Will be really cool to have some kind of support for scanning QRs in Linux, even if it's just by loading an image from disk.

App crashing when camera screen is openned twice

Stacktrace:
FATAL EXCEPTION: main E/AndroidRuntime(13290): Process: tt.unipet.refueling.unipet_mobile_refueling.dev, PID: 13290 E/AndroidRuntime(13290): java.lang.IllegalArgumentException: No supported surface combination is found for camera device - Id : 0. May be attempting to bind too many use cases. Existing surfaces: [SurfaceConfig{configType=PRIV, configSize=PREVIEW}, SurfaceConfig{configType=YUV, configSize=ANALYSIS}] New configs: [androidx.camera.core.impl.ImageAnalysisConfig@a4729a4, androidx.camera.core.impl.PreviewConfig@d48a037] E/AndroidRuntime(13290): at androidx.camera.lifecycle.LifecycleCameraRepository.bindToLifecycleCamera(LifecycleCameraRepository.java:280) E/AndroidRuntime(13290): at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:532) E/AndroidRuntime(13290): at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:360) E/AndroidRuntime(13290): at dev.steenbakker.mobile_scanner.MobileScanner.start$lambda-10(MobileScanner.kt:163) E/AndroidRuntime(13290): at dev.steenbakker.mobile_scanner.MobileScanner.lambda$bSd8nrsVH5fdvjvM1z6JkCPAiuY(Unknown Source:0) E/AndroidRuntime(13290): at dev.steenbakker.mobile_scanner.-$$Lambda$MobileScanner$bSd8nrsVH5fdvjvM1z6JkCPAiuY.run(Unknown Source:14) E/AndroidRuntime(13290): at android.os.Handler.handleCallback(Handler.java:938) E/AndroidRuntime(13290): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(13290): at android.os.Looper.loop(Looper.java:246) E/AndroidRuntime(13290): at android.app.ActivityThread.main(ActivityThread.java:8633) E/AndroidRuntime(13290): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(13290): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602) E/AndroidRuntime(13290): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

I have used the widget like following :
@override Widget build() { return Column( children: [ SizedBox( height: 100, width: 100, child: MobileScanner( controller: MobileScannerController( facing: CameraFacing.back, torchEnabled: false, ), onDetect: (barcode, args) { final String code = barcode.rawValue; showToast(code); }, ), ), ], ); }

when I go to this ^ screen from another screen the camera shows and can read QR. But If I go back and come to this screen again my app crashes.

Device: Samsung Galaxy M21
Android: 11

Result of flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] Connected device (3 available)

• No issues found!

Running analyze again after navigator pop

Hi, previously i've raise the issue
#41 , and it has been closed

but i don't think the latest version has fixed this issue,
so i create minimal reproduce about my issue, reproduce repo

which after i get the scan result and navigate to result screen, and then pop to preview / scanner screen,
the controller won't analyze the image

or is it impossible to run the analyze image after navigate ?

thanks

FlashLight still remains on navigator pop, Camera preview blank when reopen screen

Debug on android, when flash is set on torch mode and close the page with navigator pop, the flash still remain
even open the scanner screen again, the flash indicator was off, but the flash still on torch mode

and the camera preview has blank
I[/flutter]() ( 7098): MobileScanner: Called start() while already started!

mobile_scanner: 
    git:
      url: https://github.com/juliansteenbakker/mobile_scanner
      ref: master

Google Pixel 3, Android 12
Flutter 2.2.3, Dart 2.12

Make barcode types selectable

Thank you for your contribution I'm migrating a project from qr_code_scanner to this ,but Lack of specific area and bar code type support

Conflicting protobuf version

Trying to use mobile_scanner (1.0.0) package with flutter_blue (0.8.0 - latest version) in my app development. During the Pod install steps when running in iOS system, I was greet with the follow error:
-- snipets --

[!] CocoaPods could not find compatible versions for pod "Protobuf":
In snapshot (Podfile.lock):
Protobuf (= 3.11.4, ~> 3.11.4)

  In Podfile:
    flutter_blue (from `.symlinks/plugins/flutter_blue/ios`) was resolved to 0.0.1, which depends on
      flutter_blue/Protos (= 0.0.1) was resolved to 0.0.1, which depends on
        Protobuf (~> 3.11.4)

    mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) was resolved to 0.0.1, which depends on
      GoogleMLKit/BarcodeScanning (~> 2.6.0) was resolved to 2.6.0, which depends on
        MLKitBarcodeScanning (~> 1.7.0) was resolved to 1.7.0, which depends on
          MLKitVision (~> 3.0) was resolved to 3.0.0, which depends on
            Protobuf (~> 3.12)

Tried the suggested fix from the IDE ("pod repo update" && "pod install --repo-update") but it doesnt resolve the issue.

Build failed with an Exception

Following error is being thrown during compilation:

C:\Users\Dell\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\mobile_scanner-0.1.2\android\src\main\kotlin\dev\steenbakker\mobile_scanner\MobileScanner.kt: (27, 1): Class 'MobileScanner' is not abstract and does not implement abstract member public abstract fun onRequestPermissionsResult(p0: Int, p1: Array<(out) String!>, p2: IntArray): Boolean defined in io.flutter.plugin.common.PluginRegistry.RequestPermissionsResultListener e: C:\Users\Dell\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\mobile_scanner-0.1.2\android\src\main\kotlin\dev\steenbakker\mobile_scanner\MobileScanner.kt: (65, 5): 'onRequestPermissionsResult' overrides nothing e: C:\Users\Dell\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\mobile_scanner-0.1.2\android\src\main\kotlin\dev\steenbakker\mobile_scanner\MobileScanner.kt: (66, 66): Type mismatch: inferred type is Array<CapturedType(out String)>? but Array<(out) String!> was expected e: C:\Users\Dell\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\mobile_scanner-0.1.2\android\src\main\kotlin\dev\steenbakker\mobile_scanner\MobileScanner.kt: (66, 79): Type mismatch: inferred type is IntArray? but IntArray was expected

scanning region

hi, in the qr_code_scanner there was a scanning region, how to implement it in mobile scanner

Stopping the controller crashes the app

Platform: iOS
Version: ^0.0.3

Crash log when `MobileScanerController.stop()` is called.

Runner was compiled with optimization - stepping may behave oddly; variables may not be available.
thread # 1, queue = 'com.apple.main-thread', stop reason = Swift runtime failure: Unexpectedly found nil while implicitly unwrapping an Optional value
frame # 1: 0x00000001056cea70 Runner specialized SwiftMobileScannerPlugin.stop(self=0x000000028252de00) at SwiftMobileScannerPlugin.swift:239:9 [opt]
236 }
237
238 func stop(_ result: FlutterResult) {
-> 239 captureSession.stopRunning()
^
240 for input in captureSession.inputs {
241 captureSession.removeInput(input)
242 }
Target 0: (Runner) stopped.

I have tried to add a null check on the captureSession and other variables that are causing the crash and it fixes the crash, but then it won't stop scanning.

Flutter Doctor Doctor summary (to see all details, run flutter doctor -v):
  • [✓] Flutter (Channel stable, 2.10.1, on macOS 12.1 21C52 darwin-x64, locale en-ET)
  • [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
  • [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
  • [✓] Chrome - develop for the web
  • [✓] Android Studio (version 2021.1)
  • [✓] IntelliJ IDEA Community Edition (version 2021.3.1)
  • [✓] VS Code (version 1.64.2)
  • [✓] Connected device (4 available)
  • [✓] HTTP Host Availability

Support pause feature?

It would be quite nice if we could pause scanning in case of successful scan without pausing camera view. Also, vibration on detect would be helpful.

[Flutter Web] MissingPluginException :: TypeError: dart.global.jsQR is not a function

Another exception was thrown: MissingPluginException(No implementation found for method listen on channel
dev.steenbakker.mobile_scanner/scanner/event)
MobileScannerWeb: AbortError: The play() request was interrupted by a new load request. https://goo.gl/LdLk22

TypeError: dart.global.jsQR is not a function
    at mobile_scanner_web_plugin.MobileScannerWebPlugin.new._captureFrame
    (http://localhost:51540/packages/mobile_scanner/mobile_scanner_web_plugin.dart.lib.js:241:32)
    at _captureFrame.next (<anonymous>)
    at runBody (http://localhost:51540/dart_sdk.js:40565:34)
    at Object._async [as async] (http://localhost:51540/dart_sdk.js:40596:7)
    at mobile_scanner_web_plugin.MobileScannerWebPlugin.new.[_captureFrame]
    (http://localhost:51540/packages/mobile_scanner/mobile_scanner_web_plugin.dart.lib.js:235:20)
    at http://localhost:51540/packages/mobile_scanner/mobile_scanner_web_plugin.dart.lib.js:188:32
    at http://localhost:51540/dart_sdk.js:26642:9

Getting fatal on iOS emulator

When mounting the widget with

    return MobileScanner(
      key: _qrKey,
      controller: _controller,
      onDetect: (b, a) => widget.onQRViewCreated(b),
    );

I'm getting the fatal error, which crashes the app:

mobile_scanner/SwiftMobileScannerPlugin.swift:177: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

This happens on version 0.1.1.

[Web] Null error with MobileScannerController when permission is not granted to app

English is not my native language; please excuse typing errors.

Thank you for your package! I struggled for days for the QR code scanning of Flutter web with jsQR, until I found your package. But during my test, an error occurred:

Console: Expected a value of type 'MobileScannerArguments', but got one of type 'Null'

This occurs when open the a page with MobileScanner using MobileScannerController, before granting the permission.

ShareX_DxYiOmCZVU

My code:

class _BarcodeScannerViewState extends State<BarcodeScannerView> {
  final MobileScannerController _controller =
      MobileScannerController(facing: CameraFacing.back, torchEnabled: false);

  @override
    Widget build(BuildContext context) {
    return OrientationBuilder(
      builder: (context, orientation) {
        return Scaffold(
          appBar: AppBar(
            title: Text(widget.title),
          ),
          body: MobileScanner(
              controller: _controller,
              onDetect: (barcode, args) {
                final String code = barcode.rawValue!;
                debugPrint('Barcode found! $code');
                if (widget.popBack) {
                  Navigator.pop(context, code);
                } else {
                  searchNavigator(context, code,
                      destination: widget.destination, searchType: "CRID");
                }
              }),
          floatingActionButton: FloatingActionButton(
            heroTag: null,
            child: ValueListenableBuilder(
              valueListenable: _controller.torchState,
              builder: (context, state, child) {
                switch (state as TorchState) {
                  case TorchState.off:
                    return const Icon(Icons.flash_on);
                  case TorchState.on:
                    return const Icon(Icons.flash_off);
                }
              },
            ),
            onPressed: () {
              _controller.toggleTorch();
            },
          ),
        );
      },
    );
  }
}

May be related to #67 , hoping for a API for Permission Handling, or make sure MobileScannerController won't be null when permission is not granted to app?

Because ValueListenableBuilder is used to decide the flash button's icon, valueListenable requires ValueListenable<MobileScannerArguments?>, so it's impossible to make _controller nullable, setting valueListenable: _controller!.args, will leads to Expected a value of type 'MobileScannerArguments', but got one of type 'Null'.

Thank you!

Crashed if calling Navigator.pop() within onDetect

I created a mobileScanner using Navigator.push() in a new page. When I tried to close the page with Navigator.pop(), the code crashed. I tried to add a controller and called stop() and dispose() before pop(), but it did not help. I I was using it in a wrong way, please kindly prove an example of the correct way. Thanks.

Failed to build

Launching lib\main.dart on SM T550 in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file 'C:\Users\haris\AppData\Roaming\Pub\Cache\git\mobile_scanner-10915e492de4de7329c85fa2fd9e08931a6a7a80\android\build.gradle' line: 24

* What went wrong:
A problem occurred evaluating project ':mobile_scanner'.
> Plugin with id 'kotlin-android' not found.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* Where:
Script 'C:\Users\haris\StudioProjects\Maintenance\.fvm\flutter_sdk\packages\flutter_tools\gradle\flutter.gradle' line: 422

* What went wrong:
A problem occurred configuring project ':mobile_scanner'.
> Failed to notify project evaluation listener.
   > Cannot invoke method substring() on null object
   > compileSdkVersion is not specified. Please add it to build.gradle

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 59s
Exception: Gradle task assembleDebug failed with exit code 1

Flutter doctor log:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.10.4, on Microsoft Windows [Version 10.0.22581.200], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc2)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2022 17.1.1)
[√] Android Studio (version 2021.1)
[√] VS Code (version 1.65.2)
[√] Connected device (4 available)
[√] HTTP Host Availability

• No issues found!

Error on launch

I cannot launch this due to

e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\mobile_scanner-1.0.0\android\src\main\kotlin\dev\steenbakker\mobile_scanner\MobileScanner.kt: (29, 1): Class 'MobileScanner' is not abstract and does not implement abstract member public abstract fun onRequestPermissionsResult(p0: Int, p1: Array<(out) String!
>, p2: IntArray): Boolean defined in io.flutter.plugin.common.PluginRegistry.RequestPermissionsResultListener
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\mobile_scanner-1.0.0\android\src\main\kotlin\dev\steenbakker\mobile_scanner\MobileScanner.kt: (69, 5): 'onRequestPermissionsResult' overrides nothing
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\mobile_scanner-1.0.0\android\src\main\kotlin\dev\steenbakker\mobile_scanner\MobileScanner.kt: (70, 66): Type mismatch: inferred type is Array<CapturedType(out String)>? but Array<(out) String!> was expected
e: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\mobile_scanner-1.0.0\android\src\main\kotlin\dev\steenbakker\mobile_scanner\MobileScanner.kt: (70, 79): Type mismatch: inferred type is IntArray? but IntArray was expected

Changing the lines to the proposed ones lets me run it.

Thanks so much for this great plugin!

Windows Support

Now that the camera plugin works on Windows, it is definetely possible to leverage the existing WinRT APIs to support this on Windows 10+.

Part of

I need save qrcode scan

I need save qrcode scan, example I scanned a qrcode I wanted to have the freedom to show the scanned qrcode or save it in an api

Handle Case With Only One Camera

Hey! Thanks for implementing this great package! I found a bug with devices that only have one camera:

  1. Create an Android Emulator with only a backward camera
  2. Use your Example with controller and torch & camera controls
  3. Run the app and toggle the camera switch button

Expected: It does not work and there is some API to find out about the camera count
Actual: An exception is thrown when starting the scanner and one when toggling the camera

Exception that occurs 5x when starting the scanner

I/CameraManagerGlobal( 6751): Connecting to camera service
D/CameraRepository( 6751): Added camera: 0
I/Camera2CameraInfo( 6751): Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
D/CameraValidator( 6751): Verifying camera lens facing on generic_x86_arm, lensFacingInteger: null
E/CameraValidator( 6751): Camera LensFacing verification failed, existing cameras: [Camera@d8b98e[id=0]]
W/CameraX ( 6751): Retry init. Start time 438289 current time 438313
W/CameraX ( 6751): androidx.camera.core.impl.CameraValidator$CameraIdListIncorrectException: Expected camera missing from device.
W/CameraX ( 6751): 	at androidx.camera.core.impl.CameraValidator.validateCameras(CameraValidator.java:97)
W/CameraX ( 6751): 	at androidx.camera.core.CameraX.lambda$initAndRetryRecursively$2$CameraX(CameraX.java:341)
W/CameraX ( 6751): 	at androidx.camera.core.-$$Lambda$CameraX$KfzLCXuIc-FzgKWqE1UYH1CITHc.run(Unknown Source:10)
W/CameraX ( 6751): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W/CameraX ( 6751): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W/CameraX ( 6751): 	at java.lang.Thread.run(Thread.java:923)
W/CameraX ( 6751): Caused by: java.lang.IllegalArgumentException: No available camera can be found
W/CameraX ( 6751): 	at androidx.camera.core.CameraSelector.select(CameraSelector.java:82)
W/CameraX ( 6751): 	at androidx.camera.core.impl.CameraValidator.validateCameras(CameraValidator.java:91)
W/CameraX ( 6751): 	... 5 more

Exception that occurs when toggling the camera

D/DeferrableSurface( 8552): surface closed,  useCount=1 closed=true androidx.camera.core.SurfaceRequest$2@2eee9d4
D/DeferrableSurface( 8552): surface closed,  useCount=1 closed=true androidx.camera.core.impl.ImmediateSurface@a2b2ac3
D/Camera2CameraImpl( 8552): {Camera@28d60e0[id=0]} Use cases [androidx.camera.core.Preview-50b005b9-2938-43f5-b0c7-29048bc352da134173893, androidx.camera.core.ImageAnalysis-e2501c91-db0b-4269-b2cf-4d1ededc01d7149507610] now DETACHED for camera
D/UseCaseAttachState( 8552): All use case: [] for camera: 0
D/Camera2CameraImpl( 8552): {Camera@28d60e0[id=0]} Resetting Capture Session
D/Camera2CameraImpl( 8552): {Camera@28d60e0[id=0]} Releasing session in state OPENED
D/UseCaseAttachState( 8552): Active and attached use case: [] for camera: 0
D/UseCaseAttachState( 8552): Active and attached use case: [] for camera: 0
D/Camera2CameraImpl( 8552): {Camera@28d60e0[id=0]} Closing camera.
D/Camera2CameraImpl( 8552): {Camera@28d60e0[id=0]} Transitioning camera internal state: OPENED --> CLOSING
D/CameraStateRegistry( 8552): Recalculating open cameras:
D/CameraStateRegistry( 8552): Camera                                       State
D/CameraStateRegistry( 8552): -------------------------------------------------------------------
D/CameraStateRegistry( 8552): Camera@28d60e0[id=0]                         CLOSING
D/CameraStateRegistry( 8552): -------------------------------------------------------------------
D/CameraStateRegistry( 8552): Open count: 1 (Max allowed: 1)
D/CameraStateMachine( 8552): New public camera state CameraState{type=CLOSING, error=null} from CLOSING and null
D/CameraStateMachine( 8552): Publishing new public camera state CameraState{type=CLOSING, error=null}
D/Camera2CameraImpl( 8552): {Camera@28d60e0[id=0]} Resetting Capture Session
D/Camera2CameraImpl( 8552): {Camera@28d60e0[id=0]} Releasing session in state CLOSING
D/CaptureSession( 8552): onSessionFinished()
E/BufferQueueProducer( 8552): [SurfaceTexture-0-8552-0](id:216800000000,api:4,p:396,c:8552) queueBuffer: BufferQueue has been abandoned
E/BufferQueueProducer( 8552): [SurfaceTexture-0-8552-0](id:216800000000,api:4,p:396,c:8552) dequeueBuffer: BufferQueue has been abandoned
E/BufferQueueProducer( 8552): [SurfaceTexture-0-8552-0](id:216800000000,api:4,p:396,c:8552) queueBuffer: BufferQueue has been abandoned
D/AndroidRuntime( 8552): Shutting down VM
E/AndroidRuntime( 8552): FATAL EXCEPTION: main
E/AndroidRuntime( 8552): Process: de.xyz.abc, PID: 8552
E/AndroidRuntime( 8552): java.lang.IllegalArgumentException: Provided camera selector unable to resolve a camera for the given use case
E/AndroidRuntime( 8552): 	at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:470)
E/AndroidRuntime( 8552): 	at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:360)
E/AndroidRuntime( 8552): 	at dev.steenbakker.mobile_scanner.MobileScanner.start$lambda-10(MobileScanner.kt:183)
E/AndroidRuntime( 8552): 	at dev.steenbakker.mobile_scanner.MobileScanner.lambda$s9m9vwHudObqldHErksxB98AQmU(Unknown Source:0)
E/AndroidRuntime( 8552): 	at dev.steenbakker.mobile_scanner.-$$Lambda$MobileScanner$s9m9vwHudObqldHErksxB98AQmU.run(Unknown Source:14)
E/AndroidRuntime( 8552): 	at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime( 8552): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 8552): 	at android.os.Looper.loop(Looper.java:223)
E/AndroidRuntime( 8552): 	at android.app.ActivityThread.main(ActivityThread.java:7656)
E/AndroidRuntime( 8552): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 8552): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/AndroidRuntime( 8552): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
E/BufferQueueProducer( 8552): [SurfaceTexture-0-8552-0](id:216800000000,api:4,p:396,c:8552) queueBuffer: BufferQueue has been abandoned
I/Process ( 8552): Sending signal. PID: 8552 SIG: 9
Lost connection to device.
Exited (sigterm)

Android's first authorization crashed, and the app can be used normally for the second time

D/AndroidRuntime(27303): Shutting down VM
E/AndroidRuntime(27303): FATAL EXCEPTION: main
E/AndroidRuntime(27303): Process: com.emergence.friend.emergence, PID: 27303
E/AndroidRuntime(27303): java.lang.IllegalArgumentException: No supported surface combination is found for camera device - Id : 0. May be attempting to bind too many use cases. Existing surfaces: [SurfaceConfig{configType=PRIV, configSize=PREVIEW}, SurfaceConfig{configType=YUV, configSize=ANALYSIS}] New configs: [androidx.camera.core.impl.ImageAnalysisConfig@16ae728, androidx.camera.core.impl.PreviewConfig@9be914b]
E/AndroidRuntime(27303): at androidx.camera.lifecycle.LifecycleCameraRepository.bindToLifecycleCamera(LifecycleCameraRepository.java:280)
E/AndroidRuntime(27303): at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:532)
E/AndroidRuntime(27303): at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:360)
E/AndroidRuntime(27303): at dev.steenbakker.mobile_scanner.MobileScanner.start$lambda-10(MobileScanner.kt:167)
E/AndroidRuntime(27303): at dev.steenbakker.mobile_scanner.MobileScanner.lambda$bSd8nrsVH5fdvjvM1z6JkCPAiuY(Unknown Source:0)
E/AndroidRuntime(27303): at dev.steenbakker.mobile_scanner.-$$Lambda$MobileScanner$bSd8nrsVH5fdvjvM1z6JkCPAiuY.run(Unknown Source:14)
E/AndroidRuntime(27303): at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime(27303): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(27303): at android.os.Looper.loopOnce(Looper.java:210)
E/AndroidRuntime(27303): at android.os.Looper.loop(Looper.java:299)
E/AndroidRuntime(27303): at android.app.ActivityThread.main(ActivityThread.java:8087)
E/AndroidRuntime(27303): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(27303): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
E/AndroidRuntime(27303): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)
D/OOMEventManagerFK(27303): checkEventAndDumpForJE: 0
D/Camera2CameraImpl(27303): {Camera@bb300fe[id=0]} Resetting Capture Session
D/Camera2CameraImpl(27303): {Camera@bb300fe[id=0]} Releasing session in state INITIALIZED
D/Camera2CameraImpl(27303): {Camera@bb300fe[id=0]} Attempting to force open the camera.
D/CameraStateRegistry(27303): tryOpenCamera(Camera@bb300fe[id=0]) [Available Cameras: 1, Already Open: false (Previous state: null)] --> SUCCESS
D/CameraStateRegistry(27303): Recalculating open cameras:
D/CameraStateRegistry(27303): Camera State
D/CameraStateRegistry(27303): -------------------------------------------------------------------
D/CameraStateRegistry(27303): Camera@a5431d6[id=1] UNKNOWN
D/CameraStateRegistry(27303): Camera@bb300fe[id=0] OPENING
D/CameraStateRegistry(27303): -------------------------------------------------------------------
D/CameraStateRegistry(27303): Open count: 1 (Max allowed: 1)
D/Camera2CameraImpl(27303): {Camera@bb300fe[id=0]} Opening camera.
D/Camera2CameraImpl(27303): {Camera@bb300fe[id=0]} Transitioning camera internal state: INITIALIZED --> OPENING
D/CameraStateMachine(27303): New public camera state CameraState{type=OPENING, error=null} from OPENING and null
D/CameraStateMachine(27303): Publishing new public camera state CameraState{type=OPENING, error=null}
D/UseCaseAttachState(27303): All use case: [androidx.camera.core.Preview-73ae3a3d-2b65-44e3-bcf5-c2c21bc11a07187728793, androidx.camera.core.ImageAnalysis-aaa90afa-05f1-4e35-a0ae-0ca5d1e2d11c219600478] for camera: 0
W/libc (27303): Access denied finding property "persist.vendor.camera.privapp.list"
D/CameraExtImplXiaoMi(27303): initCameraDevice: 0
I/Process (27303): Sending signal. PID: 27303 SIG: 9
Lost connection to device.

min sdk contraints

any reason the SDK constraints need to be 2.16.0? I'd love to have the minimum constraints at 2.12.0 ;)

Bad state: Stream has already been listened to.

I open camera in dialog box and first time this plugin scan QR but second time it's giving this error and even if i open camera and just close dialog box also that time it gives me this error.
It's mean only first time plugin working fine but second time not working properly

Bad state: Stream has already been listened to.
MissingPluginException(No implementation found for method listen on channel dev.steenbakker.mobile_scanner/scanner/event)

Is this terminal info message normal behaviour ? ` Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client com.samsung.adaptivebrightnessgo API Level 2`

D/CameraStateMachine( 3932): New public camera state CameraState{type=CLOSED, error=null} from CLOSED and null
D/CameraStateMachine( 3932): Publishing new public camera state CameraState{type=CLOSED, error=null}
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_OPEN for client com.samsung.adaptivebrightnessgo API Level 2
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_ACTIVE for client com.samsung.adaptivebrightnessgo API Level 2
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_IDLE for client com.samsung.adaptivebrightnessgo API Level 2
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client com.samsung.adaptivebrightnessgo API Level 2
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_OPEN for client com.samsung.adaptivebrightnessgo API Level 2
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_ACTIVE for client com.samsung.adaptivebrightnessgo API Level 2
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_IDLE for client com.samsung.adaptivebrightnessgo API Level 2
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client com.samsung.adaptivebrightnessgo API Level 2
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_OPEN for client com.samsung.adaptivebrightnessgo API Level 2
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_ACTIVE for client com.samsung.adaptivebrightnessgo API Level 2
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_IDLE for client com.samsung.adaptivebrightnessgo API Level 2
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client com.samsung.adaptivebrightnessgo API Level 2
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_OPEN for client com.samsung.adaptivebrightnessgo API Level 2
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_ACTIVE for client com.samsung.adaptivebrightnessgo API Level 2
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_IDLE for client com.samsung.adaptivebrightnessgo API Level 2
I/CameraManagerGlobal( 3932): Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client com.samsung.adaptivebrightnessgo API Level 2

When developing, if I leave app open scanner is closed(it's on another screen). This messages print every second. Am I forgetting to clean something or is this normal?

[web] Bad state: stream has already been listened too

On my web app, I have 2 different screens where I want to use MobileScanner. Both are stateful widgets where I initialize the controller in the state, and dispose it in the state's dispose() function.

When I use the scanner in the first screen, everything works fine. Then I switch to the other screen and I get this error:

======== Exception caught by flutter web plugins ===================================================
The following StateError was thrown during a framework-to-plugin message:
Bad state: Stream has already been listened to.

When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49  throw_
dart-sdk/lib/async/stream_controller.dart 676:7                               [_subscribe]
dart-sdk/lib/async/stream_controller.dart 827:19                              [_createSubscription]
dart-sdk/lib/async/stream_impl.dart 473:9                                     listen
packages/flutter_web_plugins/src/plugin_event_channel.dart 136:38             _listen
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50            <fn>
dart-sdk/lib/async/zone.dart 1685:54                                          runUnary
dart-sdk/lib/async/future_impl.dart 159:18                                    handleValue
dart-sdk/lib/async/future_impl.dart 766:44                                    handleValueCallback
dart-sdk/lib/async/future_impl.dart 795:13                                    _propagateToListeners
dart-sdk/lib/async/future_impl.dart 465:9                                     callback
dart-sdk/lib/async/schedule_microtask.dart 40:11                              _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5                               _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 166:15           <fn>
====================================================================================================

======== Exception caught by services library ======================================================
The following MissingPluginException was thrown while activating platform stream on channel dev.steenbakker.mobile_scanner/scanner/event:
MissingPluginException(No implementation found for method listen on channel dev.steenbakker.mobile_scanner/scanner/event)

When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49  throw_
packages/flutter/src/services/platform_channel.dart 175:7                     _invokeMethod
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50            <fn>
dart-sdk/lib/async/zone.dart 1685:54                                          runUnary
dart-sdk/lib/async/future_impl.dart 159:18                                    handleValue
dart-sdk/lib/async/future_impl.dart 766:44                                    handleValueCallback
dart-sdk/lib/async/future_impl.dart 795:13                                    _propagateToListeners
dart-sdk/lib/async/future_impl.dart 601:5                                     [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 639:7                                     callback
dart-sdk/lib/async/schedule_microtask.dart 40:11                              _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5                               _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 166:15           <fn>
====================================================================================================

java.lang.NullPointerException on Android when phone is switched off during QR scanning is active

Using the latest version of mobile_scanner I am facing an issue on Android, tested with a Samsung Galaxy A12 device.
While the QR code scanning is active, if I switch off the phone, and switch it back again, my app crashes.

I have the following in Firebase Crashlytics:

Fatal Exception: java.lang.NullPointerException
       at dev.steenbakker.mobile_scanner.MobileScanner.start$lambda-10$lambda-6(MobileScanner.java:12)
       at dev.steenbakker.mobile_scanner.MobileScanner.$r8$lambda$BscFLzaTHqafEwvwW6YKsVTE7Cs(MobileScanner.java)
       at dev.steenbakker.mobile_scanner.MobileScanner$$InternalSyntheticLambda$2$8b32f29b98103f4c716651f5fc30a8b0567aa258605361e4c04adf5af2663670$0.onSurfaceRequested(MobileScanner.java:4)
       at androidx.camera.core.Preview.lambda$sendSurfaceRequestIfReady$1(Preview.java)
       at androidx.camera.core.Preview.$r8$lambda$cQQSNpTD_vzDR540rq5dmfARJz4(Preview.java)
       at androidx.camera.core.Preview$$InternalSyntheticLambda$3$d61493696d1ee7326726a55caf5c13f9aac8b88e93d4b3aff0111862e82fce26$0.run(Preview.java:4)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:246)
       at android.app.ActivityThread.main(ActivityThread.java:8653)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

How to handle device orientation changes

Discussed in #17

Please use the discussion page for discussions and answers.

Originally posted by juliansteenbakker February 23, 2022
Currently rotation is not supported.

We can't check for the right orientation since Flutters own orientation listener doesn't know the difference between landscape left or landscape right. This is why we can only rely on a plugin like native_device_orientation.

Another goal of this package is to use as few dependencies as possible. My question right now is if anyone knows a way we can detect for landscape left or landscape right, without the use of native_device_orientation.

Running image analyze again after navigator.pop

Hi,
I'm trying to figure out, how to running scan barcode again after pop from another screen

The flow will like this

  • User on scanner screen (First Screen),
  • Then navigate to another screen (Second Screen), using navigator.push after retrieve scan result
  • And back to scanner screen using navigator.pop();

i've been trying with these

Navigator.pushNamed(
             context,
             RouteList.error,
             arguments: {
               'type': 'invalid',
             },
).then((_) {
             cameraController = MobileScannerController();
             if (!cameraController.isStarting) {
               cameraController.start();
            
});

but it wont analyze the image

thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.