AmolGangadhare / flutter_barcode_scanner

Barcode scanner plugin for flutter. Supports barcode scanning for Android and iOS
https://pub.dev/packages/flutter_barcode_scanner
MIT License
381 stars 501 forks source link

Camara in Android.hardware has been deprecated #51

Closed Ohpizarro closed 4 years ago

Ohpizarro commented 5 years ago

Describe the bug C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_barcode_scanner-0.1.7\android\src\main\java\com\amolg\flutterbarcodescanner\camera\CameraSource.java:24: warning: [deprecation] Camera in android.hardware has been deprecated

import android.hardware.Camera; C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_barcode_scanner-0.1.7\android\src\main\java\com\amolg\flutterbarcodescanner\camera\CameraSource.java:25: warning: [deprecation] Camera in android.hardware has been deprecated

import android.hardware.Camera.CameraInfo;

buildscript { ext.kotlin_version = '1.3.50' repositories { google() jcenter() }

dependencies {
    classpath 'com.android.tools.build:gradle:3.3.1'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

}

allprojects { repositories { google() jcenter() } }

rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked" } }
}

task clean(type: Delete) { delete rootProject.buildDir } gradle.properties: android.useAndroidX=true android.enableJetifier=true

AmolGangadhare commented 4 years ago

This is causing by VISION API, in upcoming release vision API will be replaced by ml-kit, so you won't get any warning. For now, you can ignore the warning.

Closing this issue feel free to reopen if you need any help regarding this.