| // Copyright 2013 The Flutter Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| // Autogenerated from Pigeon (v9.2.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, unnecessary_import |
| // ignore_for_file: avoid_relative_lib_imports |
| 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'; |
| import 'package:flutter_test/flutter_test.dart'; |
| |
| import 'package:camera_android_camerax/src/camerax_library.g.dart'; |
| |
| abstract class TestInstanceManagerHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| /// Clear the native `InstanceManager`. |
| /// |
| /// This is typically only used after a hot restart. |
| void clear(); |
| |
| static void setup(TestInstanceManagerHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.InstanceManagerHostApi.clear', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| // ignore message |
| api.clear(); |
| return <Object?>[]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestJavaObjectHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void dispose(int identifier); |
| |
| static void setup(TestJavaObjectHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.JavaObjectHostApi.dispose', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.JavaObjectHostApi.dispose was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.JavaObjectHostApi.dispose was null, expected non-null int.'); |
| api.dispose(arg_identifier!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestCameraInfoHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| int getSensorRotationDegrees(int identifier); |
| |
| int getCameraState(int identifier); |
| |
| int getExposureState(int identifier); |
| |
| int getZoomState(int identifier); |
| |
| static void setup(TestCameraInfoHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraInfoHostApi.getSensorRotationDegrees', |
| codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.CameraInfoHostApi.getSensorRotationDegrees was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.CameraInfoHostApi.getSensorRotationDegrees was null, expected non-null int.'); |
| final int output = api.getSensorRotationDegrees(arg_identifier!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraInfoHostApi.getCameraState', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.CameraInfoHostApi.getCameraState was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.CameraInfoHostApi.getCameraState was null, expected non-null int.'); |
| final int output = api.getCameraState(arg_identifier!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraInfoHostApi.getExposureState', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.CameraInfoHostApi.getExposureState was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.CameraInfoHostApi.getExposureState was null, expected non-null int.'); |
| final int output = api.getExposureState(arg_identifier!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraInfoHostApi.getZoomState', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.CameraInfoHostApi.getZoomState was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.CameraInfoHostApi.getZoomState was null, expected non-null int.'); |
| final int output = api.getZoomState(arg_identifier!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestCameraSelectorHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier, int? lensFacing); |
| |
| List<int?> filter(int identifier, List<int?> cameraInfoIds); |
| |
| static void setup(TestCameraSelectorHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraSelectorHostApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.CameraSelectorHostApi.create was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.CameraSelectorHostApi.create was null, expected non-null int.'); |
| final int? arg_lensFacing = (args[1] as int?); |
| api.create(arg_identifier!, arg_lensFacing); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraSelectorHostApi.filter', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.CameraSelectorHostApi.filter was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.CameraSelectorHostApi.filter was null, expected non-null int.'); |
| final List<int?>? arg_cameraInfoIds = |
| (args[1] as List<Object?>?)?.cast<int?>(); |
| assert(arg_cameraInfoIds != null, |
| 'Argument for dev.flutter.pigeon.CameraSelectorHostApi.filter was null, expected non-null List<int?>.'); |
| final List<int?> output = |
| api.filter(arg_identifier!, arg_cameraInfoIds!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestProcessCameraProviderHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<int> getInstance(); |
| |
| List<int?> getAvailableCameraInfos(int identifier); |
| |
| int bindToLifecycle( |
| int identifier, int cameraSelectorIdentifier, List<int?> useCaseIds); |
| |
| bool isBound(int identifier, int useCaseIdentifier); |
| |
| void unbind(int identifier, List<int?> useCaseIds); |
| |
| void unbindAll(int identifier); |
| |
| static void setup(TestProcessCameraProviderHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ProcessCameraProviderHostApi.getInstance', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| // ignore message |
| final int output = await api.getInstance(); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ProcessCameraProviderHostApi.getAvailableCameraInfos', |
| codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ProcessCameraProviderHostApi.getAvailableCameraInfos was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ProcessCameraProviderHostApi.getAvailableCameraInfos was null, expected non-null int.'); |
| final List<int?> output = |
| api.getAvailableCameraInfos(arg_identifier!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ProcessCameraProviderHostApi.bindToLifecycle', |
| codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ProcessCameraProviderHostApi.bindToLifecycle was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ProcessCameraProviderHostApi.bindToLifecycle was null, expected non-null int.'); |
| final int? arg_cameraSelectorIdentifier = (args[1] as int?); |
| assert(arg_cameraSelectorIdentifier != null, |
| 'Argument for dev.flutter.pigeon.ProcessCameraProviderHostApi.bindToLifecycle was null, expected non-null int.'); |
| final List<int?>? arg_useCaseIds = |
| (args[2] as List<Object?>?)?.cast<int?>(); |
| assert(arg_useCaseIds != null, |
| 'Argument for dev.flutter.pigeon.ProcessCameraProviderHostApi.bindToLifecycle was null, expected non-null List<int?>.'); |
| final int output = api.bindToLifecycle( |
| arg_identifier!, arg_cameraSelectorIdentifier!, arg_useCaseIds!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ProcessCameraProviderHostApi.isBound', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ProcessCameraProviderHostApi.isBound was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ProcessCameraProviderHostApi.isBound was null, expected non-null int.'); |
| final int? arg_useCaseIdentifier = (args[1] as int?); |
| assert(arg_useCaseIdentifier != null, |
| 'Argument for dev.flutter.pigeon.ProcessCameraProviderHostApi.isBound was null, expected non-null int.'); |
| final bool output = |
| api.isBound(arg_identifier!, arg_useCaseIdentifier!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ProcessCameraProviderHostApi.unbind', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ProcessCameraProviderHostApi.unbind was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ProcessCameraProviderHostApi.unbind was null, expected non-null int.'); |
| final List<int?>? arg_useCaseIds = |
| (args[1] as List<Object?>?)?.cast<int?>(); |
| assert(arg_useCaseIds != null, |
| 'Argument for dev.flutter.pigeon.ProcessCameraProviderHostApi.unbind was null, expected non-null List<int?>.'); |
| api.unbind(arg_identifier!, arg_useCaseIds!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ProcessCameraProviderHostApi.unbindAll', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ProcessCameraProviderHostApi.unbindAll was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ProcessCameraProviderHostApi.unbindAll was null, expected non-null int.'); |
| api.unbindAll(arg_identifier!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestCameraHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| int getCameraInfo(int identifier); |
| |
| static void setup(TestCameraHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraHostApi.getCameraInfo', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.CameraHostApi.getCameraInfo was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.CameraHostApi.getCameraInfo was null, expected non-null int.'); |
| final int output = api.getCameraInfo(arg_identifier!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| } |
| } |
| |
| class _TestSystemServicesHostApiCodec extends StandardMessageCodec { |
| const _TestSystemServicesHostApiCodec(); |
| @override |
| void writeValue(WriteBuffer buffer, Object? value) { |
| if (value is CameraPermissionsErrorData) { |
| buffer.putUint8(128); |
| writeValue(buffer, value.encode()); |
| } else { |
| super.writeValue(buffer, value); |
| } |
| } |
| |
| @override |
| Object? readValueOfType(int type, ReadBuffer buffer) { |
| switch (type) { |
| case 128: |
| return CameraPermissionsErrorData.decode(readValue(buffer)!); |
| default: |
| return super.readValueOfType(type, buffer); |
| } |
| } |
| } |
| |
| abstract class TestSystemServicesHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = _TestSystemServicesHostApiCodec(); |
| |
| Future<CameraPermissionsErrorData?> requestCameraPermissions( |
| bool enableAudio); |
| |
| void startListeningForDeviceOrientationChange( |
| bool isFrontFacing, int sensorOrientation); |
| |
| void stopListeningForDeviceOrientationChange(); |
| |
| String getTempFilePath(String prefix, String suffix); |
| |
| static void setup(TestSystemServicesHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.SystemServicesHostApi.requestCameraPermissions', |
| codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.SystemServicesHostApi.requestCameraPermissions was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final bool? arg_enableAudio = (args[0] as bool?); |
| assert(arg_enableAudio != null, |
| 'Argument for dev.flutter.pigeon.SystemServicesHostApi.requestCameraPermissions was null, expected non-null bool.'); |
| final CameraPermissionsErrorData? output = |
| await api.requestCameraPermissions(arg_enableAudio!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.SystemServicesHostApi.startListeningForDeviceOrientationChange', |
| codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.SystemServicesHostApi.startListeningForDeviceOrientationChange was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final bool? arg_isFrontFacing = (args[0] as bool?); |
| assert(arg_isFrontFacing != null, |
| 'Argument for dev.flutter.pigeon.SystemServicesHostApi.startListeningForDeviceOrientationChange was null, expected non-null bool.'); |
| final int? arg_sensorOrientation = (args[1] as int?); |
| assert(arg_sensorOrientation != null, |
| 'Argument for dev.flutter.pigeon.SystemServicesHostApi.startListeningForDeviceOrientationChange was null, expected non-null int.'); |
| api.startListeningForDeviceOrientationChange( |
| arg_isFrontFacing!, arg_sensorOrientation!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.SystemServicesHostApi.stopListeningForDeviceOrientationChange', |
| codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| // ignore message |
| api.stopListeningForDeviceOrientationChange(); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.SystemServicesHostApi.getTempFilePath', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.SystemServicesHostApi.getTempFilePath was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final String? arg_prefix = (args[0] as String?); |
| assert(arg_prefix != null, |
| 'Argument for dev.flutter.pigeon.SystemServicesHostApi.getTempFilePath was null, expected non-null String.'); |
| final String? arg_suffix = (args[1] as String?); |
| assert(arg_suffix != null, |
| 'Argument for dev.flutter.pigeon.SystemServicesHostApi.getTempFilePath was null, expected non-null String.'); |
| final String output = api.getTempFilePath(arg_prefix!, arg_suffix!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| } |
| } |
| |
| class _TestPreviewHostApiCodec extends StandardMessageCodec { |
| const _TestPreviewHostApiCodec(); |
| @override |
| void writeValue(WriteBuffer buffer, Object? value) { |
| if (value is ResolutionInfo) { |
| buffer.putUint8(128); |
| writeValue(buffer, value.encode()); |
| } else { |
| super.writeValue(buffer, value); |
| } |
| } |
| |
| @override |
| Object? readValueOfType(int type, ReadBuffer buffer) { |
| switch (type) { |
| case 128: |
| return ResolutionInfo.decode(readValue(buffer)!); |
| default: |
| return super.readValueOfType(type, buffer); |
| } |
| } |
| } |
| |
| abstract class TestPreviewHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = _TestPreviewHostApiCodec(); |
| |
| void create(int identifier, int? rotation, int? resolutionSelectorId); |
| |
| int setSurfaceProvider(int identifier); |
| |
| void releaseFlutterSurfaceTexture(); |
| |
| ResolutionInfo getResolutionInfo(int identifier); |
| |
| static void setup(TestPreviewHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.PreviewHostApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.PreviewHostApi.create was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.PreviewHostApi.create was null, expected non-null int.'); |
| final int? arg_rotation = (args[1] as int?); |
| final int? arg_resolutionSelectorId = (args[2] as int?); |
| api.create(arg_identifier!, arg_rotation, arg_resolutionSelectorId); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.PreviewHostApi.setSurfaceProvider', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.PreviewHostApi.setSurfaceProvider was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.PreviewHostApi.setSurfaceProvider was null, expected non-null int.'); |
| final int output = api.setSurfaceProvider(arg_identifier!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.PreviewHostApi.releaseFlutterSurfaceTexture', |
| codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| // ignore message |
| api.releaseFlutterSurfaceTexture(); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.PreviewHostApi.getResolutionInfo', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.PreviewHostApi.getResolutionInfo was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.PreviewHostApi.getResolutionInfo was null, expected non-null int.'); |
| final ResolutionInfo output = api.getResolutionInfo(arg_identifier!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestVideoCaptureHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| int withOutput(int videoOutputId); |
| |
| int getOutput(int identifier); |
| |
| static void setup(TestVideoCaptureHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.VideoCaptureHostApi.withOutput', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.VideoCaptureHostApi.withOutput was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_videoOutputId = (args[0] as int?); |
| assert(arg_videoOutputId != null, |
| 'Argument for dev.flutter.pigeon.VideoCaptureHostApi.withOutput was null, expected non-null int.'); |
| final int output = api.withOutput(arg_videoOutputId!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.VideoCaptureHostApi.getOutput', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.VideoCaptureHostApi.getOutput was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.VideoCaptureHostApi.getOutput was null, expected non-null int.'); |
| final int output = api.getOutput(arg_identifier!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestRecorderHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create( |
| int identifier, int? aspectRatio, int? bitRate, int? qualitySelectorId); |
| |
| int getAspectRatio(int identifier); |
| |
| int getTargetVideoEncodingBitRate(int identifier); |
| |
| int prepareRecording(int identifier, String path); |
| |
| static void setup(TestRecorderHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecorderHostApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.RecorderHostApi.create was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.RecorderHostApi.create was null, expected non-null int.'); |
| final int? arg_aspectRatio = (args[1] as int?); |
| final int? arg_bitRate = (args[2] as int?); |
| final int? arg_qualitySelectorId = (args[3] as int?); |
| api.create(arg_identifier!, arg_aspectRatio, arg_bitRate, |
| arg_qualitySelectorId); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecorderHostApi.getAspectRatio', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.RecorderHostApi.getAspectRatio was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.RecorderHostApi.getAspectRatio was null, expected non-null int.'); |
| final int output = api.getAspectRatio(arg_identifier!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecorderHostApi.getTargetVideoEncodingBitRate', |
| codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.RecorderHostApi.getTargetVideoEncodingBitRate was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.RecorderHostApi.getTargetVideoEncodingBitRate was null, expected non-null int.'); |
| final int output = api.getTargetVideoEncodingBitRate(arg_identifier!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecorderHostApi.prepareRecording', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.RecorderHostApi.prepareRecording was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.RecorderHostApi.prepareRecording was null, expected non-null int.'); |
| final String? arg_path = (args[1] as String?); |
| assert(arg_path != null, |
| 'Argument for dev.flutter.pigeon.RecorderHostApi.prepareRecording was null, expected non-null String.'); |
| final int output = api.prepareRecording(arg_identifier!, arg_path!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestPendingRecordingHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| int start(int identifier); |
| |
| static void setup(TestPendingRecordingHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.PendingRecordingHostApi.start', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.PendingRecordingHostApi.start was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.PendingRecordingHostApi.start was null, expected non-null int.'); |
| final int output = api.start(arg_identifier!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestRecordingHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void close(int identifier); |
| |
| void pause(int identifier); |
| |
| void resume(int identifier); |
| |
| void stop(int identifier); |
| |
| static void setup(TestRecordingHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecordingHostApi.close', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.RecordingHostApi.close was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.RecordingHostApi.close was null, expected non-null int.'); |
| api.close(arg_identifier!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecordingHostApi.pause', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.RecordingHostApi.pause was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.RecordingHostApi.pause was null, expected non-null int.'); |
| api.pause(arg_identifier!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecordingHostApi.resume', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.RecordingHostApi.resume was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.RecordingHostApi.resume was null, expected non-null int.'); |
| api.resume(arg_identifier!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecordingHostApi.stop', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.RecordingHostApi.stop was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.RecordingHostApi.stop was null, expected non-null int.'); |
| api.stop(arg_identifier!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestImageCaptureHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier, int? flashMode, int? resolutionSelectorId); |
| |
| void setFlashMode(int identifier, int flashMode); |
| |
| Future<String> takePicture(int identifier); |
| |
| static void setup(TestImageCaptureHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageCaptureHostApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ImageCaptureHostApi.create was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ImageCaptureHostApi.create was null, expected non-null int.'); |
| final int? arg_flashMode = (args[1] as int?); |
| final int? arg_resolutionSelectorId = (args[2] as int?); |
| api.create(arg_identifier!, arg_flashMode, arg_resolutionSelectorId); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageCaptureHostApi.setFlashMode', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ImageCaptureHostApi.setFlashMode was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ImageCaptureHostApi.setFlashMode was null, expected non-null int.'); |
| final int? arg_flashMode = (args[1] as int?); |
| assert(arg_flashMode != null, |
| 'Argument for dev.flutter.pigeon.ImageCaptureHostApi.setFlashMode was null, expected non-null int.'); |
| api.setFlashMode(arg_identifier!, arg_flashMode!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageCaptureHostApi.takePicture', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ImageCaptureHostApi.takePicture was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ImageCaptureHostApi.takePicture was null, expected non-null int.'); |
| final String output = await api.takePicture(arg_identifier!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| } |
| } |
| |
| class _TestResolutionStrategyHostApiCodec extends StandardMessageCodec { |
| const _TestResolutionStrategyHostApiCodec(); |
| @override |
| void writeValue(WriteBuffer buffer, Object? value) { |
| if (value is ResolutionInfo) { |
| buffer.putUint8(128); |
| writeValue(buffer, value.encode()); |
| } else { |
| super.writeValue(buffer, value); |
| } |
| } |
| |
| @override |
| Object? readValueOfType(int type, ReadBuffer buffer) { |
| switch (type) { |
| case 128: |
| return ResolutionInfo.decode(readValue(buffer)!); |
| default: |
| return super.readValueOfType(type, buffer); |
| } |
| } |
| } |
| |
| abstract class TestResolutionStrategyHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = |
| _TestResolutionStrategyHostApiCodec(); |
| |
| void create(int identifier, ResolutionInfo? boundSize, int? fallbackRule); |
| |
| static void setup(TestResolutionStrategyHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ResolutionStrategyHostApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ResolutionStrategyHostApi.create was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ResolutionStrategyHostApi.create was null, expected non-null int.'); |
| final ResolutionInfo? arg_boundSize = (args[1] as ResolutionInfo?); |
| final int? arg_fallbackRule = (args[2] as int?); |
| api.create(arg_identifier!, arg_boundSize, arg_fallbackRule); |
| return <Object?>[]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestResolutionSelectorHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier, int? resolutionStrategyIdentifier, |
| int? aspectRatioStrategyIdentifier); |
| |
| static void setup(TestResolutionSelectorHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ResolutionSelectorHostApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ResolutionSelectorHostApi.create was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ResolutionSelectorHostApi.create was null, expected non-null int.'); |
| final int? arg_resolutionStrategyIdentifier = (args[1] as int?); |
| final int? arg_aspectRatioStrategyIdentifier = (args[2] as int?); |
| api.create(arg_identifier!, arg_resolutionStrategyIdentifier, |
| arg_aspectRatioStrategyIdentifier); |
| return <Object?>[]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestAspectRatioStrategyHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier, int preferredAspectRatio, int fallbackRule); |
| |
| static void setup(TestAspectRatioStrategyHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.AspectRatioStrategyHostApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.AspectRatioStrategyHostApi.create was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.AspectRatioStrategyHostApi.create was null, expected non-null int.'); |
| final int? arg_preferredAspectRatio = (args[1] as int?); |
| assert(arg_preferredAspectRatio != null, |
| 'Argument for dev.flutter.pigeon.AspectRatioStrategyHostApi.create was null, expected non-null int.'); |
| final int? arg_fallbackRule = (args[2] as int?); |
| assert(arg_fallbackRule != null, |
| 'Argument for dev.flutter.pigeon.AspectRatioStrategyHostApi.create was null, expected non-null int.'); |
| api.create( |
| arg_identifier!, arg_preferredAspectRatio!, arg_fallbackRule!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestImageAnalysisHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier, int? resolutionSelectorId); |
| |
| void setAnalyzer(int identifier, int analyzerIdentifier); |
| |
| void clearAnalyzer(int identifier); |
| |
| static void setup(TestImageAnalysisHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageAnalysisHostApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ImageAnalysisHostApi.create was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ImageAnalysisHostApi.create was null, expected non-null int.'); |
| final int? arg_resolutionSelectorId = (args[1] as int?); |
| api.create(arg_identifier!, arg_resolutionSelectorId); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageAnalysisHostApi.setAnalyzer', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ImageAnalysisHostApi.setAnalyzer was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ImageAnalysisHostApi.setAnalyzer was null, expected non-null int.'); |
| final int? arg_analyzerIdentifier = (args[1] as int?); |
| assert(arg_analyzerIdentifier != null, |
| 'Argument for dev.flutter.pigeon.ImageAnalysisHostApi.setAnalyzer was null, expected non-null int.'); |
| api.setAnalyzer(arg_identifier!, arg_analyzerIdentifier!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageAnalysisHostApi.clearAnalyzer', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ImageAnalysisHostApi.clearAnalyzer was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ImageAnalysisHostApi.clearAnalyzer was null, expected non-null int.'); |
| api.clearAnalyzer(arg_identifier!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestAnalyzerHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier); |
| |
| static void setup(TestAnalyzerHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.AnalyzerHostApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.AnalyzerHostApi.create was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.AnalyzerHostApi.create was null, expected non-null int.'); |
| api.create(arg_identifier!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestObserverHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier); |
| |
| static void setup(TestObserverHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ObserverHostApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ObserverHostApi.create was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ObserverHostApi.create was null, expected non-null int.'); |
| api.create(arg_identifier!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| } |
| } |
| |
| class _TestLiveDataHostApiCodec extends StandardMessageCodec { |
| const _TestLiveDataHostApiCodec(); |
| @override |
| void writeValue(WriteBuffer buffer, Object? value) { |
| if (value is LiveDataSupportedTypeData) { |
| buffer.putUint8(128); |
| writeValue(buffer, value.encode()); |
| } else { |
| super.writeValue(buffer, value); |
| } |
| } |
| |
| @override |
| Object? readValueOfType(int type, ReadBuffer buffer) { |
| switch (type) { |
| case 128: |
| return LiveDataSupportedTypeData.decode(readValue(buffer)!); |
| default: |
| return super.readValueOfType(type, buffer); |
| } |
| } |
| } |
| |
| abstract class TestLiveDataHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = _TestLiveDataHostApiCodec(); |
| |
| void observe(int identifier, int observerIdentifier); |
| |
| void removeObservers(int identifier); |
| |
| int? getValue(int identifier, LiveDataSupportedTypeData type); |
| |
| static void setup(TestLiveDataHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.LiveDataHostApi.observe', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.LiveDataHostApi.observe was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.LiveDataHostApi.observe was null, expected non-null int.'); |
| final int? arg_observerIdentifier = (args[1] as int?); |
| assert(arg_observerIdentifier != null, |
| 'Argument for dev.flutter.pigeon.LiveDataHostApi.observe was null, expected non-null int.'); |
| api.observe(arg_identifier!, arg_observerIdentifier!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.LiveDataHostApi.removeObservers', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.LiveDataHostApi.removeObservers was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.LiveDataHostApi.removeObservers was null, expected non-null int.'); |
| api.removeObservers(arg_identifier!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.LiveDataHostApi.getValue', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.LiveDataHostApi.getValue was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.LiveDataHostApi.getValue was null, expected non-null int.'); |
| final LiveDataSupportedTypeData? arg_type = |
| (args[1] as LiveDataSupportedTypeData?); |
| assert(arg_type != null, |
| 'Argument for dev.flutter.pigeon.LiveDataHostApi.getValue was null, expected non-null LiveDataSupportedTypeData.'); |
| final int? output = api.getValue(arg_identifier!, arg_type!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestImageProxyHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| List<int?> getPlanes(int identifier); |
| |
| void close(int identifier); |
| |
| static void setup(TestImageProxyHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageProxyHostApi.getPlanes', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ImageProxyHostApi.getPlanes was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ImageProxyHostApi.getPlanes was null, expected non-null int.'); |
| final List<int?> output = api.getPlanes(arg_identifier!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageProxyHostApi.close', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ImageProxyHostApi.close was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.ImageProxyHostApi.close was null, expected non-null int.'); |
| api.close(arg_identifier!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| } |
| } |
| |
| class _TestQualitySelectorHostApiCodec extends StandardMessageCodec { |
| const _TestQualitySelectorHostApiCodec(); |
| @override |
| void writeValue(WriteBuffer buffer, Object? value) { |
| if (value is ResolutionInfo) { |
| buffer.putUint8(128); |
| writeValue(buffer, value.encode()); |
| } else if (value is VideoQualityData) { |
| buffer.putUint8(129); |
| writeValue(buffer, value.encode()); |
| } else { |
| super.writeValue(buffer, value); |
| } |
| } |
| |
| @override |
| Object? readValueOfType(int type, ReadBuffer buffer) { |
| switch (type) { |
| case 128: |
| return ResolutionInfo.decode(readValue(buffer)!); |
| case 129: |
| return VideoQualityData.decode(readValue(buffer)!); |
| default: |
| return super.readValueOfType(type, buffer); |
| } |
| } |
| } |
| |
| abstract class TestQualitySelectorHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = _TestQualitySelectorHostApiCodec(); |
| |
| void create(int identifier, List<VideoQualityData?> videoQualityDataList, |
| int? fallbackStrategyId); |
| |
| ResolutionInfo getResolution(int cameraInfoId, VideoQuality quality); |
| |
| static void setup(TestQualitySelectorHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.QualitySelectorHostApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.QualitySelectorHostApi.create was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.QualitySelectorHostApi.create was null, expected non-null int.'); |
| final List<VideoQualityData?>? arg_videoQualityDataList = |
| (args[1] as List<Object?>?)?.cast<VideoQualityData?>(); |
| assert(arg_videoQualityDataList != null, |
| 'Argument for dev.flutter.pigeon.QualitySelectorHostApi.create was null, expected non-null List<VideoQualityData?>.'); |
| final int? arg_fallbackStrategyId = (args[2] as int?); |
| api.create(arg_identifier!, arg_videoQualityDataList!, |
| arg_fallbackStrategyId); |
| return <Object?>[]; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.QualitySelectorHostApi.getResolution', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.QualitySelectorHostApi.getResolution was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_cameraInfoId = (args[0] as int?); |
| assert(arg_cameraInfoId != null, |
| 'Argument for dev.flutter.pigeon.QualitySelectorHostApi.getResolution was null, expected non-null int.'); |
| final VideoQuality? arg_quality = |
| args[1] == null ? null : VideoQuality.values[args[1] as int]; |
| assert(arg_quality != null, |
| 'Argument for dev.flutter.pigeon.QualitySelectorHostApi.getResolution was null, expected non-null VideoQuality.'); |
| final ResolutionInfo output = |
| api.getResolution(arg_cameraInfoId!, arg_quality!); |
| return <Object?>[output]; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class TestFallbackStrategyHostApi { |
| static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => |
| TestDefaultBinaryMessengerBinding.instance; |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier, VideoQuality quality, |
| VideoResolutionFallbackRule fallbackRule); |
| |
| static void setup(TestFallbackStrategyHostApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.FallbackStrategyHostApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, null); |
| } else { |
| _testBinaryMessengerBinding!.defaultBinaryMessenger |
| .setMockDecodedMessageHandler<Object?>(channel, |
| (Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.FallbackStrategyHostApi.create was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final int? arg_identifier = (args[0] as int?); |
| assert(arg_identifier != null, |
| 'Argument for dev.flutter.pigeon.FallbackStrategyHostApi.create was null, expected non-null int.'); |
| final VideoQuality? arg_quality = |
| args[1] == null ? null : VideoQuality.values[args[1] as int]; |
| assert(arg_quality != null, |
| 'Argument for dev.flutter.pigeon.FallbackStrategyHostApi.create was null, expected non-null VideoQuality.'); |
| final VideoResolutionFallbackRule? arg_fallbackRule = args[2] == null |
| ? null |
| : VideoResolutionFallbackRule.values[args[2] as int]; |
| assert(arg_fallbackRule != null, |
| 'Argument for dev.flutter.pigeon.FallbackStrategyHostApi.create was null, expected non-null VideoResolutionFallbackRule.'); |
| api.create(arg_identifier!, arg_quality!, arg_fallbackRule!); |
| return <Object?>[]; |
| }); |
| } |
| } |
| } |
| } |