nyx_printer 0.0.1

SDKflutter
Platformandroid

Flutter Plugin that connect to Nyx devices Printer such as NB55

Nyx Printer

Flutter Plugin that connect to Nyx devices Printer such as NB55.

Installation

Install Nyx Printer with pub

  flutter pub add nyx_printer

Receipt

import 'package:nyx_printer/nyx_printer.dart';
  ...
  final _nyxPrinterPlugin = NyxPrinter();

  Future<void> printImage() async {
    final image = await rootBundle.load("images/img.png");
    await _nyxPrinterPlugin.printImage(image.buffer.asUint8List());
  }
  Future<void> printText() async {
      await _nyxPrinterPlugin.printText(
        "Grocery Store",
        textFormat: NyxTextFormat(
          textSize: 32,
          align: NyxAlign.center,
          font: NyxFont.monospace,
          style: NyxFontStyle.boldItalic,
        ),
      );
  }
  Future<void> printQrCode() async {
      await _nyxPrinterPlugin.printQrCode(
        "123456789",
        width: 200,
        height: 200,
      );
  }
  Future<void> printBarcode() async {
      await _nyxPrinterPlugin.printBarcode(
        "123456789",
        width: 300,
        height: 40,
      );
  }

License

MIT Copyright (c) 2023 ALADDIN SID AHMED