flutter_mobile_vision 0.0.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 84

flutter_mobile_vision #

Flutter implementation for Google Mobile Vision.

Based on Google Mobile Vision.

Android Samples -=- iOS Samples

Liked? ⭐ Star the repo to support the project!

Features #

  • [ ] Android

    • [ ] Barcode Scan
      • [x] Simple scan.
    • [ ] Detect Faces
    • [ ] Recognize Text
  • [ ] iOS

    • [ ] Barcode Scan
    • [ ] Detect Faces
    • [ ] Recognize Text

Usage #

Example

To use this plugin :

  dependencies:
    flutter:
      sdk: flutter
    flutter_mobile_vision: ^0.0.1
  • read a barcode:
//...
String barcode;
try {
  barcode = await FlutterMobileVision.scan();
} on PlatformException {
  barcode = 'Failed to get barcode.';
}
//...

Android #

For Android, you must do the following before you can use the plugin:

  • Add the camera permission to your AndroidManifest.xml

    <uses-feature android:name="android.hardware.camera" />

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

  • Add the Barcode activity to your AndroidManifest.xml

    <activity android:name="io.github.edufolly.fluttermobilevision.BarcodeCaptureActivity" />

iOS #

If you can help, the community thanks. Your fork is needed. 😉

[0.0.1] - 2018-04-24

  • Basic test functions.
  • Only Scan Barcodes.
  • Only Android support.

example/lib/main.dart

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_mobile_vision/flutter_mobile_vision.dart';

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

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

class _MyAppState extends State<MyApp> {
  String _barcode = 'Unknown';

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      theme: new ThemeData(
        primarySwatch: Colors.lime,
        buttonColor: Colors.lime,
      ),
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('Plugin example app'),
        ),
        body: new ListView(
          padding: EdgeInsets.all(40.0),
          children: <Widget>[
            new RaisedButton(
              onPressed: _scan,
              child: new Text('SCAN!'),
            ),
            new Padding(
              padding: const EdgeInsets.only(top: 12.0),
              child: new Text('Barcode: $_barcode'),
            ),
          ],
        ),
      ),
    );
  }

  Future<Null> _scan() async {
    String barcode;
    try {
      barcode = await FlutterMobileVision.scan(
        flash: false,
      );
    } on PlatformException {
      barcode = 'Failed to get barcode.';
    }

    if (!mounted) return;

    setState(() {
      _barcode = barcode;
    });
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_mobile_vision: ^0.0.1

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_mobile_vision/flutter_mobile_vision.dart';
  
Version Uploaded Documentation Archive
0.1.3 Dec 23, 2018 Go to the documentation of flutter_mobile_vision 0.1.3 Download flutter_mobile_vision 0.1.3 archive
0.1.2 Dec 16, 2018 Go to the documentation of flutter_mobile_vision 0.1.2 Download flutter_mobile_vision 0.1.2 archive
0.1.1 Jul 8, 2018 Go to the documentation of flutter_mobile_vision 0.1.1 Download flutter_mobile_vision 0.1.1 archive
0.1.0 May 7, 2018 Go to the documentation of flutter_mobile_vision 0.1.0 Download flutter_mobile_vision 0.1.0 archive
0.0.4 May 4, 2018 Go to the documentation of flutter_mobile_vision 0.0.4 Download flutter_mobile_vision 0.0.4 archive
0.0.3 May 2, 2018 Go to the documentation of flutter_mobile_vision 0.0.3 Download flutter_mobile_vision 0.0.3 archive
0.0.2 Apr 23, 2018 Go to the documentation of flutter_mobile_vision 0.0.2 Download flutter_mobile_vision 0.0.2 archive
0.0.1 Apr 23, 2018 Go to the documentation of flutter_mobile_vision 0.0.1 Download flutter_mobile_vision 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
87
Health:
Code health derived from static analysis. [more]
87
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
73
Overall:
Weighted score of the above. [more]
84
Learn more about scoring.

We analyzed this package on May 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.0
  • pana: 0.12.15
  • Flutter: 1.5.8

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

30 out of 30 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/flutter_mobile_vision.dart. (-12.22 points)

Analysis of lib/flutter_mobile_vision.dart reported 26 hints, including:

line 9 col 20: Name non-constant identifiers using lowerCamelCase.

line 10 col 20: Name non-constant identifiers using lowerCamelCase.

line 11 col 20: Name non-constant identifiers using lowerCamelCase.

line 12 col 20: Name non-constant identifiers using lowerCamelCase.

line 13 col 20: Name non-constant identifiers using lowerCamelCase.

Maintenance suggestions

The package description is too short. (-13 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

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 is getting outdated. (-4.11 points)

The package was last published 54 weeks ago.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-a <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8