khoren93 / flutter_zxing

Flutter plugin for scanning and generating QR codes using the ZXing library, supporting Android, iOS, and desktop platforms
https://pub.dev/packages/flutter_zxing
MIT License
92 stars 52 forks source link

Mistakes in README.md #25

Closed kaboc closed 2 years ago

kaboc commented 2 years ago
import 'package:flutter_zxing/flutter_zxing.dart';

...

CodeResult? resultFromXFile = await FlutterZxing.readImagePath(xFile);

FlutterZxing looks like a class name, but it does not exist. If you mean a prefix for the library, the as keyword should be used.

But as FlutterZxing violates the library_prefixes rule:

DO use lowercase_with_underscores when specifying a library prefix".

Just zxing might be better.

import 'package:flutter_zxing/flutter_zxing.dart' as zxing;

Method names are also wrong. readImagePath, readImagePathString and readImageUrl are actually readBarcodeImagePath, readBarcodeImagePathString and readBarcodeImageUrl. There may be more mistakes.

khoren93 commented 2 years ago

@kaboc I have updated the readme to the latest version of the plugin. Thanks))