rongta_printer 0.0.5 copy "rongta_printer: ^0.0.5" to clipboard
rongta_printer: ^0.0.5 copied to clipboard

A Flutter plugin to help developers to integrate with Rongta printers SDK.

rongta_printer #

Flutter Version License Platform

A Flutter plugin for printing using Rongta thermal printers. 🖨️

Features #

  • Print anything 🤯: Print any widget shape, bypassing the limitations of the Rongta native SDK.
  • Be aware of the printer status 💡: Receive updates about printer connection and document transmission.

Installation #

Add the following dependency to your pubspec.yaml file:

dependencies:
  plugin_name: ^0.0.1

Usage #

Import the package into your Dart file:

import 'package:rongta_printer/rongta_printer.dart';

Example #

Initialize the connection with the printer:

...
final _rongtaPrinterPlugin = RongtaPrinter();

void onConnectionStatusChanged(PrinterConnectionStatus status) {...}
void onOperationStatusChanged(PrinterOperationStatus status) {...}
...
await _rongtaPrinterPlugin.init(
  macAddress: 'DC:0D:30:95:39:A2',
  onPrinterConnectionChange: onConnectionStatusChanged,
  onDocPrinted: onOperationStatusChanged,
);
...

Print your document:

...
_rongtaPrinterPlugin.print(
  doc: Column(
    children: const [
      FlutterLogo(),
      Text('Rongta printing example'),
    ],
  ),
);
...

Known Issues ❗️ #

  • Using Image.memory will not display anything, as the code loads images instantly, while loading from memory takes time.
  • iOS is not supported yet. 🚧

License #

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Contributing #

Contributions are welcome! Please feel free to submit a pull request.

Acknowledgments #

The code is built on top of the Rongta SDKs for Android and iOS, which can be found here. 🙌

0
likes
90
pub points
65%
popularity

Publisher

unverified uploader

A Flutter plugin to help developers to integrate with Rongta printers SDK.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on rongta_printer