t6_pos_printer_plugin 0.0.6+2 copy "t6_pos_printer_plugin: ^0.0.6+2" to clipboard
t6_pos_printer_plugin: ^0.0.6+2 copied to clipboard

PlatformAndroid

A Flutter plugin to enable printing on the Topwise T6 POS device.

t6_pos_printer_plugin #

A Flutter plugin for Topwise T6 POS printers to handle receipt printing with text and images.

Features #

Printer Initialization Set up the printer for use.

Add Text (Single Column) Add customizable single-column text to the print template.

Add Two Texts (Double Column) Add two separate customizable text items in the same line (e.g., name & price).

Add Bitmap Image Add a bitmap image, like a logo or QR code, to the print template.

Initiate Printing Send the prepared template to the printer.

Installation #

dependencies: t6_pos_printer_plugin: ^0.0.6

Usage #

import 'package:t6_pos_printer_plugin/t6_pos_printer_plugin.dart';

void main() async { await T6PosPrinterPlugin.initializePrinter();

// Add single text await T6PosPrinterPlugin.addText( "Welcome to Topwise!", 20, "center", bold: true, );

// Add double-column text await T6PosPrinterPlugin.addTwoTexts( "Item 1", 18, "left", false, false, true, 5, 0, "\K9.99", 18, "right", true, false, true, 5, 0, 1, 1 );

// Add an image (ensure image is converted to Uint8List) final ByteData data = await rootBundle.load('assets/logo.png'); Uint8List imageData = data.buffer.asUint8List(); await T6PosPrinterPlugin.addBitmap(imageData, width, height, false);

// Print the receipt await T6PosPrinterPlugin.printReceipt(); }

API Reference #

  1. Printer Initialization

    Future

  2. Add Text (Single Column)

    static Future

    Adds a single line of text to the print template. Example: await T6PosPrinterPlugin.addText( "Hello World!", 24, "center", bold: true, );

  3. Add Two Texts (Double Column)

    static Future

  4. Add Bitmap

    static Future

  5. Print Receipt

    static Future

1
likes
140
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin to enable printing on the Topwise T6 POS device.

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on t6_pos_printer_plugin

Packages that implement t6_pos_printer_plugin