Printer class

Constructors

Printer()

Properties

charEncode String
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
mPaper Paper
getter/setter pair
mPrinterId String
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel() Future<bool>
Cancel printing. Invalid while sending data.
endCommunication() Future<bool>
Ends a communication with the printer. Note: This does not seem to impact printing.
flushPTTPrint() Future<PrinterStatus>
Transmits command and print data used to print a P-touch Template.
getBatteryInfo() Future<BatteryInfo>
Retrieves the battery information of the printer.
getBatteryWeak() Future<int>
getBLEPrinters(int timeout) Future<List<BLEPrinter>>
Discover printers which are connectable via BLE. Available on Android 5.0 or later.
getBluetoothPreference(BluetoothPreference btPre) Future<PrinterStatus>
Gets Bluetooth settings from the MW series. Refer to BluetoothPreference.
getBluetoothPrinters(List<String> modelName) Future<List<BluetoothPrinter>>
Returns the paried printers matching the model name specified.
getBootMode() Future<int>
getFirmFileVer(String filePath) Future<String>
getFirmVersion() Future<String>
getLabelInfo() Future<LabelInfo>
Retrieves the label information from the printer. Available for QL and PT series only.
getLabelParam() Future<LabelParam>
Get the detail information of the media (for QL, PT, TD and RJ series) specified by setPrinterInfo.
getMediaFileVer(String filePath) Future<String>
getMediaVersion() Future<String>
getNetPrinterInfo(String ipAddress) Future<NetPrinter>
getNetPrinters(List<String> modelName) Future<List<NetPrinter>>
Discover printers of the given model that are connected to the same network.
getPdfFilePages(String filepath) Future<int>
Get the page count of the specified pdf file. Available on Android 5.0 or later.
getPrinterInfo() Future<PrinterInfo>
Get the printer information which is currently set.
getPrinterSettings(List<PrinterSettingItem> keys, Map<PrinterSettingItem, String> outValues) Future<PrinterStatus>
Get printer settings. See Printer Configurations for available values.
getPrinterStatus() Future<PrinterStatus>
Retrieves the printer status.
getSerialNumber() Future<String>
getSystemReport() Future<String>
Retrieves the system report of the printer like self-print contents. Available if port is other than Port.NET.
getTemplateList(List<TemplateInfo> outTmplList) Future<PrinterStatus>
Gets a list of the templates that have been downloaded to the printer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printFile(String filepath) Future<PrinterStatus>
Print the image file or print data file (.prn) using print settings set by setPrinterInfo.
printFileList(List<String> fileList) Future<PrinterStatus>
Print the image files using print settings set by setPrinterInfo.
printImage(Image image) Future<PrinterStatus>
Print the image using print settings set by setPrinterInfo.
printPdfFile(String filepath, int pagenum) Future<PrinterStatus>
Print the pdf file using print settings set by setPrinterInfo. Available on Android 5.0 or later.
printText(Paragraph paragraph, {Offset offset = Offset.zero, Color background = const Color(0xFFFFFFFF)}) Future<PrinterStatus>
removeTemplate(List<int> keyList) Future<PrinterStatus>
Removes templates from the printer.
replaceText(String data) Future<bool>
Replaces the next replaceable text in a P-touch Template. Text strings are replaced in order of small object number.
replaceTextIndex(String data, int index) Future<bool>
Replaces the text in an object of a P-touch Template, specified by its object number.
replaceTextName(String data, String objectName) Future<bool>
Replaces the text in an object of a P-touch Template, specified by the object's name.
sendBinary(Uint8List data) Future<PrinterStatus>
Send the binary data containing the command. Since the status check is not performed, it is sent even if the printer specified by printerModel is different from the actually connected printer.
sendBinaryFile(String filepath) Future<PrinterStatus>
Send the binary file containing the command. Since the status check is not performed, it is sent even if the printer specified by printerModel is different from the actually connected printer.
sendDatabase(String filepath) Future<PrinterStatus>
Send the database data described in .csv format. In addition, Updates the database for printers that have templates and databases created and linked by P-touch Editor.
setPrinterInfo(PrinterInfo printerInfo) Future<bool>
Set PrinterInfo object to specify the printer and print settings.
startCommunication() Future<bool>
Starts a communication with the printer. Note: This does not seem to impact whether a print will succeed or not on the Android side. Printing without calling this will still print.
startPTTPrint(int key, String encode) Future<bool>
Start creating the command and print data string for a P-touch Template. Specify a template and the character encoding. This function assumes the default P-touch Template settings. Your application may not be able to print if the printer's settings differ from the defaults. If necessary, use the P-touch Template Setting Tool to configure the printer.
toString() String
A string representation of this object.
inherited
transfer(String filepath) Future<PrinterStatus>
Transfers a P-touch Template file to the printer. The template file (*.pdz, *.blf) is created by P-touch Transfer Manager, a Windows application. For Bluetooth and USB transfers, use pdz files. For all interface, use blf files.
updateBluetoothPreference(BluetoothPreference btPre) Future<PrinterStatus>
Updates Bluetooth settings of the MW series. Refer to BluetoothPreference. This method does not check if the request has been reflected on the device. Please check using getBluetoothPreference if needed.
updateFirm(String filepath) Future<PrinterStatus>
updatePrinterSettings(Map<PrinterSettingItem, String> settings) Future<PrinterStatus>
Update printer settings. See Printer Configurations for available values. Some settings are not applied until the printer is restarted. Restart the printer, then confirm the values are properly applied via getPrinterSettings after the restart.

Operators

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

Static Properties

byteFilePath String
getter/setter pair
bytePath String
getter/setter pair
mCancel bool
getter/setter pair
mPrinterInfo PrinterInfo
getter/setter pair
mResult PrinterStatus
getter/setter pair
mSpec PrinterSpec
getter/setter pair
platformVersion Future<String>
no setter
QUALITY int
final

Static Methods

getDate(Uint8List bytes) DateTime
getUserPrinterInfo() PrinterInfo
setUserPrinterInfo(PrinterInfo mPrinterInfo) → void