printer_plugin 0.0.3 copy "printer_plugin: ^0.0.3" to clipboard
printer_plugin: ^0.0.3 copied to clipboard

PlatformAndroid

A flutter plugin to print simple text on a PDA Urovo.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:printer_plugin/printer_plugin.dart';

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

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

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    TextEditingController controller = TextEditingController();
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Printer Plugin Example'),
        ),
        body: Center(
          child: Column(
            children: [
              TextFormField(controller: controller,),
              ElevatedButton(
                child: const Text('Print Ticket'),
                onPressed: () {
                  PrinterPlugin.printTicket('''BNS
                  \nREÇU DE PAIEMENT
                  \nDétails de la commande
                  \nProduits liquides commandés
                  \nIVOIRE
                  \nIvoire33CL -4
                  \nEmballages retournés
                  \nIVOIRE
                  \nCasier Bière Ivoire -7
                  \nMontantTotal-800.000.000 f cfa''');
                },
              ),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
150
points
2
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter plugin to print simple text on a PDA Urovo.

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on printer_plugin

Packages that implement printer_plugin