pos_printer_sdk library
Premium Bluetooth + USB thermal printer SDK for Flutter.
import 'package:posprinter_thermal/pos_printer_sdk.dart';
Classes
- BluetoothPrinterSettings
- Premium Bluetooth printer connection screen.
- BluetoothPrinterStatus
- Human readable Bluetooth printer states.
- BluetoothService
- Stateless bridge to the platform Bluetooth printer APIs.
- CommonPrinterSettingScreen
- The main SDK screen: pick Bluetooth or USB and manage the connection.
- GlobalLoaderController
- App-wide printing indicator rendered in the root overlay.
- PrinterActionButton
- Responsive action button used on the connection screens.
- PrinterConnectionEvent
- Immutable connection-lifecycle notification shared by PrinterService and BluetoothService.
- PrinterDeviceTile
- A pressable device row shared by the Bluetooth and USB screens.
- PrinterEmptyState
- Friendly empty state with an optional call to action.
- PrinterHeroCard
- The hero card at the top of a connection screen.
- PrinterInfo
- Immutable description of a USB printer, used by the UI.
- PrinterOverlay
-
Tracks the host app's root overlays so the SDK can render toasts and other
floating UI without requiring a
BuildContextat the call site. - PrinterSdk
- Entry point for the thermal printer SDK.
- PrinterSdkConfig
- Global configuration for the thermal printer SDK.
- PrinterService
- Stateless bridge to the platform USB printer APIs.
- PrinterSettingScreen
- Premium USB printer connection screen.
- PrinterStatus
- Human readable USB printer states.
- PrinterStatusCard
- A compact metric tile used by the connection screens.
- PrinterStatusGrid
- Lays status cards out in a responsive grid.
- PrinterStatusPill
-
Small rounded status badge, e.g.
Connected. - PrinterStorage
- Tiny, dependency-injected friendly wrapper around the Hive box used by the SDK.
- PrinterStorageKeys
- Keys persisted by the SDK.
Enums
- PrinterActionTone
- Visual tone of PrinterActionButton.
- PrinterConnectionEventType
- What happened to a printer that used to be connected.
- PrinterToastType
- Semantic tone of an SDK toast.
Functions
-
displaySnackBar(
{required Color color, required String message, BuildContext? context}) → void -
Backwards-compatible helper for the old app-level
displaySnackBar. -
hidePrinterToast(
) → void - Hides the visible toast, if any.
-
showPrinterConfirmDialog(
BuildContext context, {required String title, required String message, String confirmLabel = 'Yes', String cancelLabel = 'No', bool destructive = false}) → Future< bool> - Shows a premium styled confirmation dialog.
-
showPrinterToast(
String message, {PrinterToastType type = PrinterToastType.info, BuildContext? context}) → void - Shows a themed toast.
-
showPrinterToastWithColor(
String message, {required Color color, BuildContext? context}) → void -
Shows a toast with an explicit
color.