flutter_honeywell_captuvo_plugin 0.1.2

  • Readme
  • Changelog
  • Example
  • Installing
  • new56

Flutter Honeywell Captuvo Plugin #

Flutter wrapper for the Honeywell Captuvo SL22/42 iOS API.

Usage #

import 'package:flutter_honeywell_captuvo_plugin/flutter_honeywell_captuvo_plugin.dart';

@override
void initState() {
  super.initState();
  FlutterHoneywellCaptuvoPlugin.startDecoderHardware();
}

@override
Widget build(BuildContext context) {
  return StreamBuilder<String>(
    stream: FlutterHoneywellCaptuvoPlugin.decoderScanDataStream,
    builder: (_, snapshot) => Text('Last scan data: ${snapshot.data}'),
  );
}

See the provided example app for more.

0.0.1 #

  • Wrapping of basic QR scanning functions

0.0.2 #

  • Add API documentation

0.1.0 #

  • Cutting the ribbon

0.1.1 #

  • Fix README

0.1.2 #

  • Add Github repo

example/lib/main.dart

import 'dart:async';

import 'package:flutter/material.dart';

import 'package:flutter_honeywell_captuvo_plugin/flutter_honeywell_captuvo_plugin.dart';

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  StreamSubscription decoderConnectionStreamubscription;

  @override
  void initState() {
    super.initState();
    FlutterHoneywellCaptuvoPlugin.startDecoderHardware();
    decoderConnectionStreamubscription = FlutterHoneywellCaptuvoPlugin
        .decoderConnectionStream
        .listen((isConnected) {
      if (isConnected) {
        FlutterHoneywellCaptuvoPlugin.startDecoderHardware();
      }
    });
  }

  @override
  void dispose() {
    decoderConnectionStreamubscription?.cancel();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Captuvo SL42 API Example'),
        ),
        body: Padding(
          padding: const EdgeInsets.all(16.0),
          child: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                StreamBuilder<bool>(
                  stream: FlutterHoneywellCaptuvoPlugin.decoderConnectionStream,
                  initialData: false,
                  builder: (_, snapshot) => Text(
                      'Decoder is ${snapshot.data ? "Conencted" : "Disconnected"}'),
                ),
                const SizedBox(height: 10.0),
                StreamBuilder<String>(
                  stream: FlutterHoneywellCaptuvoPlugin.decoderScanDataStream,
                  initialData: "NONE",
                  builder: (_, snapshot) =>
                      Text('Last scan data: ${snapshot.data}'),
                ),
              ],
            ),
          ),
        ),
        floatingActionButton: GestureDetector(
          child: Container(
            height: 100.0,
            width: 100.0,
            decoration: BoxDecoration(
              color: Colors.blue,
              borderRadius: BorderRadius.circular(50.0),
            ),
            child: Icon(Icons.scanner),
          ),
          onTapDown: (_) =>
              FlutterHoneywellCaptuvoPlugin.startDecoderScanning(),
          onTapUp: (_) => FlutterHoneywellCaptuvoPlugin.stopDecoderScanning(),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_honeywell_captuvo_plugin: ^0.1.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:flutter_honeywell_captuvo_plugin/flutter_honeywell_captuvo_plugin.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
12
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
56
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Dependencies

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