Upgrade Skill Di ITBOX Jadi Lebih Hemat
Special Diskon 50%
Sampai 16 November 2026!
Hari
Jam
Menit
Detik
GARUDABOX

qr scan code running tapi tidak terkoneksi dengan kamera handphone nya

Beranda › Forums › Belajar Flutter Mobile Apps Tingkat Menengah › qr scan code running tapi tidak terkoneksi dengan kamera handphone nya

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #49405
    sandi
    Participant

      pada saat di debuging muncul notice di bawah ini

      The plugin qrscan uses a deprecated version of the Android embedding.
      To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
      If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.
      Launching lib\main.dart on SM A013G in debug mode…
      lib\main.dart:1
      Parameter format not correct –
      Note: Some input files use or override a deprecated API.
      Note: Recompile with -Xlint:deprecation for details.
      √ Built build\app\outputs\flutter-apk\app-debug.apk.
      Connecting to VM Service at ws://127.0.0.1:64736/AoT5ugXLCZc=/ws

      mohon pencerahanya kembali coach

      #49406
      sandi
      Participant

        ini kodingan main.dart saya

        import ‘package:flutter/material.dart’;
        import ‘main_page.dart’;
        import ‘package:qrscan/qrscan.dart’ as scanner;

        void main() {
        runApp(MyApp());
        }

        class MyApp extends StatelessWidget {
        @override
        Widget build(BuildContext context) {
        return MaterialApp(
        debugShowCheckedModeBanner: false,
        home: MainPage(),
        );
        }
        }

        #49407
        sandi
        Participant

          dan ini kodingan main_page.dart nya

          import ‘package:flutter/material.dart’;
          import ‘package:qrscan/qrscan.dart’ as scanner;

          class MainPage extends StatefulWidget {
          @override
          _MainPageState createState() => _MainPageState();
          }

          class _MainPageState extends State<MainPage> {
          String text = “hasil QR Scan”;

          @override
          Widget build(BuildContext context) {
          return Scaffold(
          appBar: AppBar(
          title: Text(“QR Scan”),
          ),
          body: Center(
          child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
          Text(text),
          SizedBox(
          height: 20,
          ),
          RaisedButton(
          child: Text(“Scan”),
          onPressed: () async {
          text = await scanner.scan();
          setState(() {});
          },
          )
          ],
          ),
          ),
          );
          }
          }

          kira2 salah nya dimana ya coach mohon pencerahanya…terimakasih

          #49408
          Anonymous

            Hallo Sandi,

            Kalau dilihat dari output errornya:

            The plugin qrscan uses a deprecated version of the Android embedding.
            To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
            If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

            Itu jelas ya sebuah warning terkait penggunaan versi android embeeding yang sudah deprecated pada code di plugin/package dari qrscan.
            Nah karena ini merupakan masalah yang berada pada code dari package tersebut, maka tidak ada yang bisa kita lakuin.
            dan juga saya lihat package qrscan sudah lumayan lama tidak diupdate. Jadi lebih baik kamu mencari package lain saja yang masih aktif diupdate sama developernya.

            Saya barusan coba search dan menemukan package yang lebih baru dan lebih bagus dari package yang kamu pakai nih, bisa dicoba
            https://pub.dev/packages/qr_code_scanner

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.
          Shopping cart0
          There are no products in the cart!
          Continue shopping