diff --git a/android/src/main/java/com/abdelaziz_mahdy/pytorch_lite/Pigeon.java b/android/src/main/java/com/abdelaziz_mahdy/pytorch_lite/Pigeon.java index 9c7a419..74465e3 100644 --- a/android/src/main/java/com/abdelaziz_mahdy/pytorch_lite/Pigeon.java +++ b/android/src/main/java/com/abdelaziz_mahdy/pytorch_lite/Pigeon.java @@ -1,8 +1,11 @@ -// Autogenerated from Pigeon (v11.0.1), do not edit directly. +// Autogenerated from Pigeon (v22.4.2), do not edit directly. // See also: https://pub.dev/packages/pigeon package com.abdelaziz_mahdy.pytorch_lite; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.CLASS; + import android.util.Log; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -11,6 +14,8 @@ import io.flutter.plugin.common.MessageCodec; import io.flutter.plugin.common.StandardMessageCodec; import java.io.ByteArrayOutputStream; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Arrays; @@ -18,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; /** Generated class from Pigeon. */ @SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression", "serial"}) @@ -42,7 +48,7 @@ public FlutterError(@NonNull String code, @Nullable String message, @Nullable Ob @NonNull protected static ArrayList wrapError(@NonNull Throwable exception) { - ArrayList errorList = new ArrayList(3); + ArrayList errorList = new ArrayList<>(3); if (exception instanceof FlutterError) { FlutterError error = (FlutterError) exception; errorList.add(error.code); @@ -57,6 +63,10 @@ protected static ArrayList wrapError(@NonNull Throwable exception) { return errorList; } + @Target(METHOD) + @Retention(CLASS) + @interface CanIgnoreReturnValue {} + /** Generated class from Pigeon that represents data sent in messages. */ public static final class PyTorchRect { private @NonNull Double left; @@ -140,10 +150,24 @@ public void setHeight(@NonNull Double setterArg) { /** Constructor is non-public to enforce null safety; use Builder. */ PyTorchRect() {} + @Override + public boolean equals(Object o) { + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } + PyTorchRect that = (PyTorchRect) o; + return left.equals(that.left) && top.equals(that.top) && right.equals(that.right) && bottom.equals(that.bottom) && width.equals(that.width) && height.equals(that.height); + } + + @Override + public int hashCode() { + return Objects.hash(left, top, right, bottom, width, height); + } + public static final class Builder { private @Nullable Double left; + @CanIgnoreReturnValue public @NonNull Builder setLeft(@NonNull Double setterArg) { this.left = setterArg; return this; @@ -151,6 +175,7 @@ public static final class Builder { private @Nullable Double top; + @CanIgnoreReturnValue public @NonNull Builder setTop(@NonNull Double setterArg) { this.top = setterArg; return this; @@ -158,6 +183,7 @@ public static final class Builder { private @Nullable Double right; + @CanIgnoreReturnValue public @NonNull Builder setRight(@NonNull Double setterArg) { this.right = setterArg; return this; @@ -165,6 +191,7 @@ public static final class Builder { private @Nullable Double bottom; + @CanIgnoreReturnValue public @NonNull Builder setBottom(@NonNull Double setterArg) { this.bottom = setterArg; return this; @@ -172,6 +199,7 @@ public static final class Builder { private @Nullable Double width; + @CanIgnoreReturnValue public @NonNull Builder setWidth(@NonNull Double setterArg) { this.width = setterArg; return this; @@ -179,6 +207,7 @@ public static final class Builder { private @Nullable Double height; + @CanIgnoreReturnValue public @NonNull Builder setHeight(@NonNull Double setterArg) { this.height = setterArg; return this; @@ -198,7 +227,7 @@ public static final class Builder { @NonNull ArrayList toList() { - ArrayList toListResult = new ArrayList(6); + ArrayList toListResult = new ArrayList<>(6); toListResult.add(left); toListResult.add(top); toListResult.add(right); @@ -208,19 +237,19 @@ ArrayList toList() { return toListResult; } - static @NonNull PyTorchRect fromList(@NonNull ArrayList list) { + static @NonNull PyTorchRect fromList(@NonNull ArrayList pigeonVar_list) { PyTorchRect pigeonResult = new PyTorchRect(); - Object left = list.get(0); + Object left = pigeonVar_list.get(0); pigeonResult.setLeft((Double) left); - Object top = list.get(1); + Object top = pigeonVar_list.get(1); pigeonResult.setTop((Double) top); - Object right = list.get(2); + Object right = pigeonVar_list.get(2); pigeonResult.setRight((Double) right); - Object bottom = list.get(3); + Object bottom = pigeonVar_list.get(3); pigeonResult.setBottom((Double) bottom); - Object width = list.get(4); + Object width = pigeonVar_list.get(4); pigeonResult.setWidth((Double) width); - Object height = list.get(5); + Object height = pigeonVar_list.get(5); pigeonResult.setHeight((Double) height); return pigeonResult; } @@ -280,10 +309,24 @@ public void setRect(@NonNull PyTorchRect setterArg) { /** Constructor is non-public to enforce null safety; use Builder. */ ResultObjectDetection() {} + @Override + public boolean equals(Object o) { + if (this == o) { return true; } + if (o == null || getClass() != o.getClass()) { return false; } + ResultObjectDetection that = (ResultObjectDetection) o; + return classIndex.equals(that.classIndex) && Objects.equals(className, that.className) && score.equals(that.score) && rect.equals(that.rect); + } + + @Override + public int hashCode() { + return Objects.hash(classIndex, className, score, rect); + } + public static final class Builder { private @Nullable Long classIndex; + @CanIgnoreReturnValue public @NonNull Builder setClassIndex(@NonNull Long setterArg) { this.classIndex = setterArg; return this; @@ -291,6 +334,7 @@ public static final class Builder { private @Nullable String className; + @CanIgnoreReturnValue public @NonNull Builder setClassName(@Nullable String setterArg) { this.className = setterArg; return this; @@ -298,6 +342,7 @@ public static final class Builder { private @Nullable Double score; + @CanIgnoreReturnValue public @NonNull Builder setScore(@NonNull Double setterArg) { this.score = setterArg; return this; @@ -305,6 +350,7 @@ public static final class Builder { private @Nullable PyTorchRect rect; + @CanIgnoreReturnValue public @NonNull Builder setRect(@NonNull PyTorchRect setterArg) { this.rect = setterArg; return this; @@ -322,46 +368,39 @@ public static final class Builder { @NonNull ArrayList toList() { - ArrayList toListResult = new ArrayList(4); + ArrayList toListResult = new ArrayList<>(4); toListResult.add(classIndex); toListResult.add(className); toListResult.add(score); - toListResult.add((rect == null) ? null : rect.toList()); + toListResult.add(rect); return toListResult; } - static @NonNull ResultObjectDetection fromList(@NonNull ArrayList list) { + static @NonNull ResultObjectDetection fromList(@NonNull ArrayList pigeonVar_list) { ResultObjectDetection pigeonResult = new ResultObjectDetection(); - Object classIndex = list.get(0); - pigeonResult.setClassIndex((classIndex == null) ? null : ((classIndex instanceof Integer) ? (Integer) classIndex : (Long) classIndex)); - Object className = list.get(1); + Object classIndex = pigeonVar_list.get(0); + pigeonResult.setClassIndex((Long) classIndex); + Object className = pigeonVar_list.get(1); pigeonResult.setClassName((String) className); - Object score = list.get(2); + Object score = pigeonVar_list.get(2); pigeonResult.setScore((Double) score); - Object rect = list.get(3); - pigeonResult.setRect((rect == null) ? null : PyTorchRect.fromList((ArrayList) rect)); + Object rect = pigeonVar_list.get(3); + pigeonResult.setRect((PyTorchRect) rect); return pigeonResult; } } - public interface Result { - @SuppressWarnings("UnknownNullness") - void success(T result); - - void error(@NonNull Throwable error); - } + private static class PigeonCodec extends StandardMessageCodec { + public static final PigeonCodec INSTANCE = new PigeonCodec(); - private static class ModelApiCodec extends StandardMessageCodec { - public static final ModelApiCodec INSTANCE = new ModelApiCodec(); - - private ModelApiCodec() {} + private PigeonCodec() {} @Override protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { switch (type) { - case (byte) 128: - return PyTorchRect.fromList((ArrayList) readValue(buffer)); case (byte) 129: + return PyTorchRect.fromList((ArrayList) readValue(buffer)); + case (byte) 130: return ResultObjectDetection.fromList((ArrayList) readValue(buffer)); default: return super.readValueOfType(type, buffer); @@ -371,10 +410,10 @@ protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { @Override protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) { if (value instanceof PyTorchRect) { - stream.write(128); + stream.write(129); writeValue(stream, ((PyTorchRect) value).toList()); } else if (value instanceof ResultObjectDetection) { - stream.write(129); + stream.write(130); writeValue(stream, ((ResultObjectDetection) value).toList()); } else { super.writeValue(stream, value); @@ -382,12 +421,37 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) { } } + + /** Asynchronous error handling return type for non-nullable API method returns. */ + public interface Result { + /** Success case callback method for handling returns. */ + void success(@NonNull T result); + + /** Failure case callback method for handling errors. */ + void error(@NonNull Throwable error); + } + /** Asynchronous error handling return type for nullable API method returns. */ + public interface NullableResult { + /** Success case callback method for handling returns. */ + void success(@Nullable T result); + + /** Failure case callback method for handling errors. */ + void error(@NonNull Throwable error); + } + /** Asynchronous error handling return type for void API method returns. */ + public interface VoidResult { + /** Success case callback method for handling returns. */ + void success(); + + /** Failure case callback method for handling errors. */ + void error(@NonNull Throwable error); + } /** Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface ModelApi { void loadModel(@NonNull String modelPath, @Nullable Long numberOfClasses, @Nullable Long imageWidth, @Nullable Long imageHeight, @Nullable Long objectDetectionModelType, @NonNull Result result); /**predicts abstract number input */ - void getPredictionCustom(@NonNull Long index, @NonNull List input, @NonNull List shape, @NonNull String dtype, @NonNull Result> result); + void getPredictionCustom(@NonNull Long index, @NonNull List input, @NonNull List shape, @NonNull String dtype, @NonNull NullableResult> result); /**predicts raw image but returns the raw net output */ void getRawImagePredictionList(@NonNull Long index, @NonNull byte[] imageData, @NonNull Result> result); /**predicts raw image but returns the raw net output */ @@ -399,25 +463,29 @@ public interface ModelApi { /** The codec used by ModelApi. */ static @NonNull MessageCodec getCodec() { - return ModelApiCodec.INSTANCE; + return PigeonCodec.INSTANCE; } /**Sets up an instance of `ModelApi` to handle messages through the `binaryMessenger`. */ - static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable ModelApi api) { + static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable ModelApi api) { + setUp(binaryMessenger, "", api); + } + static void setUp(@NonNull BinaryMessenger binaryMessenger, @NonNull String messageChannelSuffix, @Nullable ModelApi api) { + messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; { BinaryMessenger.TaskQueue taskQueue = binaryMessenger.makeBackgroundTaskQueue(); BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.pytorch_lite.ModelApi.loadModel", getCodec(), taskQueue); + binaryMessenger, "dev.flutter.pigeon.pytorch_lite.ModelApi.loadModel" + messageChannelSuffix, getCodec(), taskQueue); if (api != null) { channel.setMessageHandler( (message, reply) -> { - ArrayList wrapped = new ArrayList(); + ArrayList wrapped = new ArrayList<>(); ArrayList args = (ArrayList) message; String modelPathArg = (String) args.get(0); - Number numberOfClassesArg = (Number) args.get(1); - Number imageWidthArg = (Number) args.get(2); - Number imageHeightArg = (Number) args.get(3); - Number objectDetectionModelTypeArg = (Number) args.get(4); + Long numberOfClassesArg = (Long) args.get(1); + Long imageWidthArg = (Long) args.get(2); + Long imageHeightArg = (Long) args.get(3); + Long objectDetectionModelTypeArg = (Long) args.get(4); Result resultCallback = new Result() { public void success(Long result) { @@ -431,7 +499,7 @@ public void error(Throwable error) { } }; - api.loadModel(modelPathArg, (numberOfClassesArg == null) ? null : numberOfClassesArg.longValue(), (imageWidthArg == null) ? null : imageWidthArg.longValue(), (imageHeightArg == null) ? null : imageHeightArg.longValue(), (objectDetectionModelTypeArg == null) ? null : objectDetectionModelTypeArg.longValue(), resultCallback); + api.loadModel(modelPathArg, numberOfClassesArg, imageWidthArg, imageHeightArg, objectDetectionModelTypeArg, resultCallback); }); } else { channel.setMessageHandler(null); @@ -441,18 +509,18 @@ public void error(Throwable error) { BinaryMessenger.TaskQueue taskQueue = binaryMessenger.makeBackgroundTaskQueue(); BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.pytorch_lite.ModelApi.getPredictionCustom", getCodec(), taskQueue); + binaryMessenger, "dev.flutter.pigeon.pytorch_lite.ModelApi.getPredictionCustom" + messageChannelSuffix, getCodec(), taskQueue); if (api != null) { channel.setMessageHandler( (message, reply) -> { - ArrayList wrapped = new ArrayList(); + ArrayList wrapped = new ArrayList<>(); ArrayList args = (ArrayList) message; - Number indexArg = (Number) args.get(0); + Long indexArg = (Long) args.get(0); List inputArg = (List) args.get(1); List shapeArg = (List) args.get(2); String dtypeArg = (String) args.get(3); - Result> resultCallback = - new Result>() { + NullableResult> resultCallback = + new NullableResult>() { public void success(List result) { wrapped.add(0, result); reply.reply(wrapped); @@ -464,7 +532,7 @@ public void error(Throwable error) { } }; - api.getPredictionCustom((indexArg == null) ? null : indexArg.longValue(), inputArg, shapeArg, dtypeArg, resultCallback); + api.getPredictionCustom(indexArg, inputArg, shapeArg, dtypeArg, resultCallback); }); } else { channel.setMessageHandler(null); @@ -474,13 +542,13 @@ public void error(Throwable error) { BinaryMessenger.TaskQueue taskQueue = binaryMessenger.makeBackgroundTaskQueue(); BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.pytorch_lite.ModelApi.getRawImagePredictionList", getCodec(), taskQueue); + binaryMessenger, "dev.flutter.pigeon.pytorch_lite.ModelApi.getRawImagePredictionList" + messageChannelSuffix, getCodec(), taskQueue); if (api != null) { channel.setMessageHandler( (message, reply) -> { - ArrayList wrapped = new ArrayList(); + ArrayList wrapped = new ArrayList<>(); ArrayList args = (ArrayList) message; - Number indexArg = (Number) args.get(0); + Long indexArg = (Long) args.get(0); byte[] imageDataArg = (byte[]) args.get(1); Result> resultCallback = new Result>() { @@ -495,7 +563,7 @@ public void error(Throwable error) { } }; - api.getRawImagePredictionList((indexArg == null) ? null : indexArg.longValue(), imageDataArg, resultCallback); + api.getRawImagePredictionList(indexArg, imageDataArg, resultCallback); }); } else { channel.setMessageHandler(null); @@ -505,17 +573,17 @@ public void error(Throwable error) { BinaryMessenger.TaskQueue taskQueue = binaryMessenger.makeBackgroundTaskQueue(); BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.pytorch_lite.ModelApi.getRawImagePredictionListObjectDetection", getCodec(), taskQueue); + binaryMessenger, "dev.flutter.pigeon.pytorch_lite.ModelApi.getRawImagePredictionListObjectDetection" + messageChannelSuffix, getCodec(), taskQueue); if (api != null) { channel.setMessageHandler( (message, reply) -> { - ArrayList wrapped = new ArrayList(); + ArrayList wrapped = new ArrayList<>(); ArrayList args = (ArrayList) message; - Number indexArg = (Number) args.get(0); + Long indexArg = (Long) args.get(0); byte[] imageDataArg = (byte[]) args.get(1); Double minimumScoreArg = (Double) args.get(2); Double IOUThresholdArg = (Double) args.get(3); - Number boxesLimitArg = (Number) args.get(4); + Long boxesLimitArg = (Long) args.get(4); Result> resultCallback = new Result>() { public void success(List result) { @@ -529,7 +597,7 @@ public void error(Throwable error) { } }; - api.getRawImagePredictionListObjectDetection((indexArg == null) ? null : indexArg.longValue(), imageDataArg, minimumScoreArg, IOUThresholdArg, (boxesLimitArg == null) ? null : boxesLimitArg.longValue(), resultCallback); + api.getRawImagePredictionListObjectDetection(indexArg, imageDataArg, minimumScoreArg, IOUThresholdArg, boxesLimitArg, resultCallback); }); } else { channel.setMessageHandler(null); @@ -539,17 +607,17 @@ public void error(Throwable error) { BinaryMessenger.TaskQueue taskQueue = binaryMessenger.makeBackgroundTaskQueue(); BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.pytorch_lite.ModelApi.getImagePredictionList", getCodec(), taskQueue); + binaryMessenger, "dev.flutter.pigeon.pytorch_lite.ModelApi.getImagePredictionList" + messageChannelSuffix, getCodec(), taskQueue); if (api != null) { channel.setMessageHandler( (message, reply) -> { - ArrayList wrapped = new ArrayList(); + ArrayList wrapped = new ArrayList<>(); ArrayList args = (ArrayList) message; - Number indexArg = (Number) args.get(0); + Long indexArg = (Long) args.get(0); byte[] imageDataArg = (byte[]) args.get(1); List imageBytesListArg = (List) args.get(2); - Number imageWidthForBytesListArg = (Number) args.get(3); - Number imageHeightForBytesListArg = (Number) args.get(4); + Long imageWidthForBytesListArg = (Long) args.get(3); + Long imageHeightForBytesListArg = (Long) args.get(4); List meanArg = (List) args.get(5); List stdArg = (List) args.get(6); Result> resultCallback = @@ -565,7 +633,7 @@ public void error(Throwable error) { } }; - api.getImagePredictionList((indexArg == null) ? null : indexArg.longValue(), imageDataArg, imageBytesListArg, (imageWidthForBytesListArg == null) ? null : imageWidthForBytesListArg.longValue(), (imageHeightForBytesListArg == null) ? null : imageHeightForBytesListArg.longValue(), meanArg, stdArg, resultCallback); + api.getImagePredictionList(indexArg, imageDataArg, imageBytesListArg, imageWidthForBytesListArg, imageHeightForBytesListArg, meanArg, stdArg, resultCallback); }); } else { channel.setMessageHandler(null); @@ -575,20 +643,20 @@ public void error(Throwable error) { BinaryMessenger.TaskQueue taskQueue = binaryMessenger.makeBackgroundTaskQueue(); BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.pytorch_lite.ModelApi.getImagePredictionListObjectDetection", getCodec(), taskQueue); + binaryMessenger, "dev.flutter.pigeon.pytorch_lite.ModelApi.getImagePredictionListObjectDetection" + messageChannelSuffix, getCodec(), taskQueue); if (api != null) { channel.setMessageHandler( (message, reply) -> { - ArrayList wrapped = new ArrayList(); + ArrayList wrapped = new ArrayList<>(); ArrayList args = (ArrayList) message; - Number indexArg = (Number) args.get(0); + Long indexArg = (Long) args.get(0); byte[] imageDataArg = (byte[]) args.get(1); List imageBytesListArg = (List) args.get(2); - Number imageWidthForBytesListArg = (Number) args.get(3); - Number imageHeightForBytesListArg = (Number) args.get(4); + Long imageWidthForBytesListArg = (Long) args.get(3); + Long imageHeightForBytesListArg = (Long) args.get(4); Double minimumScoreArg = (Double) args.get(5); Double IOUThresholdArg = (Double) args.get(6); - Number boxesLimitArg = (Number) args.get(7); + Long boxesLimitArg = (Long) args.get(7); Result> resultCallback = new Result>() { public void success(List result) { @@ -602,7 +670,7 @@ public void error(Throwable error) { } }; - api.getImagePredictionListObjectDetection((indexArg == null) ? null : indexArg.longValue(), imageDataArg, imageBytesListArg, (imageWidthForBytesListArg == null) ? null : imageWidthForBytesListArg.longValue(), (imageHeightForBytesListArg == null) ? null : imageHeightForBytesListArg.longValue(), minimumScoreArg, IOUThresholdArg, (boxesLimitArg == null) ? null : boxesLimitArg.longValue(), resultCallback); + api.getImagePredictionListObjectDetection(indexArg, imageDataArg, imageBytesListArg, imageWidthForBytesListArg, imageHeightForBytesListArg, minimumScoreArg, IOUThresholdArg, boxesLimitArg, resultCallback); }); } else { channel.setMessageHandler(null); diff --git a/example/linux/flutter/ephemeral/.plugin_symlinks/file_selector_linux b/example/linux/flutter/ephemeral/.plugin_symlinks/file_selector_linux index 3ee32c4..2891e40 120000 --- a/example/linux/flutter/ephemeral/.plugin_symlinks/file_selector_linux +++ b/example/linux/flutter/ephemeral/.plugin_symlinks/file_selector_linux @@ -1 +1 @@ -/Users/AbdelazizMahdy/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.2+1/ \ No newline at end of file +/Users/AbdelazizMahdy/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3/ \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index 9a2e780..b052c25 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -37,18 +37,18 @@ packages: dependency: transitive description: name: camera_android_camerax - sha256: "8bd9cab67551642eb33ceb33ece7acc0890014fc90ddfae637c7e2b683657e65" + sha256: e3627fdc2132d89212b8a8676679f5b07008c7e3d8ae00cea775c3397f9e742b url: "https://pub.dev" source: hosted - version: "0.6.7+2" + version: "0.6.10" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "7c28969a975a7eb2349bc2cb2dfe3ad218a33dba9968ecfb181ce08c87486655" + sha256: "0d04cec8715b59fb6dc60eefb47e69024f51233c570e475b886dc9290568bca7" url: "https://pub.dev" source: hosted - version: "0.9.17+3" + version: "0.9.17+4" camera_platform_interface: dependency: transitive description: @@ -109,10 +109,10 @@ packages: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" cupertino_icons: dependency: "direct main" description: @@ -133,10 +133,10 @@ packages: dependency: transitive description: name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" file: dependency: transitive description: @@ -149,18 +149,18 @@ packages: dependency: transitive description: name: file_selector_linux - sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" + sha256: "712ce7fab537ba532c8febdb1a8f167b32441e74acd68c3ccb2e36dcb52c4ab2" url: "https://pub.dev" source: hosted - version: "0.9.2+1" + version: "0.9.3" file_selector_macos: dependency: transitive description: name: file_selector_macos - sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385 + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" url: "https://pub.dev" source: hosted - version: "0.9.4" + version: "0.9.4+2" file_selector_platform_interface: dependency: transitive description: @@ -173,10 +173,10 @@ packages: dependency: transitive description: name: file_selector_windows - sha256: "2ad726953f6e8affbc4df8dc78b77c3b4a060967a291e528ef72ae846c60fb69" + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" url: "https://pub.dev" source: hosted - version: "0.9.3+2" + version: "0.9.3+3" flutter: dependency: "direct main" description: flutter @@ -199,10 +199,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "9d98bd47ef9d34e803d438f17fd32b116d31009f534a6fa5ce3a1167f189a6de" + sha256: "9b78450b89f059e96c9ebb355fa6b3df1d6b330436e0b885fb49594c41721398" url: "https://pub.dev" source: hosted - version: "2.0.21" + version: "2.0.23" flutter_test: dependency: "direct dev" description: flutter @@ -254,10 +254,10 @@ packages: dependency: transitive description: name: image_picker_android - sha256: c0e72ecd170b00a5590bb71238d57dc8ad22ee14c60c6b0d1a4e05cafbc5db4b + sha256: d3e5e00fdfeca8fd4ffb3227001264d449cc8950414c2ff70b0e06b9c628e643 url: "https://pub.dev" source: hosted - version: "0.8.12+11" + version: "0.8.12+15" image_picker_for_web: dependency: transitive description: @@ -371,10 +371,10 @@ packages: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" path: dependency: transitive description: @@ -395,10 +395,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "490539678396d4c3c0b06efdaab75ae60675c3e0c66f72bc04c2e2c1e0e2abeb" + sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a url: "https://pub.dev" source: hosted - version: "2.2.9" + version: "2.2.12" path_provider_foundation: dependency: transitive description: @@ -469,7 +469,7 @@ packages: path: ".." relative: true source: path - version: "4.2.6" + version: "4.2.7" sky_engine: dependency: transitive description: flutter @@ -559,18 +559,18 @@ packages: dependency: transitive description: name: vm_service - sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.4" + version: "14.2.5" web: dependency: transitive description: name: web - sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.0" webdriver: dependency: transitive description: @@ -583,10 +583,10 @@ packages: dependency: transitive description: name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" xml: dependency: transitive description: @@ -596,5 +596,5 @@ packages: source: hosted version: "6.5.0" sdks: - dart: ">=3.4.0 <4.0.0" - flutter: ">=3.22.0" + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/ios/Classes/pigeon.h b/ios/Classes/pigeon.h index 7b41f92..ddc52f2 100644 --- a/ios/Classes/pigeon.h +++ b/ios/Classes/pigeon.h @@ -1,4 +1,4 @@ -// Autogenerated from Pigeon (v11.0.1), do not edit directly. +// Autogenerated from Pigeon (v22.4.2), do not edit directly. // See also: https://pub.dev/packages/pigeon #import @@ -16,50 +16,52 @@ NS_ASSUME_NONNULL_BEGIN @interface PyTorchRect : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithLeft:(NSNumber *)left - top:(NSNumber *)top - right:(NSNumber *)right - bottom:(NSNumber *)bottom - width:(NSNumber *)width - height:(NSNumber *)height; -@property(nonatomic, strong) NSNumber * left; -@property(nonatomic, strong) NSNumber * top; -@property(nonatomic, strong) NSNumber * right; -@property(nonatomic, strong) NSNumber * bottom; -@property(nonatomic, strong) NSNumber * width; -@property(nonatomic, strong) NSNumber * height; ++ (instancetype)makeWithLeft:(double )left + top:(double )top + right:(double )right + bottom:(double )bottom + width:(double )width + height:(double )height; +@property(nonatomic, assign) double left; +@property(nonatomic, assign) double top; +@property(nonatomic, assign) double right; +@property(nonatomic, assign) double bottom; +@property(nonatomic, assign) double width; +@property(nonatomic, assign) double height; @end @interface ResultObjectDetection : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; -+ (instancetype)makeWithClassIndex:(NSNumber *)classIndex ++ (instancetype)makeWithClassIndex:(NSInteger )classIndex className:(nullable NSString *)className - score:(NSNumber *)score + score:(double )score rect:(PyTorchRect *)rect; -@property(nonatomic, strong) NSNumber * classIndex; +@property(nonatomic, assign) NSInteger classIndex; @property(nonatomic, copy, nullable) NSString * className; -@property(nonatomic, strong) NSNumber * score; +@property(nonatomic, assign) double score; @property(nonatomic, strong) PyTorchRect * rect; @end -/// The codec used by ModelApi. -NSObject *ModelApiGetCodec(void); +/// The codec used by all APIs. +NSObject *nullGetPigeonCodec(void); @protocol ModelApi - (void)loadModelModelPath:(NSString *)modelPath numberOfClasses:(nullable NSNumber *)numberOfClasses imageWidth:(nullable NSNumber *)imageWidth imageHeight:(nullable NSNumber *)imageHeight objectDetectionModelType:(nullable NSNumber *)objectDetectionModelType completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; ///predicts abstract number input -- (void)getPredictionCustomIndex:(NSNumber *)index input:(NSArray *)input shape:(NSArray *)shape dtype:(NSString *)dtype completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)getPredictionCustomIndex:(NSInteger)index input:(NSArray *)input shape:(NSArray *)shape dtype:(NSString *)dtype completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; ///predicts raw image but returns the raw net output -- (void)getRawImagePredictionListIndex:(NSNumber *)index imageData:(FlutterStandardTypedData *)imageData completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)getRawImagePredictionListIndex:(NSInteger)index imageData:(FlutterStandardTypedData *)imageData completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; ///predicts raw image but returns the raw net output -- (void)getRawImagePredictionListObjectDetectionIndex:(NSNumber *)index imageData:(FlutterStandardTypedData *)imageData minimumScore:(NSNumber *)minimumScore IOUThreshold:(NSNumber *)IOUThreshold boxesLimit:(NSNumber *)boxesLimit completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)getRawImagePredictionListObjectDetectionIndex:(NSInteger)index imageData:(FlutterStandardTypedData *)imageData minimumScore:(double)minimumScore IOUThreshold:(double)IOUThreshold boxesLimit:(NSInteger)boxesLimit completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; ///predicts image but returns the raw net output -- (void)getImagePredictionListIndex:(NSNumber *)index imageData:(nullable FlutterStandardTypedData *)imageData imageBytesList:(nullable NSArray *)imageBytesList imageWidthForBytesList:(nullable NSNumber *)imageWidthForBytesList imageHeightForBytesList:(nullable NSNumber *)imageHeightForBytesList mean:(NSArray *)mean std:(NSArray *)std completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)getImagePredictionListIndex:(NSInteger)index imageData:(nullable FlutterStandardTypedData *)imageData imageBytesList:(nullable NSArray *)imageBytesList imageWidthForBytesList:(nullable NSNumber *)imageWidthForBytesList imageHeightForBytesList:(nullable NSNumber *)imageHeightForBytesList mean:(NSArray *)mean std:(NSArray *)std completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; ///predicts image but returns the output detections -- (void)getImagePredictionListObjectDetectionIndex:(NSNumber *)index imageData:(nullable FlutterStandardTypedData *)imageData imageBytesList:(nullable NSArray *)imageBytesList imageWidthForBytesList:(nullable NSNumber *)imageWidthForBytesList imageHeightForBytesList:(nullable NSNumber *)imageHeightForBytesList minimumScore:(NSNumber *)minimumScore IOUThreshold:(NSNumber *)IOUThreshold boxesLimit:(NSNumber *)boxesLimit completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)getImagePredictionListObjectDetectionIndex:(NSInteger)index imageData:(nullable FlutterStandardTypedData *)imageData imageBytesList:(nullable NSArray *)imageBytesList imageWidthForBytesList:(nullable NSNumber *)imageWidthForBytesList imageHeightForBytesList:(nullable NSNumber *)imageHeightForBytesList minimumScore:(double)minimumScore IOUThreshold:(double)IOUThreshold boxesLimit:(NSInteger)boxesLimit completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; @end -extern void ModelApiSetup(id binaryMessenger, NSObject *_Nullable api); +extern void SetUpModelApi(id binaryMessenger, NSObject *_Nullable api); + +extern void SetUpModelApiWithSuffix(id binaryMessenger, NSObject *_Nullable api, NSString *messageChannelSuffix); NS_ASSUME_NONNULL_END diff --git a/ios/Classes/pigeon.mm b/ios/Classes/pigeon.mm index b52e7de..2d2c851 100644 --- a/ios/Classes/pigeon.mm +++ b/ios/Classes/pigeon.mm @@ -1,4 +1,4 @@ -// Autogenerated from Pigeon (v11.0.1), do not edit directly. +// Autogenerated from Pigeon (v22.4.2), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "pigeon.h" @@ -13,7 +13,7 @@ #error File requires ARC to be enabled. #endif -static NSArray *wrapResult(id result, FlutterError *error) { +static NSArray *wrapResult(id result, FlutterError *error) { if (error) { return @[ error.code ?: [NSNull null], error.message ?: [NSNull null], error.details ?: [NSNull null] @@ -21,30 +21,31 @@ } return @[ result ?: [NSNull null] ]; } -static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { + +static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { id result = array[key]; return (result == [NSNull null]) ? nil : result; } @interface PyTorchRect () -+ (PyTorchRect *)fromList:(NSArray *)list; -+ (nullable PyTorchRect *)nullableFromList:(NSArray *)list; -- (NSArray *)toList; ++ (PyTorchRect *)fromList:(NSArray *)list; ++ (nullable PyTorchRect *)nullableFromList:(NSArray *)list; +- (NSArray *)toList; @end @interface ResultObjectDetection () -+ (ResultObjectDetection *)fromList:(NSArray *)list; -+ (nullable ResultObjectDetection *)nullableFromList:(NSArray *)list; -- (NSArray *)toList; ++ (ResultObjectDetection *)fromList:(NSArray *)list; ++ (nullable ResultObjectDetection *)nullableFromList:(NSArray *)list; +- (NSArray *)toList; @end @implementation PyTorchRect -+ (instancetype)makeWithLeft:(NSNumber *)left - top:(NSNumber *)top - right:(NSNumber *)right - bottom:(NSNumber *)bottom - width:(NSNumber *)width - height:(NSNumber *)height { ++ (instancetype)makeWithLeft:(double )left + top:(double )top + right:(double )right + bottom:(double )bottom + width:(double )width + height:(double )height { PyTorchRect* pigeonResult = [[PyTorchRect alloc] init]; pigeonResult.left = left; pigeonResult.top = top; @@ -54,41 +55,35 @@ + (instancetype)makeWithLeft:(NSNumber *)left pigeonResult.height = height; return pigeonResult; } -+ (PyTorchRect *)fromList:(NSArray *)list { ++ (PyTorchRect *)fromList:(NSArray *)list { PyTorchRect *pigeonResult = [[PyTorchRect alloc] init]; - pigeonResult.left = GetNullableObjectAtIndex(list, 0); - NSAssert(pigeonResult.left != nil, @""); - pigeonResult.top = GetNullableObjectAtIndex(list, 1); - NSAssert(pigeonResult.top != nil, @""); - pigeonResult.right = GetNullableObjectAtIndex(list, 2); - NSAssert(pigeonResult.right != nil, @""); - pigeonResult.bottom = GetNullableObjectAtIndex(list, 3); - NSAssert(pigeonResult.bottom != nil, @""); - pigeonResult.width = GetNullableObjectAtIndex(list, 4); - NSAssert(pigeonResult.width != nil, @""); - pigeonResult.height = GetNullableObjectAtIndex(list, 5); - NSAssert(pigeonResult.height != nil, @""); + pigeonResult.left = [GetNullableObjectAtIndex(list, 0) doubleValue]; + pigeonResult.top = [GetNullableObjectAtIndex(list, 1) doubleValue]; + pigeonResult.right = [GetNullableObjectAtIndex(list, 2) doubleValue]; + pigeonResult.bottom = [GetNullableObjectAtIndex(list, 3) doubleValue]; + pigeonResult.width = [GetNullableObjectAtIndex(list, 4) doubleValue]; + pigeonResult.height = [GetNullableObjectAtIndex(list, 5) doubleValue]; return pigeonResult; } -+ (nullable PyTorchRect *)nullableFromList:(NSArray *)list { ++ (nullable PyTorchRect *)nullableFromList:(NSArray *)list { return (list) ? [PyTorchRect fromList:list] : nil; } -- (NSArray *)toList { +- (NSArray *)toList { return @[ - (self.left ?: [NSNull null]), - (self.top ?: [NSNull null]), - (self.right ?: [NSNull null]), - (self.bottom ?: [NSNull null]), - (self.width ?: [NSNull null]), - (self.height ?: [NSNull null]), + @(self.left), + @(self.top), + @(self.right), + @(self.bottom), + @(self.width), + @(self.height), ]; } @end @implementation ResultObjectDetection -+ (instancetype)makeWithClassIndex:(NSNumber *)classIndex ++ (instancetype)makeWithClassIndex:(NSInteger )classIndex className:(nullable NSString *)className - score:(NSNumber *)score + score:(double )score rect:(PyTorchRect *)rect { ResultObjectDetection* pigeonResult = [[ResultObjectDetection alloc] init]; pigeonResult.classIndex = classIndex; @@ -97,38 +92,35 @@ + (instancetype)makeWithClassIndex:(NSNumber *)classIndex pigeonResult.rect = rect; return pigeonResult; } -+ (ResultObjectDetection *)fromList:(NSArray *)list { ++ (ResultObjectDetection *)fromList:(NSArray *)list { ResultObjectDetection *pigeonResult = [[ResultObjectDetection alloc] init]; - pigeonResult.classIndex = GetNullableObjectAtIndex(list, 0); - NSAssert(pigeonResult.classIndex != nil, @""); + pigeonResult.classIndex = [GetNullableObjectAtIndex(list, 0) integerValue]; pigeonResult.className = GetNullableObjectAtIndex(list, 1); - pigeonResult.score = GetNullableObjectAtIndex(list, 2); - NSAssert(pigeonResult.score != nil, @""); - pigeonResult.rect = [PyTorchRect nullableFromList:(GetNullableObjectAtIndex(list, 3))]; - NSAssert(pigeonResult.rect != nil, @""); + pigeonResult.score = [GetNullableObjectAtIndex(list, 2) doubleValue]; + pigeonResult.rect = GetNullableObjectAtIndex(list, 3); return pigeonResult; } -+ (nullable ResultObjectDetection *)nullableFromList:(NSArray *)list { ++ (nullable ResultObjectDetection *)nullableFromList:(NSArray *)list { return (list) ? [ResultObjectDetection fromList:list] : nil; } -- (NSArray *)toList { +- (NSArray *)toList { return @[ - (self.classIndex ?: [NSNull null]), - (self.className ?: [NSNull null]), - (self.score ?: [NSNull null]), - (self.rect ? [self.rect toList] : [NSNull null]), + @(self.classIndex), + self.className ?: [NSNull null], + @(self.score), + self.rect ?: [NSNull null], ]; } @end -@interface ModelApiCodecReader : FlutterStandardReader +@interface nullPigeonPigeonCodecReader : FlutterStandardReader @end -@implementation ModelApiCodecReader +@implementation nullPigeonPigeonCodecReader - (nullable id)readValueOfType:(UInt8)type { switch (type) { - case 128: - return [PyTorchRect fromList:[self readValue]]; case 129: + return [PyTorchRect fromList:[self readValue]]; + case 130: return [ResultObjectDetection fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -136,15 +128,15 @@ - (nullable id)readValueOfType:(UInt8)type { } @end -@interface ModelApiCodecWriter : FlutterStandardWriter +@interface nullPigeonPigeonCodecWriter : FlutterStandardWriter @end -@implementation ModelApiCodecWriter +@implementation nullPigeonPigeonCodecWriter - (void)writeValue:(id)value { if ([value isKindOfClass:[PyTorchRect class]]) { - [self writeByte:128]; + [self writeByte:129]; [self writeValue:[value toList]]; } else if ([value isKindOfClass:[ResultObjectDetection class]]) { - [self writeByte:129]; + [self writeByte:130]; [self writeValue:[value toList]]; } else { [super writeValue:value]; @@ -152,40 +144,44 @@ - (void)writeValue:(id)value { } @end -@interface ModelApiCodecReaderWriter : FlutterStandardReaderWriter +@interface nullPigeonPigeonCodecReaderWriter : FlutterStandardReaderWriter @end -@implementation ModelApiCodecReaderWriter +@implementation nullPigeonPigeonCodecReaderWriter - (FlutterStandardWriter *)writerWithData:(NSMutableData *)data { - return [[ModelApiCodecWriter alloc] initWithData:data]; + return [[nullPigeonPigeonCodecWriter alloc] initWithData:data]; } - (FlutterStandardReader *)readerWithData:(NSData *)data { - return [[ModelApiCodecReader alloc] initWithData:data]; + return [[nullPigeonPigeonCodecReader alloc] initWithData:data]; } @end -NSObject *ModelApiGetCodec(void) { +NSObject *nullGetPigeonCodec(void) { static FlutterStandardMessageCodec *sSharedObject = nil; static dispatch_once_t sPred = 0; dispatch_once(&sPred, ^{ - ModelApiCodecReaderWriter *readerWriter = [[ModelApiCodecReaderWriter alloc] init]; + nullPigeonPigeonCodecReaderWriter *readerWriter = [[nullPigeonPigeonCodecReaderWriter alloc] init]; sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter]; }); return sSharedObject; } +void SetUpModelApi(id binaryMessenger, NSObject *api) { + SetUpModelApiWithSuffix(binaryMessenger, api, @""); +} -void ModelApiSetup(id binaryMessenger, NSObject *api) { +void SetUpModelApiWithSuffix(id binaryMessenger, NSObject *api, NSString *messageChannelSuffix) { + messageChannelSuffix = messageChannelSuffix.length > 0 ? [NSString stringWithFormat: @".%@", messageChannelSuffix] : @""; { NSObject *taskQueue = [binaryMessenger makeBackgroundTaskQueue]; FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.pytorch_lite.ModelApi.loadModel" + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.pytorch_lite.ModelApi.loadModel", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:ModelApiGetCodec() + codec:nullGetPigeonCodec() taskQueue:taskQueue]; if (api) { NSCAssert([api respondsToSelector:@selector(loadModelModelPath:numberOfClasses:imageWidth:imageHeight:objectDetectionModelType:completion:)], @"ModelApi api (%@) doesn't respond to @selector(loadModelModelPath:numberOfClasses:imageWidth:imageHeight:objectDetectionModelType:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { - NSArray *args = message; + NSArray *args = message; NSString *arg_modelPath = GetNullableObjectAtIndex(args, 0); NSNumber *arg_numberOfClasses = GetNullableObjectAtIndex(args, 1); NSNumber *arg_imageWidth = GetNullableObjectAtIndex(args, 2); @@ -204,19 +200,19 @@ void ModelApiSetup(id binaryMessenger, NSObject *taskQueue = [binaryMessenger makeBackgroundTaskQueue]; FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.pytorch_lite.ModelApi.getPredictionCustom" + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.pytorch_lite.ModelApi.getPredictionCustom", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:ModelApiGetCodec() + codec:nullGetPigeonCodec() taskQueue:taskQueue]; if (api) { NSCAssert([api respondsToSelector:@selector(getPredictionCustomIndex:input:shape:dtype:completion:)], @"ModelApi api (%@) doesn't respond to @selector(getPredictionCustomIndex:input:shape:dtype:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { - NSArray *args = message; - NSNumber *arg_index = GetNullableObjectAtIndex(args, 0); + NSArray *args = message; + NSInteger arg_index = [GetNullableObjectAtIndex(args, 0) integerValue]; NSArray *arg_input = GetNullableObjectAtIndex(args, 1); NSArray *arg_shape = GetNullableObjectAtIndex(args, 2); NSString *arg_dtype = GetNullableObjectAtIndex(args, 3); - [api getPredictionCustomIndex:arg_index input:arg_input shape:arg_shape dtype:arg_dtype completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { + [api getPredictionCustomIndex:arg_index input:arg_input shape:arg_shape dtype:arg_dtype completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { callback(wrapResult(output, error)); }]; }]; @@ -229,15 +225,15 @@ void ModelApiSetup(id binaryMessenger, NSObject *taskQueue = [binaryMessenger makeBackgroundTaskQueue]; FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.pytorch_lite.ModelApi.getRawImagePredictionList" + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.pytorch_lite.ModelApi.getRawImagePredictionList", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:ModelApiGetCodec() + codec:nullGetPigeonCodec() taskQueue:taskQueue]; if (api) { NSCAssert([api respondsToSelector:@selector(getRawImagePredictionListIndex:imageData:completion:)], @"ModelApi api (%@) doesn't respond to @selector(getRawImagePredictionListIndex:imageData:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { - NSArray *args = message; - NSNumber *arg_index = GetNullableObjectAtIndex(args, 0); + NSArray *args = message; + NSInteger arg_index = [GetNullableObjectAtIndex(args, 0) integerValue]; FlutterStandardTypedData *arg_imageData = GetNullableObjectAtIndex(args, 1); [api getRawImagePredictionListIndex:arg_index imageData:arg_imageData completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { callback(wrapResult(output, error)); @@ -252,19 +248,19 @@ void ModelApiSetup(id binaryMessenger, NSObject *taskQueue = [binaryMessenger makeBackgroundTaskQueue]; FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.pytorch_lite.ModelApi.getRawImagePredictionListObjectDetection" + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.pytorch_lite.ModelApi.getRawImagePredictionListObjectDetection", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:ModelApiGetCodec() + codec:nullGetPigeonCodec() taskQueue:taskQueue]; if (api) { NSCAssert([api respondsToSelector:@selector(getRawImagePredictionListObjectDetectionIndex:imageData:minimumScore:IOUThreshold:boxesLimit:completion:)], @"ModelApi api (%@) doesn't respond to @selector(getRawImagePredictionListObjectDetectionIndex:imageData:minimumScore:IOUThreshold:boxesLimit:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { - NSArray *args = message; - NSNumber *arg_index = GetNullableObjectAtIndex(args, 0); + NSArray *args = message; + NSInteger arg_index = [GetNullableObjectAtIndex(args, 0) integerValue]; FlutterStandardTypedData *arg_imageData = GetNullableObjectAtIndex(args, 1); - NSNumber *arg_minimumScore = GetNullableObjectAtIndex(args, 2); - NSNumber *arg_IOUThreshold = GetNullableObjectAtIndex(args, 3); - NSNumber *arg_boxesLimit = GetNullableObjectAtIndex(args, 4); + double arg_minimumScore = [GetNullableObjectAtIndex(args, 2) doubleValue]; + double arg_IOUThreshold = [GetNullableObjectAtIndex(args, 3) doubleValue]; + NSInteger arg_boxesLimit = [GetNullableObjectAtIndex(args, 4) integerValue]; [api getRawImagePredictionListObjectDetectionIndex:arg_index imageData:arg_imageData minimumScore:arg_minimumScore IOUThreshold:arg_IOUThreshold boxesLimit:arg_boxesLimit completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { callback(wrapResult(output, error)); }]; @@ -278,15 +274,15 @@ void ModelApiSetup(id binaryMessenger, NSObject *taskQueue = [binaryMessenger makeBackgroundTaskQueue]; FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.pytorch_lite.ModelApi.getImagePredictionList" + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.pytorch_lite.ModelApi.getImagePredictionList", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:ModelApiGetCodec() + codec:nullGetPigeonCodec() taskQueue:taskQueue]; if (api) { NSCAssert([api respondsToSelector:@selector(getImagePredictionListIndex:imageData:imageBytesList:imageWidthForBytesList:imageHeightForBytesList:mean:std:completion:)], @"ModelApi api (%@) doesn't respond to @selector(getImagePredictionListIndex:imageData:imageBytesList:imageWidthForBytesList:imageHeightForBytesList:mean:std:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { - NSArray *args = message; - NSNumber *arg_index = GetNullableObjectAtIndex(args, 0); + NSArray *args = message; + NSInteger arg_index = [GetNullableObjectAtIndex(args, 0) integerValue]; FlutterStandardTypedData *arg_imageData = GetNullableObjectAtIndex(args, 1); NSArray *arg_imageBytesList = GetNullableObjectAtIndex(args, 2); NSNumber *arg_imageWidthForBytesList = GetNullableObjectAtIndex(args, 3); @@ -306,22 +302,22 @@ void ModelApiSetup(id binaryMessenger, NSObject *taskQueue = [binaryMessenger makeBackgroundTaskQueue]; FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.pytorch_lite.ModelApi.getImagePredictionListObjectDetection" + initWithName:[NSString stringWithFormat:@"%@%@", @"dev.flutter.pigeon.pytorch_lite.ModelApi.getImagePredictionListObjectDetection", messageChannelSuffix] binaryMessenger:binaryMessenger - codec:ModelApiGetCodec() + codec:nullGetPigeonCodec() taskQueue:taskQueue]; if (api) { NSCAssert([api respondsToSelector:@selector(getImagePredictionListObjectDetectionIndex:imageData:imageBytesList:imageWidthForBytesList:imageHeightForBytesList:minimumScore:IOUThreshold:boxesLimit:completion:)], @"ModelApi api (%@) doesn't respond to @selector(getImagePredictionListObjectDetectionIndex:imageData:imageBytesList:imageWidthForBytesList:imageHeightForBytesList:minimumScore:IOUThreshold:boxesLimit:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { - NSArray *args = message; - NSNumber *arg_index = GetNullableObjectAtIndex(args, 0); + NSArray *args = message; + NSInteger arg_index = [GetNullableObjectAtIndex(args, 0) integerValue]; FlutterStandardTypedData *arg_imageData = GetNullableObjectAtIndex(args, 1); NSArray *arg_imageBytesList = GetNullableObjectAtIndex(args, 2); NSNumber *arg_imageWidthForBytesList = GetNullableObjectAtIndex(args, 3); NSNumber *arg_imageHeightForBytesList = GetNullableObjectAtIndex(args, 4); - NSNumber *arg_minimumScore = GetNullableObjectAtIndex(args, 5); - NSNumber *arg_IOUThreshold = GetNullableObjectAtIndex(args, 6); - NSNumber *arg_boxesLimit = GetNullableObjectAtIndex(args, 7); + double arg_minimumScore = [GetNullableObjectAtIndex(args, 5) doubleValue]; + double arg_IOUThreshold = [GetNullableObjectAtIndex(args, 6) doubleValue]; + NSInteger arg_boxesLimit = [GetNullableObjectAtIndex(args, 7) integerValue]; [api getImagePredictionListObjectDetectionIndex:arg_index imageData:arg_imageData imageBytesList:arg_imageBytesList imageWidthForBytesList:arg_imageWidthForBytesList imageHeightForBytesList:arg_imageHeightForBytesList minimumScore:arg_minimumScore IOUThreshold:arg_IOUThreshold boxesLimit:arg_boxesLimit completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { callback(wrapResult(output, error)); }]; diff --git a/lib/pigeon.dart b/lib/pigeon.dart index d7dc4c4..bb5c731 100644 --- a/lib/pigeon.dart +++ b/lib/pigeon.dart @@ -1,6 +1,6 @@ -// Autogenerated from Pigeon (v11.0.1), do not edit directly. +// Autogenerated from Pigeon (v22.4.2), do not edit directly. // See also: https://pub.dev/packages/pigeon -// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; @@ -8,6 +8,13 @@ import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; import 'package:flutter/services.dart'; +PlatformException _createConnectionError(String channelName) { + return PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel: "$channelName".', + ); +} + class PyTorchRect { PyTorchRect({ required this.left, @@ -75,7 +82,7 @@ class ResultObjectDetection { classIndex, className, score, - rect.encode(), + rect, ]; } @@ -85,21 +92,25 @@ class ResultObjectDetection { classIndex: result[0]! as int, className: result[1] as String?, score: result[2]! as double, - rect: PyTorchRect.decode(result[3]! as List), + rect: result[3]! as PyTorchRect, ); } } -class _ModelApiCodec extends StandardMessageCodec { - const _ModelApiCodec(); + +class _PigeonCodec extends StandardMessageCodec { + const _PigeonCodec(); @override void writeValue(WriteBuffer buffer, Object? value) { - if (value is PyTorchRect) { - buffer.putUint8(128); - writeValue(buffer, value.encode()); - } else if (value is ResultObjectDetection) { + if (value is int) { + buffer.putUint8(4); + buffer.putInt64(value); + } else if (value is PyTorchRect) { buffer.putUint8(129); writeValue(buffer, value.encode()); + } else if (value is ResultObjectDetection) { + buffer.putUint8(130); + writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } @@ -108,9 +119,9 @@ class _ModelApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: - return PyTorchRect.decode(readValue(buffer)!); case 129: + return PyTorchRect.decode(readValue(buffer)!); + case 130: return ResultObjectDetection.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -122,171 +133,174 @@ class ModelApi { /// Constructor for [ModelApi]. The [binaryMessenger] named argument is /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. - ModelApi({BinaryMessenger? binaryMessenger}) - : _binaryMessenger = binaryMessenger; - final BinaryMessenger? _binaryMessenger; + ModelApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; - static const MessageCodec codec = _ModelApiCodec(); + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); - Future loadModel(String arg_modelPath, int? arg_numberOfClasses, int? arg_imageWidth, int? arg_imageHeight, int? arg_objectDetectionModelType) async { - final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.pytorch_lite.ModelApi.loadModel', codec, - binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send([arg_modelPath, arg_numberOfClasses, arg_imageWidth, arg_imageHeight, arg_objectDetectionModelType]) as List?; - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel.', - ); - } else if (replyList.length > 1) { + final String pigeonVar_messageChannelSuffix; + + Future loadModel(String modelPath, int? numberOfClasses, int? imageWidth, int? imageHeight, int? objectDetectionModelType) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.pytorch_lite.ModelApi.loadModel$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final List? pigeonVar_replyList = + await pigeonVar_channel.send([modelPath, numberOfClasses, imageWidth, imageHeight, objectDetectionModelType]) as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { throw PlatformException( - code: replyList[0]! as String, - message: replyList[1] as String?, - details: replyList[2], + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], ); - } else if (replyList[0] == null) { + } else if (pigeonVar_replyList[0] == null) { throw PlatformException( code: 'null-error', message: 'Host platform returned null value for non-null return value.', ); } else { - return (replyList[0] as int?)!; + return (pigeonVar_replyList[0] as int?)!; } } ///predicts abstract number input - Future?> getPredictionCustom(int arg_index, List arg_input, List arg_shape, String arg_dtype) async { - final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.pytorch_lite.ModelApi.getPredictionCustom', codec, - binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send([arg_index, arg_input, arg_shape, arg_dtype]) as List?; - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel.', - ); - } else if (replyList.length > 1) { + Future?> getPredictionCustom(int index, List input, List shape, String dtype) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.pytorch_lite.ModelApi.getPredictionCustom$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final List? pigeonVar_replyList = + await pigeonVar_channel.send([index, input, shape, dtype]) as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { throw PlatformException( - code: replyList[0]! as String, - message: replyList[1] as String?, - details: replyList[2], + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], ); } else { - return (replyList[0] as List?); + return (pigeonVar_replyList[0] as List?); } } ///predicts raw image but returns the raw net output - Future> getRawImagePredictionList(int arg_index, Uint8List arg_imageData) async { - final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.pytorch_lite.ModelApi.getRawImagePredictionList', codec, - binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send([arg_index, arg_imageData]) as List?; - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel.', - ); - } else if (replyList.length > 1) { + Future> getRawImagePredictionList(int index, Uint8List imageData) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.pytorch_lite.ModelApi.getRawImagePredictionList$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final List? pigeonVar_replyList = + await pigeonVar_channel.send([index, imageData]) as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { throw PlatformException( - code: replyList[0]! as String, - message: replyList[1] as String?, - details: replyList[2], + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], ); - } else if (replyList[0] == null) { + } else if (pigeonVar_replyList[0] == null) { throw PlatformException( code: 'null-error', message: 'Host platform returned null value for non-null return value.', ); } else { - return (replyList[0] as List?)!.cast(); + return (pigeonVar_replyList[0] as List?)!.cast(); } } ///predicts raw image but returns the raw net output - Future> getRawImagePredictionListObjectDetection(int arg_index, Uint8List arg_imageData, double arg_minimumScore, double arg_IOUThreshold, int arg_boxesLimit) async { - final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.pytorch_lite.ModelApi.getRawImagePredictionListObjectDetection', codec, - binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send([arg_index, arg_imageData, arg_minimumScore, arg_IOUThreshold, arg_boxesLimit]) as List?; - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel.', - ); - } else if (replyList.length > 1) { + Future> getRawImagePredictionListObjectDetection(int index, Uint8List imageData, double minimumScore, double IOUThreshold, int boxesLimit) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.pytorch_lite.ModelApi.getRawImagePredictionListObjectDetection$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final List? pigeonVar_replyList = + await pigeonVar_channel.send([index, imageData, minimumScore, IOUThreshold, boxesLimit]) as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { throw PlatformException( - code: replyList[0]! as String, - message: replyList[1] as String?, - details: replyList[2], + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], ); - } else if (replyList[0] == null) { + } else if (pigeonVar_replyList[0] == null) { throw PlatformException( code: 'null-error', message: 'Host platform returned null value for non-null return value.', ); } else { - return (replyList[0] as List?)!.cast(); + return (pigeonVar_replyList[0] as List?)!.cast(); } } ///predicts image but returns the raw net output - Future> getImagePredictionList(int arg_index, Uint8List? arg_imageData, List? arg_imageBytesList, int? arg_imageWidthForBytesList, int? arg_imageHeightForBytesList, List arg_mean, List arg_std) async { - final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.pytorch_lite.ModelApi.getImagePredictionList', codec, - binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send([arg_index, arg_imageData, arg_imageBytesList, arg_imageWidthForBytesList, arg_imageHeightForBytesList, arg_mean, arg_std]) as List?; - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel.', - ); - } else if (replyList.length > 1) { + Future> getImagePredictionList(int index, Uint8List? imageData, List? imageBytesList, int? imageWidthForBytesList, int? imageHeightForBytesList, List mean, List std) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.pytorch_lite.ModelApi.getImagePredictionList$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final List? pigeonVar_replyList = + await pigeonVar_channel.send([index, imageData, imageBytesList, imageWidthForBytesList, imageHeightForBytesList, mean, std]) as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { throw PlatformException( - code: replyList[0]! as String, - message: replyList[1] as String?, - details: replyList[2], + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], ); - } else if (replyList[0] == null) { + } else if (pigeonVar_replyList[0] == null) { throw PlatformException( code: 'null-error', message: 'Host platform returned null value for non-null return value.', ); } else { - return (replyList[0] as List?)!.cast(); + return (pigeonVar_replyList[0] as List?)!.cast(); } } ///predicts image but returns the output detections - Future> getImagePredictionListObjectDetection(int arg_index, Uint8List? arg_imageData, List? arg_imageBytesList, int? arg_imageWidthForBytesList, int? arg_imageHeightForBytesList, double arg_minimumScore, double arg_IOUThreshold, int arg_boxesLimit) async { - final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.pytorch_lite.ModelApi.getImagePredictionListObjectDetection', codec, - binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send([arg_index, arg_imageData, arg_imageBytesList, arg_imageWidthForBytesList, arg_imageHeightForBytesList, arg_minimumScore, arg_IOUThreshold, arg_boxesLimit]) as List?; - if (replyList == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel.', - ); - } else if (replyList.length > 1) { + Future> getImagePredictionListObjectDetection(int index, Uint8List? imageData, List? imageBytesList, int? imageWidthForBytesList, int? imageHeightForBytesList, double minimumScore, double IOUThreshold, int boxesLimit) async { + final String pigeonVar_channelName = 'dev.flutter.pigeon.pytorch_lite.ModelApi.getImagePredictionListObjectDetection$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final List? pigeonVar_replyList = + await pigeonVar_channel.send([index, imageData, imageBytesList, imageWidthForBytesList, imageHeightForBytesList, minimumScore, IOUThreshold, boxesLimit]) as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { throw PlatformException( - code: replyList[0]! as String, - message: replyList[1] as String?, - details: replyList[2], + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], ); - } else if (replyList[0] == null) { + } else if (pigeonVar_replyList[0] == null) { throw PlatformException( code: 'null-error', message: 'Host platform returned null value for non-null return value.', ); } else { - return (replyList[0] as List?)!.cast(); + return (pigeonVar_replyList[0] as List?)!.cast(); } } } diff --git a/pubspec.yaml b/pubspec.yaml index 9732e07..df475a5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -21,8 +21,8 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^4.0.0 - pigeon: ^11.0.0 + flutter_lints: ^5.0.0 + pigeon: ^22.4.2 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec