LocalPrinting class

superprinter_flutter's LocalPrinting on sPrint: one door to printing, discovery and identification. Jobs to one printer run one at a time.

Constructors

LocalPrinting()

Properties

hashCode → int
The hash code for this object.
no setterinherited
isSupported → bool
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

bondedPrinters() → Future<List<DiscoveredPrinter>>
Classic Bluetooth devices bonded with this device (none on iOS).
capabilities() → Future<PrintCapabilities>
checkLanguage(TargetPrinter printer) → Future<PrinterIdentity?>
Only the printer's own status reply (no paper, no table): what it says it speaks, or null when it is silent.
detectLanguage(TargetPrinter printer) → Future<String>
Asks the printer, else prints one test line per language (the log names what was sent); see detectedLanguage.
identify(TargetPrinter printer) → Future<PrinterIdentity?>
The language without paper: device ID, model table, IPP, status reply.
nearbyBluetooth({Duration duration = const Duration(seconds: 8)}) → Future<List<DiscoveredPrinter>>
sPrint addition: every Bluetooth device nearby over both transports, each once.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printHtml(String html, {String printerName = '', TargetPrinter? printer, int copies = 1, String? baseUrl}) → Future<PrintResult>
printLabel(LabelJob label, {String printerName = '', TargetPrinter? printer, String? html, int copies = 1}) → Future<PrintResult>
A native label; when it cannot be drawn and html is given, the HTML is printed instead (superprinter_flutter's fallback).
printPdf(Uint8List pdf, {String printerName = '', TargetPrinter? printer, int copies = 1}) → Future<PrintResult>
printRaw(Uint8List bytes, {String printerName = '', TargetPrinter? printer}) → Future<PrintResult>
probeReport(TargetPrinter printer, {Object? facts}) → Future<String>
The superprinter.probe/1 report of a printer. facts is accepted for compatibility; sPrint's report carries its own.
requestUsbPermission(String key) → Future<bool>
scanBle({Duration duration = const Duration(seconds: 8)}) → Future<List<DiscoveredPrinter>>
Bluetooth LE devices seen in duration: every one, likely printers first.
scanNetwork(String subnet) → Future<List<DiscoveredPrinter>>
Printers answering on 631 / 9100 in a /24 ("192.168.1"; empty: every local one).
selfTest(TargetPrinter printer) → Future<PrintResult>
The self-test in the printer's language (a small real PDF for a document printer).
setModelTable(String json) → Future<int>
Loads a printer model table revision; returns the active revision.
setPrinters(List<TargetPrinter> printers) → Future<void>
The configured printers, for jobs addressed by name ('' = the default).
stop() → Future<bool>
toString() → String
A string representation of this object.
inherited
usbPrinters() → Future<List<DiscoveredPrinter>>

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

platformSupported → bool
Every platform sprint_flutter runs on.
no setter

Static Methods

detectedLanguage(String log) → String?
The language read from a detectLanguage log, when the printer answered.