flutter_usb_printer 0.3.0 copy "flutter_usb_printer: ^0.3.0" to clipboard
flutter_usb_printer: ^0.3.0 copied to clipboard

This plugin will allow develop send data and work with usb printer on android

0.3.0 #

Breaking Changes #

  • minSdk raised from 16 to 24

New Features #

  • USB permission dialog is now shown automatically when a device is plugged in (via USB_DEVICE_ATTACHED intent-filter and device_filter.xml)

Bug Fixes #

  • Permission flow: connect() now waits for the user to respond to the USB permission dialog before resolving — previously it returned true immediately before the user even saw the dialog
  • Permission check: hasPermission() is checked before calling requestPermission() — no redundant dialog when permission is already granted
  • Connection reliability: openConnection() now scans all USB interfaces (not just index 0) to find the BULK OUT endpoint, fixing printers that expose the print interface at index 1+
  • Silent failure fixed: openConnection() previously returned true even when no endpoint was found, causing a silent NPE on bulkTransfer; it now returns false with a clear log message
  • Transfer result: write(), printText(), and printRawText() now return the actual transfer result (b >= 0) instead of always returning true
  • Null crash: Fixed NullPointerException in the USB permission broadcast receiver when EXTRA_DEVICE is absent on permission denial
  • UI null crash: Fixed crash in device list when manufacturer or productName fields are null

Maintenance #

  • Migrated Android build to AGP 8.11.1, Gradle 8.14, Kotlin 2.2.20
  • Migrated to Kotlin DSL (build.gradle.kts) and new Flutter Gradle plugin DSL
  • Fixed deprecated getParcelableExtra API (Android 13+)
  • Fixed deprecated buildDir setter/getter (replaced with layout.buildDirectory)
  • Replaced raw Thread{} with Kotlin Coroutines for proper error propagation
  • Migrated test mocking to TestDefaultBinaryMessengerBinding API
  • Added flutter_lints and analysis_options.yaml
  • Added android:exported="true" to MainActivity (required for Android 12+)

0.2.0 #

  • Upgraded to Flutter 3.41.9 / Dart 3.9.2+
  • Migrated Android build to AGP 8.11.1, Gradle 8.14, Kotlin 2.2.20
  • Migrated to Kotlin DSL (build.gradle.kts) and new Flutter Gradle plugin DSL
  • Raised minSdk from 16 to 24 (breaking change)
  • Fixed deprecated getParcelableExtra API (Android 13+)
  • Replaced raw Thread{} with Kotlin Coroutines for proper error propagation
  • Fixed printText/printRawText always returning true regardless of actual result
  • Fixed non-true singleton pattern in USBPrinterAdapter
  • Migrated test mocking to TestDefaultBinaryMessengerBinding API
  • Added flutter_lints and analysis_options.yaml

0.1.0+1 #

  • fixed Future

0.1.0 #

  • null safety

0.0.1 #

  • first release
27
likes
0
points
243
downloads

Publisher

verified publishermylekha.app

Weekly Downloads

This plugin will allow develop send data and work with usb printer on android

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_usb_printer

Packages that implement flutter_usb_printer