Skip to content

Commit 5df713f

Browse files
committed
.github
1 parent 8efd6ed commit 5df713f

File tree

7 files changed

+94
-6
lines changed

7 files changed

+94
-6
lines changed

.github/ISSUE_TEMPLATE/BUG_REPORT.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: Bug report
3+
about: Something is crashing or not working as intended
4+
labels: bug
5+
---
6+
7+
<!--
8+
❗️❗️❗️ IMPORTANT ❗️❗️❗️
9+
10+
DON'T DELETE THIS TEMPLATE! USE IT TO WRITE YOUR ISSUE.
11+
12+
If you delete this and you don't give me enough info,
13+
how would you expect me to solve your issue? Thanks.
14+
15+
Also, before posting a new issue, make sure to check the following points!
16+
You may already find an answer to your problem!
17+
18+
❗️❗️❗️ IMPORTANT ❗️❗️❗️
19+
-->
20+
21+
- [x] I have read the [Get Started - Installation](https://inappwebview.dev/docs/get-started/installation/) section
22+
- [x] I have read and done the [Get Started - Setup Android](https://inappwebview.dev/docs/get-started/setup-android/) section
23+
- [x] I have read and done the [Get Started - Setup iOS](https://inappwebview.dev/docs/get-started/setup-ios/) section
24+
- [x] I have already searched for the same problem
25+
26+
## Environment
27+
28+
| Technology | Version |
29+
| -------------------- | ------------- |
30+
| Flutter version | |
31+
| Plugin version | |
32+
| Android version | |
33+
| iOS version | |
34+
| Xcode version | |
35+
36+
Device information: <!-- Manufacturer and model -->
37+
38+
## Description
39+
40+
**Expected behavior:**
41+
42+
**Current behavior:**
43+
44+
## Steps to reproduce
45+
46+
<!-- Optionally provide the least amount of code that shows this behaviour. -->
47+
48+
1. This
49+
2. Than that
50+
3. Then
51+
52+
## Images <!-- if available, else delete -->
53+
54+
## Stacktrace/Logcat <!-- if available, else delete -->
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
## Environment
8+
9+
**Flutter version:**
10+
**Plugin version:** <!-- Add branch if necessary -->
11+
**Android version:** <!-- If customize ROM, write which -->
12+
**iOS version:**
13+
**Xcode version:**
14+
**Device information:** <!-- Manufacturer and model -->
15+
16+
## Description
17+
18+
**What you'd like to happen:**
19+
20+
**Alternatives you've considered:** <!-- if available, else delete -->
21+
22+
**Images:** <!-- if available, else delete -->

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.4.1
2+
- fix
3+
## 1.4.0
4+
- improve decode qrcode image
15
## 1.3.1
26
- update important readme
37
## 1.3.0

android/src/main/java/com/chavesgu/scan/QRCodeDecoder.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,15 @@ private static void encodeYUV420SP(byte[] yuv420sp, int[] argb, int width, int h
206206

207207

208208
public static String decodeQRCode(Context context, String path) {
209-
Bitmap bitmap = BitmapFactory.decodeFile(path);
209+
BitmapFactory.Options sizeOptions = new BitmapFactory.Options();
210+
sizeOptions.inJustDecodeBounds = true;
211+
BitmapFactory.decodeFile(path, sizeOptions);
212+
BitmapFactory.Options decodeOptions = new BitmapFactory.Options();
213+
if (sizeOptions.outWidth * sizeOptions.outHeight * 3 > 10 * 1024 * 1024) {
214+
Log.i("scan", String.format("bitmap too large %d x %d",sizeOptions.outWidth, sizeOptions.outHeight));
215+
decodeOptions.inSampleSize = 2;
216+
}
217+
Bitmap bitmap = BitmapFactory.decodeFile(path, decodeOptions);
210218

211219
HmsScanAnalyzerOptions options = new HmsScanAnalyzerOptions.Creator().setPhotoMode(true).create();
212220
HmsScan[] hmsScans = ScanUtil.decodeWithBitmap(context, bitmap, options);

example/pubspec.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ packages:
6666
name: images_picker
6767
url: "https://pub.flutter-io.cn"
6868
source: hosted
69-
version: "1.0.0"
69+
version: "1.2.1"
7070
matcher:
7171
dependency: transitive
7272
description:
@@ -94,7 +94,7 @@ packages:
9494
path: ".."
9595
relative: true
9696
source: path
97-
version: "1.2.0"
97+
version: "1.4.1"
9898
sky_engine:
9999
dependency: transitive
100100
description: flutter

example/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies:
2121
# the parent directory to use the current plugin's version.
2222
path: ../
2323

24-
images_picker: ^1.0.0
24+
images_picker: ^1.2.1
2525

2626
dev_dependencies:
2727
flutter_test:

pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: scan
2-
description: scan qrcode in widget tree.decode qrcode image from path.
3-
version: 1.3.1
2+
description: scan qrcode in widget tree with custom options.Accurately decode qrcode image from path.
3+
version: 1.4.1
44
homepage: https://github.com/chavesgu/FlutterScan
55

66
environment:

0 commit comments

Comments
 (0)