diff --git a/.github/workflows/runnable.yml b/.github/workflows/runnable.yml index 3599bb7..f231b78 100644 --- a/.github/workflows/runnable.yml +++ b/.github/workflows/runnable.yml @@ -41,6 +41,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: "corretto" + java-version: "17" - uses: subosito/flutter-action@v2 with: channel: "stable" diff --git a/image_editor/example/.gitignore b/image_editor/example/.gitignore index e406315..c850886 100644 --- a/image_editor/example/.gitignore +++ b/image_editor/example/.gitignore @@ -39,4 +39,5 @@ app.*.symbols # Obfuscation related app.*.map.json + !pubspec.lock diff --git a/image_editor/example/README.md b/image_editor/example/README.md index 3148bc9..d3888a2 100644 --- a/image_editor/example/README.md +++ b/image_editor/example/README.md @@ -1,7 +1,16 @@ # flutter_image_editor_example -A demo for flutter_image_editor. +Demonstrates how to use the flutter_image_editor plugin. -Run example of open harmony in the [directory][example-for-harmony] +## Getting Started -[example-for-harmony]: ../../image_editor_ohos/example/ +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://flutter.dev/docs/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/image_editor/example/android/app/build.gradle b/image_editor/example/android/app/build.gradle index c2aeb5d..090266c 100644 --- a/image_editor/example/android/app/build.gradle +++ b/image_editor/example/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' @@ -21,12 +22,13 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - compileSdkVersion flutter.compileSdkVersion + def sdkVersion = 35 + if (project.hasProperty('compileSdk')) { + compileSdk = sdkVersion + } else { + compileSdkVersion = sdkVersion + } sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -53,6 +55,15 @@ android { signingConfig signingConfigs.debug } } + + if (project.android.hasProperty('namespace')) { + namespace 'com.fluttercandies.image_editor' + } + + kotlinOptions { + jvmTarget = '1.8' + } + } flutter { @@ -60,5 +71,4 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } diff --git a/image_editor/example/android/app/src/main/AndroidManifest.xml b/image_editor/example/android/app/src/main/AndroidManifest.xml index 6dd2e6a..05165d6 100644 --- a/image_editor/example/android/app/src/main/AndroidManifest.xml +++ b/image_editor/example/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + properties.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version '8.7.2' apply false + id "org.jetbrains.kotlin.android" version '1.8.22' apply false +} + +include ":app" \ No newline at end of file diff --git a/image_editor/example/ios/Flutter/AppFrameworkInfo.plist b/image_editor/example/ios/Flutter/AppFrameworkInfo.plist index 8c6e561..f2872cf 100644 --- a/image_editor/example/ios/Flutter/AppFrameworkInfo.plist +++ b/image_editor/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 12.0 + 9.0 diff --git a/image_editor/example/ios/Podfile b/image_editor/example/ios/Podfile index ff51308..2c068c4 100644 --- a/image_editor/example/ios/Podfile +++ b/image_editor/example/ios/Podfile @@ -27,42 +27,11 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe flutter_ios_podfile_setup -def install_plugin_pods(application_path = nil, relative_symlink_dir, platform) - # defined_in_file is set by CocoaPods and is a Pathname to the Podfile. - application_path ||= File.dirname(defined_in_file.realpath) if self.respond_to?(:defined_in_file) - raise 'Could not find application path' unless application_path - - # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock - # referring to absolute paths on developers' machines. - - symlink_dir = File.expand_path(relative_symlink_dir, application_path) - system('rm', '-rf', symlink_dir) # Avoid the complication of dependencies like FileUtils. - - symlink_plugins_dir = File.expand_path('plugins', symlink_dir) - system('mkdir', '-p', symlink_plugins_dir) - - plugins_file = File.join(application_path, '..', '.flutter-plugins-dependencies') - plugin_pods = flutter_parse_plugins_file(plugins_file, platform) - plugin_pods.each do |plugin_hash| - plugin_name = plugin_hash['name'] - plugin_path = plugin_hash['path'] - # iOS and macOS code can be shared in "darwin" directory, otherwise - # respectively in "ios" or "macos" directories. - shared_darwin_source = plugin_hash.fetch('shared_darwin_source', false) - platform_directory = shared_darwin_source ? 'darwin' : platform - if (plugin_name && plugin_path) - specPath = "#{plugin_path}/#{platform_directory}/#{plugin_name}.podspec" - pod plugin_name, :path => specPath - end - end -end - target 'Runner' do use_frameworks! use_modular_headers! - flutter_install_ios_engine_pod(File.dirname(File.realpath(__FILE__))) - install_plugin_pods(File.dirname(File.realpath(__FILE__)), '.symlinks', 'ios') + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end post_install do |installer| diff --git a/image_editor/example/ios/Runner.xcodeproj/project.pbxproj b/image_editor/example/ios/Runner.xcodeproj/project.pbxproj index 1b0849f..7c53f07 100644 --- a/image_editor/example/ios/Runner.xcodeproj/project.pbxproj +++ b/image_editor/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 54; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ @@ -146,7 +146,7 @@ 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - A26971BBAB1B41EA1D99CAF0 /* [CP] Embed Pods Frameworks */, + D1337B04A10CD6FD98489BBF /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -163,7 +163,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1510; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = "The Chromium Authors"; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -208,12 +208,10 @@ /* Begin PBXShellScriptBuildPhase section */ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -246,7 +244,6 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -259,7 +256,7 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - A26971BBAB1B41EA1D99CAF0 /* [CP] Embed Pods Frameworks */ = { + D1337B04A10CD6FD98489BBF /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -356,7 +353,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -442,7 +439,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -491,7 +488,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/image_editor/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/image_editor/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index e67b280..3db53b6 100644 --- a/image_editor/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/image_editor/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ App want to use your camera to capture photo. CADisableMinimumFrameDurationOnPhone - UIApplicationSupportsIndirectInputEvents - diff --git a/image_editor/example/lib/add_text_page.dart b/image_editor/example/lib/add_text_page.dart index 9361e35..608e3f7 100644 --- a/image_editor/example/lib/add_text_page.dart +++ b/image_editor/example/lib/add_text_page.dart @@ -103,35 +103,7 @@ class _AddTextPageState extends State { controller: _controller, ), ), - - // text align dropdown - ListTile( - title: Text('textAlign'), - subtitle: DropdownButton( - value: textAlign, - items: >[ - const DropdownMenuItem( - value: TextAlign.left, - child: Text('left'), - ), - const DropdownMenuItem( - value: TextAlign.center, - child: Text('center'), - ), - const DropdownMenuItem( - value: TextAlign.right, - child: Text('right'), - ), - ], - onChanged: (TextAlign? value) { - if (value != null) { - setState(() { - textAlign = value; - }); - } - }, - ), - ), + // Slider(value: null, onChanged: null), ], ), ), @@ -149,7 +121,6 @@ class _AddTextPageState extends State { fontSizePx: size, textColor: const Color(0xFF995555), fontName: fontName, - textAlign: textAlign, ), ); option.outputFormat = const OutputFormat.png(); diff --git a/image_editor/example/lib/advanced_page.dart b/image_editor/example/lib/advanced_page.dart index 729e857..617cc68 100644 --- a/image_editor/example/lib/advanced_page.dart +++ b/image_editor/example/lib/advanced_page.dart @@ -1,6 +1,6 @@ -import 'dart:convert'; import 'dart:io'; import 'dart:typed_data'; +import 'dart:ui'; import 'package:extended_image/extended_image.dart'; import 'package:flutter/material.dart'; @@ -35,7 +35,7 @@ class _ExtendedImageExampleState extends State { IconButton( icon: Icon(Icons.check), onPressed: () async { - await crop(); + await crop(_editorController); }, ), ], @@ -69,21 +69,22 @@ class _ExtendedImageExampleState extends State { ); } + final ImageEditorController _editorController = ImageEditorController(); + Widget buildImage() { - return ClipRect( - child: ExtendedImage( - image: provider, - height: 400, - width: 400, - extendedImageEditorKey: editorKey, - mode: ExtendedImageMode.editor, - fit: BoxFit.contain, - initEditorConfigHandler: (_) => EditorConfig( - maxScale: 8.0, - cropRectPadding: const EdgeInsets.all(20.0), - hitTestSize: 20.0, - cropAspectRatio: 2 / 1, - ), + return ExtendedImage( + image: provider, + height: 400, + width: 400, + extendedImageEditorKey: editorKey, + mode: ExtendedImageMode.editor, + fit: BoxFit.contain, + initEditorConfigHandler: (_) => EditorConfig( + maxScale: 8.0, + cropRectPadding: const EdgeInsets.all(20.0), + hitTestSize: 20.0, + cropAspectRatio: 2 / 1, + controller: _editorController, ), ); } @@ -123,45 +124,44 @@ class _ExtendedImageExampleState extends State { ); } - Future crop([bool test = false]) async { - final ExtendedImageEditorState? state = editorKey.currentState; - if (state == null) { - return; - } - final Rect? rect = state.getCropRect(); - if (rect == null) { - showToast('The crop rect is null.'); - return; - } - final EditActionDetails action = state.editAction!; - final double radian = action.rotateAngle; + Future crop(ImageEditorController imageEditorController) async { + print('native library start cropping'); - final bool flipHorizontal = action.flipY; - final bool flipVertical = action.flipX; - // final img = await getImageFromEditorKey(editorKey); - final Uint8List? img = state.rawImageData; + final EditActionDetails action = imageEditorController.editActionDetails!; - if (img == null) { - showToast('The img is null.'); - return; - } + final Uint8List img = imageEditorController.state!.rawImageData; final ImageEditorOption option = ImageEditorOption(); - option.addOption(ClipOption.fromRect(rect)); - option.addOption( - FlipOption(horizontal: flipHorizontal, vertical: flipVertical)); - if (action.hasRotateAngle) { - option.addOption(RotateOption(radian.toInt())); + if (action.hasRotateDegrees) { + final int rotateDegrees = action.rotateDegrees.toInt(); + option.addOption(RotateOption(rotateDegrees)); + } + if (action.flipY) { + option.addOption(const FlipOption(horizontal: true, vertical: false)); } - option.addOption(ColorOption.saturation(sat)); - option.addOption(ColorOption.brightness(bright)); - option.addOption(ColorOption.contrast(con)); - - option.outputFormat = const OutputFormat.png(88); + if (action.needCrop) { + Rect cropRect = imageEditorController.getCropRect()!; + if (imageEditorController.state!.widget.extendedImageState.imageProvider + is ExtendedResizeImage) { + final ImmutableBuffer buffer = await ImmutableBuffer.fromUint8List(img); + final ImageDescriptor descriptor = + await ImageDescriptor.encoded(buffer); - print(const JsonEncoder.withIndent(' ').convert(option.toJson())); + final double widthRatio = + descriptor.width / imageEditorController.state!.image!.width; + final double heightRatio = + descriptor.height / imageEditorController.state!.image!.height; + cropRect = Rect.fromLTRB( + cropRect.left * widthRatio, + cropRect.top * heightRatio, + cropRect.right * widthRatio, + cropRect.bottom * heightRatio, + ); + } + option.addOption(ClipOption.fromRect(cropRect)); + } final DateTime start = DateTime.now(); final Uint8List? result = await ImageEditor.editImage( @@ -169,17 +169,10 @@ class _ExtendedImageExampleState extends State { imageEditorOption: option, ); - print('result.length = ${result?.length}'); - - final Duration diff = DateTime.now().difference(start); - - print('image_editor time : $diff'); - showToast('handle duration: $diff', - duration: const Duration(seconds: 5), dismissOtherToast: true); - - if (result == null) return; - - showPreviewDialog(result); + print('${DateTime.now().difference(start)} :total time'); + if (result != null) { + showPreviewDialog(result); + } } void flip() { @@ -187,7 +180,9 @@ class _ExtendedImageExampleState extends State { } void rotate(bool right) { - editorKey.currentState?.rotate(right: right); + editorKey.currentState?.rotate( + degree: right ? 90 : -90, + ); } void showPreviewDialog(Uint8List image) { diff --git a/image_editor/example/lib/merge_image_page.dart b/image_editor/example/lib/merge_image_page.dart index a5e15d2..d761e38 100644 --- a/image_editor/example/lib/merge_image_page.dart +++ b/image_editor/example/lib/merge_image_page.dart @@ -94,18 +94,6 @@ class _MergeImagePageState extends State { } else { provider = MemoryImage(result); } - // provider - // ?.resolve(ImageConfiguration.empty) - // .addListener(ImageStreamListener((image, synchronousCall) { - // print(image.image); - // })); - - // final File? result = await ImageMerger.mergeToFile(option: option); - // if (result == null) { - // provider = null; - // } else { - // provider = FileImage(result); - // } setState(() {}); } } diff --git a/image_editor/example/macos/Podfile.lock b/image_editor/example/macos/Podfile.lock deleted file mode 100644 index 4a4e1fa..0000000 --- a/image_editor/example/macos/Podfile.lock +++ /dev/null @@ -1,36 +0,0 @@ -PODS: - - file_selector_macos (0.0.1): - - FlutterMacOS - - FlutterMacOS (1.0.0) - - image_editor_common (1.0.0): - - Flutter - - FlutterMacOS - - path_provider_foundation (0.0.1): - - Flutter - - FlutterMacOS - -DEPENDENCIES: - - file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`) - - FlutterMacOS (from `Flutter/ephemeral`) - - image_editor_common (from `Flutter/ephemeral/.symlinks/plugins/image_editor_common/macos`) - - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) - -EXTERNAL SOURCES: - file_selector_macos: - :path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos - FlutterMacOS: - :path: Flutter/ephemeral - image_editor_common: - :path: Flutter/ephemeral/.symlinks/plugins/image_editor_common/macos - path_provider_foundation: - :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin - -SPEC CHECKSUMS: - file_selector_macos: 54fdab7caa3ac3fc43c9fac4d7d8d231277f8cf2 - FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - image_editor_common: 1b11f59fad8909bafcdaa0f31cc9373425b58600 - path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 - -PODFILE CHECKSUM: 0d3963a09fc94f580682bd88480486da345dc3f0 - -COCOAPODS: 1.15.2 diff --git a/image_editor/example/macos/Runner.xcodeproj/project.pbxproj b/image_editor/example/macos/Runner.xcodeproj/project.pbxproj index 09f3829..e770fad 100644 --- a/image_editor/example/macos/Runner.xcodeproj/project.pbxproj +++ b/image_editor/example/macos/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 54; + objectVersion = 51; objects = { /* Begin PBXAggregateTarget section */ @@ -202,7 +202,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1510; + LastUpgradeCheck = 0930; ORGANIZATIONNAME = ""; TargetAttributes = { 33CC10EC2044A3C60003C045 = { @@ -255,7 +255,6 @@ /* Begin PBXShellScriptBuildPhase section */ 3399D490228B24CF009A79C7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -404,7 +403,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -484,7 +483,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -531,7 +530,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/image_editor/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/image_editor/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index ec9aa6b..ae8ff59 100644 --- a/image_editor/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/image_editor/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ Bool { return true diff --git a/image_editor/example/pubspec.lock b/image_editor/example/pubspec.lock index a6043d2..615849f 100644 --- a/image_editor/example/pubspec.lock +++ b/image_editor/example/pubspec.lock @@ -153,21 +153,20 @@ packages: path: ".." relative: true source: path - version: "1.5.1" + version: "1.6.0" image_editor_common: dependency: "direct overridden" description: path: "../../image_editor_common" relative: true source: path - version: "1.1.2" + version: "1.2.0" image_editor_ohos: - dependency: transitive + dependency: "direct overridden" description: - name: image_editor_ohos - sha256: "06756859586d5acefec6e3b4f356f9b1ce05ef09213bcb9a0ce1680ecea2d054" - url: "https://pub.flutter-io.cn" - source: hosted + path: "../../image_editor_ohos" + relative: true + source: path version: "0.0.9" image_editor_platform_interface: dependency: "direct overridden" @@ -180,10 +179,10 @@ packages: dependency: "direct main" description: name: image_picker - sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + sha256: b6951e25b795d053a6ba03af5f710069c99349de9341af95155d52665cb4607c url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.2" + version: "0.8.9" image_picker_android: dependency: transitive description: @@ -196,10 +195,10 @@ packages: dependency: transitive description: name: image_picker_for_web - sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" + sha256: "869fe8a64771b7afbc99fc433a5f7be2fea4d1cb3d7c11a48b6b579eb9c797f0" url: "https://pub.flutter-io.cn" source: hosted - version: "3.0.6" + version: "2.2.0" image_picker_ios: dependency: transitive description: @@ -252,10 +251,10 @@ packages: dependency: transitive description: name: js - sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.flutter-io.cn" source: hosted - version: "0.7.1" + version: "0.6.7" material_color_utilities: dependency: transitive description: @@ -276,10 +275,10 @@ packages: dependency: transitive description: name: mime - sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.0" + version: "1.0.6" oktoast: dependency: "direct main" description: diff --git a/image_editor/example/pubspec.yaml b/image_editor/example/pubspec.yaml index 66a1f09..7f91465 100644 --- a/image_editor/example/pubspec.yaml +++ b/image_editor/example/pubspec.yaml @@ -14,16 +14,11 @@ dependencies: image_editor: path: .. - extended_image: any - image_picker: ^1.0.7 + extended_image: ^9.0.7 + image_picker: ^0.8.5+3 oktoast: ^3.1.5 - path_provider: ^2.0.15 + path_provider: ^2.0.0 image_size_getter: ^2.1.2 -dependency_overrides: - image_editor_platform_interface: - path: ../../image_editor_platform_interface - image_editor_common: - path: ../../image_editor_common flutter: uses-material-design: true diff --git a/image_editor/example/pubspec_overrides.yaml b/image_editor/example/pubspec_overrides.yaml new file mode 100644 index 0000000..b215c0e --- /dev/null +++ b/image_editor/example/pubspec_overrides.yaml @@ -0,0 +1,10 @@ +# melos_managed_dependency_overrides: image_editor,image_editor_common,image_editor_ohos,image_editor_platform_interface +dependency_overrides: + image_editor: + path: .. + image_editor_common: + path: ../../image_editor_common + image_editor_ohos: + path: ../../image_editor_ohos + image_editor_platform_interface: + path: ../../image_editor_platform_interface diff --git a/image_editor_common/CHANGELOG.md b/image_editor_common/CHANGELOG.md index 21838e1..efa1339 100644 --- a/image_editor_common/CHANGELOG.md +++ b/image_editor_common/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.2.0 + + - **FIX**: error for new sdk. + - **FEAT**: upgrade android sdk to 35. + ## 1.1.2 - **FIX**: add android.compileOptions.compatibility, upgrade kotlin version. diff --git a/image_editor_common/example/.gitignore b/image_editor_common/example/.gitignore deleted file mode 100644 index c850886..0000000 --- a/image_editor_common/example/.gitignore +++ /dev/null @@ -1,43 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -!pubspec.lock diff --git a/image_editor_common/example/.metadata b/image_editor_common/example/.metadata deleted file mode 100644 index 1d5f445..0000000 --- a/image_editor_common/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: cdc2d9901d1fb42c7f506b9413d12aec1b1abee8 - channel: master - -project_type: app diff --git a/image_editor_common/example/README.md b/image_editor_common/example/README.md deleted file mode 100644 index d3888a2..0000000 --- a/image_editor_common/example/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# flutter_image_editor_example - -Demonstrates how to use the flutter_image_editor 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://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/image_editor_common/example/analysis_options.yaml b/image_editor_common/example/analysis_options.yaml deleted file mode 100644 index ac9a83e..0000000 --- a/image_editor_common/example/analysis_options.yaml +++ /dev/null @@ -1,207 +0,0 @@ -# # Specify analysis options. -# # -# # Until there are meta linter rules, each desired lint must be explicitly enabled. -# # See: https://github.com/dart-lang/linter/issues/288 -# # -# # For a list of lints, see: http://dart-lang.github.io/linter/lints/ -# # See the configuration guide for more -# # https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer -# # -# # There are other similar analysis options files in the flutter repos, -# # which should be kept in sync with this file: -# # -# # - analysis_options.yaml (this file) -# # - packages/flutter/lib/analysis_options_user.yaml -# # - https://github.com/flutter/plugins/blob/master/analysis_options.yaml -# # - https://github.com/flutter/engine/blob/master/analysis_options.yaml -# # -# # This file contains the analysis options used by Flutter tools, such as IntelliJ, -# # Android Studio, and the `flutter analyze` command. - -# analyzer: -# strong-mode: -# implicit-casts: false -# implicit-dynamic: false -# errors: -# # treat missing required parameters as a warning (not a hint) -# missing_required_param: warning -# # treat missing returns as a warning (not a hint) -# missing_return: warning -# # allow having TODOs in the code -# todo: ignore -# # Ignore analyzer hints for updating pubspecs when using Future or -# # Stream and not importing dart:async -# # Please see https://github.com/flutter/flutter/pull/24528 for details. -# sdk_version_async_exported_from_core: ignore -# # exclude: -# # - "bin/cache/**" -# # # the following two are relative to the stocks example and the flutter package respectively -# # # see https://github.com/dart-lang/sdk/issues/28463 -# # - "lib/i18n/messages_*.dart" -# # - "lib/src/http/**" - -# linter: -# rules: -# # these rules are documented on and in the same order as -# # the Dart Lint rules page to make maintenance easier -# # https://github.com/dart-lang/linter/blob/master/example/all.yaml -# - always_declare_return_types -# - always_put_control_body_on_new_line -# # - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219 -# - always_require_non_null_named_parameters -# - always_specify_types -# - annotate_overrides -# # - avoid_annotating_with_dynamic # conflicts with always_specify_types -# # - avoid_as # required for implicit-casts: true -# - avoid_bool_literals_in_conditional_expressions -# # - avoid_catches_without_on_clauses # we do this commonly -# # - avoid_catching_errors # we do this commonly -# - avoid_classes_with_only_static_members -# # - avoid_double_and_int_checks # only useful when targeting JS runtime -# - avoid_empty_else -# # - avoid_equals_and_hash_code_on_mutable_classes # not yet tested -# - avoid_field_initializers_in_const_classes -# - avoid_function_literals_in_foreach_calls -# # - avoid_implementing_value_types # not yet tested -# - avoid_init_to_null -# # - avoid_js_rounded_ints # only useful when targeting JS runtime -# - avoid_null_checks_in_equality_operators -# # - avoid_positional_boolean_parameters # not yet tested -# # - avoid_print # not yet tested -# # - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356) -# # - avoid_redundant_argument_values # not yet tested -# - avoid_relative_lib_imports -# - avoid_renaming_method_parameters -# - avoid_return_types_on_setters -# # - avoid_returning_null # there are plenty of valid reasons to return null -# # - avoid_returning_null_for_future # not yet tested -# - avoid_returning_null_for_void -# # - avoid_returning_this # there are plenty of valid reasons to return this -# # - avoid_setters_without_getters # not yet tested -# # - avoid_shadowing_type_parameters # not yet tested -# - avoid_single_cascade_in_expression_statements -# - avoid_slow_async_io -# - avoid_types_as_parameter_names -# # - avoid_types_on_closure_parameters # conflicts with always_specify_types -# # - avoid_unnecessary_containers # not yet tested -# - avoid_unused_constructor_parameters -# - avoid_void_async -# # - avoid_web_libraries_in_flutter # not yet tested -# - await_only_futures -# - camel_case_extensions -# - camel_case_types -# - cancel_subscriptions -# # - cascade_invocations # not yet tested -# # - close_sinks # not reliable enough -# # - comment_references # blocked on https://github.com/flutter/flutter/issues/20765 -# # - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204 -# - control_flow_in_finally -# # - curly_braces_in_flow_control_structures # not yet tested -# # - diagnostic_describe_all_properties # not yet tested -# - directives_ordering -# - empty_catches -# - empty_constructor_bodies -# - empty_statements -# # - file_names # not yet tested -# - flutter_style_todos -# - hash_and_equals -# - implementation_imports -# # - invariant_booleans # too many false positives: https://github.com/dart-lang/linter/issues/811 -# - iterable_contains_unrelated_type -# # - join_return_with_assignment # not yet tested -# - library_names -# - library_prefixes -# # - lines_longer_than_80_chars # not yet tested -# - list_remove_unrelated_type -# # - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181 -# # - missing_whitespace_between_adjacent_strings # not yet tested -# - no_adjacent_strings_in_list -# - no_duplicate_case_values -# # - no_logic_in_create_state # not yet tested -# # - no_runtimeType_toString # not yet tested -# - non_constant_identifier_names -# # - null_closures # not yet tested -# # - omit_local_variable_types # opposite of always_specify_types -# # - one_member_abstracts # too many false positives -# # - only_throw_errors # https://github.com/flutter/flutter/issues/5792 -# - overridden_fields -# - package_api_docs -# - package_names -# - package_prefixed_library_names -# # - parameter_assignments # we do this commonly -# - prefer_adjacent_string_concatenation -# - prefer_asserts_in_initializer_lists -# # - prefer_asserts_with_message # not yet tested -# - prefer_collection_literals -# - prefer_conditional_assignment -# - prefer_const_constructors -# - prefer_const_constructors_in_immutables -# - prefer_const_declarations -# - prefer_const_literals_to_create_immutables -# # - prefer_constructors_over_static_methods # not yet tested -# - prefer_contains -# # - prefer_double_quotes # opposite of prefer_single_quotes -# - prefer_equal_for_default_values -# # - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods -# - prefer_final_fields -# - prefer_final_in_for_each -# - prefer_final_locals -# - prefer_for_elements_to_map_fromIterable -# - prefer_foreach -# # - prefer_function_declarations_over_variables # not yet tested -# - prefer_generic_function_type_aliases -# - prefer_if_elements_to_conditional_expressions -# - prefer_if_null_operators -# - prefer_initializing_formals -# - prefer_inlined_adds -# # - prefer_int_literals # not yet tested -# # - prefer_interpolation_to_compose_strings # not yet tested -# - prefer_is_empty -# - prefer_is_not_empty -# - prefer_is_not_operator -# - prefer_iterable_whereType -# # - prefer_mixin # https://github.com/dart-lang/language/issues/32 -# # - prefer_null_aware_operators # disable until NNBD, see https://github.com/flutter/flutter/pull/32711#issuecomment-492930932 -# # - prefer_relative_imports # not yet tested -# - prefer_single_quotes -# - prefer_spread_collections -# - prefer_typing_uninitialized_variables -# - prefer_void_to_null -# # - provide_deprecation_message # not yet tested -# # - public_member_api_docs # enabled on a case-by-case basis; see e.g. packages/analysis_options.yaml -# - recursive_getters -# - slash_for_doc_comments -# # - sort_child_properties_last # not yet tested -# - sort_constructors_first -# - sort_pub_dependencies -# - sort_unnamed_constructors_first -# - test_types_in_equals -# - throw_in_finally -# # - type_annotate_public_apis # subset of always_specify_types -# - type_init_formals -# # - unawaited_futures # too many false positives -# # - unnecessary_await_in_return # not yet tested -# - unnecessary_brace_in_string_interps -# - unnecessary_const -# # - unnecessary_final # conflicts with prefer_final_locals -# - unnecessary_getters_setters -# # - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498 -# - unnecessary_new -# - unnecessary_null_aware_assignments -# - unnecessary_null_in_if_null_operators -# - unnecessary_overrides -# - unnecessary_parenthesis -# - unnecessary_statements -# - unnecessary_string_interpolations -# - unnecessary_this -# - unrelated_type_equality_checks -# # - unsafe_html # not yet tested -# - use_full_hex_values_for_flutter_colors -# # - use_function_type_syntax_for_parameters # not yet tested -# # - use_key_in_widget_constructors # not yet tested -# - use_rethrow_when_possible -# # - use_setters_to_change_properties # not yet tested -# # - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182 -# # - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review -# - valid_regexps -# - void_checks diff --git a/image_editor_common/example/android/.gitignore b/image_editor_common/example/android/.gitignore deleted file mode 100644 index bc2100d..0000000 --- a/image_editor_common/example/android/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java diff --git a/image_editor_common/example/android/app/build.gradle b/image_editor_common/example/android/app/build.gradle deleted file mode 100644 index f3b5f0c..0000000 --- a/image_editor_common/example/android/app/build.gradle +++ /dev/null @@ -1,69 +0,0 @@ -plugins { - id "com.android.application" - id "kotlin-android" - id "dev.flutter.flutter-gradle-plugin" -} - -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -android { - def sdkVersion = 35 - if (project.hasProperty('compileSdk')) { - compileSdk = sdkVersion - } else { - compileSdkVersion = sdkVersion - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - lintOptions { - disable 'InvalidPackage' - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "top.kikt.flutter_image_editor_example" - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } - - if (project.android.hasProperty('namespace')) { - namespace 'com.fluttercandies.image_editor' - } -} - -flutter { - source '../..' -} - -dependencies { -} diff --git a/image_editor_common/example/android/app/src/main/AndroidManifest.xml b/image_editor_common/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 6dd2e6a..0000000 --- a/image_editor_common/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - diff --git a/image_editor_common/example/android/app/src/main/kotlin/com/fluttercandies/flutter_image_editor_example/MainActivity.kt b/image_editor_common/example/android/app/src/main/kotlin/com/fluttercandies/flutter_image_editor_example/MainActivity.kt deleted file mode 100644 index 17baa3d..0000000 --- a/image_editor_common/example/android/app/src/main/kotlin/com/fluttercandies/flutter_image_editor_example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.fluttercandies.flutter_image_editor_example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity : FlutterActivity() { -} diff --git a/image_editor_common/example/android/app/src/main/res/drawable/launch_background.xml b/image_editor_common/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f..0000000 --- a/image_editor_common/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/image_editor_common/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/image_editor_common/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4..0000000 Binary files a/image_editor_common/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/image_editor_common/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/image_editor_common/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b7..0000000 Binary files a/image_editor_common/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/image_editor_common/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/image_editor_common/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d4391..0000000 Binary files a/image_editor_common/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/image_editor_common/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/image_editor_common/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d..0000000 Binary files a/image_editor_common/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/image_editor_common/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/image_editor_common/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372e..0000000 Binary files a/image_editor_common/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/image_editor_common/example/android/app/src/main/res/values/styles.xml b/image_editor_common/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 00fa441..0000000 --- a/image_editor_common/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/image_editor_common/example/android/build.gradle b/image_editor_common/example/android/build.gradle deleted file mode 100644 index bc157bd..0000000 --- a/image_editor_common/example/android/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/image_editor_common/example/android/gradle.properties b/image_editor_common/example/android/gradle.properties deleted file mode 100644 index 94adc3a..0000000 --- a/image_editor_common/example/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/image_editor_common/example/android/gradle/wrapper/gradle-wrapper.properties b/image_editor_common/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 9162f10..0000000 --- a/image_editor_common/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip diff --git a/image_editor_common/example/android/settings.gradle b/image_editor_common/example/android/settings.gradle deleted file mode 100644 index 5a1a3ab..0000000 --- a/image_editor_common/example/android/settings.gradle +++ /dev/null @@ -1,25 +0,0 @@ -pluginManagement { - def flutterSdkPath = { - def properties = new Properties() - file("local.properties").withInputStream { properties.load(it) } - def flutterSdkPath = properties.getProperty("flutter.sdk") - assert flutterSdkPath != null, "flutter.sdk not set in local.properties" - return flutterSdkPath - }() - - includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") - - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} - -plugins { - id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version '8.7.2' apply false - id "org.jetbrains.kotlin.android" version '1.8.22' apply false -} - -include ":app" \ No newline at end of file diff --git a/image_editor_common/example/assets/dst.png b/image_editor_common/example/assets/dst.png deleted file mode 100644 index c9eac4e..0000000 Binary files a/image_editor_common/example/assets/dst.png and /dev/null differ diff --git a/image_editor_common/example/assets/have-exif-3.jpg b/image_editor_common/example/assets/have-exif-3.jpg deleted file mode 100644 index e4c982a..0000000 Binary files a/image_editor_common/example/assets/have-exif-3.jpg and /dev/null differ diff --git a/image_editor_common/example/assets/icon.png b/image_editor_common/example/assets/icon.png deleted file mode 100644 index 01d320c..0000000 Binary files a/image_editor_common/example/assets/icon.png and /dev/null differ diff --git a/image_editor_common/example/assets/src.png b/image_editor_common/example/assets/src.png deleted file mode 100644 index e5f393e..0000000 Binary files a/image_editor_common/example/assets/src.png and /dev/null differ diff --git a/image_editor_common/example/ios/.gitignore b/image_editor_common/example/ios/.gitignore deleted file mode 100644 index 0ec0969..0000000 --- a/image_editor_common/example/ios/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -*.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/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 -Podfile.lock diff --git a/image_editor_common/example/ios/Flutter/AppFrameworkInfo.plist b/image_editor_common/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index f2872cf..0000000 --- a/image_editor_common/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 9.0 - - diff --git a/image_editor_common/example/ios/Flutter/Debug.xcconfig b/image_editor_common/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index e8efba1..0000000 --- a/image_editor_common/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/image_editor_common/example/ios/Flutter/Release.xcconfig b/image_editor_common/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 399e934..0000000 --- a/image_editor_common/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/image_editor_common/example/ios/Podfile b/image_editor_common/example/ios/Podfile deleted file mode 100644 index ff51308..0000000 --- a/image_editor_common/example/ios/Podfile +++ /dev/null @@ -1,72 +0,0 @@ -# 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 - -def install_plugin_pods(application_path = nil, relative_symlink_dir, platform) - # defined_in_file is set by CocoaPods and is a Pathname to the Podfile. - application_path ||= File.dirname(defined_in_file.realpath) if self.respond_to?(:defined_in_file) - raise 'Could not find application path' unless application_path - - # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock - # referring to absolute paths on developers' machines. - - symlink_dir = File.expand_path(relative_symlink_dir, application_path) - system('rm', '-rf', symlink_dir) # Avoid the complication of dependencies like FileUtils. - - symlink_plugins_dir = File.expand_path('plugins', symlink_dir) - system('mkdir', '-p', symlink_plugins_dir) - - plugins_file = File.join(application_path, '..', '.flutter-plugins-dependencies') - plugin_pods = flutter_parse_plugins_file(plugins_file, platform) - plugin_pods.each do |plugin_hash| - plugin_name = plugin_hash['name'] - plugin_path = plugin_hash['path'] - # iOS and macOS code can be shared in "darwin" directory, otherwise - # respectively in "ios" or "macos" directories. - shared_darwin_source = plugin_hash.fetch('shared_darwin_source', false) - platform_directory = shared_darwin_source ? 'darwin' : platform - if (plugin_name && plugin_path) - specPath = "#{plugin_path}/#{platform_directory}/#{plugin_name}.podspec" - pod plugin_name, :path => specPath - end - end -end - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_ios_engine_pod(File.dirname(File.realpath(__FILE__))) - install_plugin_pods(File.dirname(File.realpath(__FILE__)), '.symlinks', 'ios') -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - end -end diff --git a/image_editor_common/example/ios/Runner.xcodeproj/project.pbxproj b/image_editor_common/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 7c53f07..0000000 --- a/image_editor_common/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,588 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 13262A89481FC58192DA733D /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FE9BBE90C8E12C0998E254C /* Pods_Runner.framework */; }; - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 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 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 = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 2FE9BBE90C8E12C0998E254C /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 3629F2D06FB8B55F9CDB2BB6 /* 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 = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 682AA4769DECC1D1454DD721 /* 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 = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 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 = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - EFA3451DEAE326D2ECDC008D /* 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 = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 13262A89481FC58192DA733D /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 7A8958EA492D45910AEF1399 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 2FE9BBE90C8E12C0998E254C /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - F4E7305707FA493FC6BD34A3 /* Pods */, - 7A8958EA492D45910AEF1399 /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - ); - name = "Supporting Files"; - sourceTree = ""; - }; - F4E7305707FA493FC6BD34A3 /* Pods */ = { - isa = PBXGroup; - children = ( - 3629F2D06FB8B55F9CDB2BB6 /* Pods-Runner.debug.xcconfig */, - EFA3451DEAE326D2ECDC008D /* Pods-Runner.release.xcconfig */, - 682AA4769DECC1D1454DD721 /* Pods-Runner.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 68A14D91CD344CD230B4629F /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - D1337B04A10CD6FD98489BBF /* [CP] Embed Pods Frameworks */, - ); - 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 = { - LastUpgradeCheck = 1300; - ORGANIZATIONNAME = "The Chromium Authors"; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - DevelopmentTeam = 64MAFNBS88; - LastSwiftMigration = 0910; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 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 */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 68A14D91CD344CD230B4629F /* [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; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - 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"; - }; - D1337B04A10CD6FD98489BBF /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/image_editor_common/image_editor_common.framework", - "${BUILT_PRODUCTS_DIR}/image_picker_ios/image_picker_ios.framework", - "${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_editor_common.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker_ios.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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; - 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 = 9.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 = 64MAFNBS88; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = top.kikt.flutterImageEditorExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 4.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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; - 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 = 9.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; - 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; - 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 = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - 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 = 64MAFNBS88; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = top.kikt.flutterImageEditorExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.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 = 64MAFNBS88; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = top.kikt.flutterImageEditorExample; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 4.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 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 */; -} diff --git a/image_editor_common/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/image_editor_common/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a..0000000 --- a/image_editor_common/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/image_editor_common/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/image_editor_common/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 3db53b6..0000000 --- a/image_editor_common/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/image_editor_common/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/image_editor_common/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc1..0000000 --- a/image_editor_common/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/image_editor_common/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/image_editor_common/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/image_editor_common/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/image_editor_common/example/ios/Runner/AppDelegate.swift b/image_editor_common/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4..0000000 --- a/image_editor_common/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@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) - } -} diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fa..0000000 --- a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "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" - } -} diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada4..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf0..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd9..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde121..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc230..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd9..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b86..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b86..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d16..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f58..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/image_editor_common/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2..0000000 --- a/image_editor_common/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "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" - } -} diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/image_editor_common/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19ea..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19ea..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/image_editor_common/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19ea..0000000 Binary files a/image_editor_common/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/image_editor_common/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/image_editor_common/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725..0000000 --- a/image_editor_common/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# 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. \ No newline at end of file diff --git a/image_editor_common/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/image_editor_common/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c..0000000 --- a/image_editor_common/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/image_editor_common/example/ios/Runner/Base.lproj/Main.storyboard b/image_editor_common/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c2851..0000000 --- a/image_editor_common/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/image_editor_common/example/ios/Runner/Info.plist b/image_editor_common/example/ios/Runner/Info.plist deleted file mode 100644 index 2597f68..0000000 --- a/image_editor_common/example/ios/Runner/Info.plist +++ /dev/null @@ -1,51 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - flutter_image_editor_example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - NSPhotoLibraryUsageDescription - App want to pick your image from Photos. - NSCameraUsageDescription - App want to use your camera to capture photo. - CADisableMinimumFrameDurationOnPhone - - - diff --git a/image_editor_common/example/ios/Runner/Runner-Bridging-Header.h b/image_editor_common/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 7335fdf..0000000 --- a/image_editor_common/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" \ No newline at end of file diff --git a/image_editor_common/example/lib/add_text_page.dart b/image_editor_common/example/lib/add_text_page.dart deleted file mode 100644 index 608e3f7..0000000 --- a/image_editor_common/example/lib/add_text_page.dart +++ /dev/null @@ -1,148 +0,0 @@ -import 'dart:io'; -// ignore: unnecessary_import -import 'dart:typed_data'; - -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:image_editor/image_editor.dart'; -import 'package:oktoast/oktoast.dart'; -import 'package:path_provider/path_provider.dart' as pp; -import 'package:http/http.dart' as http; - -import 'const/resource.dart'; - -class AddTextPage extends StatefulWidget { - @override - _AddTextPageState createState() => _AddTextPageState(); -} - -class _AddTextPageState extends State { - ImageProvider? target; - - String get asset => R.ASSETS_ICON_PNG; - - final TextEditingController _controller = - TextEditingController(text: '输入文字, 添加足够长的字数, 以测试换行的效果是怎么样的.'); - - String fontName = ''; - - TextAlign textAlign = TextAlign.left; - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('add text'), - ), - body: SingleChildScrollView( - child: Column( - children: [ - AspectRatio( - aspectRatio: 2 / 1, - child: Row( - children: [ - AspectRatio( - aspectRatio: 1, - child: Image.asset( - asset, - ), - ), - AspectRatio( - aspectRatio: 1, - child: target != null - ? Image( - image: target!, - ) - : Container(), - ), - ], - ), - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: ElevatedButton( - onPressed: () async { - await addText(fontName); - }, - child: const Text('add text'), - ), - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: ElevatedButton( - onPressed: () async { - await addText(''); - }, - child: const Text('add use defaultFont'), - ), - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: ElevatedButton( - child: Text('download and register font'), - onPressed: () async { - final aliFontUrl = - 'https://cdn.jsdelivr.net/gh/kikt-blog/ali_font@master/Alibaba-PuHuiTi-Medium.ttf'; - - final body = await http.get(Uri.parse(aliFontUrl)); - - final tmpDir = await pp.getTemporaryDirectory(); - final f = File( - '${tmpDir.absolute.path}/${DateTime.now().millisecondsSinceEpoch}.ttf'); - f.writeAsBytesSync(body.bodyBytes); - - fontName = await FontManager.registerFont(f); - - showToast('register $fontName success'); - }, - ), - ), - Padding( - padding: const EdgeInsets.all(16), - child: TextField( - controller: _controller, - ), - ), - // Slider(value: null, onChanged: null), - ], - ), - ), - ); - } - - Future addText(String fontName) async { - const int size = 120; - final ImageEditorOption option = ImageEditorOption(); - final AddTextOption textOption = AddTextOption(); - textOption.addText( - EditorText( - offset: const Offset(0, 0), - text: _controller.text, - fontSizePx: size, - textColor: const Color(0xFF995555), - fontName: fontName, - ), - ); - option.outputFormat = const OutputFormat.png(); - - option.addOption(textOption); - - final Uint8List u = await getAssetImage(); - final Uint8List? result = await ImageEditor.editImage( - image: u, - imageEditorOption: option, - ); - print(option.toString()); - - if (result == null) { - return; - } - target = MemoryImage(result); - setState(() {}); - } - - Future getAssetImage() async { - final ByteData byteData = await rootBundle.load(asset); - return byteData.buffer.asUint8List(); - } -} diff --git a/image_editor_common/example/lib/advanced_page.dart b/image_editor_common/example/lib/advanced_page.dart deleted file mode 100644 index 5f3a08f..0000000 --- a/image_editor_common/example/lib/advanced_page.dart +++ /dev/null @@ -1,269 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; -import 'dart:typed_data'; - -import 'package:extended_image/extended_image.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_image_editor_example/const/resource.dart'; -import 'package:image_editor/image_editor.dart' hide ImageSource; -import 'package:image_picker/image_picker.dart'; -import 'package:oktoast/oktoast.dart'; - -class ExtendedImageExample extends StatefulWidget { - @override - _ExtendedImageExampleState createState() => _ExtendedImageExampleState(); -} - -class _ExtendedImageExampleState extends State { - final GlobalKey editorKey = GlobalKey(); - - ImageProvider provider = ExtendedExactAssetImageProvider( - R.ASSETS_HAVE_EXIF_3_JPG, - cacheRawData: true, - ); - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Use extended_image library'), - actions: [ - IconButton( - icon: Icon(Icons.photo), - onPressed: _pick, - ), - IconButton( - icon: Icon(Icons.check), - onPressed: () async { - await crop(); - }, - ), - ], - ), - body: Container( - height: double.infinity, - child: Column( - children: [ - AspectRatio( - aspectRatio: 1, - child: buildImage(), - ), - Expanded( - child: SliderTheme( - data: const SliderThemeData( - showValueIndicator: ShowValueIndicator.always, - ), - child: Column( - children: [ - _buildSat(), - _buildBrightness(), - _buildCon(), - ], - ), - ), - ), - ], - ), - ), - bottomNavigationBar: _buildFunctions(), - ); - } - - Widget buildImage() { - return ExtendedImage( - image: provider, - height: 400, - width: 400, - extendedImageEditorKey: editorKey, - mode: ExtendedImageMode.editor, - fit: BoxFit.contain, - initEditorConfigHandler: (_) => EditorConfig( - maxScale: 8.0, - cropRectPadding: const EdgeInsets.all(20.0), - hitTestSize: 20.0, - cropAspectRatio: 2 / 1, - ), - ); - } - - Widget _buildFunctions() { - return BottomNavigationBar( - items: [ - BottomNavigationBarItem( - icon: Icon(Icons.flip), - label: 'Flip', - ), - BottomNavigationBarItem( - icon: Icon(Icons.rotate_left), - label: 'Rotate left', - ), - BottomNavigationBarItem( - icon: Icon(Icons.rotate_right), - label: 'Rotate right', - ), - ], - onTap: (int index) { - switch (index) { - case 0: - flip(); - break; - case 1: - rotate(false); - break; - case 2: - rotate(true); - break; - } - }, - currentIndex: 0, - selectedItemColor: Theme.of(context).primaryColor, - unselectedItemColor: Theme.of(context).primaryColor, - ); - } - - Future crop([bool test = false]) async { - final ExtendedImageEditorState? state = editorKey.currentState; - if (state == null) { - return; - } - final Rect? rect = state.getCropRect(); - if (rect == null) { - showToast('The crop rect is null.'); - return; - } - final EditActionDetails action = state.editAction!; - final double radian = action.rotateAngle; - - final bool flipHorizontal = action.flipY; - final bool flipVertical = action.flipX; - // final img = await getImageFromEditorKey(editorKey); - final Uint8List? img = state.rawImageData; - - if (img == null) { - showToast('The img is null.'); - return; - } - - final ImageEditorOption option = ImageEditorOption(); - - option.addOption(ClipOption.fromRect(rect)); - option.addOption( - FlipOption(horizontal: flipHorizontal, vertical: flipVertical)); - if (action.hasRotateAngle) { - option.addOption(RotateOption(radian.toInt())); - } - - option.addOption(ColorOption.saturation(sat)); - option.addOption(ColorOption.brightness(bright)); - option.addOption(ColorOption.contrast(con)); - - option.outputFormat = const OutputFormat.png(88); - - print(const JsonEncoder.withIndent(' ').convert(option.toJson())); - - final DateTime start = DateTime.now(); - final Uint8List? result = await ImageEditor.editImage( - image: img, - imageEditorOption: option, - ); - - print('result.length = ${result?.length}'); - - final Duration diff = DateTime.now().difference(start); - - print('image_editor time : $diff'); - showToast('handle duration: $diff', - duration: const Duration(seconds: 5), dismissOtherToast: true); - - if (result == null) return; - - showPreviewDialog(result); - } - - void flip() { - editorKey.currentState?.flip(); - } - - void rotate(bool right) { - editorKey.currentState?.rotate(right: right); - } - - void showPreviewDialog(Uint8List image) { - showDialog( - context: context, - builder: (BuildContext ctx) => GestureDetector( - onTap: () => Navigator.pop(context), - child: Container( - color: Colors.grey.withOpacity(0.5), - child: Center( - child: SizedBox.fromSize( - size: const Size.square(200), - child: Container( - child: Image.memory(image), - ), - ), - ), - ), - ), - ); - } - - Future _pick() async { - final XFile? result = await ImagePicker().pickImage( - source: ImageSource.camera, - ); - if (result == null) { - showToast('The pick file is null'); - return; - } - print(result.path); - provider = ExtendedFileImageProvider(File(result.path), cacheRawData: true); - setState(() {}); - } - - double sat = 1; - double bright = 1; - double con = 1; - - Widget _buildSat() { - return Slider( - label: 'sat : ${sat.toStringAsFixed(2)}', - onChanged: (double value) { - setState(() { - sat = value; - }); - }, - value: sat, - min: 0, - max: 2, - ); - } - - Widget _buildBrightness() { - return Slider( - label: 'brightness : ${bright.toStringAsFixed(2)}', - onChanged: (double value) { - setState(() { - bright = value; - }); - }, - value: bright, - min: 0, - max: 2, - ); - } - - Widget _buildCon() { - return Slider( - label: 'con : ${con.toStringAsFixed(2)}', - onChanged: (double value) { - setState(() { - con = value; - }); - }, - value: con, - min: 0, - max: 4, - ); - } -} diff --git a/image_editor_common/example/lib/const/resource.dart b/image_editor_common/example/lib/const/resource.dart deleted file mode 100644 index 160e2be..0000000 --- a/image_editor_common/example/lib/const/resource.dart +++ /dev/null @@ -1,16 +0,0 @@ -/// Generate by [resource_generator](https://github.com/CaiJingLong/flutter_resource_generator) library. -/// PLEASE DO NOT EDIT MANUALLY. -class R { - - /// ![preview](file:///Volumes/Samsung-T5/code/flutter/plugins/flutter_image_editor/example/./assets/dst.png) - static const String ASSETS_DST_PNG = 'assets/dst.png'; - - /// ![preview](file:///Volumes/Samsung-T5/code/flutter/plugins/flutter_image_editor/example/./assets/have-exif-3.jpg) - static const String ASSETS_HAVE_EXIF_3_JPG = 'assets/have-exif-3.jpg'; - - /// ![preview](file:///Volumes/Samsung-T5/code/flutter/plugins/flutter_image_editor/example/./assets/icon.png) - static const String ASSETS_ICON_PNG = 'assets/icon.png'; - - /// ![preview](file:///Volumes/Samsung-T5/code/flutter/plugins/flutter_image_editor/example/./assets/src.png) - static const String ASSETS_SRC_PNG = 'assets/src.png'; -} diff --git a/image_editor_common/example/lib/draw_example_page.dart b/image_editor_common/example/lib/draw_example_page.dart deleted file mode 100644 index cb9ba63..0000000 --- a/image_editor_common/example/lib/draw_example_page.dart +++ /dev/null @@ -1,203 +0,0 @@ -import 'dart:math'; -import 'dart:typed_data'; - -import 'package:flutter/material.dart'; -import 'package:flutter_image_editor_example/utils/time_utils.dart'; -import 'package:image_editor/image_editor.dart'; - -import 'const/resource.dart'; -import 'main.dart'; - -class DrawExamplePage extends StatefulWidget { - @override - _DrawExamplePageState createState() => _DrawExamplePageState(); -} - -class _DrawExamplePageState extends State { - Uint8List? bytes; - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('draw example'), - ), - body: Column( - children: [ - AspectRatio( - aspectRatio: 2 / 1, - child: Row( - children: [ - Image.asset( - R.ASSETS_ICON_PNG, - ), - bytes == null ? Container() : Image.memory(bytes!), - ], - ), - ), - ...[addLine(), addRect(), addOval(), addPoints(), buildDrawPath()] - .map( - (e) => Container( - width: 200, - height: 48, - margin: const EdgeInsets.all(8), - child: e, - ), - ), - ], - ), - ); - } - - Offset randomOffset() { - final x = Random().nextInt(1919) + 1; - final y = Random().nextInt(1919) + 1; - return Offset(x.toDouble(), y.toDouble()); - } - - Color randomColor() { - final rand = Random(); - final r = rand.nextInt(255); - final g = rand.nextInt(255); - final b = rand.nextInt(255); - final a = rand.nextInt(100) + 155; - return Color.fromARGB(a, r, g, b); - } - - PaintingStyle randomPaintStyle() { - return PaintingStyle.values[Random().nextInt(10) % 2]; - } - - Widget addRect() { - return ElevatedButton( - onPressed: () async { - addDrawPart( - RectDrawPart( - paint: DrawPaint( - lineWeight: 5, - paintingStyle: PaintingStyle.fill, - color: randomColor(), - ), - rect: Rect.fromPoints(randomOffset(), randomOffset()), - ), - ); - }, - child: Text('add rect'), - ); - } - - Widget addLine() { - return ElevatedButton( - onPressed: () async { - List parts = []; - for (var i = 0; i < 5; i++) { - final startOffset = randomOffset(); - final endOffset = randomOffset(); - parts.add( - LineDrawPart( - start: startOffset, - end: endOffset, - paint: DrawPaint( - lineWeight: 30, - paintingStyle: PaintingStyle.stroke, - color: randomColor()), - ), - ); - } - addDrawParts(parts); - }, - child: Text('add line'), - ); - } - - Future addDrawPart(DrawPart part) async { - await addDrawParts([part]); - } - - Future addDrawParts(List parts) async { - print(parts.map((e) => e.toString()).join('\n')); - final tu = TimeUtils(); - if (bytes == null) { - bytes = await loadFromAsset(R.ASSETS_ICON_PNG); - } - final opt = ImageEditorOption(); - opt.outputFormat = OutputFormat.png(100); - for (var item in parts) { - opt.addOption( - DrawOption()..addDrawPart(item), - ); - } - tu.start(); - bytes = await ImageEditor.editImage(image: bytes!, imageEditorOption: opt); - print(tu.currentMs()); - setState(() {}); - } - - Widget addOval() { - return ElevatedButton( - onPressed: () { - addDrawPart( - OvalDrawPart( - rect: Rect.fromCenter( - center: randomOffset(), - width: randomOffset().dx, - height: 300, - ), - paint: DrawPaint( - paintingStyle: PaintingStyle.values[Random().nextInt(10) % 2], - color: randomColor(), - ), - ), - ); - }, - child: Text('add circle'), - ); - } - - Widget addPoints() { - return ElevatedButton( - onPressed: () { - final dp = PointDrawPart( - paint: DrawPaint( - paintingStyle: randomPaintStyle(), - color: randomColor(), - lineWeight: 150, - ), - ); - dp.addAllPoints( - [ - randomOffset(), - randomOffset(), - randomOffset(), - ], - ); - addDrawPart(dp); - }, - child: Text('add points'), - ); - } - - Widget buildDrawPath() { - return ElevatedButton.icon( - onPressed: () async { - final paint = DrawPaint( - lineWeight: 10, - paintingStyle: randomPaintStyle(), - color: randomColor(), - ); - final path = PathDrawPart( - autoClose: false, - paint: paint, - ); - path.move(Offset.zero); - path.lineTo(randomOffset()); - path.lineTo(randomOffset()); - path.bezier2To(randomOffset(), randomOffset()); - path.bezier3To(randomOffset(), randomOffset(), randomOffset()); - await addDrawPart(path); - }, - icon: Icon(Icons.format_paint), - label: Text('paint'), - ); - } -} diff --git a/image_editor_common/example/lib/home_page.dart b/image_editor_common/example/lib/home_page.dart deleted file mode 100644 index 1b20961..0000000 --- a/image_editor_common/example/lib/home_page.dart +++ /dev/null @@ -1,162 +0,0 @@ -import 'dart:async'; -import 'dart:convert'; -// ignore: unnecessary_import -import 'dart:typed_data'; - -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_image_editor_example/widget/examples.dart'; -import 'package:flutter_image_editor_example/widget/scale_widget.dart'; - -import 'package:image_editor/image_editor.dart' - show - ClipOption, - FlipOption, - ImageEditor, - ImageEditorOption, - Option, - OutputFormat, - RotateOption; -import 'package:image_size_getter/image_size_getter.dart'; - -import 'const/resource.dart'; -import 'widget/clip_widget.dart'; -import 'widget/flip_widget.dart'; -import 'widget/rotate_widget.dart'; - -class IndexPage extends StatefulWidget { - @override - IndexPageState createState() => IndexPageState(); -} - -class IndexPageState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Index'), - ), - body: Examples(), - ); - } -} - -class SimpleExamplePage extends StatefulWidget { - @override - _SimpleExamplePageState createState() => _SimpleExamplePageState(); -} - -class _SimpleExamplePageState extends State { - ImageProvider? provider = AssetImage(R.ASSETS_ICON_PNG); - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Simple usage'), - actions: [ - IconButton( - icon: Icon(Icons.settings_backup_restore), - onPressed: restore, - tooltip: 'Restore image to default.', - ), - ], - ), - body: Column( - children: [ - if (provider != null) - AspectRatio( - aspectRatio: 1, - child: Image( - image: provider!, - ), - ), - Expanded( - child: Scrollbar( - child: SingleChildScrollView( - child: Column( - children: [ - FlipWidget( - onTap: _flip, - ), - ClipWidget( - onTap: _clip, - ), - RotateWidget( - onTap: _rotate, - ), - ScaleWidget( - onTap: _scale, - ), - ], - ), - ), - ), - ), - ], - ), - ); - } - - void setProvider(ImageProvider? provider) { - this.provider = provider; - setState(() {}); - } - - void restore() { - setProvider(AssetImage(R.ASSETS_ICON_PNG)); - } - - Future getAssetImage() async { - final ByteData byteData = await rootBundle.load(R.ASSETS_ICON_PNG); - return byteData.buffer.asUint8List(); - } - - Future _flip(FlipOption flipOption) async { - handleOption(