패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.1.4

flutter_barcode_listener

제조사 SDK 없이도 모든 하드웨어 바코드 스캐너를 수신할 수 있습니다

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
1.8만
좋아요
183
Pub 점수
150

패키지 설치

flutter pub add flutter_barcode_listener

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Flutter Barcode Listener는 제조사별 SDK가 필요 없이 어떤 하드웨어 바코드 스캐너에서도 입력을 받을 수 있도록 해주는 크로스플랫폼 패키지입니다. 표준 입력 이벤트를 통해 스캔된 데이터를 감지함으로써 안드로이드, iOS, 웹, macOS, Windows, 리눅스에서 원활하게 작동합니다. 이 패키지는 하드웨어 통합의 복잡성을 추상화하여 소매, 재고 관리, 물류 및 포인트 오브 세일 시스템에 바코드 스캔 기능을 쉽게 구현할 수 있게 합니다. 개발자는 장치별 설정이 아닌 비즈니스 로직에 집중할 수 있습니다.

사용 사례

  • 소매 재고 추적
  • 포인트 오브 세일 시스템
  • 물류 및 배송
  • 자산 관리
  • 모바일 데이터 입력
  • 창고 운영

주요 기능

  • 크로스 플랫폼 지원
  • 제조업체 SDK가 필요하지 않습니다
  • 자동 입력 감지
  • 간단한 이벤트 기반 API
  • 모든 USB/블루투스 바코드 스캐너와 호환됩니다
  • 실시간 스캔 응답

적합한 대상

  • POS 앱을 개발하는 개발자
  • 재고 관리 솔루션
  • 현장 서비스 애플리케이션
  • 전자상거래 모바일 도구
  • 기업 데이터 수집 시스템

고려 사항

  • 물리적 바코드 스캐너 하드웨어가 필요합니다
  • 일부 플랫폼에서는 권한 처리가 필요할 수 있습니다
  • 텍스트 기반 바코드 형식에 한정
  • 카메라 기반 스캔에 적합하지 않습니다
  • 시스템 수준의 입력 인식에 의존
  • 웹 지원은 브라우저에 따라 달라질 수 있습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

flutter_barcode_listener

Listen for any hardware barcode scanner

Problems with barcode scanning

If you need to get barcode scanned from some hardware barcode scanner you generally have few ways to do it.

  1. implement some text input control (IE. TextEdit), call focus on it and make the scan
  2. listen for some special system event (IE. intent fired from Android service)
  3. listen for raw keyboard events

First aproach is simple, and if you're ok to catch scanned barcodes only when you have focus on text control you're good to go and you don't need this package.

If you however need to somehow get scanned barcodes even when you don't have focus on text input control (or no text input control at all) you're left with two other options.

Listening for special system events (IE. Anroid service intents) is always tied for specific manufacturer/device that usually comes with some kind of SDK you need to implement. This means you're implementation will support listening barcode scannes only for this devices you implemented. Plus, it's not really cross platform friendly

And there's third way, simply listen for raw keyboard events and figure out what's barcode and what's not. Downside of this solution is that you need to figure out what's actual user interaction and what's barcode scan. Upside is it doesn't require any per manufacturer/device implementation and you're pretty much suporting all barcode scanners, including external ones with bluetooth or wifi. And it's cross platform friendly.

Implementation idea

All hardware barcode devices have few things in common

  • they act as a keyboard when barcode is scanned
  • all keyboard events are fired in extremly small time frame (less than 100 ms between each character)
  • barcode is terminated with special character (enter in majority)

So to figure out what is actual barcode and what is simple keyboard event that should be ignored this package uses following logic

  1. listen for physical keyboard raw key up event
  2. filter out only 'REAL' characters (ASCII codes lower than 256, without special characters except enter)
  3. on each new key check if previous key is older than bufferDuration, if it's older clear internal buffer.
  4. check if new key is enter key, if it is call onBarcodeScanned callback and clear buffer
  5. if it's not enter key just append it to internal buffer;

Basically it translates to: if you get bunch of keys comming really fast that end with enter key it's a BINGO.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.