flutter_usb_printer_monster 0.1.1 copy "flutter_usb_printer_monster: ^0.1.1" to clipboard
flutter_usb_printer_monster: ^0.1.1 copied to clipboard

discontinued

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

flutter_usb_printer_monster #

This project is a fork of the flutter_usb_printer project, with some improvements and fixes. https://github.com/kechankrisna/flutter_usb_printer

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

Getting Started #

    flutter pub add flutter_usb_printer_monster

Example of Usage #

_getDevicelist() async {
    List<Map<String, dynamic>> results = [];
    results = await FlutterUsbPrinter.getUSBDeviceList();

    print(" length: ${results.length}");
    setState(() {
      devices = results;
    });
}

_connect(int vendorId, int productId) async {
    bool returned;
    try {
      returned = await flutterUsbPrinter.connect(vendorId, productId);
    } on PlatformException {
      //response = 'Failed to get platform version.';
    }
    if (returned) {
      setState(() {
        connected = true;
      });
    }
}

_print() async {
    try {
      var data = Uint8List.fromList(
          utf8.encode(" Hello world Testing ESC POS printer..."));
      await flutterUsbPrinter.write(data);
      // await FlutterUsbPrinter.printRawData("text");
      // await FlutterUsbPrinter.printText("Testing ESC POS printer...");
    } on PlatformException {
      //response = 'Failed to get platform version.';
    }
}

1
likes
0
points
26
downloads

Publisher

verified publisherflutter.monster

Weekly Downloads

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

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_usb_printer_monster

Packages that implement flutter_usb_printer_monster