pos_printer_bloc 0.0.4

  • Readme
  • Changelog
  • Installing
  • new10

pos_printer_bloc #

A Flutter BLoC component to uniformly handle printing of POS receipts.

Functionality #

  • Printer discovery via printer_scan_bloc
  • Persistent printer connection via printer_bloc [ ]

Supported Printers #

[X] - Generic bluetooth printers via esc_pos_bluetooth [X] - Micro Star Printers via flutter_star_prnt [ ] - Generic network POS printers via network_pos_printer [ ] - Brother label printers via brotherlabelprintdart

[0.0.2] - 18 June 2020 #

  • Added basic Printer Scanner Builder
  • There's an issue with Star printers scanning on IOS - whole device is frozen during port scan

[0.0.1] - 18 June 2020 #

Very early development version.

  • All errors handling is relying on onError of bloc's delegate

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  pos_printer_bloc: ^0.0.4

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:pos_printer_bloc/pos_printer_bloc.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jul 9, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running flutter pub upgrade failed with the following output:

ERR: Because pos_printer_bloc depends on esc_pos_bluetooth ^0.2.8 which depends on esc_pos_utils ^0.3.6, esc_pos_utils ^0.3.6 is required.
 So, because pos_printer_bloc depends on esc_pos_utils ^0.4.1, version solving failed.

Health suggestions

Format lib/src/bloc/printer_bloc.dart.

Run flutter format to format lib/src/bloc/printer_bloc.dart.

Format lib/src/bloc/printer_scan_bloc.dart.

Run flutter format to format lib/src/bloc/printer_scan_bloc.dart.

Format lib/src/pos_ticket_line.dart.

Run flutter format to format lib/src/pos_ticket_line.dart.

Format lib/src/printer_scanner_builder.dart.

Run flutter format to format lib/src/printer_scanner_builder.dart.

Maintenance issues and suggestions

No valid SDK. (-20 points)

The analysis could not detect a valid SDK that can use this package.

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and pos_printer_bloc.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0