android_bluetooth_printer 0.0.2+2
android_bluetooth_printer: ^0.0.2+2 copied to clipboard

A plugin for Android Bluetooth Printer

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: ElevatedButton(
            onPressed: () async {
              await AndroidBluetoothPrinter.print(
                  "[C]<u><font size='big'>ORDER N°045</font></u>\n" +
                      "[L]\n" +
                      "[C]================================\n" +
                      "[L]\n" +
                      "[L]<b>BEAUTIFUL SHIRT</b>[R]9.99e\n" +
                      "[L]  + Size : S\n" +
                      "[L]\n" +
                      "[L]<b>AWESOME HAT</b>[R]24.99e\n" +
                      "[L]  + Size : 57/58\n" +
                      "[L]\n" +
                      "[C]--------------------------------\n" +
                      "[R]TOTAL PRICE :[R]34.98e\n" +
                      "[R]TAX :[R]4.23e\n" +
                      "[L]\n" +
                      "[C]================================\n" +
                      "[L]\n" +
                      "[L]<font size='tall'>Customer :</font>\n" +
                      "[L]Raymond DUPONT\n" +
                      "[L]5 rue des girafes\n" +
                      "[L]31547 PERPETES\n" +
                      "[L]Tel : +33801201456\n" +
                      "[L]\n" +
                      "[C]<barcode type='ean13' height='10'>831254784551</barcode>\n" +
                      "[C]<qrcode size='20'>http://www.developpeur-web.dantsu.com/</qrcode>"
              );
            },
            child: Text('Print'),
          ),
        ),
      ),
    );
  }
}
3
likes
100
pub points
53%
popularity

A plugin for Android Bluetooth Printer

Homepage

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on android_bluetooth_printer