Browse Source

version: 1.0.0-beta.2

pull/76/head
Khoren Markosyan 2 years ago
parent
commit
94e2c88941
  1. 1
      .pubignore
  2. 6
      lib/src/logic/barcode_encoder.dart
  3. 5
      lib/src/ui/scanner_overlay.dart
  4. 2
      pubspec.yaml

1
.pubignore

@ -29,7 +29,6 @@
build/ build/
# Ignore Example and ZXScanner folders # Ignore Example and ZXScanner folders
example/
zxscanner/ zxscanner/
src/zxing/* src/zxing/*

6
lib/src/logic/barcode_encoder.dart

@ -2,9 +2,9 @@ part of 'zxing.dart';
// Encode a string into a barcode // Encode a string into a barcode
Encode zxingEncodeBarcode({ Encode zxingEncodeBarcode({
required String contents, required String contents,
required EncodeParams params, required EncodeParams params,
}) { }) {
return bindings return bindings
.encodeBarcode( .encodeBarcode(
contents.toNativeUtf8().cast<Char>(), contents.toNativeUtf8().cast<Char>(),

5
lib/src/ui/scanner_overlay.dart

@ -1,8 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
abstract class ScannerOverlay extends ShapeBorder { abstract class ScannerOverlay extends ShapeBorder {
const ScannerOverlay({
const ScannerOverlay ({
this.borderColor = Colors.red, this.borderColor = Colors.red,
this.borderWidth = 3.0, this.borderWidth = 3.0,
this.overlayColor = const Color.fromRGBO(0, 0, 0, 40), this.overlayColor = const Color.fromRGBO(0, 0, 0, 40),
@ -17,7 +16,6 @@ abstract class ScannerOverlay extends ShapeBorder {
final double borderLength; final double borderLength;
abstract final double cutOutSize; abstract final double cutOutSize;
@override @override
EdgeInsetsGeometry get dimensions => const EdgeInsets.all(10); EdgeInsetsGeometry get dimensions => const EdgeInsets.all(10);
@ -57,5 +55,4 @@ abstract class ScannerOverlay extends ShapeBorder {
@override @override
ScannerOverlay scale(double t); ScannerOverlay scale(double t);
} }

2
pubspec.yaml

@ -1,6 +1,6 @@
name: flutter_zxing name: flutter_zxing
description: A barcode scanner and generator natively in Flutter with Dart FFI based on ZXing. description: A barcode scanner and generator natively in Flutter with Dart FFI based on ZXing.
version: 1.0.0-beta.1 version: 1.0.0-beta.2
repository: https://github.com/khoren93/flutter_zxing repository: https://github.com/khoren93/flutter_zxing
environment: environment:

Loading…
Cancel
Save