honeywell_scanner 1.0.0+2

  • Readme
  • Changelog
  • Example
  • Installing
  • 74

honeywell_scanner 1.0.0+2 #

This is a plugin to scan barcodes by using Honeywell PDA Android devices.

Native library version is 1.00.00.0085.

Description #

Honeywell Mobility SDK for Android provides scanning and printing Java libraries for native Android application development. This revision replaces the previous revision 1.00.00.0034. Target platform: Android. Programming language: Java License: Free

Supported computers

  Dolphin CT50 Android 4.4 and Android 6.0
  Dolphin CT40 Android 7.1.1
  Dolphin CT60 Android 7.1.1
  Dolphin CN80 Android 7.1.1
  Dolphin 75e Android 4.4 and Android 6.0
  CN51 Android 6.0
  CK75, CN75 and CN75e Android 6.0
  EDA50, EDA50K, EDA70 Android 7.1.1
  EDA51 Android 8.1.0

Supported printers

  Receipt printers – PR2, PR3, PB21, PB31, PB42, PB51, and 6824
  Label printers - PB22, PB32 and PB50

Supported external scanners

  Ring scanner for Dolphin 75e

How to use #

First

# add this line to your flutter project dependencies
honeywell_scanner: ^1.0.0+1

Second

The android project which is going to use this plugin library should define flatDir in its gradle allProjects closure, exactly as below:

  flatDir {
      dirs 'libs'
  }

Third

The honeywell.aar file which is inside the android/libs/ of this plugin should be copied to the android/app/libs/ folder inside your android project sources. This will allow the plugin to locate the honeywell.aar library.

1.0.0+2 #

  • TODO: Describe initial release.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:honeywell_scanner/honeywell_scanner.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  HoneywellScanner honeywellScanner = HoneywellScanner();

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> implements ScannerCallBack{
  String _scannedCode = 'Empty';
  String _scannedStatus = 'Stopped';

  @override
  void initState() {
    super.initState();
    widget.honeywellScanner.scannerCallBack = this;
    widget.honeywellScanner.setProperties(
        CodeFormatUtils.get().getFormatsAsProperties(
            [CodeFormat.CODE_128, CodeFormat.QR_CODE])
    );
  }

  @override
  void onDecoded(String result) {
    setState(() {
      _scannedCode = result;
    });
  }

  @override
  void onError(Exception error) {
    setState(() {
      _scannedCode = error.toString();
    });
  }

//  // Platform messages are asynchronous, so we initialize in an async method.
//  Future showPlatformVersion() async {
//    String platformVersion;
//    // Platform messages may fail, so we use a try/catch PlatformException.
//    try {
//      platformVersion = await HoneywellScanner.platformVersion;
//    } on PlatformException {
//      platformVersion = 'Failed to get platform version.';
//    }
//
//    // If the widget was removed from the tree while the asynchronous platform
//    // message was in flight, we want to discard the reply rather than calling
//    // setState to update our non-existent appearance.
//    if (!mounted) return;
//
//    setState(() {
//      _platformVersion = platformVersion;
//    });
//  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text('Scanner: $_scannedStatus'),
            Divider(color: Colors.transparent,),
            Text('Scanned code: $_scannedCode'),
            Divider(color: Colors.transparent,),
            RaisedButton(
              child: Text("Start Scanner"),
              onPressed: (){
                widget.honeywellScanner.startScanner();
                _scannedStatus = "Started";
                setState(() {});
              },
            ),
            Divider(color: Colors.transparent,),
            RaisedButton(
              child: Text("Stop Scanner"),
              onPressed: (){
                widget.honeywellScanner.stopScanner();
                _scannedStatus = "Stopped";
                setState(() {});
              },
            ),
          ],
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  honeywell_scanner: ^1.0.0+2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support 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:honeywell_scanner/honeywell_scanner.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
57
Health:
Code health derived from static analysis. [more]
92
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
74
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.15
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform Linux

Because:

  • package:honeywell_scanner/honeywell_scanner.dart that declares support for platforms: Android, iOS

Package does not support Flutter platform Web

Because:

  • package:honeywell_scanner/honeywell_scanner.dart that declares support for platforms: Android, iOS

Package does not support Flutter platform Windows

Because:

  • package:honeywell_scanner/honeywell_scanner.dart that declares support for platforms: Android, iOS

Package does not support Flutter platform macOS

Because:

  • package:honeywell_scanner/honeywell_scanner.dart that declares support for platforms: Android, iOS

Package not compatible with SDK dart

Because:

  • honeywell_scanner that is a package requiring null.

Health suggestions

Fix lib/code_format.dart. (-7.71 points)

Analysis of lib/code_format.dart reported 16 hints, including:

line 58 col 23: Name non-constant identifiers using lowerCamelCase.

line 59 col 23: Name non-constant identifiers using lowerCamelCase.

line 60 col 23: Name non-constant identifiers using lowerCamelCase.

line 61 col 23: Name non-constant identifiers using lowerCamelCase.

line 62 col 23: Name non-constant identifiers using lowerCamelCase.

Format lib/generated/i18n.dart.

Run flutter format to format lib/generated/i18n.dart.

Format lib/honeywell_scanner.dart.

Run flutter format to format lib/honeywell_scanner.dart.

Format lib/scanner_callback.dart.

Run flutter format to format lib/scanner_callback.dart.

Maintenance issues and suggestions

Homepage URL isn't helpful. (-10 points)

Update the homepage field from pubspec.yaml: link to a website about the package or use the source repository URL.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test