angular_barcode 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 66

angular_barcode #

Draw Barcode or QrCode with AngularDart

Usage #

A simple usage example:

<angular-barcode value="1234567890128" format="ean13"></angular-barcode>
<angular-qrcode data="1234567890128" size="200" color="0000ff"></angular-qrcode>

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

0.1.0 #

  • Supports Dart 2

0.0.2 #

  • Add QrCode

0.0.1 #

  • Initial version

example/main.dart

/// Copyright (c) 2016, lejard_h. All rights reserved. Use of this source code
/// is governed by a BSD-style license that can be found in the LICENSE file.
library angular_barcode_main;

import 'dart:async';

import 'package:angular/angular.dart';
import 'package:angular_barcode/angular_barcode.dart';

import 'main.template.dart' as ng;

void main() {
  runApp(ng.AppComponentNgFactory);
}

@Component(
  selector: "app",
  template: '''
    <angular-barcode #barcode value="1234567890128" [displayValue]="true" format="ean13" [width]="width"></angular-barcode>
    <angular-qrcode data="1234567890128" size="200" color="0000ff"></angular-qrcode>
  ''',
  directives: [angularBarcodeDirectives],
)
class AppComponent implements OnInit {
  num width = 2;

  @ViewChild("barcode")
  AngularBarcode barcode;

  @override
  ngOnInit() {
    Timer(const Duration(seconds: 2), () {
      width = 5;
      barcode.height = 200;
    });
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  angular_barcode: ^0.1.0

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

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

  • Dart: 2.7.0
  • pana: 0.13.4

Health issues and suggestions

Document public APIs. (-0.59 points)

71 out of 72 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/src/angular_barcode.dart. (-0.50 points)

Analysis of lib/src/angular_barcode.dart reported 1 hint:

line 34 col 33: 'OnChanges' is deprecated and shouldn't be used. Please use AfterChanges instead..

Format lib/angular_barcode.dart.

Run dartfmt to format lib/angular_barcode.dart.

Maintenance suggestions

The package description is too short. (-20 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 getting outdated. (-13.97 points)

The package was last published 59 weeks ago.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
angular ^5.0.0 5.3.1 6.0.0-alpha+1
dart_barcode ^1.0.1 1.0.1
Transitive dependencies
analyzer 0.35.4 0.39.4
angular_ast 0.5.9 0.5.11
angular_compiler 0.4.3 0.4.5
args 1.5.2
async 2.4.0
build 1.2.2
build_config 0.4.1+1
built_collection 4.3.2
built_value 7.0.8
charcode 1.1.2
checked_yaml 1.0.2
code_builder 3.2.1
collection 1.14.12
convert 2.1.1
crypto 2.1.4
csslib 0.14.6+1 0.16.1
dart_style 1.2.4 1.3.3
fixnum 0.10.11
front_end 0.1.14 0.1.29
glob 1.2.0
intl 0.15.8 0.16.1
js 0.6.1+1
json_annotation 3.0.1
kernel 0.3.14 0.3.29
logging 0.11.4
matcher 0.12.6
meta 1.1.8
node_interop 1.0.3
node_io 1.0.1+2
package_config 1.1.0
path 1.6.4
pedantic 1.9.0
pub_semver 1.4.2
pubspec_parse 0.1.5
quiver 2.1.2+1
source_gen 0.9.4+4 0.9.4+7
source_span 1.6.0
stack_trace 1.9.3
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+13
yaml 2.2.0
Dev dependencies
build_runner ^0.10.0
build_web_compilers ^0.4.0