Groot 7 月之前
当前提交
f496d53a4b
共有 74 个文件被更改,包括 3759 次插入0 次删除
  1. 33 0
      .gitignore
  2. 30 0
      .metadata
  3. 3 0
      CHANGELOG.md
  4. 1 0
      LICENSE
  5. 15 0
      README.md
  6. 4 0
      analysis_options.yaml
  7. 45 0
      example/.gitignore
  8. 16 0
      example/README.md
  9. 28 0
      example/analysis_options.yaml
  10. 34 0
      example/ios/.gitignore
  11. 26 0
      example/ios/Flutter/AppFrameworkInfo.plist
  12. 2 0
      example/ios/Flutter/Debug.xcconfig
  13. 2 0
      example/ios/Flutter/Release.xcconfig
  14. 51 0
      example/ios/Podfile
  15. 34 0
      example/ios/Podfile.lock
  16. 751 0
      example/ios/Runner.xcodeproj/project.pbxproj
  17. 7 0
      example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  18. 8 0
      example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  19. 8 0
      example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  20. 99 0
      example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  21. 10 0
      example/ios/Runner.xcworkspace/contents.xcworkspacedata
  22. 8 0
      example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  23. 8 0
      example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  24. 13 0
      example/ios/Runner/AppDelegate.swift
  25. 122 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
  26. 二进制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
  27. 二进制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
  28. 二进制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
  29. 二进制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
  30. 二进制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
  31. 二进制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
  32. 二进制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
  33. 二进制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
  34. 二进制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
  35. 二进制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
  36. 二进制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
  37. 二进制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
  38. 二进制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
  39. 二进制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
  40. 二进制
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
  41. 23 0
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
  42. 二进制
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
  43. 二进制
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
  44. 二进制
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
  45. 5 0
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
  46. 37 0
      example/ios/Runner/Base.lproj/LaunchScreen.storyboard
  47. 26 0
      example/ios/Runner/Base.lproj/Main.storyboard
  48. 51 0
      example/ios/Runner/Info.plist
  49. 1 0
      example/ios/Runner/Runner-Bridging-Header.h
  50. 27 0
      example/ios/RunnerTests/RunnerTests.swift
  51. 276 0
      example/lib/main.dart
  52. 344 0
      example/pubspec.lock
  53. 88 0
      example/pubspec.yaml
  54. 27 0
      example/test/widget_test.dart
  55. 38 0
      ios/.gitignore
  56. 0 0
      ios/Assets/.gitkeep
  57. 28 0
      ios/Classes/ImageClassfiy/Extension/Common+E.swift
  58. 40 0
      ios/Classes/ImageClassfiy/Extension/PHAsset+ImageInfo.swift
  59. 87 0
      ios/Classes/ImageClassfiy/Extension/PhotosImageClassfier+Blurry.swift
  60. 1 0
      ios/Classes/ImageClassfiy/Extension/PhotosImageClassfier+SimilarGroup.swift
  61. 88 0
      ios/Classes/ImageClassfiy/Extension/PhotosImageClassfiyFilter+SimilarGroup.swift
  62. 136 0
      ios/Classes/ImageClassfiy/Extension/PhotosImageClassifier+Batchs.swift
  63. 63 0
      ios/Classes/ImageClassfiy/Extension/PhotosImageClassifier+Process.swift
  64. 125 0
      ios/Classes/ImageClassfiy/Models.swift
  65. 186 0
      ios/Classes/ImageClassfiy/PhotosImageClassifier.swift
  66. 30 0
      ios/Classes/ImageClassfiy/PhotosImageClassifyFilter.swift
  67. 158 0
      ios/Classes/PhotoClassifierPlugin.swift
  68. 14 0
      ios/Resources/PrivacyInfo.xcprivacy
  69. 29 0
      ios/photo_classifier.podspec
  70. 173 0
      lib/models.dart
  71. 49 0
      lib/photo_classifier.dart
  72. 133 0
      lib/photo_classifier_method_channel.dart
  73. 49 0
      lib/photo_classifier_platform_interface.dart
  74. 69 0
      pubspec.yaml

+ 33 - 0
.gitignore

@@ -0,0 +1,33 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.build/
+.buildlog/
+.history
+.svn/
+.swiftpm/
+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/
+.flutter-plugins
+.flutter-plugins-dependencies
+build/

+ 30 - 0
.metadata

@@ -0,0 +1,30 @@
+# 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 and should not be manually edited.
+
+version:
+  revision: "ea121f8859e4b13e47a8f845e4586164519588bc"
+  channel: "stable"
+
+project_type: plugin
+
+# Tracks metadata for the flutter migrate command
+migration:
+  platforms:
+    - platform: root
+      create_revision: ea121f8859e4b13e47a8f845e4586164519588bc
+      base_revision: ea121f8859e4b13e47a8f845e4586164519588bc
+    - platform: ios
+      create_revision: ea121f8859e4b13e47a8f845e4586164519588bc
+      base_revision: ea121f8859e4b13e47a8f845e4586164519588bc
+
+  # 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'

+ 3 - 0
CHANGELOG.md

@@ -0,0 +1,3 @@
+## 0.0.1
+
+* TODO: Describe initial release.

+ 1 - 0
LICENSE

@@ -0,0 +1 @@
+TODO: Add your license here.

+ 15 - 0
README.md

@@ -0,0 +1,15 @@
+# photo_classifier
+
+A new Flutter plugin project.
+
+## Getting Started
+
+This project is a starting point for a Flutter
+[plug-in package](https://flutter.dev/to/develop-plugins),
+a specialized package that includes platform-specific implementation code for
+Android and/or iOS.
+
+For help getting started with Flutter development, view the
+[online documentation](https://docs.flutter.dev), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.
+

+ 4 - 0
analysis_options.yaml

@@ -0,0 +1,4 @@
+include: package:flutter_lints/flutter.yaml
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options

+ 45 - 0
example/.gitignore

@@ -0,0 +1,45 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.build/
+.buildlog/
+.history
+.svn/
+.swiftpm/
+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
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.pub-cache/
+.pub/
+/build/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release

+ 16 - 0
example/README.md

@@ -0,0 +1,16 @@
+# photo_classifier_example
+
+Demonstrates how to use the photo_classifier plugin.
+
+## Getting Started
+
+This project is a starting point for a Flutter application.
+
+A few resources to get you started if this is your first Flutter project:
+
+- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
+- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
+
+For help getting started with Flutter development, view the
+[online documentation](https://docs.flutter.dev/), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.

+ 28 - 0
example/analysis_options.yaml

@@ -0,0 +1,28 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+  # The lint rules applied to this project can be customized in the
+  # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+  # included above or to enable additional rules. A list of all available lints
+  # and their documentation is published at https://dart.dev/lints.
+  #
+  # Instead of disabling a lint rule for the entire project in the
+  # section below, it can also be suppressed for a single line of code
+  # or a specific dart file by using the `// ignore: name_of_lint` and
+  # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+  # producing the lint.
+  rules:
+    # avoid_print: false  # Uncomment to disable the `avoid_print` rule
+    # prefer_single_quotes: true  # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options

+ 34 - 0
example/ios/.gitignore

@@ -0,0 +1,34 @@
+**/dgph
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/ephemeral/
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3

+ 26 - 0
example/ios/Flutter/AppFrameworkInfo.plist

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>CFBundleDevelopmentRegion</key>
+  <string>en</string>
+  <key>CFBundleExecutable</key>
+  <string>App</string>
+  <key>CFBundleIdentifier</key>
+  <string>io.flutter.flutter.app</string>
+  <key>CFBundleInfoDictionaryVersion</key>
+  <string>6.0</string>
+  <key>CFBundleName</key>
+  <string>App</string>
+  <key>CFBundlePackageType</key>
+  <string>FMWK</string>
+  <key>CFBundleShortVersionString</key>
+  <string>1.0</string>
+  <key>CFBundleSignature</key>
+  <string>????</string>
+  <key>CFBundleVersion</key>
+  <string>1.0</string>
+  <key>MinimumOSVersion</key>
+  <string>12.0</string>
+</dict>
+</plist>

+ 2 - 0
example/ios/Flutter/Debug.xcconfig

@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include "Generated.xcconfig"

+ 2 - 0
example/ios/Flutter/Release.xcconfig

@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include "Generated.xcconfig"

+ 51 - 0
example/ios/Podfile

@@ -0,0 +1,51 @@
+# Uncomment this line to define a global platform for your project
+platform :ios, '12.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+  'Debug' => :debug,
+  'Profile' => :release,
+  'Release' => :release,
+}
+
+def flutter_root
+  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+  unless File.exist?(generated_xcode_build_settings_path)
+    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+  end
+
+  File.foreach(generated_xcode_build_settings_path) do |line|
+    matches = line.match(/FLUTTER_ROOT\=(.*)/)
+    return matches[1].strip if matches
+  end
+  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+  use_frameworks!
+
+  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+  target 'RunnerTests' do
+    inherit! :search_paths
+  end
+end
+
+post_install do |installer|
+  installer.pods_project.targets.each do |target|
+    flutter_additional_ios_build_settings(target)
+    
+    # 添加相册权限配置
+    target.build_configurations.each do |config|
+      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
+        '$(inherited)',
+        'PERMISSION_PHOTOS=1',
+      ]
+    end
+  end
+end

+ 34 - 0
example/ios/Podfile.lock

@@ -0,0 +1,34 @@
+PODS:
+  - Flutter (1.0.0)
+  - integration_test (0.0.1):
+    - Flutter
+  - permission_handler_apple (9.3.0):
+    - Flutter
+  - "photo_classifier (1.0.0+1)":
+    - Flutter
+
+DEPENDENCIES:
+  - Flutter (from `Flutter`)
+  - integration_test (from `.symlinks/plugins/integration_test/ios`)
+  - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
+  - photo_classifier (from `.symlinks/plugins/photo_classifier/ios`)
+
+EXTERNAL SOURCES:
+  Flutter:
+    :path: Flutter
+  integration_test:
+    :path: ".symlinks/plugins/integration_test/ios"
+  permission_handler_apple:
+    :path: ".symlinks/plugins/permission_handler_apple/ios"
+  photo_classifier:
+    :path: ".symlinks/plugins/photo_classifier/ios"
+
+SPEC CHECKSUMS:
+  Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
+  integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e
+  permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
+  photo_classifier: 418382d97b505c83978dabe6b07964064a32f187
+
+PODFILE CHECKSUM: d82a6378db04277c04aded796733264c0d29bdc4
+
+COCOAPODS: 1.16.2

+ 751 - 0
example/ios/Runner.xcodeproj/project.pbxproj

@@ -0,0 +1,751 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 54;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+		331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
+		3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+		56DF96461F09B37E19751900 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45E94059368E290E427F63F /* Pods_RunnerTests.framework */; };
+		6EA8DB8B238B874FEA84E78D /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E53BD591A80C94284BA34A3 /* Pods_Runner.framework */; };
+		74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+		97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+		97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+		97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 97C146E61CF9000F007C117D /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = 97C146ED1CF9000F007C117D;
+			remoteInfo = Runner;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+		9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 10;
+			files = (
+			);
+			name = "Embed Frameworks";
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+		1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
+		1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
+		331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
+		331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+		3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
+		74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
+		74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
+		7738A888B0B9A5EEE24A55BD /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
+		7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
+		95B07E1D322EFA544064FF7E /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
+		9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
+		9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
+		97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+		97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
+		97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
+		97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		9E53BD591A80C94284BA34A3 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		B99BC76790C5A87D31E1441F /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
+		D0E732B66F684DCD94D73C9D /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
+		DE4E52A3B34AA6FAB067FF0F /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
+		E45E94059368E290E427F63F /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		F7221BAFB085DBC96847EFF5 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		6B43EDE381F1B0FD5B151522 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				56DF96461F09B37E19751900 /* Pods_RunnerTests.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		97C146EB1CF9000F007C117D /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				6EA8DB8B238B874FEA84E78D /* Pods_Runner.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		2894138491D271349B503D2B /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				9E53BD591A80C94284BA34A3 /* Pods_Runner.framework */,
+				E45E94059368E290E427F63F /* Pods_RunnerTests.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		331C8082294A63A400263BE5 /* RunnerTests */ = {
+			isa = PBXGroup;
+			children = (
+				331C807B294A618700263BE5 /* RunnerTests.swift */,
+			);
+			path = RunnerTests;
+			sourceTree = "<group>";
+		};
+		9740EEB11CF90186004384FC /* Flutter */ = {
+			isa = PBXGroup;
+			children = (
+				3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+				9740EEB21CF90195004384FC /* Debug.xcconfig */,
+				7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+				9740EEB31CF90195004384FC /* Generated.xcconfig */,
+			);
+			name = Flutter;
+			sourceTree = "<group>";
+		};
+		97C146E51CF9000F007C117D = {
+			isa = PBXGroup;
+			children = (
+				9740EEB11CF90186004384FC /* Flutter */,
+				97C146F01CF9000F007C117D /* Runner */,
+				97C146EF1CF9000F007C117D /* Products */,
+				331C8082294A63A400263BE5 /* RunnerTests */,
+				F22E894BF7435E3F4172722A /* Pods */,
+				2894138491D271349B503D2B /* Frameworks */,
+			);
+			sourceTree = "<group>";
+		};
+		97C146EF1CF9000F007C117D /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				97C146EE1CF9000F007C117D /* Runner.app */,
+				331C8081294A63A400263BE5 /* RunnerTests.xctest */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		97C146F01CF9000F007C117D /* Runner */ = {
+			isa = PBXGroup;
+			children = (
+				97C146FA1CF9000F007C117D /* Main.storyboard */,
+				97C146FD1CF9000F007C117D /* Assets.xcassets */,
+				97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+				97C147021CF9000F007C117D /* Info.plist */,
+				1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+				1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+				74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+				74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+			);
+			path = Runner;
+			sourceTree = "<group>";
+		};
+		F22E894BF7435E3F4172722A /* Pods */ = {
+			isa = PBXGroup;
+			children = (
+				F7221BAFB085DBC96847EFF5 /* Pods-Runner.debug.xcconfig */,
+				D0E732B66F684DCD94D73C9D /* Pods-Runner.release.xcconfig */,
+				B99BC76790C5A87D31E1441F /* Pods-Runner.profile.xcconfig */,
+				7738A888B0B9A5EEE24A55BD /* Pods-RunnerTests.debug.xcconfig */,
+				95B07E1D322EFA544064FF7E /* Pods-RunnerTests.release.xcconfig */,
+				DE4E52A3B34AA6FAB067FF0F /* Pods-RunnerTests.profile.xcconfig */,
+			);
+			path = Pods;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		331C8080294A63A400263BE5 /* RunnerTests */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
+			buildPhases = (
+				BEAD3F456B13B588F8EEA332 /* [CP] Check Pods Manifest.lock */,
+				331C807D294A63A400263BE5 /* Sources */,
+				331C807F294A63A400263BE5 /* Resources */,
+				6B43EDE381F1B0FD5B151522 /* Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				331C8086294A63A400263BE5 /* PBXTargetDependency */,
+			);
+			name = RunnerTests;
+			productName = RunnerTests;
+			productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
+			productType = "com.apple.product-type.bundle.unit-test";
+		};
+		97C146ED1CF9000F007C117D /* Runner */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+			buildPhases = (
+				AF0D4947ADB5AA2610D05B31 /* [CP] Check Pods Manifest.lock */,
+				9740EEB61CF901F6004384FC /* Run Script */,
+				97C146EA1CF9000F007C117D /* Sources */,
+				97C146EB1CF9000F007C117D /* Frameworks */,
+				97C146EC1CF9000F007C117D /* Resources */,
+				9705A1C41CF9048500538489 /* Embed Frameworks */,
+				3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+				06A29244D8F8E8CEAF630E2C /* [CP] Embed Pods Frameworks */,
+				CFBB09654C95034F04899440 /* [CP] Copy Pods Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = Runner;
+			productName = Runner;
+			productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		97C146E61CF9000F007C117D /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				BuildIndependentTargetsInParallel = YES;
+				LastUpgradeCheck = 1510;
+				ORGANIZATIONNAME = "";
+				TargetAttributes = {
+					331C8080294A63A400263BE5 = {
+						CreatedOnToolsVersion = 14.0;
+						TestTargetID = 97C146ED1CF9000F007C117D;
+					};
+					97C146ED1CF9000F007C117D = {
+						CreatedOnToolsVersion = 7.3.1;
+						LastSwiftMigration = 1100;
+					};
+				};
+			};
+			buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+			compatibilityVersion = "Xcode 9.3";
+			developmentRegion = en;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = 97C146E51CF9000F007C117D;
+			productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				97C146ED1CF9000F007C117D /* Runner */,
+				331C8080294A63A400263BE5 /* RunnerTests */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		331C807F294A63A400263BE5 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		97C146EC1CF9000F007C117D /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+				3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+				97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+				97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		06A29244D8F8E8CEAF630E2C /* [CP] Embed Pods Frameworks */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputFileListPaths = (
+				"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
+			);
+			name = "[CP] Embed Pods Frameworks";
+			outputFileListPaths = (
+				"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
+			showEnvVarsInLog = 0;
+		};
+		3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+			isa = PBXShellScriptBuildPhase;
+			alwaysOutOfDate = 1;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
+			);
+			name = "Thin Binary";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+		};
+		9740EEB61CF901F6004384FC /* Run Script */ = {
+			isa = PBXShellScriptBuildPhase;
+			alwaysOutOfDate = 1;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Run Script";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+		};
+		AF0D4947ADB5AA2610D05B31 /* [CP] Check Pods Manifest.lock */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputFileListPaths = (
+			);
+			inputPaths = (
+				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+				"${PODS_ROOT}/Manifest.lock",
+			);
+			name = "[CP] Check Pods Manifest.lock";
+			outputFileListPaths = (
+			);
+			outputPaths = (
+				"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+			showEnvVarsInLog = 0;
+		};
+		BEAD3F456B13B588F8EEA332 /* [CP] Check Pods Manifest.lock */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputFileListPaths = (
+			);
+			inputPaths = (
+				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+				"${PODS_ROOT}/Manifest.lock",
+			);
+			name = "[CP] Check Pods Manifest.lock";
+			outputFileListPaths = (
+			);
+			outputPaths = (
+				"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+			showEnvVarsInLog = 0;
+		};
+		CFBB09654C95034F04899440 /* [CP] Copy Pods Resources */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputFileListPaths = (
+				"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
+			);
+			name = "[CP] Copy Pods Resources";
+			outputFileListPaths = (
+				"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
+			showEnvVarsInLog = 0;
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		331C807D294A63A400263BE5 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		97C146EA1CF9000F007C117D /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+				1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = 97C146ED1CF9000F007C117D /* Runner */;
+			targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+		97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				97C146FB1CF9000F007C117D /* Base */,
+			);
+			name = Main.storyboard;
+			sourceTree = "<group>";
+		};
+		97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				97C147001CF9000F007C117D /* Base */,
+			);
+			name = LaunchScreen.storyboard;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		249021D3217E4FDB00AE95B9 /* Profile */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_USER_SCRIPT_SANDBOXING = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = iphoneos;
+				SUPPORTED_PLATFORMS = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Profile;
+		};
+		249021D4217E4FDB00AE95B9 /* Profile */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CLANG_ENABLE_MODULES = YES;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				DEVELOPMENT_TEAM = U382G987BX;
+				ENABLE_BITCODE = NO;
+				INFOPLIST_FILE = Runner/Info.plist;
+				IPHONEOS_DEPLOYMENT_TARGET = 15.0;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.atmob.photoclassifier.photoClassifierExample;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+				SWIFT_VERSION = 5.0;
+				VERSIONING_SYSTEM = "apple-generic";
+			};
+			name = Profile;
+		};
+		331C8088294A63A400263BE5 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 7738A888B0B9A5EEE24A55BD /* Pods-RunnerTests.debug.xcconfig */;
+			buildSettings = {
+				BUNDLE_LOADER = "$(TEST_HOST)";
+				CODE_SIGN_STYLE = Automatic;
+				CURRENT_PROJECT_VERSION = 1;
+				GENERATE_INFOPLIST_FILE = YES;
+				MARKETING_VERSION = 1.0;
+				PRODUCT_BUNDLE_IDENTIFIER = com.atmob.photoclassifier.photoClassifierExample.RunnerTests;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+				SWIFT_VERSION = 5.0;
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+			};
+			name = Debug;
+		};
+		331C8089294A63A400263BE5 /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 95B07E1D322EFA544064FF7E /* Pods-RunnerTests.release.xcconfig */;
+			buildSettings = {
+				BUNDLE_LOADER = "$(TEST_HOST)";
+				CODE_SIGN_STYLE = Automatic;
+				CURRENT_PROJECT_VERSION = 1;
+				GENERATE_INFOPLIST_FILE = YES;
+				MARKETING_VERSION = 1.0;
+				PRODUCT_BUNDLE_IDENTIFIER = com.atmob.photoclassifier.photoClassifierExample.RunnerTests;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_VERSION = 5.0;
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+			};
+			name = Release;
+		};
+		331C808A294A63A400263BE5 /* Profile */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = DE4E52A3B34AA6FAB067FF0F /* Pods-RunnerTests.profile.xcconfig */;
+			buildSettings = {
+				BUNDLE_LOADER = "$(TEST_HOST)";
+				CODE_SIGN_STYLE = Automatic;
+				CURRENT_PROJECT_VERSION = 1;
+				GENERATE_INFOPLIST_FILE = YES;
+				MARKETING_VERSION = 1.0;
+				PRODUCT_BUNDLE_IDENTIFIER = com.atmob.photoclassifier.photoClassifierExample.RunnerTests;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_VERSION = 5.0;
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+			};
+			name = Profile;
+		};
+		97C147031CF9000F007C117D /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				ENABLE_USER_SCRIPT_SANDBOXING = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+				MTL_ENABLE_DEBUG_INFO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Debug;
+		};
+		97C147041CF9000F007C117D /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_USER_SCRIPT_SANDBOXING = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = iphoneos;
+				SUPPORTED_PLATFORMS = iphoneos;
+				SWIFT_COMPILATION_MODE = wholemodule;
+				SWIFT_OPTIMIZATION_LEVEL = "-O";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		97C147061CF9000F007C117D /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CLANG_ENABLE_MODULES = YES;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				DEVELOPMENT_TEAM = U382G987BX;
+				ENABLE_BITCODE = NO;
+				INFOPLIST_FILE = Runner/Info.plist;
+				IPHONEOS_DEPLOYMENT_TARGET = 15.0;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.atmob.photoclassifier.photoClassifierExample;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+				SWIFT_VERSION = 5.0;
+				VERSIONING_SYSTEM = "apple-generic";
+			};
+			name = Debug;
+		};
+		97C147071CF9000F007C117D /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CLANG_ENABLE_MODULES = YES;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				DEVELOPMENT_TEAM = U382G987BX;
+				ENABLE_BITCODE = NO;
+				INFOPLIST_FILE = Runner/Info.plist;
+				IPHONEOS_DEPLOYMENT_TARGET = 15.0;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.atmob.photoclassifier.photoClassifierExample;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+				SWIFT_VERSION = 5.0;
+				VERSIONING_SYSTEM = "apple-generic";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				331C8088294A63A400263BE5 /* Debug */,
+				331C8089294A63A400263BE5 /* Release */,
+				331C808A294A63A400263BE5 /* Profile */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				97C147031CF9000F007C117D /* Debug */,
+				97C147041CF9000F007C117D /* Release */,
+				249021D3217E4FDB00AE95B9 /* Profile */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				97C147061CF9000F007C117D /* Debug */,
+				97C147071CF9000F007C117D /* Release */,
+				249021D4217E4FDB00AE95B9 /* Profile */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}

+ 7 - 0
example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:">
+   </FileRef>
+</Workspace>

+ 8 - 0
example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>

+ 8 - 0
example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>PreviewsEnabled</key>
+	<false/>
+</dict>
+</plist>

+ 99 - 0
example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "1510"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+               BuildableName = "Runner.app"
+               BlueprintName = "Runner"
+               ReferencedContainer = "container:Runner.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <Testables>
+         <TestableReference
+            skipped = "NO"
+            parallelizable = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "331C8080294A63A400263BE5"
+               BuildableName = "RunnerTests.xctest"
+               BlueprintName = "RunnerTests"
+               ReferencedContainer = "container:Runner.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
+      </Testables>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      enableGPUValidationMode = "1"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Profile"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 10 - 0
example/ios/Runner.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "group:Runner.xcodeproj">
+   </FileRef>
+   <FileRef
+      location = "group:Pods/Pods.xcodeproj">
+   </FileRef>
+</Workspace>

+ 8 - 0
example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>

+ 8 - 0
example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>PreviewsEnabled</key>
+	<false/>
+</dict>
+</plist>

+ 13 - 0
example/ios/Runner/AppDelegate.swift

@@ -0,0 +1,13 @@
+import Flutter
+import UIKit
+
+@main
+@objc class AppDelegate: FlutterAppDelegate {
+  override func application(
+    _ application: UIApplication,
+    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+  ) -> Bool {
+    GeneratedPluginRegistrant.register(with: self)
+    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+  }
+}

+ 122 - 0
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -0,0 +1,122 @@
+{
+  "images" : [
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-20x20@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-20x20@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-29x29@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-29x29@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-29x29@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-40x40@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-40x40@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-60x60@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-60x60@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-20x20@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-20x20@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-29x29@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-29x29@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-40x40@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-40x40@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-76x76@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-76x76@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "83.5x83.5",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-83.5x83.5@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "1024x1024",
+      "idiom" : "ios-marketing",
+      "filename" : "Icon-App-1024x1024@1x.png",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

二进制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png


二进制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png


二进制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png


二进制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png


二进制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png


二进制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png


二进制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png


二进制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png


二进制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png


二进制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png


二进制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png


二进制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png


二进制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png


二进制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png


二进制
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png


+ 23 - 0
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "LaunchImage.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "LaunchImage@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "LaunchImage@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

二进制
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png


二进制
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png


二进制
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png


+ 5 - 0
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md

@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.

+ 37 - 0
example/ios/Runner/Base.lproj/LaunchScreen.storyboard

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="EHf-IW-A2E">
+            <objects>
+                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
+                        <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
+                            </imageView>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
+                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
+                        </constraints>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="53" y="375"/>
+        </scene>
+    </scenes>
+    <resources>
+        <image name="LaunchImage" width="168" height="185"/>
+    </resources>
+</document>

+ 26 - 0
example/ios/Runner/Base.lproj/Main.storyboard

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+    </dependencies>
+    <scenes>
+        <!--Flutter View Controller-->
+        <scene sceneID="tne-QT-ifu">
+            <objects>
+                <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
+                        <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
+                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
+            </objects>
+        </scene>
+    </scenes>
+</document>

+ 51 - 0
example/ios/Runner/Info.plist

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CADisableMinimumFrameDurationOnPhone</key>
+	<true/>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>$(DEVELOPMENT_LANGUAGE)</string>
+	<key>CFBundleDisplayName</key>
+	<string>Photo Classifier</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>photo_classifier_example</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>$(FLUTTER_BUILD_NAME)</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>$(FLUTTER_BUILD_NUMBER)</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>NSPhotoLibraryUsageDescription</key>
+	<string>Need library assces</string>
+	<key>UIApplicationSupportsIndirectInputEvents</key>
+	<true/>
+	<key>UILaunchStoryboardName</key>
+	<string>LaunchScreen</string>
+	<key>UIMainStoryboardFile</key>
+	<string>Main</string>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+</dict>
+</plist>

+ 1 - 0
example/ios/Runner/Runner-Bridging-Header.h

@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"

+ 27 - 0
example/ios/RunnerTests/RunnerTests.swift

@@ -0,0 +1,27 @@
+import Flutter
+import UIKit
+import XCTest
+
+
+@testable import photo_classifier
+
+// This demonstrates a simple unit test of the Swift portion of this plugin's implementation.
+//
+// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
+
+class RunnerTests: XCTestCase {
+
+  func testGetPlatformVersion() {
+    let plugin = PhotoClassifierPlugin()
+
+    let call = FlutterMethodCall(methodName: "getPlatformVersion", arguments: [])
+
+    let resultExpectation = expectation(description: "result block must be called.")
+    plugin.handle(call) { result in
+      XCTAssertEqual(result as! String, "iOS " + UIDevice.current.systemVersion)
+      resultExpectation.fulfill()
+    }
+    waitForExpectations(timeout: 1)
+  }
+
+}

+ 276 - 0
example/lib/main.dart

@@ -0,0 +1,276 @@
+import 'dart:async';
+import 'package:flutter/material.dart';
+import 'package:photo_classifier/photo_classifier.dart';
+import 'package:permission_handler/permission_handler.dart';
+import 'package:photo_classifier/models.dart';
+
+void main() {
+  runApp(const MyApp());
+}
+
+class MyApp extends StatefulWidget {
+  const MyApp({super.key});
+
+  @override
+  State<MyApp> createState() => _MyAppState();
+}
+
+class _MyAppState extends State<MyApp> {
+  final _photoclassifier = PhotoClassifier();
+  bool _hasPermission = false;
+  StreamSubscription<ClassificationEvent?>? _subscription;
+  ClassificationProgress? _progress;
+  ClassificationResult? _result;
+  bool _isClassifying = false;
+  String _errorMessage = '';
+
+  @override
+  void initState() {
+    super.initState();
+    _checkPermissions();
+  }
+
+  Future<void> _checkPermissions() async {
+    final status = await Permission.photos.status;
+    setState(() {
+      _hasPermission = status.isGranted;
+      if (!status.isGranted) {
+        _errorMessage = '需要相册权限才能进行照片分类,请点击上方按钮申请权限';
+      }
+    });
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return MaterialApp(
+      home: Scaffold(
+        appBar: AppBar(
+          title: const Text('照片分类插件示例'),
+        ),
+        body: Center(
+          child: Column(
+            mainAxisAlignment: MainAxisAlignment.center,
+            children: [
+              if (!_hasPermission)
+                ElevatedButton(
+                  onPressed: _requestPermission,
+                  child: const Text('请求照片库权限'),
+                ),
+              if (!_hasPermission)
+                Padding(
+                  padding: const EdgeInsets.only(top: 16.0),
+                  child: ElevatedButton(
+                    onPressed: () => openAppSettings(),
+                    style: ElevatedButton.styleFrom(
+                      backgroundColor: Colors.orange,
+                    ),
+                    child: const Text('打开系统设置'),
+                  ),
+                ),
+              if (_hasPermission && !_isClassifying)
+                ElevatedButton(
+                  onPressed: _startClassificationWithStream,
+                  child: const Text('开始分类'),
+                ),
+              if (_isClassifying)
+                ElevatedButton(
+                  onPressed: _cancelClassification,
+                  child: const Text('取消分类'),
+                ),
+              if (_progress != null) ...[
+                const SizedBox(height: 20),
+                Text('进度: ${(_progress!.rate * 100).toStringAsFixed(1)}%',
+                    style: const TextStyle(fontSize: 18)),
+                const SizedBox(height: 10),
+                LinearProgressIndicator(value: _progress!.rate),
+                Text('已处理: ${_progress!.currentBatch}/${_progress!.totalBatches}'),
+              ],
+              if (_errorMessage.isNotEmpty) ...[
+                const SizedBox(height: 20),
+                Container(
+                  padding: const EdgeInsets.all(12),
+                  decoration: BoxDecoration(
+                    color: Colors.red.withOpacity(0.1),
+                    borderRadius: BorderRadius.circular(8),
+                    border: Border.all(color: Colors.red.withOpacity(0.5)),
+                  ),
+                  child: Column(
+                    children: [
+                      const Icon(Icons.error_outline, color: Colors.red, size: 28),
+                      const SizedBox(height: 8),
+                      Text(
+                        _errorMessage,
+                        style: const TextStyle(color: Colors.red),
+                        textAlign: TextAlign.center,
+                      ),
+                    ],
+                  ),
+                ),
+              ],
+              if (_result != null && _progress?.isCompleted == true) ...[
+                const SizedBox(height: 20),
+                const Text('分类结果:', style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
+                _buildResultSummary(),
+              ],
+              if (_progress?.isCompleted == true)
+                ElevatedButton(
+                  onPressed: _resetAll,
+                  style: ElevatedButton.styleFrom(
+                    backgroundColor: Colors.blueGrey,
+                  ),
+                  child: const Text('重置'),
+                ),
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+
+  Widget _buildResultSummary() {
+    if (_result == null) return const Text('无结果');
+
+    return Expanded(
+      child: ListView(
+        children: [
+          _buildResultItem('相似图片组', _result?.similarGroups, isGroup: true),
+          _buildResultItem('人物照片', _result?.peopleGroups),
+          _buildResultItem('屏幕截图', _result?.screenshotGroups),
+          _buildResultItem('模糊图片', _result?.blurryGroups),
+        ],
+      ),
+    );
+  }
+
+  Widget _buildResultItem(String title, dynamic items, {bool isGroup = false}) {
+    if (items == null) return const SizedBox.shrink();
+    
+    final count = isGroup ? (items as List).length : (items as List).length;
+    final itemsText = isGroup ? '$count 组' : '$count 张';
+    
+    return Padding(
+      padding: const EdgeInsets.symmetric(vertical: 8.0),
+      child: Column(
+        crossAxisAlignment: CrossAxisAlignment.start,
+        children: [
+          Text('$title: $itemsText', 
+               style: const TextStyle(fontWeight: FontWeight.bold)),
+          // 这里可以添加图片预览
+        ],
+      ),
+    );
+  }
+
+  Future<void> _requestPermission() async {
+    try {
+      // 使用permission_handler请求权限
+      final status = await Permission.photos.request();
+      final granted = status.isGranted;
+      
+      setState(() {
+        _hasPermission = granted;
+        if (!granted) {
+          _errorMessage = '需要相册权限才能进行照片分类';
+        } else {
+          _errorMessage = '';
+        }
+      });
+      
+      // 如果被拒绝且不能再次请求,提示用户前往设置
+      if (status.isPermanentlyDenied || status.isDenied) {
+        setState(() {
+          _errorMessage = '权限被拒绝,请点击下方按钮前往设置手动开启相册权限';
+        });
+      }
+    } catch (e) {
+      setState(() {
+        _errorMessage = '请求权限失败: $e';
+      });
+    }
+  }
+
+  Future<void> _startClassificationWithStream() async {
+    setState(() {
+      _isClassifying = true;
+      _errorMessage = '';
+      _progress = null;
+      _result = null;
+    });
+
+    try {
+      // 先配置分类器
+      await _photoclassifier.configureClassifier(
+        batchSize: 200,
+        maxConcurrentProcessing: 4,
+        similarityThreshold: 0.75,
+      );
+      
+      // 设置流监听
+      _subscription = _photoclassifier
+          .startClassificationStream()
+          .listen( 
+          (event) {
+          if (event == null) return;
+          setState(() {
+            _progress = event.progress;
+            print("批次: ${event.progress?.currentBatch}/${event.progress?.totalBatches}, 进度: ${event.progress?.batchDuration}");
+            print("${event.result?.screenshotGroups?.length}");
+            if (event.progress?.isCompleted == true) {
+              _result = event.result;
+              _isClassifying = false;
+              _subscription?.cancel();
+              // 取消订阅
+              _subscription = null;
+            }
+          });
+        },
+        onError: (error) {
+          setState(() {
+            _errorMessage = '分类过程中出错: $error';
+            _isClassifying = false;
+          });
+        },
+        onDone: () {
+          if (_progress?.isCompleted != true) {
+            setState(() {
+              _errorMessage = '分类过程意外结束';
+              _isClassifying = false;
+            });
+          }
+        },
+      );
+    } catch (e) {
+      setState(() {
+        _errorMessage = '启动分类失败: $e';
+        _isClassifying = false;
+      });
+    }
+  }
+
+  void _cancelClassification() {
+    _subscription?.cancel();
+    _subscription = null;
+    
+    setState(() {
+      _isClassifying = false;
+    });
+    
+    _photoclassifier.resetClassifier();
+  }
+
+  void _resetAll() {
+    setState(() {
+      _progress = null;
+      _result = null;
+      _errorMessage = '';
+      _isClassifying = false;
+    });
+    // _photoclassifier.resetClassifier();
+  }
+
+  @override
+  void dispose() {
+    _subscription?.cancel();
+    super.dispose();
+  }
+}

+ 344 - 0
example/pubspec.lock

@@ -0,0 +1,344 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+  async:
+    dependency: transitive
+    description:
+      name: async
+      sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.12.0"
+  boolean_selector:
+    dependency: transitive
+    description:
+      name: boolean_selector
+      sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.2"
+  characters:
+    dependency: transitive
+    description:
+      name: characters
+      sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.4.0"
+  clock:
+    dependency: transitive
+    description:
+      name: clock
+      sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.1.2"
+  collection:
+    dependency: transitive
+    description:
+      name: collection
+      sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.19.1"
+  cupertino_icons:
+    dependency: "direct main"
+    description:
+      name: cupertino_icons
+      sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.0.8"
+  fake_async:
+    dependency: transitive
+    description:
+      name: fake_async
+      sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.3.2"
+  file:
+    dependency: transitive
+    description:
+      name: file
+      sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
+      url: "https://pub.dev"
+    source: hosted
+    version: "7.0.1"
+  flutter:
+    dependency: "direct main"
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  flutter_driver:
+    dependency: transitive
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  flutter_lints:
+    dependency: "direct dev"
+    description:
+      name: flutter_lints
+      sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
+      url: "https://pub.dev"
+    source: hosted
+    version: "5.0.0"
+  flutter_test:
+    dependency: "direct dev"
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  flutter_web_plugins:
+    dependency: transitive
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  fuchsia_remote_debug_protocol:
+    dependency: transitive
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  integration_test:
+    dependency: "direct dev"
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  leak_tracker:
+    dependency: transitive
+    description:
+      name: leak_tracker
+      sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
+      url: "https://pub.dev"
+    source: hosted
+    version: "10.0.8"
+  leak_tracker_flutter_testing:
+    dependency: transitive
+    description:
+      name: leak_tracker_flutter_testing
+      sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.0.9"
+  leak_tracker_testing:
+    dependency: transitive
+    description:
+      name: leak_tracker_testing
+      sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.0.1"
+  lints:
+    dependency: transitive
+    description:
+      name: lints
+      sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7
+      url: "https://pub.dev"
+    source: hosted
+    version: "5.1.1"
+  matcher:
+    dependency: transitive
+    description:
+      name: matcher
+      sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.12.17"
+  material_color_utilities:
+    dependency: transitive
+    description:
+      name: material_color_utilities
+      sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.11.1"
+  meta:
+    dependency: transitive
+    description:
+      name: meta
+      sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.16.0"
+  path:
+    dependency: transitive
+    description:
+      name: path
+      sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.9.1"
+  permission_handler:
+    dependency: "direct main"
+    description:
+      name: permission_handler
+      sha256: "59adad729136f01ea9e35a48f5d1395e25cba6cea552249ddbe9cf950f5d7849"
+      url: "https://pub.dev"
+    source: hosted
+    version: "11.4.0"
+  permission_handler_android:
+    dependency: transitive
+    description:
+      name: permission_handler_android
+      sha256: d3971dcdd76182a0c198c096b5db2f0884b0d4196723d21a866fc4cdea057ebc
+      url: "https://pub.dev"
+    source: hosted
+    version: "12.1.0"
+  permission_handler_apple:
+    dependency: transitive
+    description:
+      name: permission_handler_apple
+      sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023
+      url: "https://pub.dev"
+    source: hosted
+    version: "9.4.7"
+  permission_handler_html:
+    dependency: transitive
+    description:
+      name: permission_handler_html
+      sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.1.3+5"
+  permission_handler_platform_interface:
+    dependency: transitive
+    description:
+      name: permission_handler_platform_interface
+      sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878
+      url: "https://pub.dev"
+    source: hosted
+    version: "4.3.0"
+  permission_handler_windows:
+    dependency: transitive
+    description:
+      name: permission_handler_windows
+      sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.2.1"
+  photo_classifier:
+    dependency: "direct main"
+    description:
+      path: ".."
+      relative: true
+    source: path
+    version: "1.0.0+1"
+  platform:
+    dependency: transitive
+    description:
+      name: platform
+      sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.1.6"
+  plugin_platform_interface:
+    dependency: transitive
+    description:
+      name: plugin_platform_interface
+      sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.8"
+  process:
+    dependency: transitive
+    description:
+      name: process
+      sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d"
+      url: "https://pub.dev"
+    source: hosted
+    version: "5.0.3"
+  sky_engine:
+    dependency: transitive
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  source_span:
+    dependency: transitive
+    description:
+      name: source_span
+      sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.10.1"
+  stack_trace:
+    dependency: transitive
+    description:
+      name: stack_trace
+      sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.12.1"
+  stream_channel:
+    dependency: transitive
+    description:
+      name: stream_channel
+      sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.4"
+  string_scanner:
+    dependency: transitive
+    description:
+      name: string_scanner
+      sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.4.1"
+  sync_http:
+    dependency: transitive
+    description:
+      name: sync_http
+      sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961"
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.3.1"
+  term_glyph:
+    dependency: transitive
+    description:
+      name: term_glyph
+      sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.2.2"
+  test_api:
+    dependency: transitive
+    description:
+      name: test_api
+      sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
+      url: "https://pub.dev"
+    source: hosted
+    version: "0.7.4"
+  vector_math:
+    dependency: transitive
+    description:
+      name: vector_math
+      sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+      url: "https://pub.dev"
+    source: hosted
+    version: "2.1.4"
+  vm_service:
+    dependency: transitive
+    description:
+      name: vm_service
+      sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
+      url: "https://pub.dev"
+    source: hosted
+    version: "14.3.1"
+  web:
+    dependency: transitive
+    description:
+      name: web
+      sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
+      url: "https://pub.dev"
+    source: hosted
+    version: "1.1.1"
+  webdriver:
+    dependency: transitive
+    description:
+      name: webdriver
+      sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8"
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.0.4"
+sdks:
+  dart: ">=3.7.2 <4.0.0"
+  flutter: ">=3.24.0"

+ 88 - 0
example/pubspec.yaml

@@ -0,0 +1,88 @@
+name: photo_classifier_example
+description: "Demonstrates how to use the photo_classifier plugin."
+# The following line prevents the package from being accidentally published to
+# pub.dev using `flutter pub publish`. This is preferred for private packages.
+publish_to: 'none' # Remove this line if you wish to publish to pub.dev
+
+environment:
+  sdk: ^3.7.2
+
+# Dependencies specify other packages that your package needs in order to work.
+# To automatically upgrade your package dependencies to the latest versions
+# consider running `flutter pub upgrade --major-versions`. Alternatively,
+# dependencies can be manually updated by changing the version numbers below to
+# the latest version available on pub.dev. To see which dependencies have newer
+# versions available, run `flutter pub outdated`.
+dependencies:
+  flutter:
+    sdk: flutter
+
+  photo_classifier:
+    # When depending on this package from a real application you should use:
+    #   photo_classifier: ^x.y.z
+    # See https://dart.dev/tools/pub/dependencies#version-constraints
+    # The example app is bundled with the plugin so we use a path dependency on
+    # the parent directory to use the current plugin's version.
+    path: ../
+  
+  permission_handler: ^11.0.0
+
+  # The following adds the Cupertino Icons font to your application.
+  # Use with the CupertinoIcons class for iOS style icons.
+  cupertino_icons: ^1.0.8
+
+dev_dependencies:
+  integration_test:
+    sdk: flutter
+  flutter_test:
+    sdk: flutter
+  permission_handler: ^11.0.0
+
+  # The "flutter_lints" package below contains a set of recommended lints to
+  # encourage good coding practices. The lint set provided by the package is
+  # activated in the `analysis_options.yaml` file located at the root of your
+  # package. See that file for information about deactivating specific lint
+  # rules and activating additional ones.
+  flutter_lints: ^5.0.0
+
+# For information on the generic Dart part of this file, see the
+# following page: https://dart.dev/tools/pub/pubspec
+
+# The following section is specific to Flutter packages.
+flutter:
+
+  # The following line ensures that the Material Icons font is
+  # included with your application, so that you can use the icons in
+  # the material Icons class.
+  uses-material-design: true
+
+  # To add assets to your application, add an assets section, like this:
+  # assets:
+  #   - images/a_dot_burr.jpeg
+  #   - images/a_dot_ham.jpeg
+
+  # An image asset can refer to one or more resolution-specific "variants", see
+  # https://flutter.dev/to/resolution-aware-images
+
+  # For details regarding adding assets from package dependencies, see
+  # https://flutter.dev/to/asset-from-package
+
+  # To add custom fonts to your application, add a fonts section here,
+  # in this "flutter" section. Each entry in this list should have a
+  # "family" key with the font family name, and a "fonts" key with a
+  # list giving the asset and other descriptors for the font. For
+  # example:
+  # fonts:
+  #   - family: Schyler
+  #     fonts:
+  #       - asset: fonts/Schyler-Regular.ttf
+  #       - asset: fonts/Schyler-Italic.ttf
+  #         style: italic
+  #   - family: Trajan Pro
+  #     fonts:
+  #       - asset: fonts/TrajanPro.ttf
+  #       - asset: fonts/TrajanPro_Bold.ttf
+  #         weight: 700
+  #
+  # For details regarding fonts from package dependencies,
+  # see https://flutter.dev/to/font-from-package

+ 27 - 0
example/test/widget_test.dart

@@ -0,0 +1,27 @@
+// This is a basic Flutter widget test.
+//
+// To perform an interaction with a widget in your test, use the WidgetTester
+// utility in the flutter_test package. For example, you can send tap and scroll
+// gestures. You can also use WidgetTester to find child widgets in the widget
+// tree, read text, and verify that the values of widget properties are correct.
+
+import 'package:flutter/material.dart';
+import 'package:flutter_test/flutter_test.dart';
+
+import 'package:photo_classifier_example/main.dart';
+
+void main() {
+  testWidgets('Verify Platform version', (WidgetTester tester) async {
+    // Build our app and trigger a frame.
+    await tester.pumpWidget(const MyApp());
+
+    // Verify that platform version is retrieved.
+    expect(
+      find.byWidgetPredicate(
+        (Widget widget) => widget is Text &&
+                           widget.data!.startsWith('Running on:'),
+      ),
+      findsOneWidget,
+    );
+  });
+}

+ 38 - 0
ios/.gitignore

@@ -0,0 +1,38 @@
+.idea/
+.vagrant/
+.sconsign.dblite
+.svn/
+
+.DS_Store
+*.swp
+profile
+
+DerivedData/
+build/
+GeneratedPluginRegistrant.h
+GeneratedPluginRegistrant.m
+
+.generated/
+
+*.pbxuser
+*.mode1v3
+*.mode2v3
+*.perspectivev3
+
+!default.pbxuser
+!default.mode1v3
+!default.mode2v3
+!default.perspectivev3
+
+xcuserdata
+
+*.moved-aside
+
+*.pyc
+*sync/
+Icon?
+.tags*
+
+/Flutter/Generated.xcconfig
+/Flutter/ephemeral/
+/Flutter/flutter_export_environment.sh

+ 0 - 0
ios/Assets/.gitkeep


+ 28 - 0
ios/Classes/ImageClassfiy/Extension/Common+E.swift

@@ -0,0 +1,28 @@
+import Foundation
+import CoreLocation
+
+extension CLLocationCoordinate2D {
+    internal func toDictionary() -> [String: Any] {
+        return [
+            "latitude": latitude,
+            "longitude": longitude
+        ]
+    }
+}
+
+extension CGSize {
+    internal func toDictionary() -> [String: Any] {
+        return ["width": width, "height": height]
+    }
+}
+
+extension Encodable {
+    internal func toDictionary() -> [String: Any] {
+        guard let data = try? JSONEncoder().encode(self),
+              let dict = try? JSONSerialization.jsonObject(with: data) as? [String: Any] else {
+            return [:]
+        }
+        return dict
+    }
+}
+

+ 40 - 0
ios/Classes/ImageClassfiy/Extension/PHAsset+ImageInfo.swift

@@ -0,0 +1,40 @@
+//
+//  PHAsset+ImageInfo.swift
+//  Demo
+//
+//  Created by Groot on 2025/4/27.
+//
+
+import Foundation
+import Photos
+
+// MARK: - PHAsset扩展
+extension PHAsset {
+    /// 从资产中提取图像信息
+    /// - Returns: 图像信息
+    func extractAssetInfo() -> ImageItem.ImageInfo? {
+        let fileSize = self.getSize()
+        
+        let imageInfo = ImageItem.ImageInfo(
+            time: self.creationDate,
+            locationCoordinate: self.location?.coordinate,
+            fileSize: fileSize,
+            pixelSize: CGSize(width: self.pixelWidth, height: self.pixelHeight)
+        )
+        return imageInfo
+    }
+    
+    /// 获取资产文件大小
+    /// - Returns: 文件大小(字节)
+    func getSize() -> Int64? {
+        let resources = PHAssetResource.assetResources(for: self)
+        
+        guard let resource = resources.first,
+              let unsignedInt64 = resource.value(forKey: "fileSize") as? CLong else {
+            return nil
+        }
+        
+        return Int64(bitPattern: UInt64(unsignedInt64))
+    }
+}
+

+ 87 - 0
ios/Classes/ImageClassfiy/Extension/PhotosImageClassfier+Blurry.swift

@@ -0,0 +1,87 @@
+//
+//  PhotosImageClassfier+Blurry.swift
+//  Demo
+//
+//  Created by Groot on 2025/4/27.
+//
+
+import UIKit
+
+extension PhotosImageClassifier {
+    static func detectBlurryImages(item: ImageItem) -> Bool {
+        guard let image = item.thumbnailImage else { return false }
+        
+        return isImageBlurry(image)
+    }
+    
+    private static func isImageBlurry(_ image: UIImage) -> Bool {
+        guard let cgImage = image.cgImage else { return false }
+        
+        // 使用更小的采样区域
+        let width = cgImage.width
+        let height = cgImage.height
+        let pixelStride = 4 // 改名为pixelStride,避免与函数名冲突
+        
+        // 提前检查图像尺寸是否合法
+        guard width > (2 * pixelStride), height > (2 * pixelStride) else {
+            return false
+        }
+        
+        // 使用vImage进行快速处理
+        var buffer = [UInt8](repeating: 0, count: width * height)
+        
+        let colorSpace = CGColorSpaceCreateDeviceGray()
+        guard let context = CGContext(
+            data: &buffer,
+            width: width,
+            height: height,
+            bitsPerComponent: 8,
+            bytesPerRow: width,
+            space: colorSpace,
+            bitmapInfo: CGImageAlphaInfo.none.rawValue
+        ) else {
+            return false
+        }
+        
+        context.draw(cgImage, in: CGRect(x: 0, y: 0, width: width, height: height))
+        
+        // 使用拉普拉斯算子的简化版本
+        var score: Double = 0
+        var sampledPixels = 0
+        
+        // 只采样图像的一部分区域
+        let sampleRows = 10
+        let sampleCols = 10
+        
+        // 计算步长
+        let rowStep = max(1, height / sampleRows)
+        let colStep = max(1, width / sampleCols)
+        
+        // 使用Swift的stride函数
+        for y in Swift.stride(from: pixelStride, to: height - pixelStride, by: rowStep) {
+            for x in Swift.stride(from: pixelStride, to: width - pixelStride, by: colStep) {
+                let current = Int(buffer[y * width + x])
+                let left = Int(buffer[y * width + (x - pixelStride)])
+                let right = Int(buffer[y * width + (x + pixelStride)])
+                let top = Int(buffer[(y - pixelStride) * width + x])
+                let bottom = Int(buffer[(y + pixelStride) * width + x])
+                
+                // 简化的边缘检测
+                let dx = abs(left - right)
+                let dy = abs(top - bottom)
+                score += Double(max(dx, dy))
+                sampledPixels += 1
+            }
+        }
+        
+        // 避免除以零
+        guard sampledPixels > 0 else { return false }
+        
+        // 归一化分数
+        let normalizedScore = score / Double(sampledPixels)
+        
+        // 调整阈值
+        let threshold = 15.0
+        return normalizedScore < threshold
+    }
+}

+ 1 - 0
ios/Classes/ImageClassfiy/Extension/PhotosImageClassfier+SimilarGroup.swift

@@ -0,0 +1 @@
+ 

+ 88 - 0
ios/Classes/ImageClassfiy/Extension/PhotosImageClassfiyFilter+SimilarGroup.swift

@@ -0,0 +1,88 @@
+//
+//  PhotosImageClassfiyFilter.swift
+//  Demo
+//
+//  Created by Groot on 2025/4/27.
+//
+
+import Foundation
+
+extension PhotosImageClassifyFilter {
+    static internal func findSimilarGroups(in imageFeatures: [ImageItem], threshold: CGFloat) -> [ImageGroup] {
+        // 如果特征数量太少,直接返回空结果
+        if imageFeatures.count < 2 {
+            return []
+        }
+        
+        // 首先构建相似度矩阵,记录所有项之间的相似关系
+        var similarityGraph: [Int: Set<Int>] = [:]
+        
+        // 初始化每个节点
+        for featureIndex in 0..<imageFeatures.count {
+            similarityGraph[featureIndex] = Set<Int>()
+        }
+        
+        for sourceIndex in 0..<imageFeatures.count {
+            for targetIndex in (sourceIndex + 1)..<imageFeatures.count {
+                // 计算特征距离
+                var featureDistance: Float = 0
+                guard let sourceFeature = imageFeatures[sourceIndex].classfiyInfo?.similarFeature,
+                      let targetFeature = imageFeatures[targetIndex].classfiyInfo?.similarFeature else {
+                    continue
+                }
+                try? sourceFeature.computeDistance(&featureDistance, to: targetFeature)
+                
+                // 检查距离是否有效
+                if !featureDistance.isNaN && !featureDistance.isInfinite {
+                    // 将距离转换为相似度 (0-1之间)
+                    let similarityScore = CGFloat(1 - featureDistance)
+                    
+                    // 如果相似度超过阈值,记录这对项目是相似的
+                    if similarityScore >= threshold {
+                        similarityGraph[sourceIndex]!.insert(targetIndex)
+                        similarityGraph[targetIndex]!.insert(sourceIndex)
+                    }
+                }
+            }
+        }
+        
+        // 使用广度优先搜索算法查找连通分量(相似图片组)
+        var similarGroups: [ImageGroup] = []
+        var visitedIndices = Set<Int>()
+        
+        for startIndex in 0..<imageFeatures.count {
+            // 跳过已处理过的节点
+            if visitedIndices.contains(startIndex) {
+                continue
+            }
+            
+            // 使用BFS查找与当前节点连接的所有节点
+            var queue = [startIndex]
+            var currentGroup: ImageGroup = .init(images: [])
+            visitedIndices.insert(startIndex)
+            
+            while !queue.isEmpty {
+                let currentIndex = queue.removeFirst()
+                currentGroup.images.append(imageFeatures[currentIndex])
+                
+                // 遍历所有与当前节点相似的节点
+                for neighborIndex in similarityGraph[currentIndex]! {
+                    if !visitedIndices.contains(neighborIndex) {
+                        visitedIndices.insert(neighborIndex)
+                        queue.append(neighborIndex)
+                    }
+                }
+            }
+            
+            // 只保存有多个项目的组
+            if currentGroup.images.count > 1 {
+                similarGroups.append(currentGroup)
+            }
+        }
+        
+        // 按照照片数量降序排序
+        similarGroups.sort { $0.imageCount > $1.imageCount }
+        
+        return similarGroups
+    }
+}

+ 136 - 0
ios/Classes/ImageClassfiy/Extension/PhotosImageClassifier+Batchs.swift

@@ -0,0 +1,136 @@
+//
+//  PhotosImageClassifier+Batchs.swift
+//  Demo
+//
+//  Created by Groot on 2025/4/27.
+//
+
+import Foundation
+
+// MARK: - 批处理方法
+extension PhotosImageClassifier {
+    /// 按批次处理图片项目
+    /// - Parameters:
+    ///   - types: 分类类型
+    ///   - items: 图片项目列表
+    ///   - progressHandler: 进度和批次结果回调处理器
+    func processBatches(
+        with types: [PhotoImageClassifyType],
+        items: [ImageItem],
+        batchCompletionHandler: @escaping BatchProgressCompletion
+    ) async {
+        guard !items.isEmpty else {
+            print("Unprocess ImageItems count is Zero --- Finished batch")
+            return
+        }
+        // 计算需要处理的批次总数
+        let totalItems = items.count
+        let batchCount = Int(ceil(Double(totalItems) / Double(configuration.batchSize)))
+        let startTime = Date()
+        
+        for batchIndex in 0..<batchCount {
+            let batchStartTime = Date()
+
+            // 处理当前批次
+            let startIndex = batchIndex * configuration.batchSize
+            let endIndex = min((batchIndex + 1) * configuration.batchSize, totalItems)
+            guard startIndex <= endIndex else { return }
+            let currentBatch = Array(items[startIndex..<endIndex])
+            
+            // 处理当前批次
+            let processedItems = await processBatch(with: types, items: currentBatch)
+            
+            // 是否为最后一个批次
+            let isLastBatch = batchIndex == batchCount - 1
+            
+            let batchDuration = Date().timeIntervalSince(batchStartTime)
+            let totalDuration = Date().timeIntervalSince(startTime)
+            let progress = Double(batchIndex + 1) / Double(batchCount)
+            // 创建进度信息对象
+            let progressInfo = ClassificationProgress(
+                currentBatch: batchIndex + 1,
+                totalBatches: batchCount,
+                rate: progress,
+                batchDuration: batchDuration,
+                totalDuration: totalDuration,
+                isLastBatch: isLastBatch
+            )
+            
+            // 回调进度更新和批次处理结果
+            await batchCompletionHandler(progressInfo, processedItems)
+        }
+    }
+    
+    /// 处理单批次图片项目
+    /// - Parameters:
+    ///   - types: 分类类型
+    ///   - items: 图片项目列表
+    /// - Returns: 处理后的图片项目列表
+    func processBatch(with types: [PhotoImageClassifyType], items: [ImageItem]) async -> [ImageItem] {
+        return await limitConcurrentProcessing(items: items, maxConcurrent: configuration.maxConcurrentProcessing) { item in
+            // 请求图片
+            var mutableItem = await self.requestAssetsImageFor(item, options: self.imageRequestOptions)
+            // 处理相似图片、人物图片、模糊图片
+            self.processImage(with: types, item: &mutableItem)
+            // 提取图片信息
+            mutableItem.imageInfo = mutableItem.asset.extractAssetInfo()
+            return mutableItem
+        }
+    }
+    
+    // MARK: - 辅助方法
+    
+    /// 限制并发任务处理
+    /// - Parameters:
+    ///   - items: 待处理项目
+    ///   - maxConcurrent: 最大并发数
+    ///   - processItem: 单项处理函数
+    /// - Returns: 处理结果数组
+    func limitConcurrentProcessing<T>(
+        items: [ImageItem],
+        maxConcurrent: Int,
+        processItem: @escaping (ImageItem) async -> T?
+    ) async -> [T] {
+        guard !items.isEmpty else { return [] }
+        
+        var results: [T] = []
+        
+        // 使用TaskGroup并发处理
+        await withTaskGroup(of: T?.self) { group in
+            // 控制进行中的任务数量
+            var pendingItems = items[...]
+            var runningTasks = 0
+            
+            // 添加任务的辅助函数
+            func addTask(for item: ImageItem) {
+                group.addTask {
+                    return await processItem(item)
+                }
+                pendingItems = pendingItems.dropFirst()
+                runningTasks += 1
+            }
+            
+            // 初始添加任务,不超过最大并发数
+            while runningTasks < maxConcurrent, let item = pendingItems.first {
+                addTask(for: item)
+            }
+            
+            // 处理完成的任务,并添加新任务
+            for await result in group {
+                runningTasks -= 1
+                
+                // 添加有效结果
+                if let result = result {
+                    results.append(result)
+                }
+                
+                // 如果还有待处理项,继续添加任务
+                if let nextItem = pendingItems.first, runningTasks < maxConcurrent {
+                    addTask(for: nextItem)
+                }
+            }
+        }
+        
+        return results
+    }
+}

+ 63 - 0
ios/Classes/ImageClassfiy/Extension/PhotosImageClassifier+Process.swift

@@ -0,0 +1,63 @@
+//
+//  PhotosImageClassifier+Process.swift
+//  Demo
+//
+//  Created by Groot on 2025/4/27.
+//
+
+import Foundation
+import Vision
+import Photos
+
+// MARK: - 图像处理
+extension PhotosImageClassifier {
+    /// 处理单个图像,提取分类特征
+    /// - Parameter item: 图像项目
+    func processImage(with types: [PhotoImageClassifyType], item: inout ImageItem) {
+        var imageInfo = ImageItem.ClassifyInfo()
+
+        // 检测屏幕截图
+        if types.contains(.screenshot) {
+            imageInfo.isScreenshot = item.asset.mediaSubtypes.contains(.photoScreenshot)
+        }
+        // 检测模糊图像
+        if types.contains(.blurry) {
+            imageInfo.isBlurry = Self.detectBlurryImages(item: item)
+        }
+
+        guard types.contains(.similar) || types.contains(.people), let cgImage = item.thumbnailImage?.cgImage else {
+            item.classfiyInfo = imageInfo
+            return
+        }
+        
+        // Vision 请求处理
+        let requestHandler = VNImageRequestHandler(cgImage: cgImage, options: [:])
+        // 特征向量提取请求
+        let featureDetectionRequest = VNGenerateImageFeaturePrintRequest()
+        // 人脸检测请求
+        let faceDetectionRequest = VNDetectFaceRectanglesRequest()
+        faceDetectionRequest.revision = VNDetectFaceRectanglesRequestRevision3
+        
+        let requests = [
+            types.contains(.similar) ? featureDetectionRequest : nil,
+            types.contains(.people) ? faceDetectionRequest : nil
+        ].compactMap { $0 }
+        
+        guard !requests.isEmpty else {
+            item.classfiyInfo = imageInfo
+            return
+        }
+
+        try? requestHandler.perform(requests)
+        // 获取相似特征
+        if types.contains(.similar), let featureDetectResult = featureDetectionRequest.results?.first as? VNFeaturePrintObservation {
+            imageInfo.similarFeature = featureDetectResult
+        }
+        // 检测人脸
+        if types.contains(.people), let faceDetectResult = faceDetectionRequest.results, !faceDetectResult.isEmpty {
+            imageInfo.containsPeople = true
+        }
+
+        item.classfiyInfo = imageInfo
+    }
+}

+ 125 - 0
ios/Classes/ImageClassfiy/Models.swift

@@ -0,0 +1,125 @@
+//
+//  Models.swift
+//  Demo
+//
+//  Created by Groot on 2025/4/27.
+//
+
+import UIKit
+import Vision
+import CoreLocation
+import Photos
+
+/// 分类类型选项集
+public enum PhotoImageClassifyType: String, CaseIterable {
+    case similar, people, screenshot, blurry
+
+    public static var all: [PhotoImageClassifyType] {
+        return Self.allCases
+    }
+
+    public init?(_ rawValue: String) {
+        switch rawValue.lowercased() {
+        case "similar":
+            self = .similar
+        case "people":
+            self = .people
+        case "screenshot":
+            self = .screenshot
+        case "blurry":
+            self = .blurry
+        default:
+            return nil
+        }
+    }
+}
+
+/// 进度更新信息
+public struct ClassificationProgress: Codable {
+    /// 当前处理的批次索引
+    public let currentBatch: Int
+    /// 总批次数
+    public let totalBatches: Int
+    /// 进度百分比 (0.0-1.0)
+    public let rate: Double
+    /// 当前批次处理时间(秒)
+    public let batchDuration: Double
+    /// 总耗时(秒)
+    public let totalDuration: Double
+    /// 是否为最后一个批次
+    public let isLastBatch: Bool
+    
+    public var isCompleted: Bool {
+        return isLastBatch
+    }
+}
+
+/// 回调数据
+public struct PhotoImageClassifiedResult: Identifiable {
+    public let id: String = UUID().uuidString
+    public var similarGroups: [ImageGroup]?
+    public var peopleImages: [ImageItem]?
+    public var screenshotImages: [ImageItem]?
+    public var blurryImages: [ImageItem]?
+}
+
+/// 图片组
+public struct ImageGroup: Identifiable {
+    public let id = UUID()
+    
+    public var images: [ImageItem]
+    
+    public var imageCount: Int {
+        images.count
+    }
+    
+    public var imageSizeCount: Int64 {
+        images.reduce(0) { $0 + ($1.imageInfo?.fileSize ?? 0) }
+    }
+}
+
+/// 图片项
+public struct ImageItem: Identifiable {
+    public let id = UUID()
+    public let asset: PHAsset
+    public var thumbnailImage: UIImage?
+    
+    public var imageInfo: ImageInfo?
+    
+    public var classfiyInfo: ClassifyInfo?
+    
+    public struct ImageInfo {
+        public let time: Date?
+        public let locationCoordinate: CLLocationCoordinate2D?
+        public let fileSize: Int64?
+        public let pixelSize: CGSize
+    }
+    
+    public struct ClassifyInfo {
+        public var similarFeature: VNFeaturePrintObservation? = nil
+        
+        public var containsPeople: Bool = false
+        
+        public var isBlurry: Bool = false
+        
+        public var isScreenshot: Bool = false
+    }
+
+    public func toDictionary() -> [String: Any] {
+        var dict: [String: Any] = [
+            "assetsId": asset.localIdentifier,
+            "createdAt": imageInfo?.time?.timeIntervalSince1970 ?? 0,
+            "fileSize": imageInfo?.fileSize ?? 0,
+            "pixelWidth": Int(imageInfo?.pixelSize.width ?? 0),
+            "pixelHeight": Int(imageInfo?.pixelSize.height ?? 0)
+        ]
+        
+        if let coordinate = imageInfo?.locationCoordinate {
+            dict["location"] = [
+                "latitude": coordinate.latitude,
+                "longitude": coordinate.longitude
+            ]
+        }
+        return dict
+    }
+}

+ 186 - 0
ios/Classes/ImageClassfiy/PhotosImageClassifier.swift

@@ -0,0 +1,186 @@
+//
+//  PhotosImageClassifier.swift
+//  PhotoClassifierKit
+//
+//  Created by Groot on 2025/4/23.
+//  Copyright © 2025 GrootTech. All rights reserved.
+//
+
+import Photos
+import PhotosUI
+import UIKit
+import CoreLocation
+import Vision
+
+
+/// 照片图像分类器,用于对相册中的图片进行智能分类
+public class PhotosImageClassifier {
+
+    public typealias BatchProgressCompletion = (ClassificationProgress, [ImageItem]) async -> Void
+    
+    /// 分类器配置选项
+    public struct Configuration: Codable {
+        /// 每批处理的图片数量
+        public var batchSize: Int = 200
+        /// 最大并发处理数量(使用Vision框架时不应大于5)
+        public var maxConcurrentProcessing: Int = 4
+        /// 相似度判定阈值(0.0-1.0),值越大表示要求越相似
+        public var similarityThreshold: CGFloat = 0.7
+    }
+    
+    /// 分类行为类型
+    enum ClassificationAction<ResultType> {
+        /// 查找相似图片组
+        case similarGroups(with: [ImageItem])
+        /// 查找包含人物的图片
+        case peopleImages(with: [ImageItem])
+        /// 查找屏幕截图
+        case screenshotImages(with: [ImageItem])
+        /// 查找模糊图片
+        case blurryImages(with: [ImageItem])
+    }
+    
+    /// 单例实例
+    public static let shared = PhotosImageClassifier()
+    
+    private let imageManager = PHCachingImageManager()
+    
+    private let prefetchImageSize: CGSize = .init(width: 64, height: 64)
+    
+    internal lazy var imageRequestOptions: PHImageRequestOptions = {
+        let requestOptions = PHImageRequestOptions()
+        requestOptions.isSynchronous = false
+        requestOptions.deliveryMode = .highQualityFormat
+        requestOptions.resizeMode = .fast
+        return requestOptions
+    }()
+    
+    // MARK: - 公开属性
+    
+    /// 分类配置
+    private(set) public var configuration: Configuration = .init()
+    /// 是否已加载完所有资源项目
+    private(set) public var isAssetsLoaded: Bool = false
+    /// 是否已完成全部相册分类
+    private(set) public var isClassificationFinished: Bool = false
+    
+    // MARK: - 私有属性
+    
+    /// 存储所有加载完成的资源项目(带缩略图)
+    private var imageItems: [ImageItem] = []
+    
+    /// 私有初始化方法,加载所有图像资产
+    private init() {
+        fetchAllImageAssets()
+    }
+
+    /// 执行指定的分类操作
+    /// - Parameter action: 分类操作类型
+    /// - Returns: 分类结果
+    func perform<ResultType>(action: ClassificationAction<ResultType>) async -> ResultType? {
+        var result: ResultType? = nil
+        switch action {
+        case .similarGroups(let items):
+            result = PhotosImageClassifyFilter.filterSimilarImages(items: items, threshold: configuration.similarityThreshold) as? ResultType
+        case .peopleImages(let items):
+            result = PhotosImageClassifyFilter.filterPeopleImages(items: items) as? ResultType
+        case .screenshotImages(let items):
+            result = PhotosImageClassifyFilter.filterScreenshotImages(items: items) as? ResultType
+        case .blurryImages(let items):
+            result = PhotosImageClassifyFilter.filterBlurryImages(items: items) as? ResultType
+        }
+        return result
+    }
+    
+    /// 按批次
+    /// 开始分类过程,返回完整分类结果
+    /// - Parameter completion: 完成回调,返回处理后的图像项目和是否完成标志
+    public func startClassification(with types: [PhotoImageClassifyType] = PhotoImageClassifyType.all, completion: @escaping BatchProgressCompletion) async {
+        await processBatches(with: types, items: imageItems, batchCompletionHandler: completion)
+    }
+    
+    /// 按批次
+    /// 开始分类过程,分批次返回分类结果
+    /// - Parameter completion: 完成回调,当前进度以及分类结果
+    /// 每个`PhotoImageClassifiedResult`为当前批次分类结果
+    public func startClassification(with types: [PhotoImageClassifyType] = PhotoImageClassifyType.all, completion: @escaping (ClassificationProgress, PhotoImageClassifiedResult) async -> Void) async {
+        await processBatches(with: types, items: imageItems) { [weak self] progress, items in
+            guard let self = self else { return }
+            let result = PhotoImageClassifiedResult(
+                similarGroups: types.contains(.similar) ? await self.perform(action: .similarGroups(with: items)) : nil,
+                peopleImages: types.contains(.people) ? await self.perform(action: .peopleImages(with: items)) : nil,
+                screenshotImages: types.contains(.screenshot) ? await self.perform(action: .screenshotImages(with: items)) : nil,
+                blurryImages: types.contains(.blurry) ? await self.perform(action: .blurryImages(with: items)) : nil
+            )
+            self.isClassificationFinished = progress.isCompleted
+            await completion(progress, result)
+        }
+    }
+    
+    /// 设置分类器配置
+    /// - Parameter configuration: 分类器配置选项
+    /// - Note: 必须在调用`startClassification`方法前进行配置
+    public func configure(with configuration: Configuration) {
+        self.configuration = configuration
+    }
+    
+    /// 重置
+    public func reset() {
+        self.isAssetsLoaded = false
+        self.isClassificationFinished = false
+        self.imageItems = []
+        self.configuration = .init()
+    }
+}
+
+// MARK: - 私有方法
+extension PhotosImageClassifier {
+    // MARK: - 资源获取
+    /// 获取所有图像资源
+    private func fetchAllImageAssets() {
+        let startTime = Date()
+        
+        // 配置获取选项
+        let fetchOptions = PHFetchOptions()
+        fetchOptions.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)]
+        fetchOptions.includeHiddenAssets = false // 排除隐藏资源
+        fetchOptions.includeAllBurstAssets = false // 排除连拍照片
+        
+        // 获取所有图片资源
+        let fetchResult = PHAsset.fetchAssets(with: .image, options: fetchOptions)
+        
+        // 批量获取资源对象
+        let count = fetchResult.count
+        let userAssets = fetchResult.objects(at: IndexSet(integersIn: 0..<count))
+        
+        // 创建图片项目数组
+        self.imageItems = userAssets.map { asset in
+            ImageItem(asset: asset, thumbnailImage: nil, imageInfo: nil)
+        }
+        
+        // 禁用高质量图片缓存以节省内存
+        imageManager.allowsCachingHighQualityImages = false
+        
+        let timeInterval = Date().timeIntervalSince(startTime)
+        print("获取相册 \(count) 资产,用时: \(String(format: "%.2f", timeInterval)) 秒")
+        
+        self.isAssetsLoaded = true
+    }
+    
+    /// 请求资源图像
+    /// - Parameters:
+    ///   - item: 图像项目
+    ///   - options: 图像请求选项
+    /// - Returns: 包含缩略图的图像项目
+    internal func requestAssetsImageFor(_ item: ImageItem, options: PHImageRequestOptions) async -> ImageItem {
+        var mutableItem = item
+        return await withCheckedContinuation { continuation in
+            self.imageManager.requestImage(for: mutableItem.asset, targetSize: self.prefetchImageSize, contentMode: .aspectFit, options: options) { image, _ in
+                if let image = image {
+                    mutableItem.thumbnailImage = image
+                }
+                continuation.resume(returning: mutableItem)
+            }
+        }
+    }
+}

+ 30 - 0
ios/Classes/ImageClassfiy/PhotosImageClassifyFilter.swift

@@ -0,0 +1,30 @@
+//
+//  PhotosImageClassifyFilter.swift
+//  Demo
+//
+//  Created by Groot on 2025/4/25.
+//
+
+import Foundation
+import Vision
+import UIKit
+
+/// 使用原始ImageItem数据进行对应分类操作
+struct PhotosImageClassifyFilter {
+    static func filterSimilarImages(items: [ImageItem], threshold: CGFloat) -> [ImageGroup] {
+        return Self.findSimilarGroups(in: items, threshold: threshold)
+    }
+
+    static func filterPeopleImages(items: [ImageItem]) -> [ImageItem] {
+        return items.filter( { $0.classfiyInfo?.containsPeople == true } )
+    }
+    
+    static func filterScreenshotImages(items: [ImageItem]) -> [ImageItem] {
+        return items.filter( { $0.classfiyInfo?.isScreenshot == true } )
+    }
+    
+    static func filterBlurryImages(items: [ImageItem]) -> [ImageItem] {
+        return items.filter( { $0.classfiyInfo?.isBlurry == true } )
+    }
+}
+

+ 158 - 0
ios/Classes/PhotoClassifierPlugin.swift

@@ -0,0 +1,158 @@
+import Flutter
+import UIKit
+import Photos
+
+public class PhotoClassifierPlugin: NSObject, FlutterPlugin, FlutterStreamHandler {
+    private var eventSink: FlutterEventSink?
+    
+    public static func register(with registrar: FlutterPluginRegistrar) {
+        // 注册方法通道
+        let methodChannel = FlutterMethodChannel(name: "com.atmob.photo_classifier", binaryMessenger: registrar.messenger())
+        // 注册事件通道
+        let eventChannel = FlutterEventChannel(name: "com.atmob.photo_classifier_events", binaryMessenger: registrar.messenger())
+        
+        let instance = PhotoClassifierPlugin()
+        registrar.addMethodCallDelegate(instance, channel: methodChannel)
+        eventChannel.setStreamHandler(instance)
+    }
+    
+    public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
+        // 确保我们在主线程上处理UI相关操作
+        DispatchQueue.main.async {
+            switch call.method {
+            case "startClassification":
+                self.handleStartClassification(call: call, result: result)
+                
+            case "configureClassifier":
+                self.handleConfigureClassifier(call: call, result: result)
+                
+            case "resetClassifier":
+                PhotosImageClassifier.shared.reset()
+                result(nil)
+                
+            case "checkAssetsLoaded":
+                result(PhotosImageClassifier.shared.isAssetsLoaded)
+                
+            default:
+                result(FlutterMethodNotImplemented)
+            }
+        }
+    }
+}
+
+// MARK: -- Platform Methods
+extension PhotoClassifierPlugin {
+    // 处理开始分类请求
+    private func handleStartClassification(call: FlutterMethodCall, result: @escaping FlutterResult) {
+        guard let args = call.arguments as? [String: Any], let types = self.convertClassifyTypes(args["types"] as? [String]), !types.isEmpty else {
+            result(FlutterError(code: "INVALID_ARGUMENTS",
+                                message: "Missing or invalid types argument",
+                                details: nil))
+            result(nil)
+            return
+        }
+        
+        Task {
+            // 开始分类过程
+            await PhotosImageClassifier.shared.startClassification(with: types) { [weak self] progress, classifiedResult in
+                guard let self = self, let eventSink = self.eventSink else { return }
+                
+                // 转换进度信息
+                let progressDict = progress.toDictionary()
+                
+                // 转换分类结果
+                let resultDict = self.convertClassifiedResultToDictionary(classifiedResult)
+                
+                // 发送进度更新
+                let updateDict: [String: Any] = [
+                    "progress": progressDict,
+                    "result": resultDict
+                ]
+                await MainActor.run {
+                    eventSink(updateDict)
+                    if progress.isCompleted {
+                        eventSink(FlutterEndOfEventStream)
+                    }
+                }
+            }
+            result(nil)
+        }
+    }
+    
+    // 处理配置分类器
+    private func handleConfigureClassifier(call: FlutterMethodCall, result: @escaping FlutterResult) {
+        defer { result(nil) }
+        guard let args = call.arguments as? [String: Any] else {
+            result(FlutterError(code: "INVALID_ARGUMENTS",
+                                message: "Missing arguments",
+                                details: nil))
+            return
+        }
+        // 解码参数
+        guard let configData = try? JSONSerialization.data(withJSONObject: args),
+              let config = try? JSONDecoder().decode(PhotosImageClassifier.Configuration.self, from: configData) else {
+            result(FlutterError(code: "INVALID_CONFIG",
+                              message: "无法解析配置参数",
+                              details: nil))
+            return
+        }
+        // 应用配置
+        PhotosImageClassifier.shared.configure(with: config)
+    }
+    
+    // 将字符串数组转换为分类类型
+    private func convertClassifyTypes(_ types: [String]?) -> [PhotoImageClassifyType]? {
+        guard let types else { return nil }
+        var classifyTypes: Set<PhotoImageClassifyType> = []
+        
+        for type in types {
+            guard let classifyType = PhotoImageClassifyType(type) else { continue }
+            classifyTypes.insert(classifyType)
+        }
+        return Array(classifyTypes)
+    }
+    
+    // 将分类结果转换为字典
+    private func convertClassifiedResultToDictionary(_ result: PhotoImageClassifiedResult) -> [String: Any] {
+        var resultDict: [String: Any] = [:]
+        
+        // 处理相似组
+        if let similarGroups = result.similarGroups {
+            resultDict["similarGroups"] = [
+                "groups": similarGroups.map { group in
+                     group.images.map { $0.toDictionary() }
+                }
+            ]
+        }
+        
+        // 处理人物图片
+        if let peopleImages = result.peopleImages {
+            resultDict["peopleImages"] = peopleImages.map { $0.toDictionary() }
+        }
+        
+        // 处理截图
+        if let screenshotImages = result.screenshotImages {
+            resultDict["screenshotImages"] = screenshotImages.map { $0.toDictionary() }
+        }
+        
+        // 处理模糊图片
+        if let blurryImages = result.blurryImages {
+            resultDict["blurryImages"] = blurryImages.map { $0.toDictionary() }
+        }
+        
+        return resultDict
+    }
+    
+}
+
+extension PhotoClassifierPlugin {
+    public func onListen(withArguments arguments: Any?, eventSink events: @escaping FlutterEventSink) -> FlutterError? {
+        self.eventSink = events
+        return nil
+    }
+    
+    public func onCancel(withArguments arguments: Any?) -> FlutterError? {
+        self.eventSink = nil
+        return nil
+    }
+}

+ 14 - 0
ios/Resources/PrivacyInfo.xcprivacy

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>NSPrivacyTrackingDomains</key>
+	<array/>
+	<key>NSPrivacyAccessedAPITypes</key>
+	<array/>
+	<key>NSPrivacyCollectedDataTypes</key>
+	<array/>
+	<key>NSPrivacyTracking</key>
+	<false/>
+</dict>
+</plist>

+ 29 - 0
ios/photo_classifier.podspec

@@ -0,0 +1,29 @@
+#
+# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
+# Run `pod lib lint photo_classifier.podspec` to validate before publishing.
+#
+Pod::Spec.new do |s|
+  s.name             = 'photo_classifier'
+  s.version          = '1.0.0+1'
+  s.summary          = 'A photo classifier plugin for Clean Pro APP, Helps to classify photos with different types, such as similar, people, screenshot, blurry, etc.'
+  s.description      = <<-DESC
+A photo classifier plugin for Clean Pro APP, Helps to classify photos with different types, such as similar, people, screenshot, blurry, etc.
+                       DESC
+  s.homepage         = 'https://github.com/atmob/photo_classifier'
+  s.license          = { :file => '../LICENSE' }
+  s.author           = { 'Groot' => 'chenning@atmob.com' }
+  s.source           = { :path => '.' }
+  s.source_files = 'Classes/**/*'
+  s.dependency 'Flutter'
+  s.platform = :ios, '15.0'
+
+  # Flutter.framework does not contain a i386 slice.
+  s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
+  s.swift_version = '5.0'
+
+  # If your plugin requires a privacy manifest, for example if it uses any
+  # required reason APIs, update the PrivacyInfo.xcprivacy file to describe your
+  # plugin's privacy impact, and then uncomment this line. For more information,
+  # see https://developer.apple.com/documentation/bundleresources/privacy_manifest_files
+  # s.resource_bundles = {'photo_classifier_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
+end

+ 173 - 0
lib/models.dart

@@ -0,0 +1,173 @@
+/// 照片分类类型
+enum PhotoImageClassifyType {
+  similar,
+  people,
+  screenshot,
+  blurry,
+}
+
+/// 分类进度信息
+class ClassificationProgress {
+  /// 总批次数
+  final int totalBatches;
+  
+  /// 当前批次
+  final int currentBatch;
+  
+  /// 是否已完成
+  final bool isLastBatch;
+  
+  /// 完成百分比 (0.0-1.0)
+  final double rate;
+  
+  /// 当前批次处理时间(秒)
+  final double batchDuration;
+  
+  /// 总耗时(秒)
+  final double totalDuration;
+
+  /// 是否已完成
+  bool get isCompleted => isLastBatch;
+  
+  ClassificationProgress({
+    required this.totalBatches,
+    required this.currentBatch,
+    required this.isLastBatch,
+    required this.rate,
+    required this.batchDuration,
+    required this.totalDuration,
+  });
+
+  static double _toDouble(dynamic v) => v is int ? v.toDouble() : (v as double);
+
+  static ClassificationProgress fromJson(Map<String, dynamic> json) {
+    return ClassificationProgress(
+      totalBatches: json['totalBatches'],
+      currentBatch: json['currentBatch'],
+      isLastBatch: json['isLastBatch'],
+      rate: _toDouble(json['rate']),
+      batchDuration: _toDouble(json['batchDuration']),
+      totalDuration: _toDouble(json['totalDuration']),
+    );
+  }
+}
+
+class ClassifiedImageGroup {
+  final List<ClassifiedImage> images;
+
+  int get groupFileSize => images.fold(0, (sum, image) => sum + image.fileSize);
+
+  int get groupImageCount => images.length;
+
+  ClassifiedImageGroup({
+    required this.images,
+  });
+
+  static ClassifiedImageGroup fromList(List<ClassifiedImage> images) {
+    return ClassifiedImageGroup(
+      images: images,
+    );
+  }
+}
+
+class ImageLocation {
+  final double latitude;  // 纬度
+  final double longitude; // 经度
+
+  ImageLocation({
+    required this.latitude,
+    required this.longitude,
+  });
+
+  static ImageLocation fromJson(Map<String, dynamic> json) {
+    return ImageLocation(
+      latitude: json['latitude'],
+      longitude: json['longitude'],
+    );
+  }
+}
+
+
+class ClassifiedImage {
+  final String assetsId;
+  final double createdAt;
+  final ImageLocation? location;
+  final int fileSize;
+  final int pixelWidth;
+  final int pixelHeight;
+
+  ClassifiedImage({
+    required this.assetsId,
+    required this.createdAt,
+    this.location,
+    required this.fileSize,
+    required this.pixelWidth,
+    required this.pixelHeight,
+  });
+
+  static ClassifiedImage fromJson(Map<String, dynamic> json) {
+    return ClassifiedImage(
+      assetsId: json['assetsId'],
+      createdAt: json['createdAt'],
+      location: json['location'] != null ? ImageLocation.fromJson(Map<String, dynamic>.from(json['location'])) : null,
+      fileSize: json['fileSize'],
+      pixelWidth: json['pixelWidth'],
+      pixelHeight: json['pixelHeight'],
+    );
+  }
+}
+
+class ClassificationResult {
+  final List<ClassifiedImageGroup>? similarGroups;
+  final List<ClassifiedImage>? peopleGroups;
+  final List<ClassifiedImage>? screenshotGroups;
+  final List<ClassifiedImage>? blurryGroups;
+  
+  ClassificationResult({
+    required this.similarGroups,
+    required this.peopleGroups,
+    required this.screenshotGroups,
+    required this.blurryGroups,
+  });
+
+  static ClassificationResult fromJson(Map<String, dynamic> json) {
+
+    List<ClassifiedImage> processedImages(dynamic images) {
+      var imageList = List<Map<dynamic, dynamic>>.from(images ?? []);
+      return imageList.map((image) => ClassifiedImage.fromJson(Map<String, dynamic>.from(image))).toList();
+    }
+    
+    return ClassificationResult(
+      similarGroups: json['similarGroups']?['groups']?.isEmpty ?? true
+        ? null
+        : List<ClassifiedImageGroup>.from((json['similarGroups']?['groups'] ?? []).map((group) =>
+            ClassifiedImageGroup.fromList(
+              processedImages(group)
+            )
+          )),
+      peopleGroups: json['peopleImages']?.isEmpty ?? true
+        ? null
+        : processedImages(json['peopleImages']),
+      screenshotGroups: json['screenshotImages']?.isEmpty ?? true 
+        ? null 
+        : processedImages(json['screenshotImages']),
+      blurryGroups: json['blurryImages']?.isEmpty ?? true 
+        ? null 
+        : processedImages(json['blurryImages']),
+    );
+  }
+}
+
+/// 分类事件,包含进度和结果
+class ClassificationEvent {
+  /// 分类进度
+  final ClassificationProgress? progress;
+  
+  /// 分类结果
+  final ClassificationResult? result;
+  
+  ClassificationEvent({
+    required this.progress,
+    this.result,
+  });
+}

+ 49 - 0
lib/photo_classifier.dart

@@ -0,0 +1,49 @@
+import 'photo_classifier_platform_interface.dart';
+import 'models.dart';
+
+/// 照片分类插件主类
+class PhotoClassifier {
+  
+  /// 开始照片分类过程,返回一个提供实时更新的流
+  /// 
+  /// [types] 指定要执行的分类类型,可以是以下值的组合:
+  /// - 'similar': 查找相似图片组
+  /// - 'people': 查找包含人物的图片
+  /// - 'screenshot': 查找屏幕截图
+  /// - 'blurry': 查找模糊图片
+  /// 
+  /// 返回一个流,发出ClassificationEvent事件,包含进度和当前结果
+  Stream<ClassificationEvent?> startClassificationStream({
+    List<PhotoImageClassifyType> types = PhotoImageClassifyType.values,
+  }) {
+    return PhotoClassifierPlatform.instance.startClassificationStream(types: types);
+  }
+  
+  
+  /// 配置照片分类器
+  /// 
+  /// [batchSize] 每批处理的图片数量
+  /// [maxConcurrentProcessing] 最大并发处理数量
+  /// [similarityThreshold] 相似度判定阈值(0.0-1.0),值越大表示要求越相似
+  Future configureClassifier({
+    int? batchSize, 
+    int? maxConcurrentProcessing, 
+    double? similarityThreshold,
+  }) {
+    return PhotoClassifierPlatform.instance.configureClassifier(
+      batchSize: batchSize,
+      maxConcurrentProcessing: maxConcurrentProcessing,
+      similarityThreshold: similarityThreshold,
+    );
+  }
+  
+  /// 重置照片分类器
+  Future resetClassifier() {
+    return PhotoClassifierPlatform.instance.resetClassifier();
+  }
+  
+  /// 检查是否已加载完所有资源
+  Future checkAssetsLoaded() {
+    return PhotoClassifierPlatform.instance.checkAssetsLoaded();
+  }
+}

+ 133 - 0
lib/photo_classifier_method_channel.dart

@@ -0,0 +1,133 @@
+import 'package:flutter/foundation.dart';
+import 'package:flutter/services.dart';
+import 'photo_classifier_platform_interface.dart';
+import 'models.dart';
+
+class MethodChannelPhotoClassifier extends PhotoClassifierPlatform {
+  /// The method channel used to interact with the native platform.
+  @visibleForTesting
+  final methodChannel = MethodChannel(PhotoClassifierPlatform.methodChannelName);
+  
+  /// The event channel used to receive progress updates.
+  @visibleForTesting
+  final eventChannel = EventChannel(PhotoClassifierPlatform.eventChannelName);
+  
+  /// Stream of classification progress events
+  Stream<ClassificationEvent?>? _classificationStream;
+  
+  @override
+  Stream<ClassificationEvent?> startClassificationStream({
+    List<PhotoImageClassifyType> types = PhotoImageClassifyType.values,
+  }) {
+    _classificationStream = eventChannel
+      .receiveBroadcastStream()
+      .map<ClassificationEvent?>((dynamic event) {
+        if (event is Map) {
+          return _convertToClassificationEvent(event.cast<dynamic, dynamic>());
+        } else {
+          throw PlatformException(
+            code: 'CLASSIFICATION_ERROR',
+            message: 'Unknown error occurred in classification process',
+            details: event,
+          );
+        }
+      });
+
+    methodChannel.invokeMethod<bool>(
+      'startClassification',
+      {'types': types.map((e) => e.name).toList()},
+    ).catchError((error) {
+      throw PlatformException(
+        code: 'START_CLASSIFICATION_FAILED',
+        message: '启动分类失败: ${error is PlatformException ? error.message : error}',
+        details: error,
+      );
+    });
+
+    return _classificationStream!;
+  }
+  
+  @override
+  Future configureClassifier({
+    int? batchSize, 
+    int? maxConcurrentProcessing, 
+    double? similarityThreshold,
+  }) async {
+    try {
+      final args = <String, dynamic>{};
+      
+      if (batchSize != null) {
+        args['batchSize'] = batchSize;
+      }
+      
+      if (maxConcurrentProcessing != null) {
+        args['maxConcurrentProcessing'] = maxConcurrentProcessing;
+      }
+      
+      if (similarityThreshold != null) {
+        args['similarityThreshold'] = similarityThreshold;
+      }
+      
+      await methodChannel.invokeMethod<bool>('configureClassifier', args);
+    } on PlatformException catch (e) {
+      throw Exception('配置分类器失败: ${e.message}');
+    }
+  }
+  
+  @override
+  Future resetClassifier() async {
+    try {
+      // 重置流
+      _classificationStream = null;
+      
+      final result = await methodChannel.invokeMethod<bool>('resetClassifier');
+      return result ?? false;
+    } on PlatformException catch (e) {
+      throw Exception('重置分类器失败: ${e.message}');
+    }
+  }
+  
+  
+  @override
+  Future checkAssetsLoaded() async {
+    try {
+      final result = await methodChannel.invokeMethod<bool>('checkAssetsLoaded');
+      return result ?? false;
+    } on PlatformException catch (e) {
+      throw Exception('检查资源加载状态失败: ${e.message}');
+    }
+  }
+  
+  // 将原生事件转换为ClassificationEvent对象
+  ClassificationEvent? _convertToClassificationEvent(Map<dynamic, dynamic> eventData) {
+    try {
+      // 修改这里的类型转换
+      final progressData = eventData['progress'] as Map<dynamic, dynamic>?;
+      final resultData = eventData['result'] as Map<dynamic, dynamic>?;
+      
+      ClassificationProgress? progress;
+      ClassificationResult? result;
+
+      if (progressData != null) {
+        // 转换为 Map<String, dynamic>
+        final progressMap = Map<String, dynamic>.from(progressData);
+        progress = ClassificationProgress.fromJson(progressMap);
+      }
+
+      if (resultData != null) {
+        // 转换为 Map<String, dynamic>
+        final resultMap = Map<String, dynamic>.from(resultData);
+        result = ClassificationResult.fromJson(resultMap);
+      }
+
+      return ClassificationEvent(
+        progress: progress,
+        result: result,
+      );
+    } catch (e, stackTrace) {
+      print('转换分类事件失败: $e');
+      print('堆栈跟踪: $stackTrace');
+      return null;
+    }
+  }
+}

+ 49 - 0
lib/photo_classifier_platform_interface.dart

@@ -0,0 +1,49 @@
+import 'package:plugin_platform_interface/plugin_platform_interface.dart';
+import 'photo_classifier_method_channel.dart';
+import 'models.dart';
+
+abstract class PhotoClassifierPlatform extends PlatformInterface {
+  PhotoClassifierPlatform() : super(token: _token);
+
+  static final Object _token = Object();
+
+  static PhotoClassifierPlatform _instance = MethodChannelPhotoClassifier();
+  static PhotoClassifierPlatform get instance => _instance;
+  static set instance(PhotoClassifierPlatform instance) {
+    PlatformInterface.verifyToken(instance, _token);
+    _instance = instance;
+  }
+
+  static String methodChannelName = 'com.atmob.photo_classifier';
+  static String eventChannelName = 'com.atmob.photo_classifier_events';
+
+  /// 开始照片分类过程, 返回包含分类进度和结果的事件流
+  Stream<ClassificationEvent?> startClassificationStream({
+    List<PhotoImageClassifyType> types = PhotoImageClassifyType.values,
+  }) {
+    throw UnimplementedError('startClassificationStream() has not been implemented.');
+  }
+  
+  /// 配置照片分类器
+  /// 
+  /// [batchSize] 每批处理的图片数量
+  /// [maxConcurrentProcessing] 最大并发处理数量
+  /// [similarityThreshold] 相似度判定阈值(0.0-1.0),值越大表示要求越相似
+  Future configureClassifier({
+    int? batchSize, 
+    int? maxConcurrentProcessing, 
+    double? similarityThreshold,
+  }) {
+    throw UnimplementedError('configureClassifier() has not been implemented.');
+  }
+  
+  /// 重置照片分类器
+  Future resetClassifier() {
+    throw UnimplementedError('resetClassifier() has not been implemented.');
+  }
+  
+  /// 检查是否已加载完所有资源
+  Future checkAssetsLoaded() {
+    throw UnimplementedError('checkAssetsLoaded() has not been implemented.');
+  }
+}

+ 69 - 0
pubspec.yaml

@@ -0,0 +1,69 @@
+name: photo_classifier
+description: "A photo classifier plugin for Clean Pro APP, Helps to classify photos with different types, such as similar, people, screenshot, blurry, etc."
+version: 1.0.0+1
+homepage:
+
+environment:
+  sdk: ^3.7.0
+  flutter: '>=3.0.0'
+
+dependencies:
+  flutter:
+    sdk: flutter
+  plugin_platform_interface: ^2.0.2
+
+dev_dependencies:
+  flutter_test:
+    sdk: flutter
+  flutter_lints: ^5.0.0
+
+# For information on the generic Dart part of this file, see the
+# following page: https://dart.dev/tools/pub/pubspec
+
+# The following section is specific to Flutter packages.
+flutter:
+  # This section identifies this Flutter project as a plugin project.
+  # The 'pluginClass' specifies the class (in Java, Kotlin, Swift, Objective-C, etc.)
+  # which should be registered in the plugin registry. This is required for
+  # using method channels.
+  # The Android 'package' specifies package in which the registered class is.
+  # This is required for using method channels on Android.
+  # The 'ffiPlugin' specifies that native code should be built and bundled.
+  # This is required for using `dart:ffi`.
+  # All these are used by the tooling to maintain consistency when
+  # adding or updating assets for this project.
+  plugin:
+    platforms:
+      ios:
+        pluginClass: PhotoClassifierPlugin
+
+  # To add assets to your plugin package, add an assets section, like this:
+  # assets:
+  #   - images/a_dot_burr.jpeg
+  #   - images/a_dot_ham.jpeg
+  #
+  # For details regarding assets in packages, see
+  # https://flutter.dev/to/asset-from-package
+  #
+  # An image asset can refer to one or more resolution-specific "variants", see
+  # https://flutter.dev/to/resolution-aware-images
+
+  # To add custom fonts to your plugin package, add a fonts section here,
+  # in this "flutter" section. Each entry in this list should have a
+  # "family" key with the font family name, and a "fonts" key with a
+  # list giving the asset and other descriptors for the font. For
+  # example:
+  # fonts:
+  #   - family: Schyler
+  #     fonts:
+  #       - asset: fonts/Schyler-Regular.ttf
+  #       - asset: fonts/Schyler-Italic.ttf
+  #         style: italic
+  #   - family: Trajan Pro
+  #     fonts:
+  #       - asset: fonts/TrajanPro.ttf
+  #       - asset: fonts/TrajanPro_Bold.ttf
+  #         weight: 700
+  #
+  # For details regarding fonts in packages, see
+  # https://flutter.dev/to/font-from-package