Buscar pacotes, repositórios e categorias de apps

Repositório GitHubkechankrisna/flutter_usb_printer

flutter_usb_printer

kechankrisna/flutter_usb_printer open-source repository details.

Capa do projeto flutter_usb_printer
Estrelas
9
Forks
76
Último push (UTC)
18 de ago. de 2026
Status do projeto
Ativo

README original

Texto original em inglês. Visite o GitHub para a versão atual.

flutter_usb_printer

This plugin will allow develop send data and work with usb printer on android

Getting Started

    flutter pub add flutter_usb_printer

Example of Usage

_getDevicelist() async {
    List<Map<String, dynamic>> results = [];
    results = await FlutterUsbPrinter.getUSBDeviceList();

    print(" length: ${results.length}");
    setState(() {
      devices = results;
    });
}

_connect(int vendorId, int productId) async {
    bool returned;
    try {
      returned = await flutterUsbPrinter.connect(vendorId, productId);
    } on PlatformException {
      //response = 'Failed to get platform version.';
    }
    if (returned) {
      setState(() {
        connected = true;
      });
    }
}

_print() async {
    try {
      var data = Uint8List.fromList(
          utf8.encode(" Hello world Testing ESC POS printer..."));
      await flutterUsbPrinter.write(data);
      // await FlutterUsbPrinter.printRawData("text");
      // await FlutterUsbPrinter.printText("Testing ESC POS printer...");
    } on PlatformException {
      //response = 'Failed to get platform version.';
    }
}

ke chankrisna GitHub avatar
Autor no GitHub

ke chankrisna ↗

Let share what we know 😄

MyLekha Tech SolutionsSiem reapSite oficial ↗
LinguagensKotlinDart

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 3 itens

  • flutter{"sdk":"flutter"}
  • flutter_testDesenvolvimento{"sdk":"flutter"}
  • flutter_lintsDesenvolvimento^5.0.0

Como escolher um repositório para seu projeto?

Filtre pelo caso de uso, compare a atividade e confira o projeto original antes de adotá-lo.

  1. Busque por nome, autor ou descrição e filtre por tema.
  2. Compare estrelas, forks e envios recentes. Estrelas indicam interesse, mas não garantem qualidade.
  3. Confira o README, a licença e as issues no GitHub antes de usar o projeto.

Fontes e manutenção

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗