0 purchases
printer plugin
Printer_plugin_pda_urovo #
A flutter plugin to print simple text on a PDA Urovo
Getting Started (by installing the plugin) #
add the snippet below in the file -> pubspec.yaml
dependencies:
flutter:
sdk: flutter
printer_plugin:
copied to clipboard
Demonstrates how to use the printer_plugin plugin.
Example snippet:
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('${controller.text}');
// By using '\n' you break the line, so the upcoming text go to the next line;
// - in the text will add space in between the element two element
},
),
],
),
),
),
);
}
}
}
copied to clipboard
Let me know if you need a specific change or functionnality on the urovo pda; #
#
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.