From 85383c3feef46a3c5932bc4a72453b2c6e9b2fab Mon Sep 17 00:00:00 2001 From: Khoren Markosyan Date: Sat, 14 Jan 2023 15:53:50 +0400 Subject: [PATCH] updated README.md --- README.md | 33 +++++++++++++++++++++++++++++++++ example/pubspec.lock | 4 ++-- scripts/update_ios_macos_src.sh | 5 ++++- zxscanner/pubspec.lock | 8 ++++---- 4 files changed, 43 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 769d499..4a4399d 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,39 @@ This README file was mainly generated using ChatGPT, a tool that generates human ## Getting Started +### Cloning the flutter_zxing project + +To clone the flutter_zxing project from Github which includes submodules, use the following command: + +```bash +git clone --recursive https://github.com/khoren93/flutter_zxing.git +``` + +### Installing dependencies + +Use Melos to install the dependencies of the flutter_zxing project. Melos is a tool that helps you manage multiple Dart packages in a single repository. To install Melos, use the following command: + +```bash +pub global activate melos +``` + +To install the dependencies of the flutter_zxing project, use the following command: + +```bash +melos bootstrap +``` + +To allow the building on iOS and MacOS, you need to run the following command: + +```bash +cd scripts +sh update_ios_macos_src.sh +``` + +Now you can run the flutter_zxing example app on your device or emulator. + +## Usage + ### To read barcode ```dart diff --git a/example/pubspec.lock b/example/pubspec.lock index dbdaac8..8763bb4 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -148,7 +148,7 @@ packages: path: ".." relative: true source: path - version: "1.0.0-beta.4" + version: "1.0.0-beta.7" font_awesome_flutter: dependency: "direct main" description: @@ -359,4 +359,4 @@ packages: version: "6.1.0" sdks: dart: ">=2.18.0 <3.0.0" - flutter: ">=3.3.0" + flutter: ">=3.0.0" diff --git a/scripts/update_ios_macos_src.sh b/scripts/update_ios_macos_src.sh index 1d8ad2f..c914817 100644 --- a/scripts/update_ios_macos_src.sh +++ b/scripts/update_ios_macos_src.sh @@ -10,10 +10,13 @@ macosSrcPath="../macos/Classes/src" rm -rf $iosSrcPath rm -rf $macosSrcPath +# create the source directories +mkdir -p $iosSrcPath +mkdir -p $macosSrcPath + # Copy the source files rsync -av --exclude '*.txt' --exclude "zxing/" "$srcPath/" "$iosSrcPath/" rsync -av "$zxingPath/" "$iosSrcPath/zxing/" rsync -av --exclude '*.txt' --exclude "zxing/" "$srcPath/" "$macosSrcPath/" rsync -av "$zxingPath/" "$macosSrcPath/zxing/" - diff --git a/zxscanner/pubspec.lock b/zxscanner/pubspec.lock index 4092141..8879ce6 100644 --- a/zxscanner/pubspec.lock +++ b/zxscanner/pubspec.lock @@ -318,10 +318,10 @@ packages: flutter_zxing: dependency: "direct main" description: - name: flutter_zxing - url: "https://pub.dartlang.org" - source: hosted - version: "0.10.0" + path: ".." + relative: true + source: path + version: "1.0.0-beta.7" font_awesome_flutter: dependency: "direct main" description: