maxx_sunmi_printer

A new flutter plugin project.

Getting Started

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Contact Info

Support OS

This package support with android only

Device Support

  • Sunmi v2
  • Sunmi v2s
  • Sunmi v2 Pro
  • Other model

Import Package

import 'package:maxx_sunmi_printer/maxx_sunmi_printer.dart';

Features & Usage

Print Text

    MaxxSunmiPrinter.printText("សួស្តីកម្ពុជា");

Paper Feed

    MaxxSunmiPrinter.paperFeed()

Print Image

    ByteData bytes = await rootBundle.load('assets/logo.jpg');
    final buffer = bytes.buffer;
    final imgData = base64.encode(Uint8List.view(buffer));
    MaxxSunmiPrinter.printImage(imgData, align: SunmiAlign.center);
    MaxxSunmiPrinter.paperFeed(number: 1);

Print Text Line ( ------------------------ )

    MaxxSunmiPrinter.printTextLine()

Print Barcode

    MaxxSunmiPrinter.printBarcode("1234567890123")

print Qr Code

    MaxxSunmiPrinter.printQrCode("www.maxx4business.com")

Print Table

    MaxxSunmiPrinter.printTable(
      isBold: true,
      cols: [
        SunmiCol(text: 'បរិយាយ', width: 5),
        SunmiCol(text: 'ចំនួន', width: 2, align: SunmiAlign.right),
        SunmiCol(text: 'តម្លៃ', width: 2, align: SunmiAlign.right),
        SunmiCol(text: 'សរុប', width: 3, align: SunmiAlign.right),
      ],
    );

This package dependent on libray java of sunmi Print Demo source code - Java Android

Libraries

maxx_sunmi_printer