diff --git a/.gitignore b/.gitignore index 071964ca9..4c2fa0049 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ # Generated files -*.mocks.dart -*.g.dart -android/**/generated/ -ios/**/Generated/ +#*.mocks.dart +#*.g.dart +#android/**/generated/ +#ios/**/Generated/ # Miscellaneous *.class diff --git a/android/build.gradle b/android/build.gradle index e3b5d0bca..418425381 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -16,6 +16,9 @@ rootProject.allprojects { repositories { google() mavenCentral() + maven { + url 'https://oss.sonatype.org/content/repositories/snapshots' + } } } @@ -44,7 +47,7 @@ android { } dependencies { - api 'com.instabug.library:instabug:14.1.0' + api 'com.instabug.library:instabug:14.2.1.6692565-SNAPSHOT' testImplementation 'junit:junit:4.13.2' testImplementation "org.mockito:mockito-inline:3.12.1" testImplementation "io.mockk:mockk:1.13.13" diff --git a/android/src/main/java/com/instabug/flutter/generated/ApmPigeon.java b/android/src/main/java/com/instabug/flutter/generated/ApmPigeon.java new file mode 100644 index 000000000..1dcad08c5 --- /dev/null +++ b/android/src/main/java/com/instabug/flutter/generated/ApmPigeon.java @@ -0,0 +1,617 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +package com.instabug.flutter.generated; + +import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import io.flutter.plugin.common.BasicMessageChannel; +import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugin.common.MessageCodec; +import io.flutter.plugin.common.StandardMessageCodec; +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** Generated class from Pigeon. */ +@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression", "serial"}) +public class ApmPigeon { + + /** Error class for passing custom error details to Flutter via a thrown PlatformException. */ + public static class FlutterError extends RuntimeException { + + /** The error code. */ + public final String code; + + /** The error details. Must be a datatype supported by the api codec. */ + public final Object details; + + public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) + { + super(message); + this.code = code; + this.details = details; + } + } + + @NonNull + protected static ArrayList wrapError(@NonNull Throwable exception) { + ArrayList errorList = new ArrayList(3); + if (exception instanceof FlutterError) { + FlutterError error = (FlutterError) exception; + errorList.add(error.code); + errorList.add(error.getMessage()); + errorList.add(error.details); + } else { + errorList.add(exception.toString()); + errorList.add(exception.getClass().getSimpleName()); + errorList.add( + "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); + } + return errorList; + } + + public interface Result { + @SuppressWarnings("UnknownNullness") + void success(T result); + + void error(@NonNull Throwable error); + } + /** Generated interface from Pigeon that represents a handler of messages from Flutter. */ + public interface ApmHostApi { + + void setEnabled(@NonNull Boolean isEnabled); + + void isEnabled(@NonNull Result result); + + void setScreenLoadingEnabled(@NonNull Boolean isEnabled); + + void isScreenLoadingEnabled(@NonNull Result result); + + void setColdAppLaunchEnabled(@NonNull Boolean isEnabled); + + void setAutoUITraceEnabled(@NonNull Boolean isEnabled); + + void startExecutionTrace(@NonNull String id, @NonNull String name, @NonNull Result result); + + void startFlow(@NonNull String name); + + void setFlowAttribute(@NonNull String name, @NonNull String key, @Nullable String value); + + void endFlow(@NonNull String name); + + void setExecutionTraceAttribute(@NonNull String id, @NonNull String key, @NonNull String value); + + void endExecutionTrace(@NonNull String id); + + void startUITrace(@NonNull String name); + + void endUITrace(); + + void endAppLaunch(); + + void networkLogAndroid(@NonNull Map data); + + void startCpUiTrace(@NonNull String screenName, @NonNull Long microTimeStamp, @NonNull Long traceId); + + void reportScreenLoadingCP(@NonNull Long startTimeStampMicro, @NonNull Long durationMicro, @NonNull Long uiTraceId); + + void endScreenLoadingCP(@NonNull Long timeStampMicro, @NonNull Long uiTraceId); + + void isEndScreenLoadingEnabled(@NonNull Result result); + + /** The codec used by ApmHostApi. */ + static @NonNull MessageCodec getCodec() { + return new StandardMessageCodec(); + } + /**Sets up an instance of `ApmHostApi` to handle messages through the `binaryMessenger`. */ + static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable ApmHostApi api) { + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.setEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setEnabled(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.isEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + Result resultCallback = + new Result() { + public void success(Boolean result) { + wrapped.add(0, result); + reply.reply(wrapped); + } + + public void error(Throwable error) { + ArrayList wrappedError = wrapError(error); + reply.reply(wrappedError); + } + }; + + api.isEnabled(resultCallback); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.setScreenLoadingEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setScreenLoadingEnabled(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.isScreenLoadingEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + Result resultCallback = + new Result() { + public void success(Boolean result) { + wrapped.add(0, result); + reply.reply(wrapped); + } + + public void error(Throwable error) { + ArrayList wrappedError = wrapError(error); + reply.reply(wrappedError); + } + }; + + api.isScreenLoadingEnabled(resultCallback); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.setColdAppLaunchEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setColdAppLaunchEnabled(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.setAutoUITraceEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setAutoUITraceEnabled(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.startExecutionTrace", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String idArg = (String) args.get(0); + String nameArg = (String) args.get(1); + Result resultCallback = + new Result() { + public void success(String result) { + wrapped.add(0, result); + reply.reply(wrapped); + } + + public void error(Throwable error) { + ArrayList wrappedError = wrapError(error); + reply.reply(wrappedError); + } + }; + + api.startExecutionTrace(idArg, nameArg, resultCallback); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.startFlow", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String nameArg = (String) args.get(0); + try { + api.startFlow(nameArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.setFlowAttribute", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String nameArg = (String) args.get(0); + String keyArg = (String) args.get(1); + String valueArg = (String) args.get(2); + try { + api.setFlowAttribute(nameArg, keyArg, valueArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.endFlow", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String nameArg = (String) args.get(0); + try { + api.endFlow(nameArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.setExecutionTraceAttribute", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String idArg = (String) args.get(0); + String keyArg = (String) args.get(1); + String valueArg = (String) args.get(2); + try { + api.setExecutionTraceAttribute(idArg, keyArg, valueArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.endExecutionTrace", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String idArg = (String) args.get(0); + try { + api.endExecutionTrace(idArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.startUITrace", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String nameArg = (String) args.get(0); + try { + api.startUITrace(nameArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.endUITrace", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.endUITrace(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.endAppLaunch", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.endAppLaunch(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.networkLogAndroid", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Map dataArg = (Map) args.get(0); + try { + api.networkLogAndroid(dataArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.startCpUiTrace", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String screenNameArg = (String) args.get(0); + Number microTimeStampArg = (Number) args.get(1); + Number traceIdArg = (Number) args.get(2); + try { + api.startCpUiTrace(screenNameArg, (microTimeStampArg == null) ? null : microTimeStampArg.longValue(), (traceIdArg == null) ? null : traceIdArg.longValue()); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.reportScreenLoadingCP", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Number startTimeStampMicroArg = (Number) args.get(0); + Number durationMicroArg = (Number) args.get(1); + Number uiTraceIdArg = (Number) args.get(2); + try { + api.reportScreenLoadingCP((startTimeStampMicroArg == null) ? null : startTimeStampMicroArg.longValue(), (durationMicroArg == null) ? null : durationMicroArg.longValue(), (uiTraceIdArg == null) ? null : uiTraceIdArg.longValue()); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.endScreenLoadingCP", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Number timeStampMicroArg = (Number) args.get(0); + Number uiTraceIdArg = (Number) args.get(1); + try { + api.endScreenLoadingCP((timeStampMicroArg == null) ? null : timeStampMicroArg.longValue(), (uiTraceIdArg == null) ? null : uiTraceIdArg.longValue()); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.ApmHostApi.isEndScreenLoadingEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + Result resultCallback = + new Result() { + public void success(Boolean result) { + wrapped.add(0, result); + reply.reply(wrapped); + } + + public void error(Throwable error) { + ArrayList wrappedError = wrapError(error); + reply.reply(wrappedError); + } + }; + + api.isEndScreenLoadingEnabled(resultCallback); + }); + } else { + channel.setMessageHandler(null); + } + } + } + } +} diff --git a/android/src/main/java/com/instabug/flutter/generated/BugReportingPigeon.java b/android/src/main/java/com/instabug/flutter/generated/BugReportingPigeon.java new file mode 100644 index 000000000..88f519a6c --- /dev/null +++ b/android/src/main/java/com/instabug/flutter/generated/BugReportingPigeon.java @@ -0,0 +1,522 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +package com.instabug.flutter.generated; + +import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import io.flutter.plugin.common.BasicMessageChannel; +import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugin.common.MessageCodec; +import io.flutter.plugin.common.StandardMessageCodec; +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** Generated class from Pigeon. */ +@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression", "serial"}) +public class BugReportingPigeon { + + /** Error class for passing custom error details to Flutter via a thrown PlatformException. */ + public static class FlutterError extends RuntimeException { + + /** The error code. */ + public final String code; + + /** The error details. Must be a datatype supported by the api codec. */ + public final Object details; + + public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) + { + super(message); + this.code = code; + this.details = details; + } + } + + @NonNull + protected static ArrayList wrapError(@NonNull Throwable exception) { + ArrayList errorList = new ArrayList(3); + if (exception instanceof FlutterError) { + FlutterError error = (FlutterError) exception; + errorList.add(error.code); + errorList.add(error.getMessage()); + errorList.add(error.details); + } else { + errorList.add(exception.toString()); + errorList.add(exception.getClass().getSimpleName()); + errorList.add( + "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); + } + return errorList; + } + /** Generated class from Pigeon that represents Flutter messages that can be called from Java. */ + public static class BugReportingFlutterApi { + private final @NonNull BinaryMessenger binaryMessenger; + + public BugReportingFlutterApi(@NonNull BinaryMessenger argBinaryMessenger) { + this.binaryMessenger = argBinaryMessenger; + } + + /** Public interface for sending reply. */ + @SuppressWarnings("UnknownNullness") + public interface Reply { + void reply(T reply); + } + /** The codec used by BugReportingFlutterApi. */ + static @NonNull MessageCodec getCodec() { + return new StandardMessageCodec(); + } + public void onSdkInvoke(@NonNull Reply callback) { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingFlutterApi.onSdkInvoke", getCodec()); + channel.send( + null, + channelReply -> callback.reply(null)); + } + public void onSdkDismiss(@NonNull String dismissTypeArg, @NonNull String reportTypeArg, @NonNull Reply callback) { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingFlutterApi.onSdkDismiss", getCodec()); + channel.send( + new ArrayList(Arrays.asList(dismissTypeArg, reportTypeArg)), + channelReply -> callback.reply(null)); + } + } + /** Generated interface from Pigeon that represents a handler of messages from Flutter. */ + public interface BugReportingHostApi { + + void setEnabled(@NonNull Boolean isEnabled); + + void show(@NonNull String reportType, @NonNull List invocationOptions); + + void setInvocationEvents(@NonNull List events); + + void setReportTypes(@NonNull List types); + + void setExtendedBugReportMode(@NonNull String mode); + + void setInvocationOptions(@NonNull List options); + + void setFloatingButtonEdge(@NonNull String edge, @NonNull Long offset); + + void setVideoRecordingFloatingButtonPosition(@NonNull String position); + + void setShakingThresholdForiPhone(@NonNull Double threshold); + + void setShakingThresholdForiPad(@NonNull Double threshold); + + void setShakingThresholdForAndroid(@NonNull Long threshold); + + void setEnabledAttachmentTypes(@NonNull Boolean screenshot, @NonNull Boolean extraScreenshot, @NonNull Boolean galleryImage, @NonNull Boolean screenRecording); + + void bindOnInvokeCallback(); + + void bindOnDismissCallback(); + + void setDisclaimerText(@NonNull String text); + + void setCommentMinimumCharacterCount(@NonNull Long limit, @Nullable List reportTypes); + + /** The codec used by BugReportingHostApi. */ + static @NonNull MessageCodec getCodec() { + return new StandardMessageCodec(); + } + /**Sets up an instance of `BugReportingHostApi` to handle messages through the `binaryMessenger`. */ + static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable BugReportingHostApi api) { + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setEnabled(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.show", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String reportTypeArg = (String) args.get(0); + List invocationOptionsArg = (List) args.get(1); + try { + api.show(reportTypeArg, invocationOptionsArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setInvocationEvents", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + List eventsArg = (List) args.get(0); + try { + api.setInvocationEvents(eventsArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setReportTypes", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + List typesArg = (List) args.get(0); + try { + api.setReportTypes(typesArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setExtendedBugReportMode", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String modeArg = (String) args.get(0); + try { + api.setExtendedBugReportMode(modeArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setInvocationOptions", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + List optionsArg = (List) args.get(0); + try { + api.setInvocationOptions(optionsArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setFloatingButtonEdge", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String edgeArg = (String) args.get(0); + Number offsetArg = (Number) args.get(1); + try { + api.setFloatingButtonEdge(edgeArg, (offsetArg == null) ? null : offsetArg.longValue()); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setVideoRecordingFloatingButtonPosition", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String positionArg = (String) args.get(0); + try { + api.setVideoRecordingFloatingButtonPosition(positionArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setShakingThresholdForiPhone", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Double thresholdArg = (Double) args.get(0); + try { + api.setShakingThresholdForiPhone(thresholdArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setShakingThresholdForiPad", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Double thresholdArg = (Double) args.get(0); + try { + api.setShakingThresholdForiPad(thresholdArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setShakingThresholdForAndroid", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Number thresholdArg = (Number) args.get(0); + try { + api.setShakingThresholdForAndroid((thresholdArg == null) ? null : thresholdArg.longValue()); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setEnabledAttachmentTypes", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean screenshotArg = (Boolean) args.get(0); + Boolean extraScreenshotArg = (Boolean) args.get(1); + Boolean galleryImageArg = (Boolean) args.get(2); + Boolean screenRecordingArg = (Boolean) args.get(3); + try { + api.setEnabledAttachmentTypes(screenshotArg, extraScreenshotArg, galleryImageArg, screenRecordingArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.bindOnInvokeCallback", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.bindOnInvokeCallback(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.bindOnDismissCallback", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.bindOnDismissCallback(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setDisclaimerText", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String textArg = (String) args.get(0); + try { + api.setDisclaimerText(textArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setCommentMinimumCharacterCount", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Number limitArg = (Number) args.get(0); + List reportTypesArg = (List) args.get(1); + try { + api.setCommentMinimumCharacterCount((limitArg == null) ? null : limitArg.longValue(), reportTypesArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + } + } +} diff --git a/android/src/main/java/com/instabug/flutter/generated/CrashReportingPigeon.java b/android/src/main/java/com/instabug/flutter/generated/CrashReportingPigeon.java new file mode 100644 index 000000000..3994a6bb8 --- /dev/null +++ b/android/src/main/java/com/instabug/flutter/generated/CrashReportingPigeon.java @@ -0,0 +1,152 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +package com.instabug.flutter.generated; + +import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import io.flutter.plugin.common.BasicMessageChannel; +import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugin.common.MessageCodec; +import io.flutter.plugin.common.StandardMessageCodec; +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** Generated class from Pigeon. */ +@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression", "serial"}) +public class CrashReportingPigeon { + + /** Error class for passing custom error details to Flutter via a thrown PlatformException. */ + public static class FlutterError extends RuntimeException { + + /** The error code. */ + public final String code; + + /** The error details. Must be a datatype supported by the api codec. */ + public final Object details; + + public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) + { + super(message); + this.code = code; + this.details = details; + } + } + + @NonNull + protected static ArrayList wrapError(@NonNull Throwable exception) { + ArrayList errorList = new ArrayList(3); + if (exception instanceof FlutterError) { + FlutterError error = (FlutterError) exception; + errorList.add(error.code); + errorList.add(error.getMessage()); + errorList.add(error.details); + } else { + errorList.add(exception.toString()); + errorList.add(exception.getClass().getSimpleName()); + errorList.add( + "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); + } + return errorList; + } + /** Generated interface from Pigeon that represents a handler of messages from Flutter. */ + public interface CrashReportingHostApi { + + void setEnabled(@NonNull Boolean isEnabled); + + void send(@NonNull String jsonCrash, @NonNull Boolean isHandled); + + void sendNonFatalError(@NonNull String jsonCrash, @Nullable Map userAttributes, @Nullable String fingerprint, @NonNull String nonFatalExceptionLevel); + + /** The codec used by CrashReportingHostApi. */ + static @NonNull MessageCodec getCodec() { + return new StandardMessageCodec(); + } + /**Sets up an instance of `CrashReportingHostApi` to handle messages through the `binaryMessenger`. */ + static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable CrashReportingHostApi api) { + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.CrashReportingHostApi.setEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setEnabled(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.CrashReportingHostApi.send", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String jsonCrashArg = (String) args.get(0); + Boolean isHandledArg = (Boolean) args.get(1); + try { + api.send(jsonCrashArg, isHandledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.CrashReportingHostApi.sendNonFatalError", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String jsonCrashArg = (String) args.get(0); + Map userAttributesArg = (Map) args.get(1); + String fingerprintArg = (String) args.get(2); + String nonFatalExceptionLevelArg = (String) args.get(3); + try { + api.sendNonFatalError(jsonCrashArg, userAttributesArg, fingerprintArg, nonFatalExceptionLevelArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + } + } +} diff --git a/android/src/main/java/com/instabug/flutter/generated/FeatureRequestsPigeon.java b/android/src/main/java/com/instabug/flutter/generated/FeatureRequestsPigeon.java new file mode 100644 index 000000000..6afef5901 --- /dev/null +++ b/android/src/main/java/com/instabug/flutter/generated/FeatureRequestsPigeon.java @@ -0,0 +1,121 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +package com.instabug.flutter.generated; + +import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import io.flutter.plugin.common.BasicMessageChannel; +import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugin.common.MessageCodec; +import io.flutter.plugin.common.StandardMessageCodec; +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** Generated class from Pigeon. */ +@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression", "serial"}) +public class FeatureRequestsPigeon { + + /** Error class for passing custom error details to Flutter via a thrown PlatformException. */ + public static class FlutterError extends RuntimeException { + + /** The error code. */ + public final String code; + + /** The error details. Must be a datatype supported by the api codec. */ + public final Object details; + + public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) + { + super(message); + this.code = code; + this.details = details; + } + } + + @NonNull + protected static ArrayList wrapError(@NonNull Throwable exception) { + ArrayList errorList = new ArrayList(3); + if (exception instanceof FlutterError) { + FlutterError error = (FlutterError) exception; + errorList.add(error.code); + errorList.add(error.getMessage()); + errorList.add(error.details); + } else { + errorList.add(exception.toString()); + errorList.add(exception.getClass().getSimpleName()); + errorList.add( + "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); + } + return errorList; + } + /** Generated interface from Pigeon that represents a handler of messages from Flutter. */ + public interface FeatureRequestsHostApi { + + void show(); + + void setEmailFieldRequired(@NonNull Boolean isRequired, @NonNull List actionTypes); + + /** The codec used by FeatureRequestsHostApi. */ + static @NonNull MessageCodec getCodec() { + return new StandardMessageCodec(); + } + /**Sets up an instance of `FeatureRequestsHostApi` to handle messages through the `binaryMessenger`. */ + static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable FeatureRequestsHostApi api) { + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.FeatureRequestsHostApi.show", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.show(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.FeatureRequestsHostApi.setEmailFieldRequired", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isRequiredArg = (Boolean) args.get(0); + List actionTypesArg = (List) args.get(1); + try { + api.setEmailFieldRequired(isRequiredArg, actionTypesArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + } + } +} diff --git a/android/src/main/java/com/instabug/flutter/generated/InstabugLogPigeon.java b/android/src/main/java/com/instabug/flutter/generated/InstabugLogPigeon.java new file mode 100644 index 000000000..ba2a09cfd --- /dev/null +++ b/android/src/main/java/com/instabug/flutter/generated/InstabugLogPigeon.java @@ -0,0 +1,224 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +package com.instabug.flutter.generated; + +import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import io.flutter.plugin.common.BasicMessageChannel; +import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugin.common.MessageCodec; +import io.flutter.plugin.common.StandardMessageCodec; +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** Generated class from Pigeon. */ +@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression", "serial"}) +public class InstabugLogPigeon { + + /** Error class for passing custom error details to Flutter via a thrown PlatformException. */ + public static class FlutterError extends RuntimeException { + + /** The error code. */ + public final String code; + + /** The error details. Must be a datatype supported by the api codec. */ + public final Object details; + + public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) + { + super(message); + this.code = code; + this.details = details; + } + } + + @NonNull + protected static ArrayList wrapError(@NonNull Throwable exception) { + ArrayList errorList = new ArrayList(3); + if (exception instanceof FlutterError) { + FlutterError error = (FlutterError) exception; + errorList.add(error.code); + errorList.add(error.getMessage()); + errorList.add(error.details); + } else { + errorList.add(exception.toString()); + errorList.add(exception.getClass().getSimpleName()); + errorList.add( + "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); + } + return errorList; + } + /** Generated interface from Pigeon that represents a handler of messages from Flutter. */ + public interface InstabugLogHostApi { + + void logVerbose(@NonNull String message); + + void logDebug(@NonNull String message); + + void logInfo(@NonNull String message); + + void logWarn(@NonNull String message); + + void logError(@NonNull String message); + + void clearAllLogs(); + + /** The codec used by InstabugLogHostApi. */ + static @NonNull MessageCodec getCodec() { + return new StandardMessageCodec(); + } + /**Sets up an instance of `InstabugLogHostApi` to handle messages through the `binaryMessenger`. */ + static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable InstabugLogHostApi api) { + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.logVerbose", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String messageArg = (String) args.get(0); + try { + api.logVerbose(messageArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.logDebug", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String messageArg = (String) args.get(0); + try { + api.logDebug(messageArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.logInfo", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String messageArg = (String) args.get(0); + try { + api.logInfo(messageArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.logWarn", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String messageArg = (String) args.get(0); + try { + api.logWarn(messageArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.logError", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String messageArg = (String) args.get(0); + try { + api.logError(messageArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.clearAllLogs", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.clearAllLogs(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + } + } +} diff --git a/android/src/main/java/com/instabug/flutter/generated/InstabugPigeon.java b/android/src/main/java/com/instabug/flutter/generated/InstabugPigeon.java new file mode 100644 index 000000000..d00119625 --- /dev/null +++ b/android/src/main/java/com/instabug/flutter/generated/InstabugPigeon.java @@ -0,0 +1,1146 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +package com.instabug.flutter.generated; + +import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import io.flutter.plugin.common.BasicMessageChannel; +import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugin.common.MessageCodec; +import io.flutter.plugin.common.StandardMessageCodec; +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** Generated class from Pigeon. */ +@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression", "serial"}) +public class InstabugPigeon { + + /** Error class for passing custom error details to Flutter via a thrown PlatformException. */ + public static class FlutterError extends RuntimeException { + + /** The error code. */ + public final String code; + + /** The error details. Must be a datatype supported by the api codec. */ + public final Object details; + + public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) + { + super(message); + this.code = code; + this.details = details; + } + } + + @NonNull + protected static ArrayList wrapError(@NonNull Throwable exception) { + ArrayList errorList = new ArrayList(3); + if (exception instanceof FlutterError) { + FlutterError error = (FlutterError) exception; + errorList.add(error.code); + errorList.add(error.getMessage()); + errorList.add(error.details); + } else { + errorList.add(exception.toString()); + errorList.add(exception.getClass().getSimpleName()); + errorList.add( + "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); + } + return errorList; + } + + public interface Result { + @SuppressWarnings("UnknownNullness") + void success(T result); + + void error(@NonNull Throwable error); + } + /** Generated class from Pigeon that represents Flutter messages that can be called from Java. */ + public static class FeatureFlagsFlutterApi { + private final @NonNull BinaryMessenger binaryMessenger; + + public FeatureFlagsFlutterApi(@NonNull BinaryMessenger argBinaryMessenger) { + this.binaryMessenger = argBinaryMessenger; + } + + /** Public interface for sending reply. */ + @SuppressWarnings("UnknownNullness") + public interface Reply { + void reply(T reply); + } + /** The codec used by FeatureFlagsFlutterApi. */ + static @NonNull MessageCodec getCodec() { + return new StandardMessageCodec(); + } + public void onW3CFeatureFlagChange(@NonNull Boolean isW3cExternalTraceIDEnabledArg, @NonNull Boolean isW3cExternalGeneratedHeaderEnabledArg, @NonNull Boolean isW3cCaughtHeaderEnabledArg, @NonNull Reply callback) { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.FeatureFlagsFlutterApi.onW3CFeatureFlagChange", getCodec()); + channel.send( + new ArrayList(Arrays.asList(isW3cExternalTraceIDEnabledArg, isW3cExternalGeneratedHeaderEnabledArg, isW3cCaughtHeaderEnabledArg)), + channelReply -> callback.reply(null)); + } + } + /** Generated interface from Pigeon that represents a handler of messages from Flutter. */ + public interface InstabugHostApi { + + void setEnabled(@NonNull Boolean isEnabled); + + @NonNull + Boolean isEnabled(); + + @NonNull + Boolean isBuilt(); + + void init(@NonNull String token, @NonNull List invocationEvents, @NonNull String debugLogsLevel); + + void show(); + + void showWelcomeMessageWithMode(@NonNull String mode); + + void identifyUser(@NonNull String email, @Nullable String name, @Nullable String userId); + + void setUserData(@NonNull String data); + + void logUserEvent(@NonNull String name); + + void logOut(); + + void setLocale(@NonNull String locale); + + void setColorTheme(@NonNull String theme); + + void setWelcomeMessageMode(@NonNull String mode); + + void setPrimaryColor(@NonNull Long color); + + void setSessionProfilerEnabled(@NonNull Boolean enabled); + + void setValueForStringWithKey(@NonNull String value, @NonNull String key); + + void appendTags(@NonNull List tags); + + void resetTags(); + + void getTags(@NonNull Result> result); + + void addExperiments(@NonNull List experiments); + + void removeExperiments(@NonNull List experiments); + + void clearAllExperiments(); + + void addFeatureFlags(@NonNull Map featureFlagsMap); + + void removeFeatureFlags(@NonNull List featureFlags); + + void removeAllFeatureFlags(); + + void setUserAttribute(@NonNull String value, @NonNull String key); + + void removeUserAttribute(@NonNull String key); + + void getUserAttributeForKey(@NonNull String key, @NonNull Result result); + + void getUserAttributes(@NonNull Result> result); + + void setReproStepsConfig(@Nullable String bugMode, @Nullable String crashMode, @Nullable String sessionReplayMode); + + void reportScreenChange(@NonNull String screenName); + + void setCustomBrandingImage(@NonNull String light, @NonNull String dark); + + void setFont(@NonNull String font); + + void addFileAttachmentWithURL(@NonNull String filePath, @NonNull String fileName); + + void addFileAttachmentWithData(@NonNull byte[] data, @NonNull String fileName); + + void clearFileAttachments(); + + void networkLog(@NonNull Map data); + + void registerFeatureFlagChangeListener(); + + @NonNull + Map isW3CFeatureFlagsEnabled(); + + void willRedirectToStore(); + + /** The codec used by InstabugHostApi. */ + static @NonNull MessageCodec getCodec() { + return new StandardMessageCodec(); + } + /**Sets up an instance of `InstabugHostApi` to handle messages through the `binaryMessenger`. */ + static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable InstabugHostApi api) { + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setEnabled(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.isEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + Boolean output = api.isEnabled(); + wrapped.add(0, output); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.isBuilt", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + Boolean output = api.isBuilt(); + wrapped.add(0, output); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.init", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String tokenArg = (String) args.get(0); + List invocationEventsArg = (List) args.get(1); + String debugLogsLevelArg = (String) args.get(2); + try { + api.init(tokenArg, invocationEventsArg, debugLogsLevelArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.show", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.show(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.showWelcomeMessageWithMode", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String modeArg = (String) args.get(0); + try { + api.showWelcomeMessageWithMode(modeArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.identifyUser", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String emailArg = (String) args.get(0); + String nameArg = (String) args.get(1); + String userIdArg = (String) args.get(2); + try { + api.identifyUser(emailArg, nameArg, userIdArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setUserData", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String dataArg = (String) args.get(0); + try { + api.setUserData(dataArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.logUserEvent", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String nameArg = (String) args.get(0); + try { + api.logUserEvent(nameArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.logOut", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.logOut(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setLocale", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String localeArg = (String) args.get(0); + try { + api.setLocale(localeArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setColorTheme", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String themeArg = (String) args.get(0); + try { + api.setColorTheme(themeArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setWelcomeMessageMode", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String modeArg = (String) args.get(0); + try { + api.setWelcomeMessageMode(modeArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setPrimaryColor", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Number colorArg = (Number) args.get(0); + try { + api.setPrimaryColor((colorArg == null) ? null : colorArg.longValue()); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setSessionProfilerEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean enabledArg = (Boolean) args.get(0); + try { + api.setSessionProfilerEnabled(enabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setValueForStringWithKey", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String valueArg = (String) args.get(0); + String keyArg = (String) args.get(1); + try { + api.setValueForStringWithKey(valueArg, keyArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.appendTags", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + List tagsArg = (List) args.get(0); + try { + api.appendTags(tagsArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.resetTags", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.resetTags(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.getTags", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + Result> resultCallback = + new Result>() { + public void success(List result) { + wrapped.add(0, result); + reply.reply(wrapped); + } + + public void error(Throwable error) { + ArrayList wrappedError = wrapError(error); + reply.reply(wrappedError); + } + }; + + api.getTags(resultCallback); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.addExperiments", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + List experimentsArg = (List) args.get(0); + try { + api.addExperiments(experimentsArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.removeExperiments", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + List experimentsArg = (List) args.get(0); + try { + api.removeExperiments(experimentsArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.clearAllExperiments", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.clearAllExperiments(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.addFeatureFlags", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Map featureFlagsMapArg = (Map) args.get(0); + try { + api.addFeatureFlags(featureFlagsMapArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.removeFeatureFlags", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + List featureFlagsArg = (List) args.get(0); + try { + api.removeFeatureFlags(featureFlagsArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.removeAllFeatureFlags", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.removeAllFeatureFlags(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setUserAttribute", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String valueArg = (String) args.get(0); + String keyArg = (String) args.get(1); + try { + api.setUserAttribute(valueArg, keyArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.removeUserAttribute", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String keyArg = (String) args.get(0); + try { + api.removeUserAttribute(keyArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.getUserAttributeForKey", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String keyArg = (String) args.get(0); + Result resultCallback = + new Result() { + public void success(String result) { + wrapped.add(0, result); + reply.reply(wrapped); + } + + public void error(Throwable error) { + ArrayList wrappedError = wrapError(error); + reply.reply(wrappedError); + } + }; + + api.getUserAttributeForKey(keyArg, resultCallback); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.getUserAttributes", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + Result> resultCallback = + new Result>() { + public void success(Map result) { + wrapped.add(0, result); + reply.reply(wrapped); + } + + public void error(Throwable error) { + ArrayList wrappedError = wrapError(error); + reply.reply(wrappedError); + } + }; + + api.getUserAttributes(resultCallback); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setReproStepsConfig", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String bugModeArg = (String) args.get(0); + String crashModeArg = (String) args.get(1); + String sessionReplayModeArg = (String) args.get(2); + try { + api.setReproStepsConfig(bugModeArg, crashModeArg, sessionReplayModeArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.reportScreenChange", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String screenNameArg = (String) args.get(0); + try { + api.reportScreenChange(screenNameArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setCustomBrandingImage", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String lightArg = (String) args.get(0); + String darkArg = (String) args.get(1); + try { + api.setCustomBrandingImage(lightArg, darkArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setFont", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String fontArg = (String) args.get(0); + try { + api.setFont(fontArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.addFileAttachmentWithURL", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String filePathArg = (String) args.get(0); + String fileNameArg = (String) args.get(1); + try { + api.addFileAttachmentWithURL(filePathArg, fileNameArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.addFileAttachmentWithData", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + byte[] dataArg = (byte[]) args.get(0); + String fileNameArg = (String) args.get(1); + try { + api.addFileAttachmentWithData(dataArg, fileNameArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.clearFileAttachments", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.clearFileAttachments(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.networkLog", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Map dataArg = (Map) args.get(0); + try { + api.networkLog(dataArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.registerFeatureFlagChangeListener", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.registerFeatureFlagChangeListener(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.isW3CFeatureFlagsEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + Map output = api.isW3CFeatureFlagsEnabled(); + wrapped.add(0, output); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.InstabugHostApi.willRedirectToStore", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.willRedirectToStore(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + } + } +} diff --git a/android/src/main/java/com/instabug/flutter/generated/RepliesPigeon.java b/android/src/main/java/com/instabug/flutter/generated/RepliesPigeon.java new file mode 100644 index 000000000..3a22780c5 --- /dev/null +++ b/android/src/main/java/com/instabug/flutter/generated/RepliesPigeon.java @@ -0,0 +1,287 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +package com.instabug.flutter.generated; + +import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import io.flutter.plugin.common.BasicMessageChannel; +import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugin.common.MessageCodec; +import io.flutter.plugin.common.StandardMessageCodec; +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** Generated class from Pigeon. */ +@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression", "serial"}) +public class RepliesPigeon { + + /** Error class for passing custom error details to Flutter via a thrown PlatformException. */ + public static class FlutterError extends RuntimeException { + + /** The error code. */ + public final String code; + + /** The error details. Must be a datatype supported by the api codec. */ + public final Object details; + + public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) + { + super(message); + this.code = code; + this.details = details; + } + } + + @NonNull + protected static ArrayList wrapError(@NonNull Throwable exception) { + ArrayList errorList = new ArrayList(3); + if (exception instanceof FlutterError) { + FlutterError error = (FlutterError) exception; + errorList.add(error.code); + errorList.add(error.getMessage()); + errorList.add(error.details); + } else { + errorList.add(exception.toString()); + errorList.add(exception.getClass().getSimpleName()); + errorList.add( + "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); + } + return errorList; + } + + public interface Result { + @SuppressWarnings("UnknownNullness") + void success(T result); + + void error(@NonNull Throwable error); + } + /** Generated class from Pigeon that represents Flutter messages that can be called from Java. */ + public static class RepliesFlutterApi { + private final @NonNull BinaryMessenger binaryMessenger; + + public RepliesFlutterApi(@NonNull BinaryMessenger argBinaryMessenger) { + this.binaryMessenger = argBinaryMessenger; + } + + /** Public interface for sending reply. */ + @SuppressWarnings("UnknownNullness") + public interface Reply { + void reply(T reply); + } + /** The codec used by RepliesFlutterApi. */ + static @NonNull MessageCodec getCodec() { + return new StandardMessageCodec(); + } + public void onNewReply(@NonNull Reply callback) { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.RepliesFlutterApi.onNewReply", getCodec()); + channel.send( + null, + channelReply -> callback.reply(null)); + } + } + /** Generated interface from Pigeon that represents a handler of messages from Flutter. */ + public interface RepliesHostApi { + + void setEnabled(@NonNull Boolean isEnabled); + + void show(); + + void setInAppNotificationsEnabled(@NonNull Boolean isEnabled); + + void setInAppNotificationSound(@NonNull Boolean isEnabled); + + void getUnreadRepliesCount(@NonNull Result result); + + void hasChats(@NonNull Result result); + + void bindOnNewReplyCallback(); + + /** The codec used by RepliesHostApi. */ + static @NonNull MessageCodec getCodec() { + return new StandardMessageCodec(); + } + /**Sets up an instance of `RepliesHostApi` to handle messages through the `binaryMessenger`. */ + static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable RepliesHostApi api) { + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.RepliesHostApi.setEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setEnabled(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.RepliesHostApi.show", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.show(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.RepliesHostApi.setInAppNotificationsEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setInAppNotificationsEnabled(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.RepliesHostApi.setInAppNotificationSound", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setInAppNotificationSound(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.RepliesHostApi.getUnreadRepliesCount", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + Result resultCallback = + new Result() { + public void success(Long result) { + wrapped.add(0, result); + reply.reply(wrapped); + } + + public void error(Throwable error) { + ArrayList wrappedError = wrapError(error); + reply.reply(wrappedError); + } + }; + + api.getUnreadRepliesCount(resultCallback); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.RepliesHostApi.hasChats", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + Result resultCallback = + new Result() { + public void success(Boolean result) { + wrapped.add(0, result); + reply.reply(wrapped); + } + + public void error(Throwable error) { + ArrayList wrappedError = wrapError(error); + reply.reply(wrappedError); + } + }; + + api.hasChats(resultCallback); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.RepliesHostApi.bindOnNewReplyCallback", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.bindOnNewReplyCallback(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + } + } +} diff --git a/android/src/main/java/com/instabug/flutter/generated/SessionReplayPigeon.java b/android/src/main/java/com/instabug/flutter/generated/SessionReplayPigeon.java new file mode 100644 index 000000000..9b9a7b8eb --- /dev/null +++ b/android/src/main/java/com/instabug/flutter/generated/SessionReplayPigeon.java @@ -0,0 +1,210 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +package com.instabug.flutter.generated; + +import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import io.flutter.plugin.common.BasicMessageChannel; +import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugin.common.MessageCodec; +import io.flutter.plugin.common.StandardMessageCodec; +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** Generated class from Pigeon. */ +@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression", "serial"}) +public class SessionReplayPigeon { + + /** Error class for passing custom error details to Flutter via a thrown PlatformException. */ + public static class FlutterError extends RuntimeException { + + /** The error code. */ + public final String code; + + /** The error details. Must be a datatype supported by the api codec. */ + public final Object details; + + public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) + { + super(message); + this.code = code; + this.details = details; + } + } + + @NonNull + protected static ArrayList wrapError(@NonNull Throwable exception) { + ArrayList errorList = new ArrayList(3); + if (exception instanceof FlutterError) { + FlutterError error = (FlutterError) exception; + errorList.add(error.code); + errorList.add(error.getMessage()); + errorList.add(error.details); + } else { + errorList.add(exception.toString()); + errorList.add(exception.getClass().getSimpleName()); + errorList.add( + "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); + } + return errorList; + } + + public interface Result { + @SuppressWarnings("UnknownNullness") + void success(T result); + + void error(@NonNull Throwable error); + } + /** Generated interface from Pigeon that represents a handler of messages from Flutter. */ + public interface SessionReplayHostApi { + + void setEnabled(@NonNull Boolean isEnabled); + + void setNetworkLogsEnabled(@NonNull Boolean isEnabled); + + void setInstabugLogsEnabled(@NonNull Boolean isEnabled); + + void setUserStepsEnabled(@NonNull Boolean isEnabled); + + void getSessionReplayLink(@NonNull Result result); + + /** The codec used by SessionReplayHostApi. */ + static @NonNull MessageCodec getCodec() { + return new StandardMessageCodec(); + } + /**Sets up an instance of `SessionReplayHostApi` to handle messages through the `binaryMessenger`. */ + static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable SessionReplayHostApi api) { + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SessionReplayHostApi.setEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setEnabled(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SessionReplayHostApi.setNetworkLogsEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setNetworkLogsEnabled(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SessionReplayHostApi.setInstabugLogsEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setInstabugLogsEnabled(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SessionReplayHostApi.setUserStepsEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setUserStepsEnabled(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SessionReplayHostApi.getSessionReplayLink", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + Result resultCallback = + new Result() { + public void success(String result) { + wrapped.add(0, result); + reply.reply(wrapped); + } + + public void error(Throwable error) { + ArrayList wrappedError = wrapError(error); + reply.reply(wrappedError); + } + }; + + api.getSessionReplayLink(resultCallback); + }); + } else { + channel.setMessageHandler(null); + } + } + } + } +} diff --git a/android/src/main/java/com/instabug/flutter/generated/SurveysPigeon.java b/android/src/main/java/com/instabug/flutter/generated/SurveysPigeon.java new file mode 100644 index 000000000..e884530d6 --- /dev/null +++ b/android/src/main/java/com/instabug/flutter/generated/SurveysPigeon.java @@ -0,0 +1,373 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +package com.instabug.flutter.generated; + +import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import io.flutter.plugin.common.BasicMessageChannel; +import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugin.common.MessageCodec; +import io.flutter.plugin.common.StandardMessageCodec; +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** Generated class from Pigeon. */ +@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression", "serial"}) +public class SurveysPigeon { + + /** Error class for passing custom error details to Flutter via a thrown PlatformException. */ + public static class FlutterError extends RuntimeException { + + /** The error code. */ + public final String code; + + /** The error details. Must be a datatype supported by the api codec. */ + public final Object details; + + public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) + { + super(message); + this.code = code; + this.details = details; + } + } + + @NonNull + protected static ArrayList wrapError(@NonNull Throwable exception) { + ArrayList errorList = new ArrayList(3); + if (exception instanceof FlutterError) { + FlutterError error = (FlutterError) exception; + errorList.add(error.code); + errorList.add(error.getMessage()); + errorList.add(error.details); + } else { + errorList.add(exception.toString()); + errorList.add(exception.getClass().getSimpleName()); + errorList.add( + "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); + } + return errorList; + } + + public interface Result { + @SuppressWarnings("UnknownNullness") + void success(T result); + + void error(@NonNull Throwable error); + } + /** Generated class from Pigeon that represents Flutter messages that can be called from Java. */ + public static class SurveysFlutterApi { + private final @NonNull BinaryMessenger binaryMessenger; + + public SurveysFlutterApi(@NonNull BinaryMessenger argBinaryMessenger) { + this.binaryMessenger = argBinaryMessenger; + } + + /** Public interface for sending reply. */ + @SuppressWarnings("UnknownNullness") + public interface Reply { + void reply(T reply); + } + /** The codec used by SurveysFlutterApi. */ + static @NonNull MessageCodec getCodec() { + return new StandardMessageCodec(); + } + public void onShowSurvey(@NonNull Reply callback) { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SurveysFlutterApi.onShowSurvey", getCodec()); + channel.send( + null, + channelReply -> callback.reply(null)); + } + public void onDismissSurvey(@NonNull Reply callback) { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SurveysFlutterApi.onDismissSurvey", getCodec()); + channel.send( + null, + channelReply -> callback.reply(null)); + } + } + /** Generated interface from Pigeon that represents a handler of messages from Flutter. */ + public interface SurveysHostApi { + + void setEnabled(@NonNull Boolean isEnabled); + + void showSurveyIfAvailable(); + + void showSurvey(@NonNull String surveyToken); + + void setAutoShowingEnabled(@NonNull Boolean isEnabled); + + void setShouldShowWelcomeScreen(@NonNull Boolean shouldShowWelcomeScreen); + + void setAppStoreURL(@NonNull String appStoreURL); + + void hasRespondedToSurvey(@NonNull String surveyToken, @NonNull Result result); + + void getAvailableSurveys(@NonNull Result> result); + + void bindOnShowSurveyCallback(); + + void bindOnDismissSurveyCallback(); + + /** The codec used by SurveysHostApi. */ + static @NonNull MessageCodec getCodec() { + return new StandardMessageCodec(); + } + /**Sets up an instance of `SurveysHostApi` to handle messages through the `binaryMessenger`. */ + static void setup(@NonNull BinaryMessenger binaryMessenger, @Nullable SurveysHostApi api) { + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SurveysHostApi.setEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setEnabled(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SurveysHostApi.showSurveyIfAvailable", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.showSurveyIfAvailable(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SurveysHostApi.showSurvey", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String surveyTokenArg = (String) args.get(0); + try { + api.showSurvey(surveyTokenArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SurveysHostApi.setAutoShowingEnabled", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean isEnabledArg = (Boolean) args.get(0); + try { + api.setAutoShowingEnabled(isEnabledArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SurveysHostApi.setShouldShowWelcomeScreen", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + Boolean shouldShowWelcomeScreenArg = (Boolean) args.get(0); + try { + api.setShouldShowWelcomeScreen(shouldShowWelcomeScreenArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SurveysHostApi.setAppStoreURL", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String appStoreURLArg = (String) args.get(0); + try { + api.setAppStoreURL(appStoreURLArg); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SurveysHostApi.hasRespondedToSurvey", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + ArrayList args = (ArrayList) message; + String surveyTokenArg = (String) args.get(0); + Result resultCallback = + new Result() { + public void success(Boolean result) { + wrapped.add(0, result); + reply.reply(wrapped); + } + + public void error(Throwable error) { + ArrayList wrappedError = wrapError(error); + reply.reply(wrappedError); + } + }; + + api.hasRespondedToSurvey(surveyTokenArg, resultCallback); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SurveysHostApi.getAvailableSurveys", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + Result> resultCallback = + new Result>() { + public void success(List result) { + wrapped.add(0, result); + reply.reply(wrapped); + } + + public void error(Throwable error) { + ArrayList wrappedError = wrapError(error); + reply.reply(wrappedError); + } + }; + + api.getAvailableSurveys(resultCallback); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SurveysHostApi.bindOnShowSurveyCallback", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.bindOnShowSurveyCallback(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, "dev.flutter.pigeon.instabug_flutter.SurveysHostApi.bindOnDismissSurveyCallback", getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList(); + try { + api.bindOnDismissSurveyCallback(); + wrapped.add(0, null); + } + catch (Throwable exception) { + ArrayList wrappedError = wrapError(exception); + wrapped = wrappedError; + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + } + } +} diff --git a/ios/Classes/Generated/ApmPigeon.h b/ios/Classes/Generated/ApmPigeon.h new file mode 100644 index 000000000..f31c5c8b3 --- /dev/null +++ b/ios/Classes/Generated/ApmPigeon.h @@ -0,0 +1,42 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import + +@protocol FlutterBinaryMessenger; +@protocol FlutterMessageCodec; +@class FlutterError; +@class FlutterStandardTypedData; + +NS_ASSUME_NONNULL_BEGIN + + +/// The codec used by ApmHostApi. +NSObject *ApmHostApiGetCodec(void); + +@protocol ApmHostApi +- (void)setEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)isEnabledWithCompletion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)setScreenLoadingEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)isScreenLoadingEnabledWithCompletion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)setColdAppLaunchEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setAutoUITraceEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)startExecutionTraceId:(NSString *)id name:(NSString *)name completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)startFlowName:(NSString *)name error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setFlowAttributeName:(NSString *)name key:(NSString *)key value:(nullable NSString *)value error:(FlutterError *_Nullable *_Nonnull)error; +- (void)endFlowName:(NSString *)name error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setExecutionTraceAttributeId:(NSString *)id key:(NSString *)key value:(NSString *)value error:(FlutterError *_Nullable *_Nonnull)error; +- (void)endExecutionTraceId:(NSString *)id error:(FlutterError *_Nullable *_Nonnull)error; +- (void)startUITraceName:(NSString *)name error:(FlutterError *_Nullable *_Nonnull)error; +- (void)endUITraceWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)endAppLaunchWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)networkLogAndroidData:(NSDictionary *)data error:(FlutterError *_Nullable *_Nonnull)error; +- (void)startCpUiTraceScreenName:(NSString *)screenName microTimeStamp:(NSNumber *)microTimeStamp traceId:(NSNumber *)traceId error:(FlutterError *_Nullable *_Nonnull)error; +- (void)reportScreenLoadingCPStartTimeStampMicro:(NSNumber *)startTimeStampMicro durationMicro:(NSNumber *)durationMicro uiTraceId:(NSNumber *)uiTraceId error:(FlutterError *_Nullable *_Nonnull)error; +- (void)endScreenLoadingCPTimeStampMicro:(NSNumber *)timeStampMicro uiTraceId:(NSNumber *)uiTraceId error:(FlutterError *_Nullable *_Nonnull)error; +- (void)isEndScreenLoadingEnabledWithCompletion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +@end + +extern void ApmHostApiSetup(id binaryMessenger, NSObject *_Nullable api); + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Generated/ApmPigeon.m b/ios/Classes/Generated/ApmPigeon.m new file mode 100644 index 000000000..0a73a8417 --- /dev/null +++ b/ios/Classes/Generated/ApmPigeon.m @@ -0,0 +1,416 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import "ApmPigeon.h" + +#if TARGET_OS_OSX +#import +#else +#import +#endif + +#if !__has_feature(objc_arc) +#error File requires ARC to be enabled. +#endif + +static NSArray *wrapResult(id result, FlutterError *error) { + if (error) { + return @[ + error.code ?: [NSNull null], error.message ?: [NSNull null], error.details ?: [NSNull null] + ]; + } + return @[ result ?: [NSNull null] ]; +} +static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { + id result = array[key]; + return (result == [NSNull null]) ? nil : result; +} + +NSObject *ApmHostApiGetCodec(void) { + static FlutterStandardMessageCodec *sSharedObject = nil; + sSharedObject = [FlutterStandardMessageCodec sharedInstance]; + return sSharedObject; +} + +void ApmHostApiSetup(id binaryMessenger, NSObject *api) { + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.setEnabled" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setEnabledIsEnabled:error:)], @"ApmHostApi api (%@) doesn't respond to @selector(setEnabledIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setEnabledIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.isEnabled" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(isEnabledWithCompletion:)], @"ApmHostApi api (%@) doesn't respond to @selector(isEnabledWithCompletion:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + [api isEnabledWithCompletion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.setScreenLoadingEnabled" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setScreenLoadingEnabledIsEnabled:error:)], @"ApmHostApi api (%@) doesn't respond to @selector(setScreenLoadingEnabledIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setScreenLoadingEnabledIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.isScreenLoadingEnabled" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(isScreenLoadingEnabledWithCompletion:)], @"ApmHostApi api (%@) doesn't respond to @selector(isScreenLoadingEnabledWithCompletion:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + [api isScreenLoadingEnabledWithCompletion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.setColdAppLaunchEnabled" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setColdAppLaunchEnabledIsEnabled:error:)], @"ApmHostApi api (%@) doesn't respond to @selector(setColdAppLaunchEnabledIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setColdAppLaunchEnabledIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.setAutoUITraceEnabled" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setAutoUITraceEnabledIsEnabled:error:)], @"ApmHostApi api (%@) doesn't respond to @selector(setAutoUITraceEnabledIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setAutoUITraceEnabledIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.startExecutionTrace" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(startExecutionTraceId:name:completion:)], @"ApmHostApi api (%@) doesn't respond to @selector(startExecutionTraceId:name:completion:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_id = GetNullableObjectAtIndex(args, 0); + NSString *arg_name = GetNullableObjectAtIndex(args, 1); + [api startExecutionTraceId:arg_id name:arg_name completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.startFlow" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(startFlowName:error:)], @"ApmHostApi api (%@) doesn't respond to @selector(startFlowName:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_name = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api startFlowName:arg_name error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.setFlowAttribute" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setFlowAttributeName:key:value:error:)], @"ApmHostApi api (%@) doesn't respond to @selector(setFlowAttributeName:key:value:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_name = GetNullableObjectAtIndex(args, 0); + NSString *arg_key = GetNullableObjectAtIndex(args, 1); + NSString *arg_value = GetNullableObjectAtIndex(args, 2); + FlutterError *error; + [api setFlowAttributeName:arg_name key:arg_key value:arg_value error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.endFlow" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(endFlowName:error:)], @"ApmHostApi api (%@) doesn't respond to @selector(endFlowName:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_name = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api endFlowName:arg_name error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.setExecutionTraceAttribute" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setExecutionTraceAttributeId:key:value:error:)], @"ApmHostApi api (%@) doesn't respond to @selector(setExecutionTraceAttributeId:key:value:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_id = GetNullableObjectAtIndex(args, 0); + NSString *arg_key = GetNullableObjectAtIndex(args, 1); + NSString *arg_value = GetNullableObjectAtIndex(args, 2); + FlutterError *error; + [api setExecutionTraceAttributeId:arg_id key:arg_key value:arg_value error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.endExecutionTrace" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(endExecutionTraceId:error:)], @"ApmHostApi api (%@) doesn't respond to @selector(endExecutionTraceId:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_id = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api endExecutionTraceId:arg_id error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.startUITrace" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(startUITraceName:error:)], @"ApmHostApi api (%@) doesn't respond to @selector(startUITraceName:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_name = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api startUITraceName:arg_name error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.endUITrace" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(endUITraceWithError:)], @"ApmHostApi api (%@) doesn't respond to @selector(endUITraceWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api endUITraceWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.endAppLaunch" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(endAppLaunchWithError:)], @"ApmHostApi api (%@) doesn't respond to @selector(endAppLaunchWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api endAppLaunchWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.networkLogAndroid" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(networkLogAndroidData:error:)], @"ApmHostApi api (%@) doesn't respond to @selector(networkLogAndroidData:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSDictionary *arg_data = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api networkLogAndroidData:arg_data error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.startCpUiTrace" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(startCpUiTraceScreenName:microTimeStamp:traceId:error:)], @"ApmHostApi api (%@) doesn't respond to @selector(startCpUiTraceScreenName:microTimeStamp:traceId:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_screenName = GetNullableObjectAtIndex(args, 0); + NSNumber *arg_microTimeStamp = GetNullableObjectAtIndex(args, 1); + NSNumber *arg_traceId = GetNullableObjectAtIndex(args, 2); + FlutterError *error; + [api startCpUiTraceScreenName:arg_screenName microTimeStamp:arg_microTimeStamp traceId:arg_traceId error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.reportScreenLoadingCP" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(reportScreenLoadingCPStartTimeStampMicro:durationMicro:uiTraceId:error:)], @"ApmHostApi api (%@) doesn't respond to @selector(reportScreenLoadingCPStartTimeStampMicro:durationMicro:uiTraceId:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_startTimeStampMicro = GetNullableObjectAtIndex(args, 0); + NSNumber *arg_durationMicro = GetNullableObjectAtIndex(args, 1); + NSNumber *arg_uiTraceId = GetNullableObjectAtIndex(args, 2); + FlutterError *error; + [api reportScreenLoadingCPStartTimeStampMicro:arg_startTimeStampMicro durationMicro:arg_durationMicro uiTraceId:arg_uiTraceId error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.endScreenLoadingCP" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(endScreenLoadingCPTimeStampMicro:uiTraceId:error:)], @"ApmHostApi api (%@) doesn't respond to @selector(endScreenLoadingCPTimeStampMicro:uiTraceId:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_timeStampMicro = GetNullableObjectAtIndex(args, 0); + NSNumber *arg_uiTraceId = GetNullableObjectAtIndex(args, 1); + FlutterError *error; + [api endScreenLoadingCPTimeStampMicro:arg_timeStampMicro uiTraceId:arg_uiTraceId error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.ApmHostApi.isEndScreenLoadingEnabled" + binaryMessenger:binaryMessenger + codec:ApmHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(isEndScreenLoadingEnabledWithCompletion:)], @"ApmHostApi api (%@) doesn't respond to @selector(isEndScreenLoadingEnabledWithCompletion:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + [api isEndScreenLoadingEnabledWithCompletion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; + }]; + } else { + [channel setMessageHandler:nil]; + } + } +} diff --git a/ios/Classes/Generated/BugReportingPigeon.h b/ios/Classes/Generated/BugReportingPigeon.h new file mode 100644 index 000000000..cad4bbf19 --- /dev/null +++ b/ios/Classes/Generated/BugReportingPigeon.h @@ -0,0 +1,47 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import + +@protocol FlutterBinaryMessenger; +@protocol FlutterMessageCodec; +@class FlutterError; +@class FlutterStandardTypedData; + +NS_ASSUME_NONNULL_BEGIN + + +/// The codec used by BugReportingFlutterApi. +NSObject *BugReportingFlutterApiGetCodec(void); + +@interface BugReportingFlutterApi : NSObject +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger; +- (void)onSdkInvokeWithCompletion:(void (^)(FlutterError *_Nullable))completion; +- (void)onSdkDismissDismissType:(NSString *)dismissType reportType:(NSString *)reportType completion:(void (^)(FlutterError *_Nullable))completion; +@end + +/// The codec used by BugReportingHostApi. +NSObject *BugReportingHostApiGetCodec(void); + +@protocol BugReportingHostApi +- (void)setEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)showReportType:(NSString *)reportType invocationOptions:(NSArray *)invocationOptions error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setInvocationEventsEvents:(NSArray *)events error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setReportTypesTypes:(NSArray *)types error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setExtendedBugReportModeMode:(NSString *)mode error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setInvocationOptionsOptions:(NSArray *)options error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setFloatingButtonEdgeEdge:(NSString *)edge offset:(NSNumber *)offset error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setVideoRecordingFloatingButtonPositionPosition:(NSString *)position error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setShakingThresholdForiPhoneThreshold:(NSNumber *)threshold error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setShakingThresholdForiPadThreshold:(NSNumber *)threshold error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setShakingThresholdForAndroidThreshold:(NSNumber *)threshold error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setEnabledAttachmentTypesScreenshot:(NSNumber *)screenshot extraScreenshot:(NSNumber *)extraScreenshot galleryImage:(NSNumber *)galleryImage screenRecording:(NSNumber *)screenRecording error:(FlutterError *_Nullable *_Nonnull)error; +- (void)bindOnInvokeCallbackWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)bindOnDismissCallbackWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)setDisclaimerTextText:(NSString *)text error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setCommentMinimumCharacterCountLimit:(NSNumber *)limit reportTypes:(nullable NSArray *)reportTypes error:(FlutterError *_Nullable *_Nonnull)error; +@end + +extern void BugReportingHostApiSetup(id binaryMessenger, NSObject *_Nullable api); + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Generated/BugReportingPigeon.m b/ios/Classes/Generated/BugReportingPigeon.m new file mode 100644 index 000000000..ecf1a879c --- /dev/null +++ b/ios/Classes/Generated/BugReportingPigeon.m @@ -0,0 +1,383 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import "BugReportingPigeon.h" + +#if TARGET_OS_OSX +#import +#else +#import +#endif + +#if !__has_feature(objc_arc) +#error File requires ARC to be enabled. +#endif + +static NSArray *wrapResult(id result, FlutterError *error) { + if (error) { + return @[ + error.code ?: [NSNull null], error.message ?: [NSNull null], error.details ?: [NSNull null] + ]; + } + return @[ result ?: [NSNull null] ]; +} +static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { + id result = array[key]; + return (result == [NSNull null]) ? nil : result; +} + +NSObject *BugReportingFlutterApiGetCodec(void) { + static FlutterStandardMessageCodec *sSharedObject = nil; + sSharedObject = [FlutterStandardMessageCodec sharedInstance]; + return sSharedObject; +} + +@interface BugReportingFlutterApi () +@property(nonatomic, strong) NSObject *binaryMessenger; +@end + +@implementation BugReportingFlutterApi + +- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger { + self = [super init]; + if (self) { + _binaryMessenger = binaryMessenger; + } + return self; +} +- (void)onSdkInvokeWithCompletion:(void (^)(FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel + messageChannelWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingFlutterApi.onSdkInvoke" + binaryMessenger:self.binaryMessenger + codec:BugReportingFlutterApiGetCodec()]; + [channel sendMessage:nil reply:^(id reply) { + completion(nil); + }]; +} +- (void)onSdkDismissDismissType:(NSString *)arg_dismissType reportType:(NSString *)arg_reportType completion:(void (^)(FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel + messageChannelWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingFlutterApi.onSdkDismiss" + binaryMessenger:self.binaryMessenger + codec:BugReportingFlutterApiGetCodec()]; + [channel sendMessage:@[arg_dismissType ?: [NSNull null], arg_reportType ?: [NSNull null]] reply:^(id reply) { + completion(nil); + }]; +} +@end + +NSObject *BugReportingHostApiGetCodec(void) { + static FlutterStandardMessageCodec *sSharedObject = nil; + sSharedObject = [FlutterStandardMessageCodec sharedInstance]; + return sSharedObject; +} + +void BugReportingHostApiSetup(id binaryMessenger, NSObject *api) { + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setEnabled" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setEnabledIsEnabled:error:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(setEnabledIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setEnabledIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.show" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(showReportType:invocationOptions:error:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(showReportType:invocationOptions:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_reportType = GetNullableObjectAtIndex(args, 0); + NSArray *arg_invocationOptions = GetNullableObjectAtIndex(args, 1); + FlutterError *error; + [api showReportType:arg_reportType invocationOptions:arg_invocationOptions error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setInvocationEvents" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setInvocationEventsEvents:error:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(setInvocationEventsEvents:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSArray *arg_events = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setInvocationEventsEvents:arg_events error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setReportTypes" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setReportTypesTypes:error:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(setReportTypesTypes:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSArray *arg_types = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setReportTypesTypes:arg_types error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setExtendedBugReportMode" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setExtendedBugReportModeMode:error:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(setExtendedBugReportModeMode:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_mode = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setExtendedBugReportModeMode:arg_mode error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setInvocationOptions" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setInvocationOptionsOptions:error:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(setInvocationOptionsOptions:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSArray *arg_options = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setInvocationOptionsOptions:arg_options error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setFloatingButtonEdge" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setFloatingButtonEdgeEdge:offset:error:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(setFloatingButtonEdgeEdge:offset:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_edge = GetNullableObjectAtIndex(args, 0); + NSNumber *arg_offset = GetNullableObjectAtIndex(args, 1); + FlutterError *error; + [api setFloatingButtonEdgeEdge:arg_edge offset:arg_offset error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setVideoRecordingFloatingButtonPosition" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setVideoRecordingFloatingButtonPositionPosition:error:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(setVideoRecordingFloatingButtonPositionPosition:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_position = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setVideoRecordingFloatingButtonPositionPosition:arg_position error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setShakingThresholdForiPhone" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setShakingThresholdForiPhoneThreshold:error:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(setShakingThresholdForiPhoneThreshold:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_threshold = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setShakingThresholdForiPhoneThreshold:arg_threshold error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setShakingThresholdForiPad" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setShakingThresholdForiPadThreshold:error:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(setShakingThresholdForiPadThreshold:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_threshold = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setShakingThresholdForiPadThreshold:arg_threshold error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setShakingThresholdForAndroid" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setShakingThresholdForAndroidThreshold:error:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(setShakingThresholdForAndroidThreshold:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_threshold = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setShakingThresholdForAndroidThreshold:arg_threshold error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setEnabledAttachmentTypes" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setEnabledAttachmentTypesScreenshot:extraScreenshot:galleryImage:screenRecording:error:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(setEnabledAttachmentTypesScreenshot:extraScreenshot:galleryImage:screenRecording:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_screenshot = GetNullableObjectAtIndex(args, 0); + NSNumber *arg_extraScreenshot = GetNullableObjectAtIndex(args, 1); + NSNumber *arg_galleryImage = GetNullableObjectAtIndex(args, 2); + NSNumber *arg_screenRecording = GetNullableObjectAtIndex(args, 3); + FlutterError *error; + [api setEnabledAttachmentTypesScreenshot:arg_screenshot extraScreenshot:arg_extraScreenshot galleryImage:arg_galleryImage screenRecording:arg_screenRecording error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.bindOnInvokeCallback" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(bindOnInvokeCallbackWithError:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(bindOnInvokeCallbackWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api bindOnInvokeCallbackWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.bindOnDismissCallback" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(bindOnDismissCallbackWithError:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(bindOnDismissCallbackWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api bindOnDismissCallbackWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setDisclaimerText" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setDisclaimerTextText:error:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(setDisclaimerTextText:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_text = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setDisclaimerTextText:arg_text error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setCommentMinimumCharacterCount" + binaryMessenger:binaryMessenger + codec:BugReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setCommentMinimumCharacterCountLimit:reportTypes:error:)], @"BugReportingHostApi api (%@) doesn't respond to @selector(setCommentMinimumCharacterCountLimit:reportTypes:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_limit = GetNullableObjectAtIndex(args, 0); + NSArray *arg_reportTypes = GetNullableObjectAtIndex(args, 1); + FlutterError *error; + [api setCommentMinimumCharacterCountLimit:arg_limit reportTypes:arg_reportTypes error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } +} diff --git a/ios/Classes/Generated/CrashReportingPigeon.h b/ios/Classes/Generated/CrashReportingPigeon.h new file mode 100644 index 000000000..c556c4555 --- /dev/null +++ b/ios/Classes/Generated/CrashReportingPigeon.h @@ -0,0 +1,25 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import + +@protocol FlutterBinaryMessenger; +@protocol FlutterMessageCodec; +@class FlutterError; +@class FlutterStandardTypedData; + +NS_ASSUME_NONNULL_BEGIN + + +/// The codec used by CrashReportingHostApi. +NSObject *CrashReportingHostApiGetCodec(void); + +@protocol CrashReportingHostApi +- (void)setEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)sendJsonCrash:(NSString *)jsonCrash isHandled:(NSNumber *)isHandled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)sendNonFatalErrorJsonCrash:(NSString *)jsonCrash userAttributes:(nullable NSDictionary *)userAttributes fingerprint:(nullable NSString *)fingerprint nonFatalExceptionLevel:(NSString *)nonFatalExceptionLevel error:(FlutterError *_Nullable *_Nonnull)error; +@end + +extern void CrashReportingHostApiSetup(id binaryMessenger, NSObject *_Nullable api); + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Generated/CrashReportingPigeon.m b/ios/Classes/Generated/CrashReportingPigeon.m new file mode 100644 index 000000000..1e9f4426d --- /dev/null +++ b/ios/Classes/Generated/CrashReportingPigeon.m @@ -0,0 +1,97 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import "CrashReportingPigeon.h" + +#if TARGET_OS_OSX +#import +#else +#import +#endif + +#if !__has_feature(objc_arc) +#error File requires ARC to be enabled. +#endif + +static NSArray *wrapResult(id result, FlutterError *error) { + if (error) { + return @[ + error.code ?: [NSNull null], error.message ?: [NSNull null], error.details ?: [NSNull null] + ]; + } + return @[ result ?: [NSNull null] ]; +} +static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { + id result = array[key]; + return (result == [NSNull null]) ? nil : result; +} + +NSObject *CrashReportingHostApiGetCodec(void) { + static FlutterStandardMessageCodec *sSharedObject = nil; + sSharedObject = [FlutterStandardMessageCodec sharedInstance]; + return sSharedObject; +} + +void CrashReportingHostApiSetup(id binaryMessenger, NSObject *api) { + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.CrashReportingHostApi.setEnabled" + binaryMessenger:binaryMessenger + codec:CrashReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setEnabledIsEnabled:error:)], @"CrashReportingHostApi api (%@) doesn't respond to @selector(setEnabledIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setEnabledIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.CrashReportingHostApi.send" + binaryMessenger:binaryMessenger + codec:CrashReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(sendJsonCrash:isHandled:error:)], @"CrashReportingHostApi api (%@) doesn't respond to @selector(sendJsonCrash:isHandled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_jsonCrash = GetNullableObjectAtIndex(args, 0); + NSNumber *arg_isHandled = GetNullableObjectAtIndex(args, 1); + FlutterError *error; + [api sendJsonCrash:arg_jsonCrash isHandled:arg_isHandled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.CrashReportingHostApi.sendNonFatalError" + binaryMessenger:binaryMessenger + codec:CrashReportingHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(sendNonFatalErrorJsonCrash:userAttributes:fingerprint:nonFatalExceptionLevel:error:)], @"CrashReportingHostApi api (%@) doesn't respond to @selector(sendNonFatalErrorJsonCrash:userAttributes:fingerprint:nonFatalExceptionLevel:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_jsonCrash = GetNullableObjectAtIndex(args, 0); + NSDictionary *arg_userAttributes = GetNullableObjectAtIndex(args, 1); + NSString *arg_fingerprint = GetNullableObjectAtIndex(args, 2); + NSString *arg_nonFatalExceptionLevel = GetNullableObjectAtIndex(args, 3); + FlutterError *error; + [api sendNonFatalErrorJsonCrash:arg_jsonCrash userAttributes:arg_userAttributes fingerprint:arg_fingerprint nonFatalExceptionLevel:arg_nonFatalExceptionLevel error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } +} diff --git a/ios/Classes/Generated/FeatureRequestsPigeon.h b/ios/Classes/Generated/FeatureRequestsPigeon.h new file mode 100644 index 000000000..012df9ebb --- /dev/null +++ b/ios/Classes/Generated/FeatureRequestsPigeon.h @@ -0,0 +1,24 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import + +@protocol FlutterBinaryMessenger; +@protocol FlutterMessageCodec; +@class FlutterError; +@class FlutterStandardTypedData; + +NS_ASSUME_NONNULL_BEGIN + + +/// The codec used by FeatureRequestsHostApi. +NSObject *FeatureRequestsHostApiGetCodec(void); + +@protocol FeatureRequestsHostApi +- (void)showWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)setEmailFieldRequiredIsRequired:(NSNumber *)isRequired actionTypes:(NSArray *)actionTypes error:(FlutterError *_Nullable *_Nonnull)error; +@end + +extern void FeatureRequestsHostApiSetup(id binaryMessenger, NSObject *_Nullable api); + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Generated/FeatureRequestsPigeon.m b/ios/Classes/Generated/FeatureRequestsPigeon.m new file mode 100644 index 000000000..6e5f4d40e --- /dev/null +++ b/ios/Classes/Generated/FeatureRequestsPigeon.m @@ -0,0 +1,73 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import "FeatureRequestsPigeon.h" + +#if TARGET_OS_OSX +#import +#else +#import +#endif + +#if !__has_feature(objc_arc) +#error File requires ARC to be enabled. +#endif + +static NSArray *wrapResult(id result, FlutterError *error) { + if (error) { + return @[ + error.code ?: [NSNull null], error.message ?: [NSNull null], error.details ?: [NSNull null] + ]; + } + return @[ result ?: [NSNull null] ]; +} +static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { + id result = array[key]; + return (result == [NSNull null]) ? nil : result; +} + +NSObject *FeatureRequestsHostApiGetCodec(void) { + static FlutterStandardMessageCodec *sSharedObject = nil; + sSharedObject = [FlutterStandardMessageCodec sharedInstance]; + return sSharedObject; +} + +void FeatureRequestsHostApiSetup(id binaryMessenger, NSObject *api) { + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.FeatureRequestsHostApi.show" + binaryMessenger:binaryMessenger + codec:FeatureRequestsHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(showWithError:)], @"FeatureRequestsHostApi api (%@) doesn't respond to @selector(showWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api showWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.FeatureRequestsHostApi.setEmailFieldRequired" + binaryMessenger:binaryMessenger + codec:FeatureRequestsHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setEmailFieldRequiredIsRequired:actionTypes:error:)], @"FeatureRequestsHostApi api (%@) doesn't respond to @selector(setEmailFieldRequiredIsRequired:actionTypes:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isRequired = GetNullableObjectAtIndex(args, 0); + NSArray *arg_actionTypes = GetNullableObjectAtIndex(args, 1); + FlutterError *error; + [api setEmailFieldRequiredIsRequired:arg_isRequired actionTypes:arg_actionTypes error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } +} diff --git a/ios/Classes/Generated/InstabugLogPigeon.h b/ios/Classes/Generated/InstabugLogPigeon.h new file mode 100644 index 000000000..61c09cf40 --- /dev/null +++ b/ios/Classes/Generated/InstabugLogPigeon.h @@ -0,0 +1,28 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import + +@protocol FlutterBinaryMessenger; +@protocol FlutterMessageCodec; +@class FlutterError; +@class FlutterStandardTypedData; + +NS_ASSUME_NONNULL_BEGIN + + +/// The codec used by InstabugLogHostApi. +NSObject *InstabugLogHostApiGetCodec(void); + +@protocol InstabugLogHostApi +- (void)logVerboseMessage:(NSString *)message error:(FlutterError *_Nullable *_Nonnull)error; +- (void)logDebugMessage:(NSString *)message error:(FlutterError *_Nullable *_Nonnull)error; +- (void)logInfoMessage:(NSString *)message error:(FlutterError *_Nullable *_Nonnull)error; +- (void)logWarnMessage:(NSString *)message error:(FlutterError *_Nullable *_Nonnull)error; +- (void)logErrorMessage:(NSString *)message error:(FlutterError *_Nullable *_Nonnull)error; +- (void)clearAllLogsWithError:(FlutterError *_Nullable *_Nonnull)error; +@end + +extern void InstabugLogHostApiSetup(id binaryMessenger, NSObject *_Nullable api); + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Generated/InstabugLogPigeon.m b/ios/Classes/Generated/InstabugLogPigeon.m new file mode 100644 index 000000000..17961c82b --- /dev/null +++ b/ios/Classes/Generated/InstabugLogPigeon.m @@ -0,0 +1,148 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import "InstabugLogPigeon.h" + +#if TARGET_OS_OSX +#import +#else +#import +#endif + +#if !__has_feature(objc_arc) +#error File requires ARC to be enabled. +#endif + +static NSArray *wrapResult(id result, FlutterError *error) { + if (error) { + return @[ + error.code ?: [NSNull null], error.message ?: [NSNull null], error.details ?: [NSNull null] + ]; + } + return @[ result ?: [NSNull null] ]; +} +static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { + id result = array[key]; + return (result == [NSNull null]) ? nil : result; +} + +NSObject *InstabugLogHostApiGetCodec(void) { + static FlutterStandardMessageCodec *sSharedObject = nil; + sSharedObject = [FlutterStandardMessageCodec sharedInstance]; + return sSharedObject; +} + +void InstabugLogHostApiSetup(id binaryMessenger, NSObject *api) { + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.logVerbose" + binaryMessenger:binaryMessenger + codec:InstabugLogHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(logVerboseMessage:error:)], @"InstabugLogHostApi api (%@) doesn't respond to @selector(logVerboseMessage:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_message = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api logVerboseMessage:arg_message error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.logDebug" + binaryMessenger:binaryMessenger + codec:InstabugLogHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(logDebugMessage:error:)], @"InstabugLogHostApi api (%@) doesn't respond to @selector(logDebugMessage:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_message = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api logDebugMessage:arg_message error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.logInfo" + binaryMessenger:binaryMessenger + codec:InstabugLogHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(logInfoMessage:error:)], @"InstabugLogHostApi api (%@) doesn't respond to @selector(logInfoMessage:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_message = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api logInfoMessage:arg_message error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.logWarn" + binaryMessenger:binaryMessenger + codec:InstabugLogHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(logWarnMessage:error:)], @"InstabugLogHostApi api (%@) doesn't respond to @selector(logWarnMessage:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_message = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api logWarnMessage:arg_message error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.logError" + binaryMessenger:binaryMessenger + codec:InstabugLogHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(logErrorMessage:error:)], @"InstabugLogHostApi api (%@) doesn't respond to @selector(logErrorMessage:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_message = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api logErrorMessage:arg_message error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.clearAllLogs" + binaryMessenger:binaryMessenger + codec:InstabugLogHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(clearAllLogsWithError:)], @"InstabugLogHostApi api (%@) doesn't respond to @selector(clearAllLogsWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api clearAllLogsWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } +} diff --git a/ios/Classes/Generated/InstabugPigeon.h b/ios/Classes/Generated/InstabugPigeon.h new file mode 100644 index 000000000..0fc88be5b --- /dev/null +++ b/ios/Classes/Generated/InstabugPigeon.h @@ -0,0 +1,73 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import + +@protocol FlutterBinaryMessenger; +@protocol FlutterMessageCodec; +@class FlutterError; +@class FlutterStandardTypedData; + +NS_ASSUME_NONNULL_BEGIN + + +/// The codec used by FeatureFlagsFlutterApi. +NSObject *FeatureFlagsFlutterApiGetCodec(void); + +@interface FeatureFlagsFlutterApi : NSObject +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger; +- (void)onW3CFeatureFlagChangeIsW3cExternalTraceIDEnabled:(NSNumber *)isW3cExternalTraceIDEnabled isW3cExternalGeneratedHeaderEnabled:(NSNumber *)isW3cExternalGeneratedHeaderEnabled isW3cCaughtHeaderEnabled:(NSNumber *)isW3cCaughtHeaderEnabled completion:(void (^)(FlutterError *_Nullable))completion; +@end + +/// The codec used by InstabugHostApi. +NSObject *InstabugHostApiGetCodec(void); + +@protocol InstabugHostApi +- (void)setEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)isEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSNumber *)isBuiltWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)initToken:(NSString *)token invocationEvents:(NSArray *)invocationEvents debugLogsLevel:(NSString *)debugLogsLevel error:(FlutterError *_Nullable *_Nonnull)error; +- (void)showWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)showWelcomeMessageWithModeMode:(NSString *)mode error:(FlutterError *_Nullable *_Nonnull)error; +- (void)identifyUserEmail:(NSString *)email name:(nullable NSString *)name userId:(nullable NSString *)userId error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setUserDataData:(NSString *)data error:(FlutterError *_Nullable *_Nonnull)error; +- (void)logUserEventName:(NSString *)name error:(FlutterError *_Nullable *_Nonnull)error; +- (void)logOutWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)setLocaleLocale:(NSString *)locale error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setColorThemeTheme:(NSString *)theme error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setWelcomeMessageModeMode:(NSString *)mode error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setPrimaryColorColor:(NSNumber *)color error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setSessionProfilerEnabledEnabled:(NSNumber *)enabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setValueForStringWithKeyValue:(NSString *)value key:(NSString *)key error:(FlutterError *_Nullable *_Nonnull)error; +- (void)appendTagsTags:(NSArray *)tags error:(FlutterError *_Nullable *_Nonnull)error; +- (void)resetTagsWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)getTagsWithCompletion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)addExperimentsExperiments:(NSArray *)experiments error:(FlutterError *_Nullable *_Nonnull)error; +- (void)removeExperimentsExperiments:(NSArray *)experiments error:(FlutterError *_Nullable *_Nonnull)error; +- (void)clearAllExperimentsWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)addFeatureFlagsFeatureFlagsMap:(NSDictionary *)featureFlagsMap error:(FlutterError *_Nullable *_Nonnull)error; +- (void)removeFeatureFlagsFeatureFlags:(NSArray *)featureFlags error:(FlutterError *_Nullable *_Nonnull)error; +- (void)removeAllFeatureFlagsWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)setUserAttributeValue:(NSString *)value key:(NSString *)key error:(FlutterError *_Nullable *_Nonnull)error; +- (void)removeUserAttributeKey:(NSString *)key error:(FlutterError *_Nullable *_Nonnull)error; +- (void)getUserAttributeForKeyKey:(NSString *)key completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)getUserAttributesWithCompletion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion; +- (void)setReproStepsConfigBugMode:(nullable NSString *)bugMode crashMode:(nullable NSString *)crashMode sessionReplayMode:(nullable NSString *)sessionReplayMode error:(FlutterError *_Nullable *_Nonnull)error; +- (void)reportScreenChangeScreenName:(NSString *)screenName error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setCustomBrandingImageLight:(NSString *)light dark:(NSString *)dark error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setFontFont:(NSString *)font error:(FlutterError *_Nullable *_Nonnull)error; +- (void)addFileAttachmentWithURLFilePath:(NSString *)filePath fileName:(NSString *)fileName error:(FlutterError *_Nullable *_Nonnull)error; +- (void)addFileAttachmentWithDataData:(FlutterStandardTypedData *)data fileName:(NSString *)fileName error:(FlutterError *_Nullable *_Nonnull)error; +- (void)clearFileAttachmentsWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)networkLogData:(NSDictionary *)data error:(FlutterError *_Nullable *_Nonnull)error; +- (void)registerFeatureFlagChangeListenerWithError:(FlutterError *_Nullable *_Nonnull)error; +/// @return `nil` only when `error != nil`. +- (nullable NSDictionary *)isW3CFeatureFlagsEnabledWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)willRedirectToStoreWithError:(FlutterError *_Nullable *_Nonnull)error; +@end + +extern void InstabugHostApiSetup(id binaryMessenger, NSObject *_Nullable api); + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Generated/InstabugPigeon.m b/ios/Classes/Generated/InstabugPigeon.m new file mode 100644 index 000000000..0847b5330 --- /dev/null +++ b/ios/Classes/Generated/InstabugPigeon.m @@ -0,0 +1,812 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import "InstabugPigeon.h" + +#if TARGET_OS_OSX +#import +#else +#import +#endif + +#if !__has_feature(objc_arc) +#error File requires ARC to be enabled. +#endif + +static NSArray *wrapResult(id result, FlutterError *error) { + if (error) { + return @[ + error.code ?: [NSNull null], error.message ?: [NSNull null], error.details ?: [NSNull null] + ]; + } + return @[ result ?: [NSNull null] ]; +} +static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { + id result = array[key]; + return (result == [NSNull null]) ? nil : result; +} + +NSObject *FeatureFlagsFlutterApiGetCodec(void) { + static FlutterStandardMessageCodec *sSharedObject = nil; + sSharedObject = [FlutterStandardMessageCodec sharedInstance]; + return sSharedObject; +} + +@interface FeatureFlagsFlutterApi () +@property(nonatomic, strong) NSObject *binaryMessenger; +@end + +@implementation FeatureFlagsFlutterApi + +- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger { + self = [super init]; + if (self) { + _binaryMessenger = binaryMessenger; + } + return self; +} +- (void)onW3CFeatureFlagChangeIsW3cExternalTraceIDEnabled:(NSNumber *)arg_isW3cExternalTraceIDEnabled isW3cExternalGeneratedHeaderEnabled:(NSNumber *)arg_isW3cExternalGeneratedHeaderEnabled isW3cCaughtHeaderEnabled:(NSNumber *)arg_isW3cCaughtHeaderEnabled completion:(void (^)(FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel + messageChannelWithName:@"dev.flutter.pigeon.instabug_flutter.FeatureFlagsFlutterApi.onW3CFeatureFlagChange" + binaryMessenger:self.binaryMessenger + codec:FeatureFlagsFlutterApiGetCodec()]; + [channel sendMessage:@[arg_isW3cExternalTraceIDEnabled ?: [NSNull null], arg_isW3cExternalGeneratedHeaderEnabled ?: [NSNull null], arg_isW3cCaughtHeaderEnabled ?: [NSNull null]] reply:^(id reply) { + completion(nil); + }]; +} +@end + +NSObject *InstabugHostApiGetCodec(void) { + static FlutterStandardMessageCodec *sSharedObject = nil; + sSharedObject = [FlutterStandardMessageCodec sharedInstance]; + return sSharedObject; +} + +void InstabugHostApiSetup(id binaryMessenger, NSObject *api) { + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setEnabled" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setEnabledIsEnabled:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(setEnabledIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setEnabledIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.isEnabled" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(isEnabledWithError:)], @"InstabugHostApi api (%@) doesn't respond to @selector(isEnabledWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + NSNumber *output = [api isEnabledWithError:&error]; + callback(wrapResult(output, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.isBuilt" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(isBuiltWithError:)], @"InstabugHostApi api (%@) doesn't respond to @selector(isBuiltWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + NSNumber *output = [api isBuiltWithError:&error]; + callback(wrapResult(output, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.init" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(initToken:invocationEvents:debugLogsLevel:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(initToken:invocationEvents:debugLogsLevel:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_token = GetNullableObjectAtIndex(args, 0); + NSArray *arg_invocationEvents = GetNullableObjectAtIndex(args, 1); + NSString *arg_debugLogsLevel = GetNullableObjectAtIndex(args, 2); + FlutterError *error; + [api initToken:arg_token invocationEvents:arg_invocationEvents debugLogsLevel:arg_debugLogsLevel error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.show" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(showWithError:)], @"InstabugHostApi api (%@) doesn't respond to @selector(showWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api showWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.showWelcomeMessageWithMode" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(showWelcomeMessageWithModeMode:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(showWelcomeMessageWithModeMode:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_mode = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api showWelcomeMessageWithModeMode:arg_mode error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.identifyUser" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(identifyUserEmail:name:userId:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(identifyUserEmail:name:userId:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_email = GetNullableObjectAtIndex(args, 0); + NSString *arg_name = GetNullableObjectAtIndex(args, 1); + NSString *arg_userId = GetNullableObjectAtIndex(args, 2); + FlutterError *error; + [api identifyUserEmail:arg_email name:arg_name userId:arg_userId error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setUserData" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setUserDataData:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(setUserDataData:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_data = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setUserDataData:arg_data error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.logUserEvent" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(logUserEventName:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(logUserEventName:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_name = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api logUserEventName:arg_name error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.logOut" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(logOutWithError:)], @"InstabugHostApi api (%@) doesn't respond to @selector(logOutWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api logOutWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setLocale" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setLocaleLocale:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(setLocaleLocale:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_locale = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setLocaleLocale:arg_locale error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setColorTheme" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setColorThemeTheme:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(setColorThemeTheme:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_theme = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setColorThemeTheme:arg_theme error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setWelcomeMessageMode" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setWelcomeMessageModeMode:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(setWelcomeMessageModeMode:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_mode = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setWelcomeMessageModeMode:arg_mode error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setPrimaryColor" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setPrimaryColorColor:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(setPrimaryColorColor:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_color = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setPrimaryColorColor:arg_color error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setSessionProfilerEnabled" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setSessionProfilerEnabledEnabled:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(setSessionProfilerEnabledEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_enabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setSessionProfilerEnabledEnabled:arg_enabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setValueForStringWithKey" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setValueForStringWithKeyValue:key:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(setValueForStringWithKeyValue:key:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_value = GetNullableObjectAtIndex(args, 0); + NSString *arg_key = GetNullableObjectAtIndex(args, 1); + FlutterError *error; + [api setValueForStringWithKeyValue:arg_value key:arg_key error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.appendTags" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(appendTagsTags:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(appendTagsTags:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSArray *arg_tags = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api appendTagsTags:arg_tags error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.resetTags" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(resetTagsWithError:)], @"InstabugHostApi api (%@) doesn't respond to @selector(resetTagsWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api resetTagsWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.getTags" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(getTagsWithCompletion:)], @"InstabugHostApi api (%@) doesn't respond to @selector(getTagsWithCompletion:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + [api getTagsWithCompletion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.addExperiments" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(addExperimentsExperiments:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(addExperimentsExperiments:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSArray *arg_experiments = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api addExperimentsExperiments:arg_experiments error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.removeExperiments" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(removeExperimentsExperiments:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(removeExperimentsExperiments:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSArray *arg_experiments = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api removeExperimentsExperiments:arg_experiments error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.clearAllExperiments" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(clearAllExperimentsWithError:)], @"InstabugHostApi api (%@) doesn't respond to @selector(clearAllExperimentsWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api clearAllExperimentsWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.addFeatureFlags" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(addFeatureFlagsFeatureFlagsMap:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(addFeatureFlagsFeatureFlagsMap:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSDictionary *arg_featureFlagsMap = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api addFeatureFlagsFeatureFlagsMap:arg_featureFlagsMap error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.removeFeatureFlags" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(removeFeatureFlagsFeatureFlags:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(removeFeatureFlagsFeatureFlags:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSArray *arg_featureFlags = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api removeFeatureFlagsFeatureFlags:arg_featureFlags error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.removeAllFeatureFlags" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(removeAllFeatureFlagsWithError:)], @"InstabugHostApi api (%@) doesn't respond to @selector(removeAllFeatureFlagsWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api removeAllFeatureFlagsWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setUserAttribute" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setUserAttributeValue:key:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(setUserAttributeValue:key:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_value = GetNullableObjectAtIndex(args, 0); + NSString *arg_key = GetNullableObjectAtIndex(args, 1); + FlutterError *error; + [api setUserAttributeValue:arg_value key:arg_key error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.removeUserAttribute" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(removeUserAttributeKey:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(removeUserAttributeKey:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_key = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api removeUserAttributeKey:arg_key error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.getUserAttributeForKey" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(getUserAttributeForKeyKey:completion:)], @"InstabugHostApi api (%@) doesn't respond to @selector(getUserAttributeForKeyKey:completion:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_key = GetNullableObjectAtIndex(args, 0); + [api getUserAttributeForKeyKey:arg_key completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.getUserAttributes" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(getUserAttributesWithCompletion:)], @"InstabugHostApi api (%@) doesn't respond to @selector(getUserAttributesWithCompletion:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + [api getUserAttributesWithCompletion:^(NSDictionary *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setReproStepsConfig" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setReproStepsConfigBugMode:crashMode:sessionReplayMode:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(setReproStepsConfigBugMode:crashMode:sessionReplayMode:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_bugMode = GetNullableObjectAtIndex(args, 0); + NSString *arg_crashMode = GetNullableObjectAtIndex(args, 1); + NSString *arg_sessionReplayMode = GetNullableObjectAtIndex(args, 2); + FlutterError *error; + [api setReproStepsConfigBugMode:arg_bugMode crashMode:arg_crashMode sessionReplayMode:arg_sessionReplayMode error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.reportScreenChange" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(reportScreenChangeScreenName:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(reportScreenChangeScreenName:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_screenName = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api reportScreenChangeScreenName:arg_screenName error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setCustomBrandingImage" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setCustomBrandingImageLight:dark:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(setCustomBrandingImageLight:dark:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_light = GetNullableObjectAtIndex(args, 0); + NSString *arg_dark = GetNullableObjectAtIndex(args, 1); + FlutterError *error; + [api setCustomBrandingImageLight:arg_light dark:arg_dark error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setFont" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setFontFont:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(setFontFont:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_font = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setFontFont:arg_font error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.addFileAttachmentWithURL" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(addFileAttachmentWithURLFilePath:fileName:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(addFileAttachmentWithURLFilePath:fileName:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_filePath = GetNullableObjectAtIndex(args, 0); + NSString *arg_fileName = GetNullableObjectAtIndex(args, 1); + FlutterError *error; + [api addFileAttachmentWithURLFilePath:arg_filePath fileName:arg_fileName error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.addFileAttachmentWithData" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(addFileAttachmentWithDataData:fileName:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(addFileAttachmentWithDataData:fileName:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + FlutterStandardTypedData *arg_data = GetNullableObjectAtIndex(args, 0); + NSString *arg_fileName = GetNullableObjectAtIndex(args, 1); + FlutterError *error; + [api addFileAttachmentWithDataData:arg_data fileName:arg_fileName error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.clearFileAttachments" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(clearFileAttachmentsWithError:)], @"InstabugHostApi api (%@) doesn't respond to @selector(clearFileAttachmentsWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api clearFileAttachmentsWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.networkLog" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(networkLogData:error:)], @"InstabugHostApi api (%@) doesn't respond to @selector(networkLogData:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSDictionary *arg_data = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api networkLogData:arg_data error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.registerFeatureFlagChangeListener" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(registerFeatureFlagChangeListenerWithError:)], @"InstabugHostApi api (%@) doesn't respond to @selector(registerFeatureFlagChangeListenerWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api registerFeatureFlagChangeListenerWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.isW3CFeatureFlagsEnabled" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(isW3CFeatureFlagsEnabledWithError:)], @"InstabugHostApi api (%@) doesn't respond to @selector(isW3CFeatureFlagsEnabledWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + NSDictionary *output = [api isW3CFeatureFlagsEnabledWithError:&error]; + callback(wrapResult(output, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.InstabugHostApi.willRedirectToStore" + binaryMessenger:binaryMessenger + codec:InstabugHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(willRedirectToStoreWithError:)], @"InstabugHostApi api (%@) doesn't respond to @selector(willRedirectToStoreWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api willRedirectToStoreWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } +} diff --git a/ios/Classes/Generated/RepliesPigeon.h b/ios/Classes/Generated/RepliesPigeon.h new file mode 100644 index 000000000..d1688b4e0 --- /dev/null +++ b/ios/Classes/Generated/RepliesPigeon.h @@ -0,0 +1,37 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import + +@protocol FlutterBinaryMessenger; +@protocol FlutterMessageCodec; +@class FlutterError; +@class FlutterStandardTypedData; + +NS_ASSUME_NONNULL_BEGIN + + +/// The codec used by RepliesFlutterApi. +NSObject *RepliesFlutterApiGetCodec(void); + +@interface RepliesFlutterApi : NSObject +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger; +- (void)onNewReplyWithCompletion:(void (^)(FlutterError *_Nullable))completion; +@end + +/// The codec used by RepliesHostApi. +NSObject *RepliesHostApiGetCodec(void); + +@protocol RepliesHostApi +- (void)setEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)showWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)setInAppNotificationsEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setInAppNotificationSoundIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)getUnreadRepliesCountWithCompletion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)hasChatsWithCompletion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)bindOnNewReplyCallbackWithError:(FlutterError *_Nullable *_Nonnull)error; +@end + +extern void RepliesHostApiSetup(id binaryMessenger, NSObject *_Nullable api); + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Generated/RepliesPigeon.m b/ios/Classes/Generated/RepliesPigeon.m new file mode 100644 index 000000000..68ed05a19 --- /dev/null +++ b/ios/Classes/Generated/RepliesPigeon.m @@ -0,0 +1,192 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import "RepliesPigeon.h" + +#if TARGET_OS_OSX +#import +#else +#import +#endif + +#if !__has_feature(objc_arc) +#error File requires ARC to be enabled. +#endif + +static NSArray *wrapResult(id result, FlutterError *error) { + if (error) { + return @[ + error.code ?: [NSNull null], error.message ?: [NSNull null], error.details ?: [NSNull null] + ]; + } + return @[ result ?: [NSNull null] ]; +} +static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { + id result = array[key]; + return (result == [NSNull null]) ? nil : result; +} + +NSObject *RepliesFlutterApiGetCodec(void) { + static FlutterStandardMessageCodec *sSharedObject = nil; + sSharedObject = [FlutterStandardMessageCodec sharedInstance]; + return sSharedObject; +} + +@interface RepliesFlutterApi () +@property(nonatomic, strong) NSObject *binaryMessenger; +@end + +@implementation RepliesFlutterApi + +- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger { + self = [super init]; + if (self) { + _binaryMessenger = binaryMessenger; + } + return self; +} +- (void)onNewReplyWithCompletion:(void (^)(FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel + messageChannelWithName:@"dev.flutter.pigeon.instabug_flutter.RepliesFlutterApi.onNewReply" + binaryMessenger:self.binaryMessenger + codec:RepliesFlutterApiGetCodec()]; + [channel sendMessage:nil reply:^(id reply) { + completion(nil); + }]; +} +@end + +NSObject *RepliesHostApiGetCodec(void) { + static FlutterStandardMessageCodec *sSharedObject = nil; + sSharedObject = [FlutterStandardMessageCodec sharedInstance]; + return sSharedObject; +} + +void RepliesHostApiSetup(id binaryMessenger, NSObject *api) { + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.RepliesHostApi.setEnabled" + binaryMessenger:binaryMessenger + codec:RepliesHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setEnabledIsEnabled:error:)], @"RepliesHostApi api (%@) doesn't respond to @selector(setEnabledIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setEnabledIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.RepliesHostApi.show" + binaryMessenger:binaryMessenger + codec:RepliesHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(showWithError:)], @"RepliesHostApi api (%@) doesn't respond to @selector(showWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api showWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.RepliesHostApi.setInAppNotificationsEnabled" + binaryMessenger:binaryMessenger + codec:RepliesHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setInAppNotificationsEnabledIsEnabled:error:)], @"RepliesHostApi api (%@) doesn't respond to @selector(setInAppNotificationsEnabledIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setInAppNotificationsEnabledIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.RepliesHostApi.setInAppNotificationSound" + binaryMessenger:binaryMessenger + codec:RepliesHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setInAppNotificationSoundIsEnabled:error:)], @"RepliesHostApi api (%@) doesn't respond to @selector(setInAppNotificationSoundIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setInAppNotificationSoundIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.RepliesHostApi.getUnreadRepliesCount" + binaryMessenger:binaryMessenger + codec:RepliesHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(getUnreadRepliesCountWithCompletion:)], @"RepliesHostApi api (%@) doesn't respond to @selector(getUnreadRepliesCountWithCompletion:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + [api getUnreadRepliesCountWithCompletion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.RepliesHostApi.hasChats" + binaryMessenger:binaryMessenger + codec:RepliesHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(hasChatsWithCompletion:)], @"RepliesHostApi api (%@) doesn't respond to @selector(hasChatsWithCompletion:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + [api hasChatsWithCompletion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.RepliesHostApi.bindOnNewReplyCallback" + binaryMessenger:binaryMessenger + codec:RepliesHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(bindOnNewReplyCallbackWithError:)], @"RepliesHostApi api (%@) doesn't respond to @selector(bindOnNewReplyCallbackWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api bindOnNewReplyCallbackWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } +} diff --git a/ios/Classes/Generated/SessionReplayPigeon.h b/ios/Classes/Generated/SessionReplayPigeon.h new file mode 100644 index 000000000..d29358cab --- /dev/null +++ b/ios/Classes/Generated/SessionReplayPigeon.h @@ -0,0 +1,27 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import + +@protocol FlutterBinaryMessenger; +@protocol FlutterMessageCodec; +@class FlutterError; +@class FlutterStandardTypedData; + +NS_ASSUME_NONNULL_BEGIN + + +/// The codec used by SessionReplayHostApi. +NSObject *SessionReplayHostApiGetCodec(void); + +@protocol SessionReplayHostApi +- (void)setEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setNetworkLogsEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setInstabugLogsEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setUserStepsEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)getSessionReplayLinkWithCompletion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +@end + +extern void SessionReplayHostApiSetup(id binaryMessenger, NSObject *_Nullable api); + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Generated/SessionReplayPigeon.m b/ios/Classes/Generated/SessionReplayPigeon.m new file mode 100644 index 000000000..322e52e7c --- /dev/null +++ b/ios/Classes/Generated/SessionReplayPigeon.m @@ -0,0 +1,129 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import "SessionReplayPigeon.h" + +#if TARGET_OS_OSX +#import +#else +#import +#endif + +#if !__has_feature(objc_arc) +#error File requires ARC to be enabled. +#endif + +static NSArray *wrapResult(id result, FlutterError *error) { + if (error) { + return @[ + error.code ?: [NSNull null], error.message ?: [NSNull null], error.details ?: [NSNull null] + ]; + } + return @[ result ?: [NSNull null] ]; +} +static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { + id result = array[key]; + return (result == [NSNull null]) ? nil : result; +} + +NSObject *SessionReplayHostApiGetCodec(void) { + static FlutterStandardMessageCodec *sSharedObject = nil; + sSharedObject = [FlutterStandardMessageCodec sharedInstance]; + return sSharedObject; +} + +void SessionReplayHostApiSetup(id binaryMessenger, NSObject *api) { + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.SessionReplayHostApi.setEnabled" + binaryMessenger:binaryMessenger + codec:SessionReplayHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setEnabledIsEnabled:error:)], @"SessionReplayHostApi api (%@) doesn't respond to @selector(setEnabledIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setEnabledIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.SessionReplayHostApi.setNetworkLogsEnabled" + binaryMessenger:binaryMessenger + codec:SessionReplayHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setNetworkLogsEnabledIsEnabled:error:)], @"SessionReplayHostApi api (%@) doesn't respond to @selector(setNetworkLogsEnabledIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setNetworkLogsEnabledIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.SessionReplayHostApi.setInstabugLogsEnabled" + binaryMessenger:binaryMessenger + codec:SessionReplayHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setInstabugLogsEnabledIsEnabled:error:)], @"SessionReplayHostApi api (%@) doesn't respond to @selector(setInstabugLogsEnabledIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setInstabugLogsEnabledIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.SessionReplayHostApi.setUserStepsEnabled" + binaryMessenger:binaryMessenger + codec:SessionReplayHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setUserStepsEnabledIsEnabled:error:)], @"SessionReplayHostApi api (%@) doesn't respond to @selector(setUserStepsEnabledIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setUserStepsEnabledIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.SessionReplayHostApi.getSessionReplayLink" + binaryMessenger:binaryMessenger + codec:SessionReplayHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(getSessionReplayLinkWithCompletion:)], @"SessionReplayHostApi api (%@) doesn't respond to @selector(getSessionReplayLinkWithCompletion:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + [api getSessionReplayLinkWithCompletion:^(NSString *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; + }]; + } else { + [channel setMessageHandler:nil]; + } + } +} diff --git a/ios/Classes/Generated/SurveysPigeon.h b/ios/Classes/Generated/SurveysPigeon.h new file mode 100644 index 000000000..8af831a81 --- /dev/null +++ b/ios/Classes/Generated/SurveysPigeon.h @@ -0,0 +1,41 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import + +@protocol FlutterBinaryMessenger; +@protocol FlutterMessageCodec; +@class FlutterError; +@class FlutterStandardTypedData; + +NS_ASSUME_NONNULL_BEGIN + + +/// The codec used by SurveysFlutterApi. +NSObject *SurveysFlutterApiGetCodec(void); + +@interface SurveysFlutterApi : NSObject +- (instancetype)initWithBinaryMessenger:(id)binaryMessenger; +- (void)onShowSurveyWithCompletion:(void (^)(FlutterError *_Nullable))completion; +- (void)onDismissSurveyWithCompletion:(void (^)(FlutterError *_Nullable))completion; +@end + +/// The codec used by SurveysHostApi. +NSObject *SurveysHostApiGetCodec(void); + +@protocol SurveysHostApi +- (void)setEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)showSurveyIfAvailableWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)showSurveySurveyToken:(NSString *)surveyToken error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setAutoShowingEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setShouldShowWelcomeScreenShouldShowWelcomeScreen:(NSNumber *)shouldShowWelcomeScreen error:(FlutterError *_Nullable *_Nonnull)error; +- (void)setAppStoreURLAppStoreURL:(NSString *)appStoreURL error:(FlutterError *_Nullable *_Nonnull)error; +- (void)hasRespondedToSurveySurveyToken:(NSString *)surveyToken completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)getAvailableSurveysWithCompletion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)bindOnShowSurveyCallbackWithError:(FlutterError *_Nullable *_Nonnull)error; +- (void)bindOnDismissSurveyCallbackWithError:(FlutterError *_Nullable *_Nonnull)error; +@end + +extern void SurveysHostApiSetup(id binaryMessenger, NSObject *_Nullable api); + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Generated/SurveysPigeon.m b/ios/Classes/Generated/SurveysPigeon.m new file mode 100644 index 000000000..9e5d955e1 --- /dev/null +++ b/ios/Classes/Generated/SurveysPigeon.m @@ -0,0 +1,259 @@ +// Autogenerated from Pigeon (v10.1.5), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +#import "SurveysPigeon.h" + +#if TARGET_OS_OSX +#import +#else +#import +#endif + +#if !__has_feature(objc_arc) +#error File requires ARC to be enabled. +#endif + +static NSArray *wrapResult(id result, FlutterError *error) { + if (error) { + return @[ + error.code ?: [NSNull null], error.message ?: [NSNull null], error.details ?: [NSNull null] + ]; + } + return @[ result ?: [NSNull null] ]; +} +static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { + id result = array[key]; + return (result == [NSNull null]) ? nil : result; +} + +NSObject *SurveysFlutterApiGetCodec(void) { + static FlutterStandardMessageCodec *sSharedObject = nil; + sSharedObject = [FlutterStandardMessageCodec sharedInstance]; + return sSharedObject; +} + +@interface SurveysFlutterApi () +@property(nonatomic, strong) NSObject *binaryMessenger; +@end + +@implementation SurveysFlutterApi + +- (instancetype)initWithBinaryMessenger:(NSObject *)binaryMessenger { + self = [super init]; + if (self) { + _binaryMessenger = binaryMessenger; + } + return self; +} +- (void)onShowSurveyWithCompletion:(void (^)(FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel + messageChannelWithName:@"dev.flutter.pigeon.instabug_flutter.SurveysFlutterApi.onShowSurvey" + binaryMessenger:self.binaryMessenger + codec:SurveysFlutterApiGetCodec()]; + [channel sendMessage:nil reply:^(id reply) { + completion(nil); + }]; +} +- (void)onDismissSurveyWithCompletion:(void (^)(FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel + messageChannelWithName:@"dev.flutter.pigeon.instabug_flutter.SurveysFlutterApi.onDismissSurvey" + binaryMessenger:self.binaryMessenger + codec:SurveysFlutterApiGetCodec()]; + [channel sendMessage:nil reply:^(id reply) { + completion(nil); + }]; +} +@end + +NSObject *SurveysHostApiGetCodec(void) { + static FlutterStandardMessageCodec *sSharedObject = nil; + sSharedObject = [FlutterStandardMessageCodec sharedInstance]; + return sSharedObject; +} + +void SurveysHostApiSetup(id binaryMessenger, NSObject *api) { + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.SurveysHostApi.setEnabled" + binaryMessenger:binaryMessenger + codec:SurveysHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setEnabledIsEnabled:error:)], @"SurveysHostApi api (%@) doesn't respond to @selector(setEnabledIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setEnabledIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.SurveysHostApi.showSurveyIfAvailable" + binaryMessenger:binaryMessenger + codec:SurveysHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(showSurveyIfAvailableWithError:)], @"SurveysHostApi api (%@) doesn't respond to @selector(showSurveyIfAvailableWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api showSurveyIfAvailableWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.SurveysHostApi.showSurvey" + binaryMessenger:binaryMessenger + codec:SurveysHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(showSurveySurveyToken:error:)], @"SurveysHostApi api (%@) doesn't respond to @selector(showSurveySurveyToken:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_surveyToken = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api showSurveySurveyToken:arg_surveyToken error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.SurveysHostApi.setAutoShowingEnabled" + binaryMessenger:binaryMessenger + codec:SurveysHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setAutoShowingEnabledIsEnabled:error:)], @"SurveysHostApi api (%@) doesn't respond to @selector(setAutoShowingEnabledIsEnabled:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_isEnabled = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setAutoShowingEnabledIsEnabled:arg_isEnabled error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.SurveysHostApi.setShouldShowWelcomeScreen" + binaryMessenger:binaryMessenger + codec:SurveysHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setShouldShowWelcomeScreenShouldShowWelcomeScreen:error:)], @"SurveysHostApi api (%@) doesn't respond to @selector(setShouldShowWelcomeScreenShouldShowWelcomeScreen:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSNumber *arg_shouldShowWelcomeScreen = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setShouldShowWelcomeScreenShouldShowWelcomeScreen:arg_shouldShowWelcomeScreen error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.SurveysHostApi.setAppStoreURL" + binaryMessenger:binaryMessenger + codec:SurveysHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(setAppStoreURLAppStoreURL:error:)], @"SurveysHostApi api (%@) doesn't respond to @selector(setAppStoreURLAppStoreURL:error:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_appStoreURL = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + [api setAppStoreURLAppStoreURL:arg_appStoreURL error:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.SurveysHostApi.hasRespondedToSurvey" + binaryMessenger:binaryMessenger + codec:SurveysHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(hasRespondedToSurveySurveyToken:completion:)], @"SurveysHostApi api (%@) doesn't respond to @selector(hasRespondedToSurveySurveyToken:completion:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_surveyToken = GetNullableObjectAtIndex(args, 0); + [api hasRespondedToSurveySurveyToken:arg_surveyToken completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.SurveysHostApi.getAvailableSurveys" + binaryMessenger:binaryMessenger + codec:SurveysHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(getAvailableSurveysWithCompletion:)], @"SurveysHostApi api (%@) doesn't respond to @selector(getAvailableSurveysWithCompletion:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + [api getAvailableSurveysWithCompletion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.SurveysHostApi.bindOnShowSurveyCallback" + binaryMessenger:binaryMessenger + codec:SurveysHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(bindOnShowSurveyCallbackWithError:)], @"SurveysHostApi api (%@) doesn't respond to @selector(bindOnShowSurveyCallbackWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api bindOnShowSurveyCallbackWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.instabug_flutter.SurveysHostApi.bindOnDismissSurveyCallback" + binaryMessenger:binaryMessenger + codec:SurveysHostApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(bindOnDismissSurveyCallbackWithError:)], @"SurveysHostApi api (%@) doesn't respond to @selector(bindOnDismissSurveyCallbackWithError:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + FlutterError *error; + [api bindOnDismissSurveyCallbackWithError:&error]; + callback(wrapResult(nil, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } +} diff --git a/lib/src/generated/apm.api.g.dart b/lib/src/generated/apm.api.g.dart new file mode 100644 index 000000000..4dfcc9426 --- /dev/null +++ b/lib/src/generated/apm.api.g.dart @@ -0,0 +1,491 @@ +// Autogenerated from Pigeon (v10.1.5), 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 + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +class ApmHostApi { + /// Constructor for [ApmHostApi]. 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. + ApmHostApi({BinaryMessenger? binaryMessenger}) + : _binaryMessenger = binaryMessenger; + final BinaryMessenger? _binaryMessenger; + + static const MessageCodec codec = StandardMessageCodec(); + + Future setEnabled(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.setEnabled', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future isEnabled() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.isEnabled', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (replyList[0] as bool?)!; + } + } + + Future setScreenLoadingEnabled(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.setScreenLoadingEnabled', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future isScreenLoadingEnabled() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.isScreenLoadingEnabled', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (replyList[0] as bool?)!; + } + } + + Future setColdAppLaunchEnabled(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.setColdAppLaunchEnabled', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setAutoUITraceEnabled(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.setAutoUITraceEnabled', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future startExecutionTrace(String arg_id, String arg_name) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.startExecutionTrace', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_id, arg_name]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return (replyList[0] as String?); + } + } + + Future startFlow(String arg_name) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.startFlow', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_name]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setFlowAttribute( + String arg_name, String arg_key, String? arg_value) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.setFlowAttribute', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel + .send([arg_name, arg_key, arg_value]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future endFlow(String arg_name) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.endFlow', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_name]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setExecutionTraceAttribute( + String arg_id, String arg_key, String arg_value) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.setExecutionTraceAttribute', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel + .send([arg_id, arg_key, arg_value]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future endExecutionTrace(String arg_id) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.endExecutionTrace', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_id]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future startUITrace(String arg_name) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.startUITrace', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_name]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future endUITrace() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.endUITrace', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future endAppLaunch() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.endAppLaunch', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future networkLogAndroid(Map arg_data) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.networkLogAndroid', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_data]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future startCpUiTrace( + String arg_screenName, int arg_microTimeStamp, int arg_traceId) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.startCpUiTrace', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel + .send([arg_screenName, arg_microTimeStamp, arg_traceId]) + as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future reportScreenLoadingCP(int arg_startTimeStampMicro, + int arg_durationMicro, int arg_uiTraceId) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.reportScreenLoadingCP', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send([ + arg_startTimeStampMicro, + arg_durationMicro, + arg_uiTraceId + ]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future endScreenLoadingCP( + int arg_timeStampMicro, int arg_uiTraceId) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.endScreenLoadingCP', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel + .send([arg_timeStampMicro, arg_uiTraceId]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future isEndScreenLoadingEnabled() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.ApmHostApi.isEndScreenLoadingEnabled', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (replyList[0] as bool?)!; + } + } +} diff --git a/lib/src/generated/bug_reporting.api.g.dart b/lib/src/generated/bug_reporting.api.g.dart new file mode 100644 index 000000000..e8aef5b35 --- /dev/null +++ b/lib/src/generated/bug_reporting.api.g.dart @@ -0,0 +1,447 @@ +// Autogenerated from Pigeon (v10.1.5), 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 + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +abstract class BugReportingFlutterApi { + static const MessageCodec codec = StandardMessageCodec(); + + void onSdkInvoke(); + + void onSdkDismiss(String dismissType, String reportType); + + static void setup(BugReportingFlutterApi? api, + {BinaryMessenger? binaryMessenger}) { + { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingFlutterApi.onSdkInvoke', + codec, + binaryMessenger: binaryMessenger); + if (api == null) { + channel.setMessageHandler(null); + } else { + channel.setMessageHandler((Object? message) async { + // ignore message + api.onSdkInvoke(); + return; + }); + } + } + { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingFlutterApi.onSdkDismiss', + codec, + binaryMessenger: binaryMessenger); + if (api == null) { + channel.setMessageHandler(null); + } else { + channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.instabug_flutter.BugReportingFlutterApi.onSdkDismiss was null.'); + final List args = (message as List?)!; + final String? arg_dismissType = (args[0] as String?); + assert(arg_dismissType != null, + 'Argument for dev.flutter.pigeon.instabug_flutter.BugReportingFlutterApi.onSdkDismiss was null, expected non-null String.'); + final String? arg_reportType = (args[1] as String?); + assert(arg_reportType != null, + 'Argument for dev.flutter.pigeon.instabug_flutter.BugReportingFlutterApi.onSdkDismiss was null, expected non-null String.'); + api.onSdkDismiss(arg_dismissType!, arg_reportType!); + return; + }); + } + } + } +} + +class BugReportingHostApi { + /// Constructor for [BugReportingHostApi]. 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. + BugReportingHostApi({BinaryMessenger? binaryMessenger}) + : _binaryMessenger = binaryMessenger; + final BinaryMessenger? _binaryMessenger; + + static const MessageCodec codec = StandardMessageCodec(); + + Future setEnabled(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setEnabled', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future show( + String arg_reportType, List arg_invocationOptions) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.show', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_reportType, arg_invocationOptions]) + as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setInvocationEvents(List arg_events) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setInvocationEvents', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_events]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setReportTypes(List arg_types) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setReportTypes', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_types]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setExtendedBugReportMode(String arg_mode) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setExtendedBugReportMode', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_mode]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setInvocationOptions(List arg_options) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setInvocationOptions', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_options]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setFloatingButtonEdge(String arg_edge, int arg_offset) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setFloatingButtonEdge', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_edge, arg_offset]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setVideoRecordingFloatingButtonPosition( + String arg_position) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setVideoRecordingFloatingButtonPosition', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_position]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setShakingThresholdForiPhone(double arg_threshold) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setShakingThresholdForiPhone', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_threshold]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setShakingThresholdForiPad(double arg_threshold) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setShakingThresholdForiPad', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_threshold]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setShakingThresholdForAndroid(int arg_threshold) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setShakingThresholdForAndroid', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_threshold]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setEnabledAttachmentTypes( + bool arg_screenshot, + bool arg_extraScreenshot, + bool arg_galleryImage, + bool arg_screenRecording) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setEnabledAttachmentTypes', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send([ + arg_screenshot, + arg_extraScreenshot, + arg_galleryImage, + arg_screenRecording + ]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future bindOnInvokeCallback() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.bindOnInvokeCallback', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future bindOnDismissCallback() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.bindOnDismissCallback', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setDisclaimerText(String arg_text) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setDisclaimerText', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_text]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setCommentMinimumCharacterCount( + int arg_limit, List? arg_reportTypes) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.BugReportingHostApi.setCommentMinimumCharacterCount', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel + .send([arg_limit, arg_reportTypes]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } +} diff --git a/lib/src/generated/crash_reporting.api.g.dart b/lib/src/generated/crash_reporting.api.g.dart new file mode 100644 index 000000000..f32d1e843 --- /dev/null +++ b/lib/src/generated/crash_reporting.api.g.dart @@ -0,0 +1,96 @@ +// Autogenerated from Pigeon (v10.1.5), 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 + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +class CrashReportingHostApi { + /// Constructor for [CrashReportingHostApi]. 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. + CrashReportingHostApi({BinaryMessenger? binaryMessenger}) + : _binaryMessenger = binaryMessenger; + final BinaryMessenger? _binaryMessenger; + + static const MessageCodec codec = StandardMessageCodec(); + + Future setEnabled(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.CrashReportingHostApi.setEnabled', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future send(String arg_jsonCrash, bool arg_isHandled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.CrashReportingHostApi.send', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel + .send([arg_jsonCrash, arg_isHandled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future sendNonFatalError( + String arg_jsonCrash, + Map? arg_userAttributes, + String? arg_fingerprint, + String arg_nonFatalExceptionLevel) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.CrashReportingHostApi.sendNonFatalError', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send([ + arg_jsonCrash, + arg_userAttributes, + arg_fingerprint, + arg_nonFatalExceptionLevel + ]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } +} diff --git a/lib/src/generated/feature_requests.api.g.dart b/lib/src/generated/feature_requests.api.g.dart new file mode 100644 index 000000000..bb52b6a07 --- /dev/null +++ b/lib/src/generated/feature_requests.api.g.dart @@ -0,0 +1,66 @@ +// Autogenerated from Pigeon (v10.1.5), 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 + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +class FeatureRequestsHostApi { + /// Constructor for [FeatureRequestsHostApi]. 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. + FeatureRequestsHostApi({BinaryMessenger? binaryMessenger}) + : _binaryMessenger = binaryMessenger; + final BinaryMessenger? _binaryMessenger; + + static const MessageCodec codec = StandardMessageCodec(); + + Future show() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.FeatureRequestsHostApi.show', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setEmailFieldRequired( + bool arg_isRequired, List arg_actionTypes) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.FeatureRequestsHostApi.setEmailFieldRequired', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel + .send([arg_isRequired, arg_actionTypes]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } +} diff --git a/lib/src/generated/instabug.api.g.dart b/lib/src/generated/instabug.api.g.dart new file mode 100644 index 000000000..5ece6d4df --- /dev/null +++ b/lib/src/generated/instabug.api.g.dart @@ -0,0 +1,980 @@ +// Autogenerated from Pigeon (v10.1.5), 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 + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +abstract class FeatureFlagsFlutterApi { + static const MessageCodec codec = StandardMessageCodec(); + + void onW3CFeatureFlagChange(bool isW3cExternalTraceIDEnabled, + bool isW3cExternalGeneratedHeaderEnabled, bool isW3cCaughtHeaderEnabled); + + static void setup(FeatureFlagsFlutterApi? api, + {BinaryMessenger? binaryMessenger}) { + { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.FeatureFlagsFlutterApi.onW3CFeatureFlagChange', + codec, + binaryMessenger: binaryMessenger); + if (api == null) { + channel.setMessageHandler(null); + } else { + channel.setMessageHandler((Object? message) async { + assert(message != null, + 'Argument for dev.flutter.pigeon.instabug_flutter.FeatureFlagsFlutterApi.onW3CFeatureFlagChange was null.'); + final List args = (message as List?)!; + final bool? arg_isW3cExternalTraceIDEnabled = (args[0] as bool?); + assert(arg_isW3cExternalTraceIDEnabled != null, + 'Argument for dev.flutter.pigeon.instabug_flutter.FeatureFlagsFlutterApi.onW3CFeatureFlagChange was null, expected non-null bool.'); + final bool? arg_isW3cExternalGeneratedHeaderEnabled = + (args[1] as bool?); + assert(arg_isW3cExternalGeneratedHeaderEnabled != null, + 'Argument for dev.flutter.pigeon.instabug_flutter.FeatureFlagsFlutterApi.onW3CFeatureFlagChange was null, expected non-null bool.'); + final bool? arg_isW3cCaughtHeaderEnabled = (args[2] as bool?); + assert(arg_isW3cCaughtHeaderEnabled != null, + 'Argument for dev.flutter.pigeon.instabug_flutter.FeatureFlagsFlutterApi.onW3CFeatureFlagChange was null, expected non-null bool.'); + api.onW3CFeatureFlagChange( + arg_isW3cExternalTraceIDEnabled!, + arg_isW3cExternalGeneratedHeaderEnabled!, + arg_isW3cCaughtHeaderEnabled!); + return; + }); + } + } + } +} + +class InstabugHostApi { + /// Constructor for [InstabugHostApi]. 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. + InstabugHostApi({BinaryMessenger? binaryMessenger}) + : _binaryMessenger = binaryMessenger; + final BinaryMessenger? _binaryMessenger; + + static const MessageCodec codec = StandardMessageCodec(); + + Future setEnabled(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setEnabled', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future isEnabled() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.isEnabled', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (replyList[0] as bool?)!; + } + } + + Future isBuilt() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.isBuilt', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (replyList[0] as bool?)!; + } + } + + Future init(String arg_token, List arg_invocationEvents, + String arg_debugLogsLevel) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.init', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send( + [arg_token, arg_invocationEvents, arg_debugLogsLevel]) + as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future show() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.show', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future showWelcomeMessageWithMode(String arg_mode) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.showWelcomeMessageWithMode', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_mode]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future identifyUser( + String arg_email, String? arg_name, String? arg_userId) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.identifyUser', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel + .send([arg_email, arg_name, arg_userId]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setUserData(String arg_data) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setUserData', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_data]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future logUserEvent(String arg_name) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.logUserEvent', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_name]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future logOut() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.logOut', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setLocale(String arg_locale) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setLocale', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_locale]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setColorTheme(String arg_theme) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setColorTheme', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_theme]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setWelcomeMessageMode(String arg_mode) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setWelcomeMessageMode', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_mode]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setPrimaryColor(int arg_color) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setPrimaryColor', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_color]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setSessionProfilerEnabled(bool arg_enabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setSessionProfilerEnabled', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_enabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setValueForStringWithKey( + String arg_value, String arg_key) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setValueForStringWithKey', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_value, arg_key]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future appendTags(List arg_tags) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.appendTags', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_tags]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future resetTags() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.resetTags', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future?> getTags() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.getTags', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return (replyList[0] as List?)?.cast(); + } + } + + Future addExperiments(List arg_experiments) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.addExperiments', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_experiments]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future removeExperiments(List arg_experiments) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.removeExperiments', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_experiments]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future clearAllExperiments() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.clearAllExperiments', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future addFeatureFlags( + Map arg_featureFlagsMap) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.addFeatureFlags', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_featureFlagsMap]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future removeFeatureFlags(List arg_featureFlags) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.removeFeatureFlags', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_featureFlags]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future removeAllFeatureFlags() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.removeAllFeatureFlags', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setUserAttribute(String arg_value, String arg_key) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setUserAttribute', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_value, arg_key]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future removeUserAttribute(String arg_key) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.removeUserAttribute', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_key]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future getUserAttributeForKey(String arg_key) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.getUserAttributeForKey', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_key]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return (replyList[0] as String?); + } + } + + Future?> getUserAttributes() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.getUserAttributes', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return (replyList[0] as Map?)?.cast(); + } + } + + Future setReproStepsConfig(String? arg_bugMode, String? arg_crashMode, + String? arg_sessionReplayMode) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setReproStepsConfig', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel + .send([arg_bugMode, arg_crashMode, arg_sessionReplayMode]) + as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future reportScreenChange(String arg_screenName) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.reportScreenChange', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_screenName]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setCustomBrandingImage(String arg_light, String arg_dark) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setCustomBrandingImage', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_light, arg_dark]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setFont(String arg_font) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.setFont', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_font]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future addFileAttachmentWithURL( + String arg_filePath, String arg_fileName) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.addFileAttachmentWithURL', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel + .send([arg_filePath, arg_fileName]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future addFileAttachmentWithData( + Uint8List arg_data, String arg_fileName) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.addFileAttachmentWithData', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_data, arg_fileName]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future clearFileAttachments() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.clearFileAttachments', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future networkLog(Map arg_data) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.networkLog', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_data]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future registerFeatureFlagChangeListener() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.registerFeatureFlagChangeListener', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future> isW3CFeatureFlagsEnabled() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.isW3CFeatureFlagsEnabled', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (replyList[0] as Map?)!.cast(); + } + } + + Future willRedirectToStore() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugHostApi.willRedirectToStore', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } +} diff --git a/lib/src/generated/instabug_log.api.g.dart b/lib/src/generated/instabug_log.api.g.dart new file mode 100644 index 000000000..3de2c9be1 --- /dev/null +++ b/lib/src/generated/instabug_log.api.g.dart @@ -0,0 +1,155 @@ +// Autogenerated from Pigeon (v10.1.5), 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 + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +class InstabugLogHostApi { + /// Constructor for [InstabugLogHostApi]. 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. + InstabugLogHostApi({BinaryMessenger? binaryMessenger}) + : _binaryMessenger = binaryMessenger; + final BinaryMessenger? _binaryMessenger; + + static const MessageCodec codec = StandardMessageCodec(); + + Future logVerbose(String arg_message) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.logVerbose', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_message]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future logDebug(String arg_message) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.logDebug', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_message]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future logInfo(String arg_message) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.logInfo', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_message]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future logWarn(String arg_message) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.logWarn', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_message]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future logError(String arg_message) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.logError', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_message]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future clearAllLogs() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.InstabugLogHostApi.clearAllLogs', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } +} diff --git a/lib/src/generated/replies.api.g.dart b/lib/src/generated/replies.api.g.dart new file mode 100644 index 000000000..ee30f81a6 --- /dev/null +++ b/lib/src/generated/replies.api.g.dart @@ -0,0 +1,209 @@ +// Autogenerated from Pigeon (v10.1.5), 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 + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +abstract class RepliesFlutterApi { + static const MessageCodec codec = StandardMessageCodec(); + + void onNewReply(); + + static void setup(RepliesFlutterApi? api, + {BinaryMessenger? binaryMessenger}) { + { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.RepliesFlutterApi.onNewReply', + codec, + binaryMessenger: binaryMessenger); + if (api == null) { + channel.setMessageHandler(null); + } else { + channel.setMessageHandler((Object? message) async { + // ignore message + api.onNewReply(); + return; + }); + } + } + } +} + +class RepliesHostApi { + /// Constructor for [RepliesHostApi]. 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. + RepliesHostApi({BinaryMessenger? binaryMessenger}) + : _binaryMessenger = binaryMessenger; + final BinaryMessenger? _binaryMessenger; + + static const MessageCodec codec = StandardMessageCodec(); + + Future setEnabled(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.RepliesHostApi.setEnabled', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future show() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.RepliesHostApi.show', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setInAppNotificationsEnabled(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.RepliesHostApi.setInAppNotificationsEnabled', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setInAppNotificationSound(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.RepliesHostApi.setInAppNotificationSound', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future getUnreadRepliesCount() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.RepliesHostApi.getUnreadRepliesCount', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (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?)!; + } + } + + Future hasChats() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.RepliesHostApi.hasChats', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (replyList[0] as bool?)!; + } + } + + Future bindOnNewReplyCallback() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.RepliesHostApi.bindOnNewReplyCallback', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } +} diff --git a/lib/src/generated/session_replay.api.g.dart b/lib/src/generated/session_replay.api.g.dart new file mode 100644 index 000000000..1d3143353 --- /dev/null +++ b/lib/src/generated/session_replay.api.g.dart @@ -0,0 +1,139 @@ +// Autogenerated from Pigeon (v10.1.5), 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 + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +class SessionReplayHostApi { + /// Constructor for [SessionReplayHostApi]. 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. + SessionReplayHostApi({BinaryMessenger? binaryMessenger}) + : _binaryMessenger = binaryMessenger; + final BinaryMessenger? _binaryMessenger; + + static const MessageCodec codec = StandardMessageCodec(); + + Future setEnabled(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SessionReplayHostApi.setEnabled', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setNetworkLogsEnabled(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SessionReplayHostApi.setNetworkLogsEnabled', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setInstabugLogsEnabled(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SessionReplayHostApi.setInstabugLogsEnabled', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setUserStepsEnabled(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SessionReplayHostApi.setUserStepsEnabled', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future getSessionReplayLink() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SessionReplayHostApi.getSessionReplayLink', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (replyList[0] as String?)!; + } + } +} diff --git a/lib/src/generated/surveys.api.g.dart b/lib/src/generated/surveys.api.g.dart new file mode 100644 index 000000000..10788dc57 --- /dev/null +++ b/lib/src/generated/surveys.api.g.dart @@ -0,0 +1,297 @@ +// Autogenerated from Pigeon (v10.1.5), 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 + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +abstract class SurveysFlutterApi { + static const MessageCodec codec = StandardMessageCodec(); + + void onShowSurvey(); + + void onDismissSurvey(); + + static void setup(SurveysFlutterApi? api, + {BinaryMessenger? binaryMessenger}) { + { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SurveysFlutterApi.onShowSurvey', + codec, + binaryMessenger: binaryMessenger); + if (api == null) { + channel.setMessageHandler(null); + } else { + channel.setMessageHandler((Object? message) async { + // ignore message + api.onShowSurvey(); + return; + }); + } + } + { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SurveysFlutterApi.onDismissSurvey', + codec, + binaryMessenger: binaryMessenger); + if (api == null) { + channel.setMessageHandler(null); + } else { + channel.setMessageHandler((Object? message) async { + // ignore message + api.onDismissSurvey(); + return; + }); + } + } + } +} + +class SurveysHostApi { + /// Constructor for [SurveysHostApi]. 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. + SurveysHostApi({BinaryMessenger? binaryMessenger}) + : _binaryMessenger = binaryMessenger; + final BinaryMessenger? _binaryMessenger; + + static const MessageCodec codec = StandardMessageCodec(); + + Future setEnabled(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SurveysHostApi.setEnabled', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future showSurveyIfAvailable() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SurveysHostApi.showSurveyIfAvailable', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future showSurvey(String arg_surveyToken) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SurveysHostApi.showSurvey', codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_surveyToken]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setAutoShowingEnabled(bool arg_isEnabled) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SurveysHostApi.setAutoShowingEnabled', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_isEnabled]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setShouldShowWelcomeScreen( + bool arg_shouldShowWelcomeScreen) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SurveysHostApi.setShouldShowWelcomeScreen', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel + .send([arg_shouldShowWelcomeScreen]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future setAppStoreURL(String arg_appStoreURL) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SurveysHostApi.setAppStoreURL', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_appStoreURL]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future hasRespondedToSurvey(String arg_surveyToken) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SurveysHostApi.hasRespondedToSurvey', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = + await channel.send([arg_surveyToken]) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (replyList[0] as bool?)!; + } + } + + Future> getAvailableSurveys() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SurveysHostApi.getAvailableSurveys', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else if (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(); + } + } + + Future bindOnShowSurveyCallback() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SurveysHostApi.bindOnShowSurveyCallback', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } + + Future bindOnDismissSurveyCallback() async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.instabug_flutter.SurveysHostApi.bindOnDismissSurveyCallback', + codec, + binaryMessenger: _binaryMessenger); + final List? replyList = await channel.send(null) as List?; + if (replyList == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyList.length > 1) { + throw PlatformException( + code: replyList[0]! as String, + message: replyList[1] as String?, + details: replyList[2], + ); + } else { + return; + } + } +} diff --git a/test/apm_test.mocks.dart b/test/apm_test.mocks.dart new file mode 100644 index 000000000..deb1526ae --- /dev/null +++ b/test/apm_test.mocks.dart @@ -0,0 +1,360 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in instabug_flutter/test/apm_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i3; + +import 'package:instabug_flutter/src/generated/apm.api.g.dart' as _i2; +import 'package:instabug_flutter/src/utils/ibg_build_info.dart' as _i5; +import 'package:instabug_flutter/src/utils/ibg_date_time.dart' as _i4; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i6; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeDateTime_0 extends _i1.SmartFake implements DateTime { + _FakeDateTime_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [ApmHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockApmHostApi extends _i1.Mock implements _i2.ApmHostApi { + MockApmHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i3.Future setEnabled(bool? arg_isEnabled) => (super.noSuchMethod( + Invocation.method( + #setEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future isEnabled() => (super.noSuchMethod( + Invocation.method( + #isEnabled, + [], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + + @override + _i3.Future setScreenLoadingEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setScreenLoadingEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future isScreenLoadingEnabled() => (super.noSuchMethod( + Invocation.method( + #isScreenLoadingEnabled, + [], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + + @override + _i3.Future setColdAppLaunchEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setColdAppLaunchEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setAutoUITraceEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setAutoUITraceEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future startExecutionTrace( + String? arg_id, + String? arg_name, + ) => + (super.noSuchMethod( + Invocation.method( + #startExecutionTrace, + [ + arg_id, + arg_name, + ], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future startFlow(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #startFlow, + [arg_name], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setFlowAttribute( + String? arg_name, + String? arg_key, + String? arg_value, + ) => + (super.noSuchMethod( + Invocation.method( + #setFlowAttribute, + [ + arg_name, + arg_key, + arg_value, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future endFlow(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #endFlow, + [arg_name], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setExecutionTraceAttribute( + String? arg_id, + String? arg_key, + String? arg_value, + ) => + (super.noSuchMethod( + Invocation.method( + #setExecutionTraceAttribute, + [ + arg_id, + arg_key, + arg_value, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future endExecutionTrace(String? arg_id) => (super.noSuchMethod( + Invocation.method( + #endExecutionTrace, + [arg_id], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future startUITrace(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #startUITrace, + [arg_name], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future endUITrace() => (super.noSuchMethod( + Invocation.method( + #endUITrace, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future endAppLaunch() => (super.noSuchMethod( + Invocation.method( + #endAppLaunch, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future networkLogAndroid(Map? arg_data) => + (super.noSuchMethod( + Invocation.method( + #networkLogAndroid, + [arg_data], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future startCpUiTrace( + String? arg_screenName, + int? arg_microTimeStamp, + int? arg_traceId, + ) => + (super.noSuchMethod( + Invocation.method( + #startCpUiTrace, + [ + arg_screenName, + arg_microTimeStamp, + arg_traceId, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future reportScreenLoadingCP( + int? arg_startTimeStampMicro, + int? arg_durationMicro, + int? arg_uiTraceId, + ) => + (super.noSuchMethod( + Invocation.method( + #reportScreenLoadingCP, + [ + arg_startTimeStampMicro, + arg_durationMicro, + arg_uiTraceId, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future endScreenLoadingCP( + int? arg_timeStampMicro, + int? arg_uiTraceId, + ) => + (super.noSuchMethod( + Invocation.method( + #endScreenLoadingCP, + [ + arg_timeStampMicro, + arg_uiTraceId, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future isEndScreenLoadingEnabled() => (super.noSuchMethod( + Invocation.method( + #isEndScreenLoadingEnabled, + [], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); +} + +/// A class which mocks [IBGDateTime]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockIBGDateTime extends _i1.Mock implements _i4.IBGDateTime { + MockIBGDateTime() { + _i1.throwOnMissingStub(this); + } + + @override + DateTime now() => (super.noSuchMethod( + Invocation.method( + #now, + [], + ), + returnValue: _FakeDateTime_0( + this, + Invocation.method( + #now, + [], + ), + ), + ) as DateTime); +} + +/// A class which mocks [IBGBuildInfo]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockIBGBuildInfo extends _i1.Mock implements _i5.IBGBuildInfo { + MockIBGBuildInfo() { + _i1.throwOnMissingStub(this); + } + + @override + bool get isAndroid => (super.noSuchMethod( + Invocation.getter(#isAndroid), + returnValue: false, + ) as bool); + + @override + bool get isIOS => (super.noSuchMethod( + Invocation.getter(#isIOS), + returnValue: false, + ) as bool); + + @override + String get operatingSystem => (super.noSuchMethod( + Invocation.getter(#operatingSystem), + returnValue: _i6.dummyValue( + this, + Invocation.getter(#operatingSystem), + ), + ) as String); + + @override + bool get isReleaseMode => (super.noSuchMethod( + Invocation.getter(#isReleaseMode), + returnValue: false, + ) as bool); + + @override + bool get isDebugMode => (super.noSuchMethod( + Invocation.getter(#isDebugMode), + returnValue: false, + ) as bool); +} diff --git a/test/bug_reporting_test.mocks.dart b/test/bug_reporting_test.mocks.dart new file mode 100644 index 000000000..cbdb9da9b --- /dev/null +++ b/test/bug_reporting_test.mocks.dart @@ -0,0 +1,277 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in instabug_flutter/test/bug_reporting_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i3; + +import 'package:instabug_flutter/src/generated/bug_reporting.api.g.dart' as _i2; +import 'package:instabug_flutter/src/utils/ibg_build_info.dart' as _i4; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i5; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +/// A class which mocks [BugReportingHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockBugReportingHostApi extends _i1.Mock + implements _i2.BugReportingHostApi { + MockBugReportingHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i3.Future setEnabled(bool? arg_isEnabled) => (super.noSuchMethod( + Invocation.method( + #setEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future show( + String? arg_reportType, + List? arg_invocationOptions, + ) => + (super.noSuchMethod( + Invocation.method( + #show, + [ + arg_reportType, + arg_invocationOptions, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setInvocationEvents(List? arg_events) => + (super.noSuchMethod( + Invocation.method( + #setInvocationEvents, + [arg_events], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setReportTypes(List? arg_types) => + (super.noSuchMethod( + Invocation.method( + #setReportTypes, + [arg_types], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setExtendedBugReportMode(String? arg_mode) => + (super.noSuchMethod( + Invocation.method( + #setExtendedBugReportMode, + [arg_mode], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setInvocationOptions(List? arg_options) => + (super.noSuchMethod( + Invocation.method( + #setInvocationOptions, + [arg_options], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setFloatingButtonEdge( + String? arg_edge, + int? arg_offset, + ) => + (super.noSuchMethod( + Invocation.method( + #setFloatingButtonEdge, + [ + arg_edge, + arg_offset, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setVideoRecordingFloatingButtonPosition( + String? arg_position) => + (super.noSuchMethod( + Invocation.method( + #setVideoRecordingFloatingButtonPosition, + [arg_position], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setShakingThresholdForiPhone(double? arg_threshold) => + (super.noSuchMethod( + Invocation.method( + #setShakingThresholdForiPhone, + [arg_threshold], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setShakingThresholdForiPad(double? arg_threshold) => + (super.noSuchMethod( + Invocation.method( + #setShakingThresholdForiPad, + [arg_threshold], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setShakingThresholdForAndroid(int? arg_threshold) => + (super.noSuchMethod( + Invocation.method( + #setShakingThresholdForAndroid, + [arg_threshold], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setEnabledAttachmentTypes( + bool? arg_screenshot, + bool? arg_extraScreenshot, + bool? arg_galleryImage, + bool? arg_screenRecording, + ) => + (super.noSuchMethod( + Invocation.method( + #setEnabledAttachmentTypes, + [ + arg_screenshot, + arg_extraScreenshot, + arg_galleryImage, + arg_screenRecording, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future bindOnInvokeCallback() => (super.noSuchMethod( + Invocation.method( + #bindOnInvokeCallback, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future bindOnDismissCallback() => (super.noSuchMethod( + Invocation.method( + #bindOnDismissCallback, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setDisclaimerText(String? arg_text) => (super.noSuchMethod( + Invocation.method( + #setDisclaimerText, + [arg_text], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setCommentMinimumCharacterCount( + int? arg_limit, + List? arg_reportTypes, + ) => + (super.noSuchMethod( + Invocation.method( + #setCommentMinimumCharacterCount, + [ + arg_limit, + arg_reportTypes, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); +} + +/// A class which mocks [IBGBuildInfo]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockIBGBuildInfo extends _i1.Mock implements _i4.IBGBuildInfo { + MockIBGBuildInfo() { + _i1.throwOnMissingStub(this); + } + + @override + bool get isAndroid => (super.noSuchMethod( + Invocation.getter(#isAndroid), + returnValue: false, + ) as bool); + + @override + bool get isIOS => (super.noSuchMethod( + Invocation.getter(#isIOS), + returnValue: false, + ) as bool); + + @override + String get operatingSystem => (super.noSuchMethod( + Invocation.getter(#operatingSystem), + returnValue: _i5.dummyValue( + this, + Invocation.getter(#operatingSystem), + ), + ) as String); + + @override + bool get isReleaseMode => (super.noSuchMethod( + Invocation.getter(#isReleaseMode), + returnValue: false, + ) as bool); + + @override + bool get isDebugMode => (super.noSuchMethod( + Invocation.getter(#isDebugMode), + returnValue: false, + ) as bool); +} diff --git a/test/crash_reporting_test.mocks.dart b/test/crash_reporting_test.mocks.dart new file mode 100644 index 000000000..2b2967700 --- /dev/null +++ b/test/crash_reporting_test.mocks.dart @@ -0,0 +1,125 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in instabug_flutter/test/crash_reporting_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i3; + +import 'package:instabug_flutter/src/generated/crash_reporting.api.g.dart' + as _i2; +import 'package:instabug_flutter/src/utils/ibg_build_info.dart' as _i4; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i5; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +/// A class which mocks [CrashReportingHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockCrashReportingHostApi extends _i1.Mock + implements _i2.CrashReportingHostApi { + MockCrashReportingHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i3.Future setEnabled(bool? arg_isEnabled) => (super.noSuchMethod( + Invocation.method( + #setEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future send( + String? arg_jsonCrash, + bool? arg_isHandled, + ) => + (super.noSuchMethod( + Invocation.method( + #send, + [ + arg_jsonCrash, + arg_isHandled, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future sendNonFatalError( + String? arg_jsonCrash, + Map? arg_userAttributes, + String? arg_fingerprint, + String? arg_nonFatalExceptionLevel, + ) => + (super.noSuchMethod( + Invocation.method( + #sendNonFatalError, + [ + arg_jsonCrash, + arg_userAttributes, + arg_fingerprint, + arg_nonFatalExceptionLevel, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); +} + +/// A class which mocks [IBGBuildInfo]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockIBGBuildInfo extends _i1.Mock implements _i4.IBGBuildInfo { + MockIBGBuildInfo() { + _i1.throwOnMissingStub(this); + } + + @override + bool get isAndroid => (super.noSuchMethod( + Invocation.getter(#isAndroid), + returnValue: false, + ) as bool); + + @override + bool get isIOS => (super.noSuchMethod( + Invocation.getter(#isIOS), + returnValue: false, + ) as bool); + + @override + String get operatingSystem => (super.noSuchMethod( + Invocation.getter(#operatingSystem), + returnValue: _i5.dummyValue( + this, + Invocation.getter(#operatingSystem), + ), + ) as String); + + @override + bool get isReleaseMode => (super.noSuchMethod( + Invocation.getter(#isReleaseMode), + returnValue: false, + ) as bool); + + @override + bool get isDebugMode => (super.noSuchMethod( + Invocation.getter(#isDebugMode), + returnValue: false, + ) as bool); +} diff --git a/test/feature_flags_manager_test.mocks.dart b/test/feature_flags_manager_test.mocks.dart new file mode 100644 index 000000000..10c345280 --- /dev/null +++ b/test/feature_flags_manager_test.mocks.dart @@ -0,0 +1,544 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in instabug_flutter/test/feature_flags_manager_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i3; +import 'dart:typed_data' as _i4; + +import 'package:instabug_flutter/src/generated/instabug.api.g.dart' as _i2; +import 'package:instabug_flutter/src/utils/ibg_build_info.dart' as _i5; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i6; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +/// A class which mocks [InstabugHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockInstabugHostApi extends _i1.Mock implements _i2.InstabugHostApi { + MockInstabugHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i3.Future setEnabled(bool? arg_isEnabled) => (super.noSuchMethod( + Invocation.method( + #setEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future isEnabled() => (super.noSuchMethod( + Invocation.method( + #isEnabled, + [], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + + @override + _i3.Future isBuilt() => (super.noSuchMethod( + Invocation.method( + #isBuilt, + [], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + + @override + _i3.Future init( + String? arg_token, + List? arg_invocationEvents, + String? arg_debugLogsLevel, + ) => + (super.noSuchMethod( + Invocation.method( + #init, + [ + arg_token, + arg_invocationEvents, + arg_debugLogsLevel, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future show() => (super.noSuchMethod( + Invocation.method( + #show, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future showWelcomeMessageWithMode(String? arg_mode) => + (super.noSuchMethod( + Invocation.method( + #showWelcomeMessageWithMode, + [arg_mode], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future identifyUser( + String? arg_email, + String? arg_name, + String? arg_userId, + ) => + (super.noSuchMethod( + Invocation.method( + #identifyUser, + [ + arg_email, + arg_name, + arg_userId, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setUserData(String? arg_data) => (super.noSuchMethod( + Invocation.method( + #setUserData, + [arg_data], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future logUserEvent(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #logUserEvent, + [arg_name], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future logOut() => (super.noSuchMethod( + Invocation.method( + #logOut, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setLocale(String? arg_locale) => (super.noSuchMethod( + Invocation.method( + #setLocale, + [arg_locale], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setColorTheme(String? arg_theme) => (super.noSuchMethod( + Invocation.method( + #setColorTheme, + [arg_theme], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setWelcomeMessageMode(String? arg_mode) => + (super.noSuchMethod( + Invocation.method( + #setWelcomeMessageMode, + [arg_mode], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setPrimaryColor(int? arg_color) => (super.noSuchMethod( + Invocation.method( + #setPrimaryColor, + [arg_color], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setSessionProfilerEnabled(bool? arg_enabled) => + (super.noSuchMethod( + Invocation.method( + #setSessionProfilerEnabled, + [arg_enabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setValueForStringWithKey( + String? arg_value, + String? arg_key, + ) => + (super.noSuchMethod( + Invocation.method( + #setValueForStringWithKey, + [ + arg_value, + arg_key, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future appendTags(List? arg_tags) => (super.noSuchMethod( + Invocation.method( + #appendTags, + [arg_tags], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future resetTags() => (super.noSuchMethod( + Invocation.method( + #resetTags, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future?> getTags() => (super.noSuchMethod( + Invocation.method( + #getTags, + [], + ), + returnValue: _i3.Future?>.value(), + ) as _i3.Future?>); + + @override + _i3.Future addExperiments(List? arg_experiments) => + (super.noSuchMethod( + Invocation.method( + #addExperiments, + [arg_experiments], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future removeExperiments(List? arg_experiments) => + (super.noSuchMethod( + Invocation.method( + #removeExperiments, + [arg_experiments], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future clearAllExperiments() => (super.noSuchMethod( + Invocation.method( + #clearAllExperiments, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future addFeatureFlags( + Map? arg_featureFlagsMap) => + (super.noSuchMethod( + Invocation.method( + #addFeatureFlags, + [arg_featureFlagsMap], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future removeFeatureFlags(List? arg_featureFlags) => + (super.noSuchMethod( + Invocation.method( + #removeFeatureFlags, + [arg_featureFlags], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future removeAllFeatureFlags() => (super.noSuchMethod( + Invocation.method( + #removeAllFeatureFlags, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setUserAttribute( + String? arg_value, + String? arg_key, + ) => + (super.noSuchMethod( + Invocation.method( + #setUserAttribute, + [ + arg_value, + arg_key, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future removeUserAttribute(String? arg_key) => (super.noSuchMethod( + Invocation.method( + #removeUserAttribute, + [arg_key], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future getUserAttributeForKey(String? arg_key) => + (super.noSuchMethod( + Invocation.method( + #getUserAttributeForKey, + [arg_key], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future?> getUserAttributes() => (super.noSuchMethod( + Invocation.method( + #getUserAttributes, + [], + ), + returnValue: _i3.Future?>.value(), + ) as _i3.Future?>); + + @override + _i3.Future setReproStepsConfig( + String? arg_bugMode, + String? arg_crashMode, + String? arg_sessionReplayMode, + ) => + (super.noSuchMethod( + Invocation.method( + #setReproStepsConfig, + [ + arg_bugMode, + arg_crashMode, + arg_sessionReplayMode, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future reportScreenChange(String? arg_screenName) => + (super.noSuchMethod( + Invocation.method( + #reportScreenChange, + [arg_screenName], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setCustomBrandingImage( + String? arg_light, + String? arg_dark, + ) => + (super.noSuchMethod( + Invocation.method( + #setCustomBrandingImage, + [ + arg_light, + arg_dark, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setFont(String? arg_font) => (super.noSuchMethod( + Invocation.method( + #setFont, + [arg_font], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future addFileAttachmentWithURL( + String? arg_filePath, + String? arg_fileName, + ) => + (super.noSuchMethod( + Invocation.method( + #addFileAttachmentWithURL, + [ + arg_filePath, + arg_fileName, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future addFileAttachmentWithData( + _i4.Uint8List? arg_data, + String? arg_fileName, + ) => + (super.noSuchMethod( + Invocation.method( + #addFileAttachmentWithData, + [ + arg_data, + arg_fileName, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future clearFileAttachments() => (super.noSuchMethod( + Invocation.method( + #clearFileAttachments, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future networkLog(Map? arg_data) => + (super.noSuchMethod( + Invocation.method( + #networkLog, + [arg_data], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future registerFeatureFlagChangeListener() => (super.noSuchMethod( + Invocation.method( + #registerFeatureFlagChangeListener, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future> isW3CFeatureFlagsEnabled() => + (super.noSuchMethod( + Invocation.method( + #isW3CFeatureFlagsEnabled, + [], + ), + returnValue: _i3.Future>.value({}), + ) as _i3.Future>); + + @override + _i3.Future willRedirectToStore() => (super.noSuchMethod( + Invocation.method( + #willRedirectToStore, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); +} + +/// A class which mocks [IBGBuildInfo]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockIBGBuildInfo extends _i1.Mock implements _i5.IBGBuildInfo { + MockIBGBuildInfo() { + _i1.throwOnMissingStub(this); + } + + @override + bool get isAndroid => (super.noSuchMethod( + Invocation.getter(#isAndroid), + returnValue: false, + ) as bool); + + @override + bool get isIOS => (super.noSuchMethod( + Invocation.getter(#isIOS), + returnValue: false, + ) as bool); + + @override + String get operatingSystem => (super.noSuchMethod( + Invocation.getter(#operatingSystem), + returnValue: _i6.dummyValue( + this, + Invocation.getter(#operatingSystem), + ), + ) as String); + + @override + bool get isReleaseMode => (super.noSuchMethod( + Invocation.getter(#isReleaseMode), + returnValue: false, + ) as bool); + + @override + bool get isDebugMode => (super.noSuchMethod( + Invocation.getter(#isDebugMode), + returnValue: false, + ) as bool); +} diff --git a/test/feature_requests_test.mocks.dart b/test/feature_requests_test.mocks.dart new file mode 100644 index 000000000..589a8ea6b --- /dev/null +++ b/test/feature_requests_test.mocks.dart @@ -0,0 +1,60 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in instabug_flutter/test/feature_requests_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i3; + +import 'package:instabug_flutter/src/generated/feature_requests.api.g.dart' + as _i2; +import 'package:mockito/mockito.dart' as _i1; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +/// A class which mocks [FeatureRequestsHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockFeatureRequestsHostApi extends _i1.Mock + implements _i2.FeatureRequestsHostApi { + MockFeatureRequestsHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i3.Future show() => (super.noSuchMethod( + Invocation.method( + #show, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setEmailFieldRequired( + bool? arg_isRequired, + List? arg_actionTypes, + ) => + (super.noSuchMethod( + Invocation.method( + #setEmailFieldRequired, + [ + arg_isRequired, + arg_actionTypes, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); +} diff --git a/test/instabug_log_test.mocks.dart b/test/instabug_log_test.mocks.dart new file mode 100644 index 000000000..1db958f31 --- /dev/null +++ b/test/instabug_log_test.mocks.dart @@ -0,0 +1,92 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in instabug_flutter/test/instabug_log_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i3; + +import 'package:instabug_flutter/src/generated/instabug_log.api.g.dart' as _i2; +import 'package:mockito/mockito.dart' as _i1; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +/// A class which mocks [InstabugLogHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockInstabugLogHostApi extends _i1.Mock + implements _i2.InstabugLogHostApi { + MockInstabugLogHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i3.Future logVerbose(String? arg_message) => (super.noSuchMethod( + Invocation.method( + #logVerbose, + [arg_message], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future logDebug(String? arg_message) => (super.noSuchMethod( + Invocation.method( + #logDebug, + [arg_message], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future logInfo(String? arg_message) => (super.noSuchMethod( + Invocation.method( + #logInfo, + [arg_message], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future logWarn(String? arg_message) => (super.noSuchMethod( + Invocation.method( + #logWarn, + [arg_message], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future logError(String? arg_message) => (super.noSuchMethod( + Invocation.method( + #logError, + [arg_message], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future clearAllLogs() => (super.noSuchMethod( + Invocation.method( + #clearAllLogs, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); +} diff --git a/test/instabug_test.mocks.dart b/test/instabug_test.mocks.dart new file mode 100644 index 000000000..594e1ff65 --- /dev/null +++ b/test/instabug_test.mocks.dart @@ -0,0 +1,579 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in instabug_flutter/test/instabug_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i3; +import 'dart:typed_data' as _i4; + +import 'package:instabug_flutter/src/generated/instabug.api.g.dart' as _i2; +import 'package:instabug_flutter/src/utils/ibg_build_info.dart' as _i5; +import 'package:instabug_flutter/src/utils/screen_name_masker.dart' as _i7; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i6; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +/// A class which mocks [InstabugHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockInstabugHostApi extends _i1.Mock implements _i2.InstabugHostApi { + MockInstabugHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i3.Future setEnabled(bool? arg_isEnabled) => (super.noSuchMethod( + Invocation.method( + #setEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future isEnabled() => (super.noSuchMethod( + Invocation.method( + #isEnabled, + [], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + + @override + _i3.Future isBuilt() => (super.noSuchMethod( + Invocation.method( + #isBuilt, + [], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + + @override + _i3.Future init( + String? arg_token, + List? arg_invocationEvents, + String? arg_debugLogsLevel, + ) => + (super.noSuchMethod( + Invocation.method( + #init, + [ + arg_token, + arg_invocationEvents, + arg_debugLogsLevel, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future show() => (super.noSuchMethod( + Invocation.method( + #show, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future showWelcomeMessageWithMode(String? arg_mode) => + (super.noSuchMethod( + Invocation.method( + #showWelcomeMessageWithMode, + [arg_mode], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future identifyUser( + String? arg_email, + String? arg_name, + String? arg_userId, + ) => + (super.noSuchMethod( + Invocation.method( + #identifyUser, + [ + arg_email, + arg_name, + arg_userId, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setUserData(String? arg_data) => (super.noSuchMethod( + Invocation.method( + #setUserData, + [arg_data], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future logUserEvent(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #logUserEvent, + [arg_name], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future logOut() => (super.noSuchMethod( + Invocation.method( + #logOut, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setLocale(String? arg_locale) => (super.noSuchMethod( + Invocation.method( + #setLocale, + [arg_locale], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setColorTheme(String? arg_theme) => (super.noSuchMethod( + Invocation.method( + #setColorTheme, + [arg_theme], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setWelcomeMessageMode(String? arg_mode) => + (super.noSuchMethod( + Invocation.method( + #setWelcomeMessageMode, + [arg_mode], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setPrimaryColor(int? arg_color) => (super.noSuchMethod( + Invocation.method( + #setPrimaryColor, + [arg_color], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setSessionProfilerEnabled(bool? arg_enabled) => + (super.noSuchMethod( + Invocation.method( + #setSessionProfilerEnabled, + [arg_enabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setValueForStringWithKey( + String? arg_value, + String? arg_key, + ) => + (super.noSuchMethod( + Invocation.method( + #setValueForStringWithKey, + [ + arg_value, + arg_key, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future appendTags(List? arg_tags) => (super.noSuchMethod( + Invocation.method( + #appendTags, + [arg_tags], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future resetTags() => (super.noSuchMethod( + Invocation.method( + #resetTags, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future?> getTags() => (super.noSuchMethod( + Invocation.method( + #getTags, + [], + ), + returnValue: _i3.Future?>.value(), + ) as _i3.Future?>); + + @override + _i3.Future addExperiments(List? arg_experiments) => + (super.noSuchMethod( + Invocation.method( + #addExperiments, + [arg_experiments], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future removeExperiments(List? arg_experiments) => + (super.noSuchMethod( + Invocation.method( + #removeExperiments, + [arg_experiments], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future clearAllExperiments() => (super.noSuchMethod( + Invocation.method( + #clearAllExperiments, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future addFeatureFlags( + Map? arg_featureFlagsMap) => + (super.noSuchMethod( + Invocation.method( + #addFeatureFlags, + [arg_featureFlagsMap], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future removeFeatureFlags(List? arg_featureFlags) => + (super.noSuchMethod( + Invocation.method( + #removeFeatureFlags, + [arg_featureFlags], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future removeAllFeatureFlags() => (super.noSuchMethod( + Invocation.method( + #removeAllFeatureFlags, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setUserAttribute( + String? arg_value, + String? arg_key, + ) => + (super.noSuchMethod( + Invocation.method( + #setUserAttribute, + [ + arg_value, + arg_key, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future removeUserAttribute(String? arg_key) => (super.noSuchMethod( + Invocation.method( + #removeUserAttribute, + [arg_key], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future getUserAttributeForKey(String? arg_key) => + (super.noSuchMethod( + Invocation.method( + #getUserAttributeForKey, + [arg_key], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future?> getUserAttributes() => (super.noSuchMethod( + Invocation.method( + #getUserAttributes, + [], + ), + returnValue: _i3.Future?>.value(), + ) as _i3.Future?>); + + @override + _i3.Future setReproStepsConfig( + String? arg_bugMode, + String? arg_crashMode, + String? arg_sessionReplayMode, + ) => + (super.noSuchMethod( + Invocation.method( + #setReproStepsConfig, + [ + arg_bugMode, + arg_crashMode, + arg_sessionReplayMode, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future reportScreenChange(String? arg_screenName) => + (super.noSuchMethod( + Invocation.method( + #reportScreenChange, + [arg_screenName], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setCustomBrandingImage( + String? arg_light, + String? arg_dark, + ) => + (super.noSuchMethod( + Invocation.method( + #setCustomBrandingImage, + [ + arg_light, + arg_dark, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setFont(String? arg_font) => (super.noSuchMethod( + Invocation.method( + #setFont, + [arg_font], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future addFileAttachmentWithURL( + String? arg_filePath, + String? arg_fileName, + ) => + (super.noSuchMethod( + Invocation.method( + #addFileAttachmentWithURL, + [ + arg_filePath, + arg_fileName, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future addFileAttachmentWithData( + _i4.Uint8List? arg_data, + String? arg_fileName, + ) => + (super.noSuchMethod( + Invocation.method( + #addFileAttachmentWithData, + [ + arg_data, + arg_fileName, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future clearFileAttachments() => (super.noSuchMethod( + Invocation.method( + #clearFileAttachments, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future networkLog(Map? arg_data) => + (super.noSuchMethod( + Invocation.method( + #networkLog, + [arg_data], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future registerFeatureFlagChangeListener() => (super.noSuchMethod( + Invocation.method( + #registerFeatureFlagChangeListener, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future> isW3CFeatureFlagsEnabled() => + (super.noSuchMethod( + Invocation.method( + #isW3CFeatureFlagsEnabled, + [], + ), + returnValue: _i3.Future>.value({}), + ) as _i3.Future>); + + @override + _i3.Future willRedirectToStore() => (super.noSuchMethod( + Invocation.method( + #willRedirectToStore, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); +} + +/// A class which mocks [IBGBuildInfo]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockIBGBuildInfo extends _i1.Mock implements _i5.IBGBuildInfo { + MockIBGBuildInfo() { + _i1.throwOnMissingStub(this); + } + + @override + bool get isAndroid => (super.noSuchMethod( + Invocation.getter(#isAndroid), + returnValue: false, + ) as bool); + + @override + bool get isIOS => (super.noSuchMethod( + Invocation.getter(#isIOS), + returnValue: false, + ) as bool); + + @override + String get operatingSystem => (super.noSuchMethod( + Invocation.getter(#operatingSystem), + returnValue: _i6.dummyValue( + this, + Invocation.getter(#operatingSystem), + ), + ) as String); + + @override + bool get isReleaseMode => (super.noSuchMethod( + Invocation.getter(#isReleaseMode), + returnValue: false, + ) as bool); + + @override + bool get isDebugMode => (super.noSuchMethod( + Invocation.getter(#isDebugMode), + returnValue: false, + ) as bool); +} + +/// A class which mocks [ScreenNameMasker]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockScreenNameMasker extends _i1.Mock implements _i7.ScreenNameMasker { + MockScreenNameMasker() { + _i1.throwOnMissingStub(this); + } + + @override + void setMaskingCallback(_i7.ScreenNameMaskingCallback? callback) => + super.noSuchMethod( + Invocation.method( + #setMaskingCallback, + [callback], + ), + returnValueForMissingStub: null, + ); + + @override + String mask(String? screen) => (super.noSuchMethod( + Invocation.method( + #mask, + [screen], + ), + returnValue: _i6.dummyValue( + this, + Invocation.method( + #mask, + [screen], + ), + ), + ) as String); +} diff --git a/test/network_logger_test.mocks.dart b/test/network_logger_test.mocks.dart new file mode 100644 index 000000000..871f1756c --- /dev/null +++ b/test/network_logger_test.mocks.dart @@ -0,0 +1,1067 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in instabug_flutter/test/network_logger_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i7; +import 'dart:math' as _i14; +import 'dart:typed_data' as _i9; + +import 'package:instabug_flutter/instabug_flutter.dart' as _i2; +import 'package:instabug_flutter/src/generated/apm.api.g.dart' as _i6; +import 'package:instabug_flutter/src/generated/instabug.api.g.dart' as _i8; +import 'package:instabug_flutter/src/models/generated_w3c_header.dart' as _i4; +import 'package:instabug_flutter/src/models/trace_partial_id.dart' as _i3; +import 'package:instabug_flutter/src/models/w3c_feature_flags.dart' as _i5; +import 'package:instabug_flutter/src/utils/feature_flags_manager.dart' as _i15; +import 'package:instabug_flutter/src/utils/ibg_build_info.dart' as _i10; +import 'package:instabug_flutter/src/utils/network_manager.dart' as _i12; +import 'package:instabug_flutter/src/utils/w3c_header_utils.dart' as _i13; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i11; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeNetworkData_0 extends _i1.SmartFake implements _i2.NetworkData { + _FakeNetworkData_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeTracePartialId_1 extends _i1.SmartFake + implements _i3.TracePartialId { + _FakeTracePartialId_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeGeneratedW3CHeader_2 extends _i1.SmartFake + implements _i4.GeneratedW3CHeader { + _FakeGeneratedW3CHeader_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeW3cFeatureFlags_3 extends _i1.SmartFake + implements _i5.W3cFeatureFlags { + _FakeW3cFeatureFlags_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +/// A class which mocks [ApmHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockApmHostApi extends _i1.Mock implements _i6.ApmHostApi { + MockApmHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i7.Future setEnabled(bool? arg_isEnabled) => (super.noSuchMethod( + Invocation.method( + #setEnabled, + [arg_isEnabled], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future isEnabled() => (super.noSuchMethod( + Invocation.method( + #isEnabled, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + + @override + _i7.Future setScreenLoadingEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setScreenLoadingEnabled, + [arg_isEnabled], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future isScreenLoadingEnabled() => (super.noSuchMethod( + Invocation.method( + #isScreenLoadingEnabled, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + + @override + _i7.Future setColdAppLaunchEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setColdAppLaunchEnabled, + [arg_isEnabled], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future setAutoUITraceEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setAutoUITraceEnabled, + [arg_isEnabled], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future startExecutionTrace( + String? arg_id, + String? arg_name, + ) => + (super.noSuchMethod( + Invocation.method( + #startExecutionTrace, + [ + arg_id, + arg_name, + ], + ), + returnValue: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future startFlow(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #startFlow, + [arg_name], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future setFlowAttribute( + String? arg_name, + String? arg_key, + String? arg_value, + ) => + (super.noSuchMethod( + Invocation.method( + #setFlowAttribute, + [ + arg_name, + arg_key, + arg_value, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future endFlow(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #endFlow, + [arg_name], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future setExecutionTraceAttribute( + String? arg_id, + String? arg_key, + String? arg_value, + ) => + (super.noSuchMethod( + Invocation.method( + #setExecutionTraceAttribute, + [ + arg_id, + arg_key, + arg_value, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future endExecutionTrace(String? arg_id) => (super.noSuchMethod( + Invocation.method( + #endExecutionTrace, + [arg_id], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future startUITrace(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #startUITrace, + [arg_name], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future endUITrace() => (super.noSuchMethod( + Invocation.method( + #endUITrace, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future endAppLaunch() => (super.noSuchMethod( + Invocation.method( + #endAppLaunch, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future networkLogAndroid(Map? arg_data) => + (super.noSuchMethod( + Invocation.method( + #networkLogAndroid, + [arg_data], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future startCpUiTrace( + String? arg_screenName, + int? arg_microTimeStamp, + int? arg_traceId, + ) => + (super.noSuchMethod( + Invocation.method( + #startCpUiTrace, + [ + arg_screenName, + arg_microTimeStamp, + arg_traceId, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future reportScreenLoadingCP( + int? arg_startTimeStampMicro, + int? arg_durationMicro, + int? arg_uiTraceId, + ) => + (super.noSuchMethod( + Invocation.method( + #reportScreenLoadingCP, + [ + arg_startTimeStampMicro, + arg_durationMicro, + arg_uiTraceId, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future endScreenLoadingCP( + int? arg_timeStampMicro, + int? arg_uiTraceId, + ) => + (super.noSuchMethod( + Invocation.method( + #endScreenLoadingCP, + [ + arg_timeStampMicro, + arg_uiTraceId, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future isEndScreenLoadingEnabled() => (super.noSuchMethod( + Invocation.method( + #isEndScreenLoadingEnabled, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); +} + +/// A class which mocks [InstabugHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockInstabugHostApi extends _i1.Mock implements _i8.InstabugHostApi { + MockInstabugHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i7.Future setEnabled(bool? arg_isEnabled) => (super.noSuchMethod( + Invocation.method( + #setEnabled, + [arg_isEnabled], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future isEnabled() => (super.noSuchMethod( + Invocation.method( + #isEnabled, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + + @override + _i7.Future isBuilt() => (super.noSuchMethod( + Invocation.method( + #isBuilt, + [], + ), + returnValue: _i7.Future.value(false), + ) as _i7.Future); + + @override + _i7.Future init( + String? arg_token, + List? arg_invocationEvents, + String? arg_debugLogsLevel, + ) => + (super.noSuchMethod( + Invocation.method( + #init, + [ + arg_token, + arg_invocationEvents, + arg_debugLogsLevel, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future show() => (super.noSuchMethod( + Invocation.method( + #show, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future showWelcomeMessageWithMode(String? arg_mode) => + (super.noSuchMethod( + Invocation.method( + #showWelcomeMessageWithMode, + [arg_mode], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future identifyUser( + String? arg_email, + String? arg_name, + String? arg_userId, + ) => + (super.noSuchMethod( + Invocation.method( + #identifyUser, + [ + arg_email, + arg_name, + arg_userId, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future setUserData(String? arg_data) => (super.noSuchMethod( + Invocation.method( + #setUserData, + [arg_data], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future logUserEvent(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #logUserEvent, + [arg_name], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future logOut() => (super.noSuchMethod( + Invocation.method( + #logOut, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future setLocale(String? arg_locale) => (super.noSuchMethod( + Invocation.method( + #setLocale, + [arg_locale], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future setColorTheme(String? arg_theme) => (super.noSuchMethod( + Invocation.method( + #setColorTheme, + [arg_theme], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future setWelcomeMessageMode(String? arg_mode) => + (super.noSuchMethod( + Invocation.method( + #setWelcomeMessageMode, + [arg_mode], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future setPrimaryColor(int? arg_color) => (super.noSuchMethod( + Invocation.method( + #setPrimaryColor, + [arg_color], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future setSessionProfilerEnabled(bool? arg_enabled) => + (super.noSuchMethod( + Invocation.method( + #setSessionProfilerEnabled, + [arg_enabled], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future setValueForStringWithKey( + String? arg_value, + String? arg_key, + ) => + (super.noSuchMethod( + Invocation.method( + #setValueForStringWithKey, + [ + arg_value, + arg_key, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future appendTags(List? arg_tags) => (super.noSuchMethod( + Invocation.method( + #appendTags, + [arg_tags], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future resetTags() => (super.noSuchMethod( + Invocation.method( + #resetTags, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future?> getTags() => (super.noSuchMethod( + Invocation.method( + #getTags, + [], + ), + returnValue: _i7.Future?>.value(), + ) as _i7.Future?>); + + @override + _i7.Future addExperiments(List? arg_experiments) => + (super.noSuchMethod( + Invocation.method( + #addExperiments, + [arg_experiments], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future removeExperiments(List? arg_experiments) => + (super.noSuchMethod( + Invocation.method( + #removeExperiments, + [arg_experiments], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future clearAllExperiments() => (super.noSuchMethod( + Invocation.method( + #clearAllExperiments, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future addFeatureFlags( + Map? arg_featureFlagsMap) => + (super.noSuchMethod( + Invocation.method( + #addFeatureFlags, + [arg_featureFlagsMap], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future removeFeatureFlags(List? arg_featureFlags) => + (super.noSuchMethod( + Invocation.method( + #removeFeatureFlags, + [arg_featureFlags], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future removeAllFeatureFlags() => (super.noSuchMethod( + Invocation.method( + #removeAllFeatureFlags, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future setUserAttribute( + String? arg_value, + String? arg_key, + ) => + (super.noSuchMethod( + Invocation.method( + #setUserAttribute, + [ + arg_value, + arg_key, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future removeUserAttribute(String? arg_key) => (super.noSuchMethod( + Invocation.method( + #removeUserAttribute, + [arg_key], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future getUserAttributeForKey(String? arg_key) => + (super.noSuchMethod( + Invocation.method( + #getUserAttributeForKey, + [arg_key], + ), + returnValue: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future?> getUserAttributes() => (super.noSuchMethod( + Invocation.method( + #getUserAttributes, + [], + ), + returnValue: _i7.Future?>.value(), + ) as _i7.Future?>); + + @override + _i7.Future setReproStepsConfig( + String? arg_bugMode, + String? arg_crashMode, + String? arg_sessionReplayMode, + ) => + (super.noSuchMethod( + Invocation.method( + #setReproStepsConfig, + [ + arg_bugMode, + arg_crashMode, + arg_sessionReplayMode, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future reportScreenChange(String? arg_screenName) => + (super.noSuchMethod( + Invocation.method( + #reportScreenChange, + [arg_screenName], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future setCustomBrandingImage( + String? arg_light, + String? arg_dark, + ) => + (super.noSuchMethod( + Invocation.method( + #setCustomBrandingImage, + [ + arg_light, + arg_dark, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future setFont(String? arg_font) => (super.noSuchMethod( + Invocation.method( + #setFont, + [arg_font], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future addFileAttachmentWithURL( + String? arg_filePath, + String? arg_fileName, + ) => + (super.noSuchMethod( + Invocation.method( + #addFileAttachmentWithURL, + [ + arg_filePath, + arg_fileName, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future addFileAttachmentWithData( + _i9.Uint8List? arg_data, + String? arg_fileName, + ) => + (super.noSuchMethod( + Invocation.method( + #addFileAttachmentWithData, + [ + arg_data, + arg_fileName, + ], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future clearFileAttachments() => (super.noSuchMethod( + Invocation.method( + #clearFileAttachments, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future networkLog(Map? arg_data) => + (super.noSuchMethod( + Invocation.method( + #networkLog, + [arg_data], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future registerFeatureFlagChangeListener() => (super.noSuchMethod( + Invocation.method( + #registerFeatureFlagChangeListener, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + _i7.Future> isW3CFeatureFlagsEnabled() => + (super.noSuchMethod( + Invocation.method( + #isW3CFeatureFlagsEnabled, + [], + ), + returnValue: _i7.Future>.value({}), + ) as _i7.Future>); + + @override + _i7.Future willRedirectToStore() => (super.noSuchMethod( + Invocation.method( + #willRedirectToStore, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); +} + +/// A class which mocks [IBGBuildInfo]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockIBGBuildInfo extends _i1.Mock implements _i10.IBGBuildInfo { + MockIBGBuildInfo() { + _i1.throwOnMissingStub(this); + } + + @override + bool get isAndroid => (super.noSuchMethod( + Invocation.getter(#isAndroid), + returnValue: false, + ) as bool); + + @override + bool get isIOS => (super.noSuchMethod( + Invocation.getter(#isIOS), + returnValue: false, + ) as bool); + + @override + String get operatingSystem => (super.noSuchMethod( + Invocation.getter(#operatingSystem), + returnValue: _i11.dummyValue( + this, + Invocation.getter(#operatingSystem), + ), + ) as String); + + @override + bool get isReleaseMode => (super.noSuchMethod( + Invocation.getter(#isReleaseMode), + returnValue: false, + ) as bool); + + @override + bool get isDebugMode => (super.noSuchMethod( + Invocation.getter(#isDebugMode), + returnValue: false, + ) as bool); +} + +/// A class which mocks [NetworkManager]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockNetworkManager extends _i1.Mock implements _i12.NetworkManager { + MockNetworkManager() { + _i1.throwOnMissingStub(this); + } + + @override + void setObfuscateLogCallback(_i12.ObfuscateLogCallback? callback) => + super.noSuchMethod( + Invocation.method( + #setObfuscateLogCallback, + [callback], + ), + returnValueForMissingStub: null, + ); + + @override + void setOmitLogCallback(_i12.OmitLogCallback? callback) => super.noSuchMethod( + Invocation.method( + #setOmitLogCallback, + [callback], + ), + returnValueForMissingStub: null, + ); + + @override + _i7.FutureOr<_i2.NetworkData> obfuscateLog(_i2.NetworkData? data) => + (super.noSuchMethod( + Invocation.method( + #obfuscateLog, + [data], + ), + returnValue: _i7.Future<_i2.NetworkData>.value(_FakeNetworkData_0( + this, + Invocation.method( + #obfuscateLog, + [data], + ), + )), + ) as _i7.FutureOr<_i2.NetworkData>); + + @override + _i7.FutureOr omitLog(_i2.NetworkData? data) => (super.noSuchMethod( + Invocation.method( + #omitLog, + [data], + ), + returnValue: _i7.Future.value(false), + ) as _i7.FutureOr); +} + +/// A class which mocks [W3CHeaderUtils]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockW3CHeaderUtils extends _i1.Mock implements _i13.W3CHeaderUtils { + MockW3CHeaderUtils() { + _i1.throwOnMissingStub(this); + } + + @override + void $setRandom(_i14.Random? random) => super.noSuchMethod( + Invocation.method( + #$setRandom, + [random], + ), + returnValueForMissingStub: null, + ); + + @override + _i3.TracePartialId generateTracePartialId() => (super.noSuchMethod( + Invocation.method( + #generateTracePartialId, + [], + ), + returnValue: _FakeTracePartialId_1( + this, + Invocation.method( + #generateTracePartialId, + [], + ), + ), + ) as _i3.TracePartialId); + + @override + _i4.GeneratedW3CHeader generateW3CHeader(int? networkStartTime) => + (super.noSuchMethod( + Invocation.method( + #generateW3CHeader, + [networkStartTime], + ), + returnValue: _FakeGeneratedW3CHeader_2( + this, + Invocation.method( + #generateW3CHeader, + [networkStartTime], + ), + ), + ) as _i4.GeneratedW3CHeader); +} + +/// A class which mocks [FeatureFlagsManager]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockFeatureFlagsManager extends _i1.Mock + implements _i15.FeatureFlagsManager { + MockFeatureFlagsManager() { + _i1.throwOnMissingStub(this); + } + + @override + void $setHostApi(_i8.InstabugHostApi? host) => super.noSuchMethod( + Invocation.method( + #$setHostApi, + [host], + ), + returnValueForMissingStub: null, + ); + + @override + void setFeatureFlagsManager(_i15.FeatureFlagsManager? featureFlagsManager) => + super.noSuchMethod( + Invocation.method( + #setFeatureFlagsManager, + [featureFlagsManager], + ), + returnValueForMissingStub: null, + ); + + @override + _i7.Future<_i5.W3cFeatureFlags> getW3CFeatureFlagsHeader() => + (super.noSuchMethod( + Invocation.method( + #getW3CFeatureFlagsHeader, + [], + ), + returnValue: + _i7.Future<_i5.W3cFeatureFlags>.value(_FakeW3cFeatureFlags_3( + this, + Invocation.method( + #getW3CFeatureFlagsHeader, + [], + ), + )), + ) as _i7.Future<_i5.W3cFeatureFlags>); + + @override + _i7.Future registerW3CFlagsListener() => (super.noSuchMethod( + Invocation.method( + #registerW3CFlagsListener, + [], + ), + returnValue: _i7.Future.value(), + returnValueForMissingStub: _i7.Future.value(), + ) as _i7.Future); + + @override + void onW3CFeatureFlagChange( + bool? isW3cExternalTraceIDEnabled, + bool? isW3cExternalGeneratedHeaderEnabled, + bool? isW3cCaughtHeaderEnabled, + ) => + super.noSuchMethod( + Invocation.method( + #onW3CFeatureFlagChange, + [ + isW3cExternalTraceIDEnabled, + isW3cExternalGeneratedHeaderEnabled, + isW3cCaughtHeaderEnabled, + ], + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [Random]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockRandom extends _i1.Mock implements _i14.Random { + MockRandom() { + _i1.throwOnMissingStub(this); + } + + @override + int nextInt(int? max) => (super.noSuchMethod( + Invocation.method( + #nextInt, + [max], + ), + returnValue: 0, + ) as int); + + @override + double nextDouble() => (super.noSuchMethod( + Invocation.method( + #nextDouble, + [], + ), + returnValue: 0.0, + ) as double); + + @override + bool nextBool() => (super.noSuchMethod( + Invocation.method( + #nextBool, + [], + ), + returnValue: false, + ) as bool); +} diff --git a/test/replies_test.mocks.dart b/test/replies_test.mocks.dart new file mode 100644 index 000000000..d9f8f2457 --- /dev/null +++ b/test/replies_test.mocks.dart @@ -0,0 +1,145 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in instabug_flutter/test/replies_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i3; + +import 'package:instabug_flutter/src/generated/replies.api.g.dart' as _i2; +import 'package:instabug_flutter/src/utils/ibg_build_info.dart' as _i4; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i5; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +/// A class which mocks [RepliesHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockRepliesHostApi extends _i1.Mock implements _i2.RepliesHostApi { + MockRepliesHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i3.Future setEnabled(bool? arg_isEnabled) => (super.noSuchMethod( + Invocation.method( + #setEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future show() => (super.noSuchMethod( + Invocation.method( + #show, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setInAppNotificationsEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setInAppNotificationsEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setInAppNotificationSound(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setInAppNotificationSound, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future getUnreadRepliesCount() => (super.noSuchMethod( + Invocation.method( + #getUnreadRepliesCount, + [], + ), + returnValue: _i3.Future.value(0), + ) as _i3.Future); + + @override + _i3.Future hasChats() => (super.noSuchMethod( + Invocation.method( + #hasChats, + [], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + + @override + _i3.Future bindOnNewReplyCallback() => (super.noSuchMethod( + Invocation.method( + #bindOnNewReplyCallback, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); +} + +/// A class which mocks [IBGBuildInfo]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockIBGBuildInfo extends _i1.Mock implements _i4.IBGBuildInfo { + MockIBGBuildInfo() { + _i1.throwOnMissingStub(this); + } + + @override + bool get isAndroid => (super.noSuchMethod( + Invocation.getter(#isAndroid), + returnValue: false, + ) as bool); + + @override + bool get isIOS => (super.noSuchMethod( + Invocation.getter(#isIOS), + returnValue: false, + ) as bool); + + @override + String get operatingSystem => (super.noSuchMethod( + Invocation.getter(#operatingSystem), + returnValue: _i5.dummyValue( + this, + Invocation.getter(#operatingSystem), + ), + ) as String); + + @override + bool get isReleaseMode => (super.noSuchMethod( + Invocation.getter(#isReleaseMode), + returnValue: false, + ) as bool); + + @override + bool get isDebugMode => (super.noSuchMethod( + Invocation.getter(#isDebugMode), + returnValue: false, + ) as bool); +} diff --git a/test/session_replay_test.mocks.dart b/test/session_replay_test.mocks.dart new file mode 100644 index 000000000..ce98bbbf1 --- /dev/null +++ b/test/session_replay_test.mocks.dart @@ -0,0 +1,92 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in instabug_flutter/test/session_replay_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i3; + +import 'package:instabug_flutter/src/generated/session_replay.api.g.dart' + as _i2; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i4; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +/// A class which mocks [SessionReplayHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockSessionReplayHostApi extends _i1.Mock + implements _i2.SessionReplayHostApi { + MockSessionReplayHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i3.Future setEnabled(bool? arg_isEnabled) => (super.noSuchMethod( + Invocation.method( + #setEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setNetworkLogsEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setNetworkLogsEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setInstabugLogsEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setInstabugLogsEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setUserStepsEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setUserStepsEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future getSessionReplayLink() => (super.noSuchMethod( + Invocation.method( + #getSessionReplayLink, + [], + ), + returnValue: _i3.Future.value(_i4.dummyValue( + this, + Invocation.method( + #getSessionReplayLink, + [], + ), + )), + ) as _i3.Future); +} diff --git a/test/surveys_test.mocks.dart b/test/surveys_test.mocks.dart new file mode 100644 index 000000000..1eae8399f --- /dev/null +++ b/test/surveys_test.mocks.dart @@ -0,0 +1,178 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in instabug_flutter/test/surveys_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i3; + +import 'package:instabug_flutter/src/generated/surveys.api.g.dart' as _i2; +import 'package:instabug_flutter/src/utils/ibg_build_info.dart' as _i4; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i5; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +/// A class which mocks [SurveysHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockSurveysHostApi extends _i1.Mock implements _i2.SurveysHostApi { + MockSurveysHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i3.Future setEnabled(bool? arg_isEnabled) => (super.noSuchMethod( + Invocation.method( + #setEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future showSurveyIfAvailable() => (super.noSuchMethod( + Invocation.method( + #showSurveyIfAvailable, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future showSurvey(String? arg_surveyToken) => (super.noSuchMethod( + Invocation.method( + #showSurvey, + [arg_surveyToken], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setAutoShowingEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setAutoShowingEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setShouldShowWelcomeScreen( + bool? arg_shouldShowWelcomeScreen) => + (super.noSuchMethod( + Invocation.method( + #setShouldShowWelcomeScreen, + [arg_shouldShowWelcomeScreen], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setAppStoreURL(String? arg_appStoreURL) => + (super.noSuchMethod( + Invocation.method( + #setAppStoreURL, + [arg_appStoreURL], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future hasRespondedToSurvey(String? arg_surveyToken) => + (super.noSuchMethod( + Invocation.method( + #hasRespondedToSurvey, + [arg_surveyToken], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + + @override + _i3.Future> getAvailableSurveys() => (super.noSuchMethod( + Invocation.method( + #getAvailableSurveys, + [], + ), + returnValue: _i3.Future>.value([]), + ) as _i3.Future>); + + @override + _i3.Future bindOnShowSurveyCallback() => (super.noSuchMethod( + Invocation.method( + #bindOnShowSurveyCallback, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future bindOnDismissSurveyCallback() => (super.noSuchMethod( + Invocation.method( + #bindOnDismissSurveyCallback, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); +} + +/// A class which mocks [IBGBuildInfo]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockIBGBuildInfo extends _i1.Mock implements _i4.IBGBuildInfo { + MockIBGBuildInfo() { + _i1.throwOnMissingStub(this); + } + + @override + bool get isAndroid => (super.noSuchMethod( + Invocation.getter(#isAndroid), + returnValue: false, + ) as bool); + + @override + bool get isIOS => (super.noSuchMethod( + Invocation.getter(#isIOS), + returnValue: false, + ) as bool); + + @override + String get operatingSystem => (super.noSuchMethod( + Invocation.getter(#operatingSystem), + returnValue: _i5.dummyValue( + this, + Invocation.getter(#operatingSystem), + ), + ) as String); + + @override + bool get isReleaseMode => (super.noSuchMethod( + Invocation.getter(#isReleaseMode), + returnValue: false, + ) as bool); + + @override + bool get isDebugMode => (super.noSuchMethod( + Invocation.getter(#isDebugMode), + returnValue: false, + ) as bool); +} diff --git a/test/trace_test.mocks.dart b/test/trace_test.mocks.dart new file mode 100644 index 000000000..d2daca699 --- /dev/null +++ b/test/trace_test.mocks.dart @@ -0,0 +1,281 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in instabug_flutter/test/trace_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i3; + +import 'package:instabug_flutter/src/generated/apm.api.g.dart' as _i2; +import 'package:mockito/mockito.dart' as _i1; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +/// A class which mocks [ApmHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockApmHostApi extends _i1.Mock implements _i2.ApmHostApi { + MockApmHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i3.Future setEnabled(bool? arg_isEnabled) => (super.noSuchMethod( + Invocation.method( + #setEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future isEnabled() => (super.noSuchMethod( + Invocation.method( + #isEnabled, + [], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + + @override + _i3.Future setScreenLoadingEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setScreenLoadingEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future isScreenLoadingEnabled() => (super.noSuchMethod( + Invocation.method( + #isScreenLoadingEnabled, + [], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + + @override + _i3.Future setColdAppLaunchEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setColdAppLaunchEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setAutoUITraceEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setAutoUITraceEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future startExecutionTrace( + String? arg_id, + String? arg_name, + ) => + (super.noSuchMethod( + Invocation.method( + #startExecutionTrace, + [ + arg_id, + arg_name, + ], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future startFlow(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #startFlow, + [arg_name], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setFlowAttribute( + String? arg_name, + String? arg_key, + String? arg_value, + ) => + (super.noSuchMethod( + Invocation.method( + #setFlowAttribute, + [ + arg_name, + arg_key, + arg_value, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future endFlow(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #endFlow, + [arg_name], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setExecutionTraceAttribute( + String? arg_id, + String? arg_key, + String? arg_value, + ) => + (super.noSuchMethod( + Invocation.method( + #setExecutionTraceAttribute, + [ + arg_id, + arg_key, + arg_value, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future endExecutionTrace(String? arg_id) => (super.noSuchMethod( + Invocation.method( + #endExecutionTrace, + [arg_id], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future startUITrace(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #startUITrace, + [arg_name], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future endUITrace() => (super.noSuchMethod( + Invocation.method( + #endUITrace, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future endAppLaunch() => (super.noSuchMethod( + Invocation.method( + #endAppLaunch, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future networkLogAndroid(Map? arg_data) => + (super.noSuchMethod( + Invocation.method( + #networkLogAndroid, + [arg_data], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future startCpUiTrace( + String? arg_screenName, + int? arg_microTimeStamp, + int? arg_traceId, + ) => + (super.noSuchMethod( + Invocation.method( + #startCpUiTrace, + [ + arg_screenName, + arg_microTimeStamp, + arg_traceId, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future reportScreenLoadingCP( + int? arg_startTimeStampMicro, + int? arg_durationMicro, + int? arg_uiTraceId, + ) => + (super.noSuchMethod( + Invocation.method( + #reportScreenLoadingCP, + [ + arg_startTimeStampMicro, + arg_durationMicro, + arg_uiTraceId, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future endScreenLoadingCP( + int? arg_timeStampMicro, + int? arg_uiTraceId, + ) => + (super.noSuchMethod( + Invocation.method( + #endScreenLoadingCP, + [ + arg_timeStampMicro, + arg_uiTraceId, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future isEndScreenLoadingEnabled() => (super.noSuchMethod( + Invocation.method( + #isEndScreenLoadingEnabled, + [], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); +} diff --git a/test/utils/instabug_navigator_observer_test.mocks.dart b/test/utils/instabug_navigator_observer_test.mocks.dart new file mode 100644 index 000000000..7dd84147f --- /dev/null +++ b/test/utils/instabug_navigator_observer_test.mocks.dart @@ -0,0 +1,634 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in instabug_flutter/test/utils/instabug_navigator_observer_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i3; +import 'dart:typed_data' as _i4; + +import 'package:instabug_flutter/src/generated/instabug.api.g.dart' as _i2; +import 'package:instabug_flutter/src/utils/screen_loading/screen_loading_manager.dart' + as _i5; +import 'package:instabug_flutter/src/utils/screen_loading/screen_loading_trace.dart' + as _i7; +import 'package:instabug_flutter/src/utils/screen_loading/ui_trace.dart' as _i6; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i8; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +/// A class which mocks [InstabugHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockInstabugHostApi extends _i1.Mock implements _i2.InstabugHostApi { + MockInstabugHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i3.Future setEnabled(bool? arg_isEnabled) => (super.noSuchMethod( + Invocation.method( + #setEnabled, + [arg_isEnabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future isEnabled() => (super.noSuchMethod( + Invocation.method( + #isEnabled, + [], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + + @override + _i3.Future isBuilt() => (super.noSuchMethod( + Invocation.method( + #isBuilt, + [], + ), + returnValue: _i3.Future.value(false), + ) as _i3.Future); + + @override + _i3.Future init( + String? arg_token, + List? arg_invocationEvents, + String? arg_debugLogsLevel, + ) => + (super.noSuchMethod( + Invocation.method( + #init, + [ + arg_token, + arg_invocationEvents, + arg_debugLogsLevel, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future show() => (super.noSuchMethod( + Invocation.method( + #show, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future showWelcomeMessageWithMode(String? arg_mode) => + (super.noSuchMethod( + Invocation.method( + #showWelcomeMessageWithMode, + [arg_mode], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future identifyUser( + String? arg_email, + String? arg_name, + String? arg_userId, + ) => + (super.noSuchMethod( + Invocation.method( + #identifyUser, + [ + arg_email, + arg_name, + arg_userId, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setUserData(String? arg_data) => (super.noSuchMethod( + Invocation.method( + #setUserData, + [arg_data], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future logUserEvent(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #logUserEvent, + [arg_name], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future logOut() => (super.noSuchMethod( + Invocation.method( + #logOut, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setLocale(String? arg_locale) => (super.noSuchMethod( + Invocation.method( + #setLocale, + [arg_locale], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setColorTheme(String? arg_theme) => (super.noSuchMethod( + Invocation.method( + #setColorTheme, + [arg_theme], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setWelcomeMessageMode(String? arg_mode) => + (super.noSuchMethod( + Invocation.method( + #setWelcomeMessageMode, + [arg_mode], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setPrimaryColor(int? arg_color) => (super.noSuchMethod( + Invocation.method( + #setPrimaryColor, + [arg_color], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setSessionProfilerEnabled(bool? arg_enabled) => + (super.noSuchMethod( + Invocation.method( + #setSessionProfilerEnabled, + [arg_enabled], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setValueForStringWithKey( + String? arg_value, + String? arg_key, + ) => + (super.noSuchMethod( + Invocation.method( + #setValueForStringWithKey, + [ + arg_value, + arg_key, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future appendTags(List? arg_tags) => (super.noSuchMethod( + Invocation.method( + #appendTags, + [arg_tags], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future resetTags() => (super.noSuchMethod( + Invocation.method( + #resetTags, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future?> getTags() => (super.noSuchMethod( + Invocation.method( + #getTags, + [], + ), + returnValue: _i3.Future?>.value(), + ) as _i3.Future?>); + + @override + _i3.Future addExperiments(List? arg_experiments) => + (super.noSuchMethod( + Invocation.method( + #addExperiments, + [arg_experiments], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future removeExperiments(List? arg_experiments) => + (super.noSuchMethod( + Invocation.method( + #removeExperiments, + [arg_experiments], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future clearAllExperiments() => (super.noSuchMethod( + Invocation.method( + #clearAllExperiments, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future addFeatureFlags( + Map? arg_featureFlagsMap) => + (super.noSuchMethod( + Invocation.method( + #addFeatureFlags, + [arg_featureFlagsMap], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future removeFeatureFlags(List? arg_featureFlags) => + (super.noSuchMethod( + Invocation.method( + #removeFeatureFlags, + [arg_featureFlags], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future removeAllFeatureFlags() => (super.noSuchMethod( + Invocation.method( + #removeAllFeatureFlags, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setUserAttribute( + String? arg_value, + String? arg_key, + ) => + (super.noSuchMethod( + Invocation.method( + #setUserAttribute, + [ + arg_value, + arg_key, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future removeUserAttribute(String? arg_key) => (super.noSuchMethod( + Invocation.method( + #removeUserAttribute, + [arg_key], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future getUserAttributeForKey(String? arg_key) => + (super.noSuchMethod( + Invocation.method( + #getUserAttributeForKey, + [arg_key], + ), + returnValue: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future?> getUserAttributes() => (super.noSuchMethod( + Invocation.method( + #getUserAttributes, + [], + ), + returnValue: _i3.Future?>.value(), + ) as _i3.Future?>); + + @override + _i3.Future setReproStepsConfig( + String? arg_bugMode, + String? arg_crashMode, + String? arg_sessionReplayMode, + ) => + (super.noSuchMethod( + Invocation.method( + #setReproStepsConfig, + [ + arg_bugMode, + arg_crashMode, + arg_sessionReplayMode, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future reportScreenChange(String? arg_screenName) => + (super.noSuchMethod( + Invocation.method( + #reportScreenChange, + [arg_screenName], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setCustomBrandingImage( + String? arg_light, + String? arg_dark, + ) => + (super.noSuchMethod( + Invocation.method( + #setCustomBrandingImage, + [ + arg_light, + arg_dark, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future setFont(String? arg_font) => (super.noSuchMethod( + Invocation.method( + #setFont, + [arg_font], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future addFileAttachmentWithURL( + String? arg_filePath, + String? arg_fileName, + ) => + (super.noSuchMethod( + Invocation.method( + #addFileAttachmentWithURL, + [ + arg_filePath, + arg_fileName, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future addFileAttachmentWithData( + _i4.Uint8List? arg_data, + String? arg_fileName, + ) => + (super.noSuchMethod( + Invocation.method( + #addFileAttachmentWithData, + [ + arg_data, + arg_fileName, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future clearFileAttachments() => (super.noSuchMethod( + Invocation.method( + #clearFileAttachments, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future networkLog(Map? arg_data) => + (super.noSuchMethod( + Invocation.method( + #networkLog, + [arg_data], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future registerFeatureFlagChangeListener() => (super.noSuchMethod( + Invocation.method( + #registerFeatureFlagChangeListener, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future> isW3CFeatureFlagsEnabled() => + (super.noSuchMethod( + Invocation.method( + #isW3CFeatureFlagsEnabled, + [], + ), + returnValue: _i3.Future>.value({}), + ) as _i3.Future>); + + @override + _i3.Future willRedirectToStore() => (super.noSuchMethod( + Invocation.method( + #willRedirectToStore, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); +} + +/// A class which mocks [ScreenLoadingManager]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockScreenLoadingManager extends _i1.Mock + implements _i5.ScreenLoadingManager { + MockScreenLoadingManager() { + _i1.throwOnMissingStub(this); + } + + @override + set currentUiTrace(_i6.UiTrace? _currentUiTrace) => super.noSuchMethod( + Invocation.setter( + #currentUiTrace, + _currentUiTrace, + ), + returnValueForMissingStub: null, + ); + + @override + set currentScreenLoadingTrace( + _i7.ScreenLoadingTrace? _currentScreenLoadingTrace) => + super.noSuchMethod( + Invocation.setter( + #currentScreenLoadingTrace, + _currentScreenLoadingTrace, + ), + returnValueForMissingStub: null, + ); + + @override + List<_i7.ScreenLoadingTrace> get prematurelyEndedTraces => + (super.noSuchMethod( + Invocation.getter(#prematurelyEndedTraces), + returnValue: <_i7.ScreenLoadingTrace>[], + ) as List<_i7.ScreenLoadingTrace>); + + @override + void resetDidStartScreenLoading() => super.noSuchMethod( + Invocation.method( + #resetDidStartScreenLoading, + [], + ), + returnValueForMissingStub: null, + ); + + @override + void resetDidReportScreenLoading() => super.noSuchMethod( + Invocation.method( + #resetDidReportScreenLoading, + [], + ), + returnValueForMissingStub: null, + ); + + @override + void resetDidExtendScreenLoading() => super.noSuchMethod( + Invocation.method( + #resetDidExtendScreenLoading, + [], + ), + returnValueForMissingStub: null, + ); + + @override + String sanitizeScreenName(String? screenName) => (super.noSuchMethod( + Invocation.method( + #sanitizeScreenName, + [screenName], + ), + returnValue: _i8.dummyValue( + this, + Invocation.method( + #sanitizeScreenName, + [screenName], + ), + ), + ) as String); + + @override + _i3.Future startUiTrace( + String? screenName, [ + String? matchingScreenName, + ]) => + (super.noSuchMethod( + Invocation.method( + #startUiTrace, + [ + screenName, + matchingScreenName, + ], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future startScreenLoadingTrace(_i7.ScreenLoadingTrace? trace) => + (super.noSuchMethod( + Invocation.method( + #startScreenLoadingTrace, + [trace], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future reportScreenLoading(_i7.ScreenLoadingTrace? trace) => + (super.noSuchMethod( + Invocation.method( + #reportScreenLoading, + [trace], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future endScreenLoading() => (super.noSuchMethod( + Invocation.method( + #endScreenLoading, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); +} diff --git a/test/utils/screen_loading/screen_loading_manager_test.mocks.dart b/test/utils/screen_loading/screen_loading_manager_test.mocks.dart new file mode 100644 index 000000000..4baa68dff --- /dev/null +++ b/test/utils/screen_loading/screen_loading_manager_test.mocks.dart @@ -0,0 +1,1327 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in instabug_flutter/test/utils/screen_loading/screen_loading_manager_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:async' as _i5; +import 'dart:typed_data' as _i7; + +import 'package:flutter/foundation.dart' as _i3; +import 'package:flutter/src/widgets/framework.dart' as _i2; +import 'package:flutter/src/widgets/notification_listener.dart' as _i14; +import 'package:instabug_flutter/instabug_flutter.dart' as _i9; +import 'package:instabug_flutter/src/generated/apm.api.g.dart' as _i4; +import 'package:instabug_flutter/src/generated/instabug.api.g.dart' as _i6; +import 'package:instabug_flutter/src/utils/ibg_build_info.dart' as _i12; +import 'package:instabug_flutter/src/utils/ibg_date_time.dart' as _i10; +import 'package:instabug_flutter/src/utils/instabug_logger.dart' as _i8; +import 'package:instabug_flutter/src/utils/instabug_montonic_clock.dart' + as _i11; +import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i13; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +class _FakeDateTime_0 extends _i1.SmartFake implements DateTime { + _FakeDateTime_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} + +class _FakeWidget_1 extends _i1.SmartFake implements _i2.Widget { + _FakeWidget_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); + + @override + String toString({_i3.DiagnosticLevel? minLevel = _i3.DiagnosticLevel.info}) => + super.toString(); +} + +class _FakeInheritedWidget_2 extends _i1.SmartFake + implements _i2.InheritedWidget { + _FakeInheritedWidget_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); + + @override + String toString({_i3.DiagnosticLevel? minLevel = _i3.DiagnosticLevel.info}) => + super.toString(); +} + +class _FakeDiagnosticsNode_3 extends _i1.SmartFake + implements _i3.DiagnosticsNode { + _FakeDiagnosticsNode_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); + + @override + String toString({ + _i3.TextTreeConfiguration? parentConfiguration, + _i3.DiagnosticLevel? minLevel = _i3.DiagnosticLevel.info, + }) => + super.toString(); +} + +class _FakeElement_4 extends _i1.SmartFake implements _i2.Element { + _FakeElement_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); + + @override + String toString({_i3.DiagnosticLevel? minLevel = _i3.DiagnosticLevel.info}) => + super.toString(); +} + +/// A class which mocks [ApmHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockApmHostApi extends _i1.Mock implements _i4.ApmHostApi { + MockApmHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i5.Future setEnabled(bool? arg_isEnabled) => (super.noSuchMethod( + Invocation.method( + #setEnabled, + [arg_isEnabled], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future isEnabled() => (super.noSuchMethod( + Invocation.method( + #isEnabled, + [], + ), + returnValue: _i5.Future.value(false), + ) as _i5.Future); + + @override + _i5.Future setScreenLoadingEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setScreenLoadingEnabled, + [arg_isEnabled], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future isScreenLoadingEnabled() => (super.noSuchMethod( + Invocation.method( + #isScreenLoadingEnabled, + [], + ), + returnValue: _i5.Future.value(false), + ) as _i5.Future); + + @override + _i5.Future setColdAppLaunchEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setColdAppLaunchEnabled, + [arg_isEnabled], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setAutoUITraceEnabled(bool? arg_isEnabled) => + (super.noSuchMethod( + Invocation.method( + #setAutoUITraceEnabled, + [arg_isEnabled], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future startExecutionTrace( + String? arg_id, + String? arg_name, + ) => + (super.noSuchMethod( + Invocation.method( + #startExecutionTrace, + [ + arg_id, + arg_name, + ], + ), + returnValue: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future startFlow(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #startFlow, + [arg_name], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setFlowAttribute( + String? arg_name, + String? arg_key, + String? arg_value, + ) => + (super.noSuchMethod( + Invocation.method( + #setFlowAttribute, + [ + arg_name, + arg_key, + arg_value, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future endFlow(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #endFlow, + [arg_name], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setExecutionTraceAttribute( + String? arg_id, + String? arg_key, + String? arg_value, + ) => + (super.noSuchMethod( + Invocation.method( + #setExecutionTraceAttribute, + [ + arg_id, + arg_key, + arg_value, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future endExecutionTrace(String? arg_id) => (super.noSuchMethod( + Invocation.method( + #endExecutionTrace, + [arg_id], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future startUITrace(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #startUITrace, + [arg_name], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future endUITrace() => (super.noSuchMethod( + Invocation.method( + #endUITrace, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future endAppLaunch() => (super.noSuchMethod( + Invocation.method( + #endAppLaunch, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future networkLogAndroid(Map? arg_data) => + (super.noSuchMethod( + Invocation.method( + #networkLogAndroid, + [arg_data], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future startCpUiTrace( + String? arg_screenName, + int? arg_microTimeStamp, + int? arg_traceId, + ) => + (super.noSuchMethod( + Invocation.method( + #startCpUiTrace, + [ + arg_screenName, + arg_microTimeStamp, + arg_traceId, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future reportScreenLoadingCP( + int? arg_startTimeStampMicro, + int? arg_durationMicro, + int? arg_uiTraceId, + ) => + (super.noSuchMethod( + Invocation.method( + #reportScreenLoadingCP, + [ + arg_startTimeStampMicro, + arg_durationMicro, + arg_uiTraceId, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future endScreenLoadingCP( + int? arg_timeStampMicro, + int? arg_uiTraceId, + ) => + (super.noSuchMethod( + Invocation.method( + #endScreenLoadingCP, + [ + arg_timeStampMicro, + arg_uiTraceId, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future isEndScreenLoadingEnabled() => (super.noSuchMethod( + Invocation.method( + #isEndScreenLoadingEnabled, + [], + ), + returnValue: _i5.Future.value(false), + ) as _i5.Future); +} + +/// A class which mocks [InstabugHostApi]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockInstabugHostApi extends _i1.Mock implements _i6.InstabugHostApi { + MockInstabugHostApi() { + _i1.throwOnMissingStub(this); + } + + @override + _i5.Future setEnabled(bool? arg_isEnabled) => (super.noSuchMethod( + Invocation.method( + #setEnabled, + [arg_isEnabled], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future isEnabled() => (super.noSuchMethod( + Invocation.method( + #isEnabled, + [], + ), + returnValue: _i5.Future.value(false), + ) as _i5.Future); + + @override + _i5.Future isBuilt() => (super.noSuchMethod( + Invocation.method( + #isBuilt, + [], + ), + returnValue: _i5.Future.value(false), + ) as _i5.Future); + + @override + _i5.Future init( + String? arg_token, + List? arg_invocationEvents, + String? arg_debugLogsLevel, + ) => + (super.noSuchMethod( + Invocation.method( + #init, + [ + arg_token, + arg_invocationEvents, + arg_debugLogsLevel, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future show() => (super.noSuchMethod( + Invocation.method( + #show, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future showWelcomeMessageWithMode(String? arg_mode) => + (super.noSuchMethod( + Invocation.method( + #showWelcomeMessageWithMode, + [arg_mode], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future identifyUser( + String? arg_email, + String? arg_name, + String? arg_userId, + ) => + (super.noSuchMethod( + Invocation.method( + #identifyUser, + [ + arg_email, + arg_name, + arg_userId, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setUserData(String? arg_data) => (super.noSuchMethod( + Invocation.method( + #setUserData, + [arg_data], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future logUserEvent(String? arg_name) => (super.noSuchMethod( + Invocation.method( + #logUserEvent, + [arg_name], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future logOut() => (super.noSuchMethod( + Invocation.method( + #logOut, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setLocale(String? arg_locale) => (super.noSuchMethod( + Invocation.method( + #setLocale, + [arg_locale], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setColorTheme(String? arg_theme) => (super.noSuchMethod( + Invocation.method( + #setColorTheme, + [arg_theme], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setWelcomeMessageMode(String? arg_mode) => + (super.noSuchMethod( + Invocation.method( + #setWelcomeMessageMode, + [arg_mode], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setPrimaryColor(int? arg_color) => (super.noSuchMethod( + Invocation.method( + #setPrimaryColor, + [arg_color], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setSessionProfilerEnabled(bool? arg_enabled) => + (super.noSuchMethod( + Invocation.method( + #setSessionProfilerEnabled, + [arg_enabled], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setValueForStringWithKey( + String? arg_value, + String? arg_key, + ) => + (super.noSuchMethod( + Invocation.method( + #setValueForStringWithKey, + [ + arg_value, + arg_key, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future appendTags(List? arg_tags) => (super.noSuchMethod( + Invocation.method( + #appendTags, + [arg_tags], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future resetTags() => (super.noSuchMethod( + Invocation.method( + #resetTags, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future?> getTags() => (super.noSuchMethod( + Invocation.method( + #getTags, + [], + ), + returnValue: _i5.Future?>.value(), + ) as _i5.Future?>); + + @override + _i5.Future addExperiments(List? arg_experiments) => + (super.noSuchMethod( + Invocation.method( + #addExperiments, + [arg_experiments], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future removeExperiments(List? arg_experiments) => + (super.noSuchMethod( + Invocation.method( + #removeExperiments, + [arg_experiments], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future clearAllExperiments() => (super.noSuchMethod( + Invocation.method( + #clearAllExperiments, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future addFeatureFlags( + Map? arg_featureFlagsMap) => + (super.noSuchMethod( + Invocation.method( + #addFeatureFlags, + [arg_featureFlagsMap], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future removeFeatureFlags(List? arg_featureFlags) => + (super.noSuchMethod( + Invocation.method( + #removeFeatureFlags, + [arg_featureFlags], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future removeAllFeatureFlags() => (super.noSuchMethod( + Invocation.method( + #removeAllFeatureFlags, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setUserAttribute( + String? arg_value, + String? arg_key, + ) => + (super.noSuchMethod( + Invocation.method( + #setUserAttribute, + [ + arg_value, + arg_key, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future removeUserAttribute(String? arg_key) => (super.noSuchMethod( + Invocation.method( + #removeUserAttribute, + [arg_key], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future getUserAttributeForKey(String? arg_key) => + (super.noSuchMethod( + Invocation.method( + #getUserAttributeForKey, + [arg_key], + ), + returnValue: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future?> getUserAttributes() => (super.noSuchMethod( + Invocation.method( + #getUserAttributes, + [], + ), + returnValue: _i5.Future?>.value(), + ) as _i5.Future?>); + + @override + _i5.Future setReproStepsConfig( + String? arg_bugMode, + String? arg_crashMode, + String? arg_sessionReplayMode, + ) => + (super.noSuchMethod( + Invocation.method( + #setReproStepsConfig, + [ + arg_bugMode, + arg_crashMode, + arg_sessionReplayMode, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future reportScreenChange(String? arg_screenName) => + (super.noSuchMethod( + Invocation.method( + #reportScreenChange, + [arg_screenName], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setCustomBrandingImage( + String? arg_light, + String? arg_dark, + ) => + (super.noSuchMethod( + Invocation.method( + #setCustomBrandingImage, + [ + arg_light, + arg_dark, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future setFont(String? arg_font) => (super.noSuchMethod( + Invocation.method( + #setFont, + [arg_font], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future addFileAttachmentWithURL( + String? arg_filePath, + String? arg_fileName, + ) => + (super.noSuchMethod( + Invocation.method( + #addFileAttachmentWithURL, + [ + arg_filePath, + arg_fileName, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future addFileAttachmentWithData( + _i7.Uint8List? arg_data, + String? arg_fileName, + ) => + (super.noSuchMethod( + Invocation.method( + #addFileAttachmentWithData, + [ + arg_data, + arg_fileName, + ], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future clearFileAttachments() => (super.noSuchMethod( + Invocation.method( + #clearFileAttachments, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future networkLog(Map? arg_data) => + (super.noSuchMethod( + Invocation.method( + #networkLog, + [arg_data], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future registerFeatureFlagChangeListener() => (super.noSuchMethod( + Invocation.method( + #registerFeatureFlagChangeListener, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); + + @override + _i5.Future> isW3CFeatureFlagsEnabled() => + (super.noSuchMethod( + Invocation.method( + #isW3CFeatureFlagsEnabled, + [], + ), + returnValue: _i5.Future>.value({}), + ) as _i5.Future>); + + @override + _i5.Future willRedirectToStore() => (super.noSuchMethod( + Invocation.method( + #willRedirectToStore, + [], + ), + returnValue: _i5.Future.value(), + returnValueForMissingStub: _i5.Future.value(), + ) as _i5.Future); +} + +/// A class which mocks [InstabugLogger]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockInstabugLogger extends _i1.Mock implements _i8.InstabugLogger { + MockInstabugLogger() { + _i1.throwOnMissingStub(this); + } + + @override + set logLevel(_i9.LogLevel? level) => super.noSuchMethod( + Invocation.setter( + #logLevel, + level, + ), + returnValueForMissingStub: null, + ); + + @override + void log( + String? message, { + required _i9.LogLevel? level, + String? tag = r'', + }) => + super.noSuchMethod( + Invocation.method( + #log, + [message], + { + #level: level, + #tag: tag, + }, + ), + returnValueForMissingStub: null, + ); + + @override + void e( + String? message, { + String? tag = r'', + }) => + super.noSuchMethod( + Invocation.method( + #e, + [message], + {#tag: tag}, + ), + returnValueForMissingStub: null, + ); + + @override + void d( + String? message, { + String? tag = r'', + }) => + super.noSuchMethod( + Invocation.method( + #d, + [message], + {#tag: tag}, + ), + returnValueForMissingStub: null, + ); + + @override + void v( + String? message, { + String? tag = r'', + }) => + super.noSuchMethod( + Invocation.method( + #v, + [message], + {#tag: tag}, + ), + returnValueForMissingStub: null, + ); +} + +/// A class which mocks [IBGDateTime]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockIBGDateTime extends _i1.Mock implements _i10.IBGDateTime { + MockIBGDateTime() { + _i1.throwOnMissingStub(this); + } + + @override + DateTime now() => (super.noSuchMethod( + Invocation.method( + #now, + [], + ), + returnValue: _FakeDateTime_0( + this, + Invocation.method( + #now, + [], + ), + ), + ) as DateTime); +} + +/// A class which mocks [InstabugMonotonicClock]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockInstabugMonotonicClock extends _i1.Mock + implements _i11.InstabugMonotonicClock { + MockInstabugMonotonicClock() { + _i1.throwOnMissingStub(this); + } + + @override + int get now => (super.noSuchMethod( + Invocation.getter(#now), + returnValue: 0, + ) as int); +} + +/// A class which mocks [IBGBuildInfo]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockIBGBuildInfo extends _i1.Mock implements _i12.IBGBuildInfo { + MockIBGBuildInfo() { + _i1.throwOnMissingStub(this); + } + + @override + bool get isAndroid => (super.noSuchMethod( + Invocation.getter(#isAndroid), + returnValue: false, + ) as bool); + + @override + bool get isIOS => (super.noSuchMethod( + Invocation.getter(#isIOS), + returnValue: false, + ) as bool); + + @override + String get operatingSystem => (super.noSuchMethod( + Invocation.getter(#operatingSystem), + returnValue: _i13.dummyValue( + this, + Invocation.getter(#operatingSystem), + ), + ) as String); + + @override + bool get isReleaseMode => (super.noSuchMethod( + Invocation.getter(#isReleaseMode), + returnValue: false, + ) as bool); + + @override + bool get isDebugMode => (super.noSuchMethod( + Invocation.getter(#isDebugMode), + returnValue: false, + ) as bool); +} + +/// A class which mocks [RouteMatcher]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockRouteMatcher extends _i1.Mock implements _i9.RouteMatcher { + MockRouteMatcher() { + _i1.throwOnMissingStub(this); + } + + @override + bool match({ + required String? routePath, + required String? actualPath, + }) => + (super.noSuchMethod( + Invocation.method( + #match, + [], + { + #routePath: routePath, + #actualPath: actualPath, + }, + ), + returnValue: false, + ) as bool); +} + +/// A class which mocks [BuildContext]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockBuildContext extends _i1.Mock implements _i2.BuildContext { + MockBuildContext() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.Widget get widget => (super.noSuchMethod( + Invocation.getter(#widget), + returnValue: _FakeWidget_1( + this, + Invocation.getter(#widget), + ), + ) as _i2.Widget); + + @override + bool get mounted => (super.noSuchMethod( + Invocation.getter(#mounted), + returnValue: false, + ) as bool); + + @override + bool get debugDoingBuild => (super.noSuchMethod( + Invocation.getter(#debugDoingBuild), + returnValue: false, + ) as bool); + + @override + _i2.InheritedWidget dependOnInheritedElement( + _i2.InheritedElement? ancestor, { + Object? aspect, + }) => + (super.noSuchMethod( + Invocation.method( + #dependOnInheritedElement, + [ancestor], + {#aspect: aspect}, + ), + returnValue: _FakeInheritedWidget_2( + this, + Invocation.method( + #dependOnInheritedElement, + [ancestor], + {#aspect: aspect}, + ), + ), + ) as _i2.InheritedWidget); + + @override + void visitAncestorElements(_i2.ConditionalElementVisitor? visitor) => + super.noSuchMethod( + Invocation.method( + #visitAncestorElements, + [visitor], + ), + returnValueForMissingStub: null, + ); + + @override + void visitChildElements(_i2.ElementVisitor? visitor) => super.noSuchMethod( + Invocation.method( + #visitChildElements, + [visitor], + ), + returnValueForMissingStub: null, + ); + + @override + void dispatchNotification(_i14.Notification? notification) => + super.noSuchMethod( + Invocation.method( + #dispatchNotification, + [notification], + ), + returnValueForMissingStub: null, + ); + + @override + _i3.DiagnosticsNode describeElement( + String? name, { + _i3.DiagnosticsTreeStyle? style = _i3.DiagnosticsTreeStyle.errorProperty, + }) => + (super.noSuchMethod( + Invocation.method( + #describeElement, + [name], + {#style: style}, + ), + returnValue: _FakeDiagnosticsNode_3( + this, + Invocation.method( + #describeElement, + [name], + {#style: style}, + ), + ), + ) as _i3.DiagnosticsNode); + + @override + _i3.DiagnosticsNode describeWidget( + String? name, { + _i3.DiagnosticsTreeStyle? style = _i3.DiagnosticsTreeStyle.errorProperty, + }) => + (super.noSuchMethod( + Invocation.method( + #describeWidget, + [name], + {#style: style}, + ), + returnValue: _FakeDiagnosticsNode_3( + this, + Invocation.method( + #describeWidget, + [name], + {#style: style}, + ), + ), + ) as _i3.DiagnosticsNode); + + @override + List<_i3.DiagnosticsNode> describeMissingAncestor( + {required Type? expectedAncestorType}) => + (super.noSuchMethod( + Invocation.method( + #describeMissingAncestor, + [], + {#expectedAncestorType: expectedAncestorType}, + ), + returnValue: <_i3.DiagnosticsNode>[], + ) as List<_i3.DiagnosticsNode>); + + @override + _i3.DiagnosticsNode describeOwnershipChain(String? name) => + (super.noSuchMethod( + Invocation.method( + #describeOwnershipChain, + [name], + ), + returnValue: _FakeDiagnosticsNode_3( + this, + Invocation.method( + #describeOwnershipChain, + [name], + ), + ), + ) as _i3.DiagnosticsNode); +} + +/// A class which mocks [Widget]. +/// +/// See the documentation for Mockito's code generation for more information. +// ignore: must_be_immutable +class MockWidget extends _i1.Mock implements _i2.Widget { + MockWidget() { + _i1.throwOnMissingStub(this); + } + + @override + _i2.Element createElement() => (super.noSuchMethod( + Invocation.method( + #createElement, + [], + ), + returnValue: _FakeElement_4( + this, + Invocation.method( + #createElement, + [], + ), + ), + ) as _i2.Element); + + @override + String toStringShort() => (super.noSuchMethod( + Invocation.method( + #toStringShort, + [], + ), + returnValue: _i13.dummyValue( + this, + Invocation.method( + #toStringShort, + [], + ), + ), + ) as String); + + @override + void debugFillProperties(_i3.DiagnosticPropertiesBuilder? properties) => + super.noSuchMethod( + Invocation.method( + #debugFillProperties, + [properties], + ), + returnValueForMissingStub: null, + ); + + @override + String toStringShallow({ + String? joiner = r', ', + _i3.DiagnosticLevel? minLevel = _i3.DiagnosticLevel.debug, + }) => + (super.noSuchMethod( + Invocation.method( + #toStringShallow, + [], + { + #joiner: joiner, + #minLevel: minLevel, + }, + ), + returnValue: _i13.dummyValue( + this, + Invocation.method( + #toStringShallow, + [], + { + #joiner: joiner, + #minLevel: minLevel, + }, + ), + ), + ) as String); + + @override + String toStringDeep({ + String? prefixLineOne = r'', + String? prefixOtherLines, + _i3.DiagnosticLevel? minLevel = _i3.DiagnosticLevel.debug, + int? wrapWidth = 65, + }) => + (super.noSuchMethod( + Invocation.method( + #toStringDeep, + [], + { + #prefixLineOne: prefixLineOne, + #prefixOtherLines: prefixOtherLines, + #minLevel: minLevel, + #wrapWidth: wrapWidth, + }, + ), + returnValue: _i13.dummyValue( + this, + Invocation.method( + #toStringDeep, + [], + { + #prefixLineOne: prefixLineOne, + #prefixOtherLines: prefixOtherLines, + #minLevel: minLevel, + #wrapWidth: wrapWidth, + }, + ), + ), + ) as String); + + @override + _i3.DiagnosticsNode toDiagnosticsNode({ + String? name, + _i3.DiagnosticsTreeStyle? style, + }) => + (super.noSuchMethod( + Invocation.method( + #toDiagnosticsNode, + [], + { + #name: name, + #style: style, + }, + ), + returnValue: _FakeDiagnosticsNode_3( + this, + Invocation.method( + #toDiagnosticsNode, + [], + { + #name: name, + #style: style, + }, + ), + ), + ) as _i3.DiagnosticsNode); + + @override + List<_i3.DiagnosticsNode> debugDescribeChildren() => (super.noSuchMethod( + Invocation.method( + #debugDescribeChildren, + [], + ), + returnValue: <_i3.DiagnosticsNode>[], + ) as List<_i3.DiagnosticsNode>); + + @override + String toString({_i3.DiagnosticLevel? minLevel = _i3.DiagnosticLevel.info}) => + super.toString(); +} diff --git a/test/w3_header_utils_test.mocks.dart b/test/w3_header_utils_test.mocks.dart new file mode 100644 index 000000000..b3d5b4010 --- /dev/null +++ b/test/w3_header_utils_test.mocks.dart @@ -0,0 +1,57 @@ +// Mocks generated by Mockito 5.4.4 from annotations +// in instabug_flutter/test/w3_header_utils_test.dart. +// Do not manually edit this file. + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'dart:math' as _i2; + +import 'package:mockito/mockito.dart' as _i1; + +// ignore_for_file: type=lint +// ignore_for_file: avoid_redundant_argument_values +// ignore_for_file: avoid_setters_without_getters +// ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: implementation_imports +// ignore_for_file: invalid_use_of_visible_for_testing_member +// ignore_for_file: prefer_const_constructors +// ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class + +/// A class which mocks [Random]. +/// +/// See the documentation for Mockito's code generation for more information. +class MockRandom extends _i1.Mock implements _i2.Random { + MockRandom() { + _i1.throwOnMissingStub(this); + } + + @override + int nextInt(int? max) => (super.noSuchMethod( + Invocation.method( + #nextInt, + [max], + ), + returnValue: 0, + ) as int); + + @override + double nextDouble() => (super.noSuchMethod( + Invocation.method( + #nextDouble, + [], + ), + returnValue: 0.0, + ) as double); + + @override + bool nextBool() => (super.noSuchMethod( + Invocation.method( + #nextBool, + [], + ), + returnValue: false, + ) as bool); +}