nyx_printer_v2 0.0.1 copy "nyx_printer_v2: ^0.0.1" to clipboard
nyx_printer_v2: ^0.0.1 copied to clipboard

retracted

A Flutter plugin for integrating and controlling the Nyx printer (NB55 and T2 Pro models), enabling features like paper handling, printing status, and more.

example/lib/main.dart

import 'package:example/extension.dart';
import 'package:flutter/material.dart';
import 'package:nyx_printer/nyx_printer.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'NyxPrinter Demo',
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final NyxPrinter nyxPrinter = NyxPrinter();
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: const Text("Nyx Printer Sample"),
      ),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          const Text('Sample Text').onTap(
            () => nyxPrinter.printText("Sample Text"),
          ),
          const SizedBox(height: 12),
          const Text('Sample Text with Styling').onTap(
            () => nyxPrinter.printText(
              "Sample Text",
              textFormat: NyxTextFormat(
                align: NyxAlign.center,
                style: NyxFontStyle.bold,
                textSize: 18,
                underline: true,
              ),
            ),
          ),
          const SizedBox(height: 12),
          const Text('Print QR Code').onTap(
            () {
              nyxPrinter.printQrCode('Sample QR Code');
            },
          ),
          const SizedBox(height: 12),
          const Text('Print BarCode').onTap(
            () {
              nyxPrinter.printBarcode('Sample Print Code');
            },
          ),
        ],
      ),
    );
  }
}
4
likes
0
points
23
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for integrating and controlling the Nyx printer (NB55 and T2 Pro models), enabling features like paper handling, printing status, and more.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on nyx_printer_v2