Skip to content

Commit

Permalink
Merge pull request #61 from Aldo-f/develop
Browse files Browse the repository at this point in the history
update example;
  • Loading branch information
pdliuw authored Jun 2, 2022
2 parents 254f90d + b6d9884 commit b958dd6
Show file tree
Hide file tree
Showing 16 changed files with 188 additions and 93 deletions.
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/

# Web related
lib/generated_plugin_registrant.dart

# Visual Code
.vscode/*

# Additional
.fvm

# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!.vscode/launch.json
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ai_barcode (example)",
"request": "launch",
"type": "dart",
"program": "example/lib/main.dart"
},
]
}
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ group 'com.air.ai_barcode'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.6.21'
ext.android_gradle_version = '7.2.0'
repositories {
google()
// mavenCentral()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath "com.android.tools.build:gradle:$android_gradle_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
8 changes: 4 additions & 4 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
},
)
: Center(
child: OutlineButton(
child: OutlinedButton(
onPressed: () {
_requestPermission();
},
Expand All @@ -90,7 +90,7 @@
),
),
_useCameraScan
? OutlineButton(
? OutlinedButton(
onPressed: () {
setState(() {
_useCameraScan = false;
Expand All @@ -100,15 +100,15 @@
)
: Row(
children: [
OutlineButton(
OutlinedButton(
onPressed: () {
setState(() {
_useCameraScan = true;
});
},
child: Text("扫描$_label"),
),
OutlineButton(
OutlinedButton(
onPressed: () {
_resultCallback(_inputValue);
},
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 28
compileSdkVersion 31

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA"/>
<application
android:name="io.flutter.app.FlutterApplication"
android:name="${applicationName}"
android:label="ai_barcode_example"
android:icon="@mipmap/ic_launcher">
<activity
Expand Down
5 changes: 3 additions & 2 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.6.21'
ext.android_gradle_version = '7.2.0'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "com.android.tools.build:gradle:$android_gradle_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
8 changes: 4 additions & 4 deletions example/lib/app_barcode_scanner_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class _BarcodePermissionWidgetState extends State<_BarcodePermissionWidget> {
},
)
: Center(
child: OutlineButton(
child: OutlinedButton(
onPressed: () {
_requestMobilePermission();
},
Expand All @@ -96,7 +96,7 @@ class _BarcodePermissionWidgetState extends State<_BarcodePermissionWidget> {
),
),
_useCameraScan
? OutlineButton(
? OutlinedButton(
onPressed: () {
setState(() {
_useCameraScan = false;
Expand All @@ -106,15 +106,15 @@ class _BarcodePermissionWidgetState extends State<_BarcodePermissionWidget> {
)
: Row(
children: [
OutlineButton(
OutlinedButton(
onPressed: () {
setState(() {
_useCameraScan = true;
});
},
child: Text("扫描$_label"),
),
OutlineButton(
OutlinedButton(
onPressed: () {
_resultCallback(_inputValue);
},
Expand Down
1 change: 0 additions & 1 deletion example/lib/custom_size_scanner_page.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:ai_barcode_example/app_barcode_scanner_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

///
Expand Down
Loading

0 comments on commit b958dd6

Please sign in to comment.