0 purchases
thermal print
POS Thermal printer package. This package extends from esc_pos_print package
Features #
Print direct text
Print widget screenshot
Getting started #
use this git to pubspec.yaml
Usage #
Register the PrintApi as abstract and ThermalPrint() as implementation to getIt singleton.
final getIt = GetIt.instance;
void setupLocator() {
getIt.registerSingleton<PrintApi>(ThermalPrint());
}
copied to clipboard
Initialize the initialize method, from main
void main() async {
WidgetsFlutterBinding.ensureInitialized();
setupLocator();
await getIt<PrintApi>().initialize();
runApp(const MyApp());
}
copied to clipboard
Print demo
final printer = getIt<PrintApi>();
printer.printDirectText(
printerModel: PrinterModel(
name: "Recipe Print",
ip: "192.168.1.13",
),
print: ReceiptModel.demo(),
);
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.