diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
deleted file mode 100644
index ce9860d..0000000
--- a/.github/workflows/main.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: Build and Deploy Flutter Web
-
-on:
- push:
- branches:
- - main
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Set up Flutter
- uses: subosito/flutter-action@v1
- with:
- channel: 'stable'
- - name: Get dependencies
- run: |
- cd example
- flutter pub get
- - uses: bluefireteam/flutter-gh-pages@v7
- with:
- workingDir: example
- baseHref: /flutter_document_scan_sdk/
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 96486fd..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,30 +0,0 @@
-# Miscellaneous
-*.class
-*.log
-*.pyc
-*.swp
-.DS_Store
-.atom/
-.buildlog/
-.history
-.svn/
-migrate_working_dir/
-
-# 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
-# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
-/pubspec.lock
-**/doc/api/
-.dart_tool/
-.packages
-build/
diff --git a/.last_build_id b/.last_build_id
new file mode 100644
index 0000000..737ce72
--- /dev/null
+++ b/.last_build_id
@@ -0,0 +1 @@
+d8597bb1535f729b031be609327c6a4b
\ No newline at end of file
diff --git a/.metadata b/.metadata
deleted file mode 100644
index 45a40f1..0000000
--- a/.metadata
+++ /dev/null
@@ -1,42 +0,0 @@
-# This file tracks properties of this Flutter project.
-# Used by Flutter tool to assess capabilities and perform upgrades etc.
-#
-# This file should be version controlled.
-
-version:
- revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- channel: stable
-
-project_type: plugin
-
-# Tracks metadata for the flutter migrate command
-migration:
- platforms:
- - platform: root
- create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- - platform: android
- create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- - platform: ios
- create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- - platform: linux
- create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- - platform: web
- create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- - platform: windows
- create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
-
- # User provided section
-
- # List of Local paths (relative to this file) that should be
- # ignored by the migrate tool.
- #
- # Files that are not part of the templates will be ignored by default.
- unmanaged_files:
- - 'lib/main.dart'
- - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index 68c1696..0000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "files.associations": {
- "algorithm": "cpp",
- "any": "cpp",
- "atomic": "cpp",
- "bit": "cpp",
- "cctype": "cpp",
- "charconv": "cpp",
- "chrono": "cpp",
- "clocale": "cpp",
- "cmath": "cpp",
- "compare": "cpp",
- "concepts": "cpp",
- "cstddef": "cpp",
- "cstdint": "cpp",
- "cstdio": "cpp",
- "cstdlib": "cpp",
- "cstring": "cpp",
- "ctime": "cpp",
- "cwchar": "cpp",
- "exception": "cpp",
- "format": "cpp",
- "forward_list": "cpp",
- "functional": "cpp",
- "initializer_list": "cpp",
- "iomanip": "cpp",
- "ios": "cpp",
- "iosfwd": "cpp",
- "iostream": "cpp",
- "istream": "cpp",
- "iterator": "cpp",
- "limits": "cpp",
- "list": "cpp",
- "locale": "cpp",
- "map": "cpp",
- "memory": "cpp",
- "mutex": "cpp",
- "new": "cpp",
- "optional": "cpp",
- "ostream": "cpp",
- "ratio": "cpp",
- "set": "cpp",
- "sstream": "cpp",
- "stdexcept": "cpp",
- "stop_token": "cpp",
- "streambuf": "cpp",
- "string": "cpp",
- "system_error": "cpp",
- "thread": "cpp",
- "tuple": "cpp",
- "type_traits": "cpp",
- "typeinfo": "cpp",
- "unordered_map": "cpp",
- "utility": "cpp",
- "variant": "cpp",
- "vector": "cpp",
- "xfacet": "cpp",
- "xhash": "cpp",
- "xiosbase": "cpp",
- "xlocale": "cpp",
- "xlocbuf": "cpp",
- "xlocinfo": "cpp",
- "xlocmes": "cpp",
- "xlocmon": "cpp",
- "xlocnum": "cpp",
- "xloctime": "cpp",
- "xmemory": "cpp",
- "xstddef": "cpp",
- "xstring": "cpp",
- "xtr1common": "cpp",
- "xtree": "cpp",
- "xutility": "cpp",
- "condition_variable": "cpp",
- "deque": "cpp",
- "queue": "cpp"
- },
- "java.configuration.updateBuildConfiguration": "automatic",
- "editor.formatOnSave": true
-}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
deleted file mode 100644
index 5bcdaa8..0000000
--- a/CHANGELOG.md
+++ /dev/null
@@ -1,42 +0,0 @@
-## 1.1.2
-- Support AGP 8 for Android.
-
-## 1.1.1
-- Adjusted the `ThresholdCompensation` value from 9 to 10 in the template file.
-
-## 1.1.0
-- Updated DDN iOS to v1.0.30.
-
-## 1.0.3
-- Fixed dependency issue for iOS.
-
-## 1.0.2
-- Updated DDN Android to v1.0.30.
-
-## 1.0.1
-- Instead of the `save()` method, use Dart APIs to save the image to a file.
-- Added camera scanner to the example code, supporting Windows, Android, iOS and web.
-
-## 1.0.0
-- Added `normalizeBuffer()` and `detectBuffer()` for Linux, Android, iOS and web.
-
-## 0.5.0
-- Renamed `normalize()` to `normalizeFile`.
-- Renamed `detect()` to `detectFile`.
-- Added `normalizeBuffer()` and `detectBuffer()` for Windows.
-
-## 0.4.0
-- Updated example code to support quadrilateral editing.
-- Updated DDNJS to 1.0.12.
-- Fixed JS normalize function based on quadrilateral points.
-
-## 0.3.0
-* Supported Android and iOS.
-
-## 0.2.0
-* Supported Windows and Linux.
-* Updated the example code.
-
-## 0.1.0
-
-* Encapsulated Dynamsoft Document Normalizer for web development.
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index a0b4bcc..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2022 Xiao Ling
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index ddd1036..0000000
--- a/README.md
+++ /dev/null
@@ -1,137 +0,0 @@
-# flutter_document_scan_sdk
-The Flutter plugin is a wrapper for Dynamsoft's [Document Normalizer SDK v1.x](https://www.dynamsoft.com/document-normalizer/docs/introduction/). It enables you to build document rectification applications for **Windows**, **Linux**, **web**, **Android** and **iOS**.
-
-## Try Document Rectification Example
-
-### Desktop: Windows & Linux
-
-
-**Windows**
-
-```bash
-cd example
-flutter run -d windows
-```
-
-![Flutter windows document edge detection and normalization](https://www.dynamsoft.com/codepool/img/2022/12/flutter-windows-desktop-document-scanner.png)
-
-
-**Linux**
-
-```bash
-cd example
-flutter run -d linux
-```
-
-![Flutter Linux document edge detection and normalization](https://www.dynamsoft.com/codepool/img/2022/12/flutter-linux-desktop-document-scanner.png)
-
-### Web
-```bash
-cd example
-flutter run -d chrome
-```
-
-![Flutter web document edge detection and normalization](https://www.dynamsoft.com/codepool/img/2023/05/document-edge-edit.png)
-
-### Mobile: Android & iOS
-
-```bash
-cd example
-flutter run
-```
-
-![Flutter document rectification for Android and iOS](https://www.dynamsoft.com/codepool/img/2023/02/flutter-document-rectification-android-ios.jpg)
-
-## Getting a License Key for Dynamsoft Document Normalizer
-[![](https://img.shields.io/badge/Get-30--day%20FREE%20Trial-blue)](https://www.dynamsoft.com/customer/license/trialLicense/?product=dcv&package=cross-platform)
-
-## Supported Platforms
-- Web
-- Windows
-- Linux
-- Android
-- iOS
-
-## Installation
-Add `flutter_document_scan_sdk` as a dependency in your `pubspec.yaml` file.
-
-```yml
-dependencies:
- ...
- flutter_document_scan_sdk:
-```
-
-### One More Step for Web
-Include the JavaScript library of Dynamsoft Document Normalizer in your `index.html` file:
-
-```html
-
-```
-
-## API Compatibility
-| Methods | Android | iOS | Windows | Linux | Web|
-| ----------- | ----------- | ----------- | ----------- |----------- |----------- |
-| `Future init(String key)` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |:heavy_check_mark: |
-| `Future?> detectFile(String file)` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |:heavy_check_mark: | :heavy_check_mark: |
-| `Future normalizeFile(String file, dynamic points)` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |:heavy_check_mark: | :heavy_check_mark: |
-| `Future setParameters(String params)` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |:heavy_check_mark: |
-| `Future getParameters()` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |:heavy_check_mark: |
-| `Future?> detectBuffer(Uint8List bytes, int width, int height, int stride, int format)` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |:heavy_check_mark: | :heavy_check_mark: |
-| `Future normalizeBuffer(Uint8List bytes, int width, int height, int stride, int format, dynamic points)` | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |:heavy_check_mark: | :heavy_check_mark: |
-
-## Usage
-- Initialize the document rectification SDK with a valid license key:
-
- ```dart
- final _flutterDocumentScanSdkPlugin = FlutterDocumentScanSdk();
- await _flutterDocumentScanSdkPlugin.init(
- "LICENSE-KEY");
-
- await _flutterDocumentScanSdkPlugin.setParameters(Template.grayscale);
- ```
-
-- Do document edge detection and return quadrilaterals:
-
- ```dart
- List? detectionResults =
- await _flutterDocumentScanSdkPlugin
- .detectFile(file);
- ```
-- Detect document edges from a buffer:
-
- ```dart
- List? detectionResults =
- await _flutterDocumentScanSdkPlugin
- .detectBuffer(bytes, width, height, stride, format);
- ```
-- Rectify the document based on document corners:
-
- ```dart
- NormalizedImage? normalizedImage = await _flutterDocumentScanSdkPlugin.normalizeFile(
- file, detectionResults[0].points);
- ```
-- Rectify the document based on document corners from a buffer:
-
- ```dart
- NormalizedImage? normalizedImage = await _flutterDocumentScanSdkPlugin.normalizeBuffer(
- bytes, width, height, stride, format, detectionResults[0].points);
- ```
-- Save the rectified document image to a file:
-
- ```dart
- if (normalizedUiImage != null) {
- const String mimeType = 'image/png';
- ByteData? data = await normalizedUiImage!
- .toByteData(format: ui.ImageByteFormat.png);
- if (data != null) {
- final XFile imageFile = XFile.fromData(
- data.buffer.asUint8List(),
- mimeType: mimeType,
- );
- await imageFile.saveTo(path);
- }
- }
- ```
-
-
-
diff --git a/analysis_options.yaml b/analysis_options.yaml
deleted file mode 100644
index a5744c1..0000000
--- a/analysis_options.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-include: package:flutter_lints/flutter.yaml
-
-# Additional information about this file can be found at
-# https://dart.dev/guides/language/analysis-options
diff --git a/android/.gitignore b/android/.gitignore
deleted file mode 100644
index 161bdcd..0000000
--- a/android/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-*.iml
-.gradle
-/local.properties
-/.idea/workspace.xml
-/.idea/libraries
-.DS_Store
-/build
-/captures
-.cxx
diff --git a/android/build.gradle b/android/build.gradle
deleted file mode 100644
index 722c943..0000000
--- a/android/build.gradle
+++ /dev/null
@@ -1,46 +0,0 @@
-group 'com.dynamsoft.flutter_document_scan_sdk'
-version '1.0'
-
-buildscript {
- repositories {
- google()
- mavenCentral()
- }
-
- dependencies {
- classpath 'com.android.tools.build:gradle:7.1.2'
- }
-}
-
-rootProject.allprojects {
- repositories {
- maven {
- url "https://download2.dynamsoft.com/maven/aar"
- }
- google()
- mavenCentral()
- }
-}
-
-apply plugin: 'com.android.library'
-
-android {
- if (project.android.hasProperty('namespace')) {
- namespace 'com.dynamsoft.flutter_document_scan_sdk'
- }
-
- compileSdkVersion 31
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-
- defaultConfig {
- minSdkVersion 21
- }
-}
-
-dependencies {
- implementation 'com.dynamsoft:dynamsoftdocumentnormalizer:1.0.30'
-}
\ No newline at end of file
diff --git a/android/settings.gradle b/android/settings.gradle
deleted file mode 100644
index 741bbbf..0000000
--- a/android/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name = 'flutter_document_scan_sdk'
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
deleted file mode 100644
index 679e323..0000000
--- a/android/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
diff --git a/android/src/main/java/com/dynamsoft/flutter_document_scan_sdk/FlutterDocumentScanSdkPlugin.java b/android/src/main/java/com/dynamsoft/flutter_document_scan_sdk/FlutterDocumentScanSdkPlugin.java
deleted file mode 100644
index 67a79da..0000000
--- a/android/src/main/java/com/dynamsoft/flutter_document_scan_sdk/FlutterDocumentScanSdkPlugin.java
+++ /dev/null
@@ -1,433 +0,0 @@
-package com.dynamsoft.flutter_document_scan_sdk;
-
-import androidx.annotation.NonNull;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.Looper;
-
-import io.flutter.embedding.engine.plugins.FlutterPlugin;
-import io.flutter.plugin.common.MethodCall;
-import io.flutter.plugin.common.MethodChannel;
-import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
-import io.flutter.plugin.common.MethodChannel.Result;
-
-import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding;
-import io.flutter.embedding.engine.plugins.activity.ActivityAware;
-import android.app.Activity;
-
-import java.util.concurrent.Executor;
-import java.util.concurrent.Executors;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.dynamsoft.core.ImageData;
-import com.dynamsoft.core.CoreException;
-import com.dynamsoft.core.LicenseManager;
-import com.dynamsoft.core.LicenseVerificationListener;
-import com.dynamsoft.core.EnumImagePixelFormat;
-import com.dynamsoft.core.Quadrilateral;
-
-import com.dynamsoft.ddn.DocumentNormalizer;
-import com.dynamsoft.ddn.DetectedQuadResult;
-import com.dynamsoft.ddn.DocumentNormalizerException;
-import com.dynamsoft.ddn.NormalizedImageResult;
-
-import android.graphics.Point;
-
-/** FlutterDocumentScanSdkPlugin */
-public class FlutterDocumentScanSdkPlugin implements FlutterPlugin, MethodCallHandler, ActivityAware {
- /// The MethodChannel that will the communication between Flutter and native Android
- ///
- /// This local reference serves to register the plugin with the Flutter Engine and unregister it
- /// when the Flutter Engine is detached from the Activity
- private MethodChannel channel;
- private HandlerThread mHandlerThread;
- private Handler mHandler;
- private final Executor mExecutor;
- private FlutterPluginBinding flutterPluginBinding;
- private Activity activity;
- private DocumentNormalizer mNormalizer;
- private NormalizedImageResult mNormalizedImage;
-
- public FlutterDocumentScanSdkPlugin() {
- mHandler = new Handler(Looper.getMainLooper());
- mExecutor = Executors.newSingleThreadExecutor();
-
- try {
- mNormalizer = new DocumentNormalizer();
- } catch (DocumentNormalizerException e) {
- e.printStackTrace();
- }
- }
-
- @Override
- public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
- channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "flutter_document_scan_sdk");
- channel.setMethodCallHandler(this);
- this.flutterPluginBinding = flutterPluginBinding;
- }
-
- @Override
- public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
- switch (call.method) {
- case "getPlatformVersion": {
- result.success("Android " + android.os.Build.VERSION.RELEASE);
- break;
- }
- case "init": {
- final String license = call.argument("key");
- LicenseManager.initLicense(
- license, activity,
- new LicenseVerificationListener() {
- @Override
- public void licenseVerificationCallback(boolean isSuccessful, CoreException e) {
- if (isSuccessful)
- {
- result.success(0);
- }
- else {
- result.success(-1);
- }
- }
- });
- break;
- }
- case "setParameters": {
- final String params = call.argument("params");
- try {
- mNormalizer.initRuntimeSettingsFromString(params);
- result.success(0);
- } catch (DocumentNormalizerException e) {
- result.success(-1);
- }
-
- break;
- }
- case "getParameters": {
- String parameters = "";
- if (mNormalizer != null) {
- try {
- parameters = mNormalizer.outputRuntimeSettings("");
- } catch (Exception e) {
- // TODO: handle exception
- }
- }
- result.success(parameters);
- break;
- }
- case "detectBuffer": {
- List