diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 4286154..194df22 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - uses: subosito/flutter-action@v2 - name: Install Dependencies diff --git a/CHANGELOG.md b/CHANGELOG.md index c2d60f0..856cff1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## 1.4.0 +### General +* Bumped `permission_handler` to `12.0.1`. +* Updated the example app to use Kotlin `2.2.21`, Android Gradle Plugin `8.13.1`, and Gradle `8.13`. +* Added detailed documentation comments to the `CunningDocumentScanner` class. +### Android +* Upgraded `play-services-mlkit-document-scanner` to `16.0.0`. +* Updated `compileSdk` to `34`. + ## 1.3.1 * Upgraded dependencies. diff --git a/android/build.gradle b/android/build.gradle index 3a5faee..34d2137 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -27,7 +27,7 @@ apply plugin: 'kotlin-android' android { namespace 'biz.cunning.cunning_document_scanner' - compileSdk 33 + compileSdk 34 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -49,5 +49,5 @@ android { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'com.google.android.gms:play-services-mlkit-document-scanner:16.0.0-beta1' + implementation 'com.google.android.gms:play-services-mlkit-document-scanner:16.0.0' } diff --git a/example/.gitignore b/example/.gitignore index 0fa6b67..acc017d 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -8,6 +8,7 @@ .buildlog/ .history .svn/ +.cxx/ # IntelliJ related *.iml diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index c6d20f8..1cd47fc 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -24,7 +24,7 @@ if (flutterVersionName == null) { android { namespace "biz.cunning.cunning_document_scanner_example" - compileSdk 35 + compileSdk 36 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -42,7 +42,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "biz.cunning.cunning_document_scanner_example" - minSdkVersion 21 + minSdkVersion flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName @@ -63,12 +63,12 @@ flutter { dependencies {} -configurations.all { +configurations.configureEach { resolutionStrategy { eachDependency { if ((requested.group == "org.jetbrains.kotlin") && (requested.name.startsWith("kotlin-stdlib"))) { - useVersion("1.8.22") + useVersion("2.2.21") } } } -} \ No newline at end of file +} diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 990dabd..fab30aa 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + =3.7.0 <4.0.0" - flutter: ">=3.27.0" + dart: ">=3.9.0 <4.0.0" + flutter: ">=3.35.0" diff --git a/lib/cunning_document_scanner.dart b/lib/cunning_document_scanner.dart index 39c8348..107d7f8 100644 --- a/lib/cunning_document_scanner.dart +++ b/lib/cunning_document_scanner.dart @@ -7,11 +7,21 @@ import 'ios_options.dart'; export 'ios_options.dart'; +/// A class that provides a simple way to scan documents. class CunningDocumentScanner { + /// The method channel used to interact with the native platform. static const MethodChannel _channel = MethodChannel('cunning_document_scanner'); - /// Call this to start get Picture workflow. + /// Starts the document scanning process. + /// + /// This method will open the camera and allow the user to scan documents. + /// + /// [noOfPages] is the maximum number of pages that can be scanned. + /// [isGalleryImportAllowed] is a flag that allows the user to import images from the gallery. + /// [iosScannerOptions] is a set of options for the iOS scanner. + /// + /// Returns a list of paths to the scanned images, or null if the user cancels the operation. static Future?> getPictures({ int noOfPages = 100, bool isGalleryImportAllowed = false, diff --git a/pubspec.yaml b/pubspec.yaml index ba0145e..60081dd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: cunning_document_scanner description: A document scanner plugin for flutter. Scan and crop automatically on iOS and Android. -version: 1.3.1 +version: 1.4.0 homepage: https://cunning.biz repository: https://github.com/jachzen/cunning_document_scanner @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - permission_handler: ^12.0.0+1 + permission_handler: ^12.0.1 permission_handler_platform_interface: ^4.3.0 plugin_platform_interface: ^2.1.8