GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — flutter-star-printer-plugin/README.md at master · cloudloom/flutter-star-printer-plugin

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
59 lines (40 loc) · 1.49 KB
/

README.md

Copy path

File metadata and controls

59 lines (40 loc) · 1.49 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

flutter_star_printer_plugin

A flutter plugin project for Star micronics printers.

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.

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

import 'package:flutter_star_printer_plugin/flutter_star_printer_plugin.dart';

// find and list all the printers
List<PortInfo> list = await StarPrinter.portDiscovery("LAN");

// check status
// await StarPrinter.checkStatus( portName: port.portName, emulation: 'StarLine');

// Print command
PrintCommands commands = PrintCommands();

String title = "Example Title\n\n";
commands.push({
  'width': 2,
  'height': 2,
  'appendMultiple': title,
});

String text = "This is an example text for printing.\n";
commands.push({
  'append': text
});

commands.push({
  'appendCutPaper': "FullCutWithFeed"
});

await StarPrinter.print( portName: port.portName, emulation: 'StarLine', printCommands: commands);

Android

Permissions required depending on your printer:

<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.BLUETOOTH"></uses-permission>

Documentation work in progress.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.