| // 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, 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'; |
| |
| /// The states the camera can be in. |
| /// |
| /// See https://developer.android.com/reference/androidx/camera/core/CameraState.Type. |
| enum CameraStateType { |
| closed, |
| closing, |
| open, |
| opening, |
| pendingOpen, |
| } |
| |
| /// The types (T) properly wrapped to be used as a LiveData<T>. |
| /// |
| /// If you need to add another type to support a type S to use a LiveData<S> in |
| /// this plugin, ensure the following is done on the Dart side: |
| /// |
| /// * In `../lib/src/live_data.dart`, add new cases for S in |
| /// `_LiveDataHostApiImpl#getValueFromInstances` to get the current value of |
| /// type S from a LiveData<S> instance and in `LiveDataFlutterApiImpl#create` |
| /// to create the expected type of LiveData<S> when requested. |
| /// |
| /// On the native side, ensure the following is done: |
| /// |
| /// * Update `LiveDataHostApiImpl#getValue` is updated to properly return |
| /// identifiers for instances of type S. |
| /// * Update `ObserverFlutterApiWrapper#onChanged` to properly handle receiving |
| /// calls with instances of type S if a LiveData<S> instance is observed. |
| enum LiveDataSupportedType { |
| cameraState, |
| zoomState, |
| } |
| |
| class ResolutionInfo { |
| ResolutionInfo({ |
| required this.width, |
| required this.height, |
| }); |
| |
| int width; |
| |
| int height; |
| |
| Object encode() { |
| return <Object?>[ |
| width, |
| height, |
| ]; |
| } |
| |
| static ResolutionInfo decode(Object result) { |
| result as List<Object?>; |
| return ResolutionInfo( |
| width: result[0]! as int, |
| height: result[1]! as int, |
| ); |
| } |
| } |
| |
| class CameraPermissionsErrorData { |
| CameraPermissionsErrorData({ |
| required this.errorCode, |
| required this.description, |
| }); |
| |
| String errorCode; |
| |
| String description; |
| |
| Object encode() { |
| return <Object?>[ |
| errorCode, |
| description, |
| ]; |
| } |
| |
| static CameraPermissionsErrorData decode(Object result) { |
| result as List<Object?>; |
| return CameraPermissionsErrorData( |
| errorCode: result[0]! as String, |
| description: result[1]! as String, |
| ); |
| } |
| } |
| |
| class CameraStateTypeData { |
| CameraStateTypeData({ |
| required this.value, |
| }); |
| |
| CameraStateType value; |
| |
| Object encode() { |
| return <Object?>[ |
| value.index, |
| ]; |
| } |
| |
| static CameraStateTypeData decode(Object result) { |
| result as List<Object?>; |
| return CameraStateTypeData( |
| value: CameraStateType.values[result[0]! as int], |
| ); |
| } |
| } |
| |
| class LiveDataSupportedTypeData { |
| LiveDataSupportedTypeData({ |
| required this.value, |
| }); |
| |
| LiveDataSupportedType value; |
| |
| Object encode() { |
| return <Object?>[ |
| value.index, |
| ]; |
| } |
| |
| static LiveDataSupportedTypeData decode(Object result) { |
| result as List<Object?>; |
| return LiveDataSupportedTypeData( |
| value: LiveDataSupportedType.values[result[0]! as int], |
| ); |
| } |
| } |
| |
| class ExposureCompensationRange { |
| ExposureCompensationRange({ |
| required this.minCompensation, |
| required this.maxCompensation, |
| }); |
| |
| int minCompensation; |
| |
| int maxCompensation; |
| |
| Object encode() { |
| return <Object?>[ |
| minCompensation, |
| maxCompensation, |
| ]; |
| } |
| |
| static ExposureCompensationRange decode(Object result) { |
| result as List<Object?>; |
| return ExposureCompensationRange( |
| minCompensation: result[0]! as int, |
| maxCompensation: result[1]! as int, |
| ); |
| } |
| } |
| |
| class InstanceManagerHostApi { |
| /// Constructor for [InstanceManagerHostApi]. 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. |
| InstanceManagerHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| /// Clear the native `InstanceManager`. |
| /// |
| /// This is typically only used after a hot restart. |
| Future<void> clear() async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.InstanceManagerHostApi.clear', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel.send(null) as List<Object?>?; |
| 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; |
| } |
| } |
| } |
| |
| class JavaObjectHostApi { |
| /// Constructor for [JavaObjectHostApi]. 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. |
| JavaObjectHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<void> dispose(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.JavaObjectHostApi.dispose', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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; |
| } |
| } |
| } |
| |
| abstract class JavaObjectFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void dispose(int identifier); |
| |
| static void setup(JavaObjectFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.JavaObjectFlutterApi.dispose', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.JavaObjectFlutterApi.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.JavaObjectFlutterApi.dispose was null, expected non-null int.'); |
| api.dispose(arg_identifier!); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| class CameraInfoHostApi { |
| /// Constructor for [CameraInfoHostApi]. 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. |
| CameraInfoHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<int> getSensorRotationDegrees(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraInfoHostApi.getSensorRotationDegrees', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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<int> getCameraState(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraInfoHostApi.getCameraState', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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<int> getExposureState(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraInfoHostApi.getExposureState', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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<int> getZoomState(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraInfoHostApi.getZoomState', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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?)!; |
| } |
| } |
| } |
| |
| abstract class CameraInfoFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier); |
| |
| static void setup(CameraInfoFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraInfoFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.CameraInfoFlutterApi.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.CameraInfoFlutterApi.create was null, expected non-null int.'); |
| api.create(arg_identifier!); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| class CameraSelectorHostApi { |
| /// Constructor for [CameraSelectorHostApi]. 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. |
| CameraSelectorHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<void> create(int arg_identifier, int? arg_lensFacing) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraSelectorHostApi.create', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel |
| .send(<Object?>[arg_identifier, arg_lensFacing]) as List<Object?>?; |
| 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<List<int?>> filter( |
| int arg_identifier, List<int?> arg_cameraInfoIds) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraSelectorHostApi.filter', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel |
| .send(<Object?>[arg_identifier, arg_cameraInfoIds]) as List<Object?>?; |
| 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<Object?>?)!.cast<int?>(); |
| } |
| } |
| } |
| |
| abstract class CameraSelectorFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier, int? lensFacing); |
| |
| static void setup(CameraSelectorFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraSelectorFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.CameraSelectorFlutterApi.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.CameraSelectorFlutterApi.create was null, expected non-null int.'); |
| final int? arg_lensFacing = (args[1] as int?); |
| api.create(arg_identifier!, arg_lensFacing); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| class ProcessCameraProviderHostApi { |
| /// Constructor for [ProcessCameraProviderHostApi]. 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. |
| ProcessCameraProviderHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<int> getInstance() async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ProcessCameraProviderHostApi.getInstance', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel.send(null) as List<Object?>?; |
| 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<List<int?>> getAvailableCameraInfos(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ProcessCameraProviderHostApi.getAvailableCameraInfos', |
| codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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<Object?>?)!.cast<int?>(); |
| } |
| } |
| |
| Future<int> bindToLifecycle(int arg_identifier, |
| int arg_cameraSelectorIdentifier, List<int?> arg_useCaseIds) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ProcessCameraProviderHostApi.bindToLifecycle', |
| codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel.send(<Object?>[ |
| arg_identifier, |
| arg_cameraSelectorIdentifier, |
| arg_useCaseIds |
| ]) as List<Object?>?; |
| 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<bool> isBound(int arg_identifier, int arg_useCaseIdentifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ProcessCameraProviderHostApi.isBound', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier, arg_useCaseIdentifier]) |
| as List<Object?>?; |
| 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<void> unbind(int arg_identifier, List<int?> arg_useCaseIds) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ProcessCameraProviderHostApi.unbind', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel |
| .send(<Object?>[arg_identifier, arg_useCaseIds]) as List<Object?>?; |
| 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<void> unbindAll(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ProcessCameraProviderHostApi.unbindAll', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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; |
| } |
| } |
| } |
| |
| abstract class ProcessCameraProviderFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier); |
| |
| static void setup(ProcessCameraProviderFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ProcessCameraProviderFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ProcessCameraProviderFlutterApi.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.ProcessCameraProviderFlutterApi.create was null, expected non-null int.'); |
| api.create(arg_identifier!); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| class CameraHostApi { |
| /// Constructor for [CameraHostApi]. 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. |
| CameraHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<int> getCameraInfo(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraHostApi.getCameraInfo', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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?)!; |
| } |
| } |
| } |
| |
| abstract class CameraFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier); |
| |
| static void setup(CameraFlutterApi? api, {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.CameraFlutterApi.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.CameraFlutterApi.create was null, expected non-null int.'); |
| api.create(arg_identifier!); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| class _SystemServicesHostApiCodec extends StandardMessageCodec { |
| const _SystemServicesHostApiCodec(); |
| @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); |
| } |
| } |
| } |
| |
| class SystemServicesHostApi { |
| /// Constructor for [SystemServicesHostApi]. 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. |
| SystemServicesHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = _SystemServicesHostApiCodec(); |
| |
| Future<CameraPermissionsErrorData?> requestCameraPermissions( |
| bool arg_enableAudio) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.SystemServicesHostApi.requestCameraPermissions', |
| codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_enableAudio]) as List<Object?>?; |
| 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 CameraPermissionsErrorData?); |
| } |
| } |
| |
| Future<void> startListeningForDeviceOrientationChange( |
| bool arg_isFrontFacing, int arg_sensorOrientation) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.SystemServicesHostApi.startListeningForDeviceOrientationChange', |
| codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_isFrontFacing, arg_sensorOrientation]) |
| as List<Object?>?; |
| 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<void> stopListeningForDeviceOrientationChange() async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.SystemServicesHostApi.stopListeningForDeviceOrientationChange', |
| codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel.send(null) as List<Object?>?; |
| 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<String> getTempFilePath(String arg_prefix, String arg_suffix) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.SystemServicesHostApi.getTempFilePath', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_prefix, arg_suffix]) as List<Object?>?; |
| 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?)!; |
| } |
| } |
| } |
| |
| abstract class SystemServicesFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void onDeviceOrientationChanged(String orientation); |
| |
| void onCameraError(String errorDescription); |
| |
| static void setup(SystemServicesFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.SystemServicesFlutterApi.onDeviceOrientationChanged', |
| codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.SystemServicesFlutterApi.onDeviceOrientationChanged was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final String? arg_orientation = (args[0] as String?); |
| assert(arg_orientation != null, |
| 'Argument for dev.flutter.pigeon.SystemServicesFlutterApi.onDeviceOrientationChanged was null, expected non-null String.'); |
| api.onDeviceOrientationChanged(arg_orientation!); |
| return; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.SystemServicesFlutterApi.onCameraError', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.SystemServicesFlutterApi.onCameraError was null.'); |
| final List<Object?> args = (message as List<Object?>?)!; |
| final String? arg_errorDescription = (args[0] as String?); |
| assert(arg_errorDescription != null, |
| 'Argument for dev.flutter.pigeon.SystemServicesFlutterApi.onCameraError was null, expected non-null String.'); |
| api.onCameraError(arg_errorDescription!); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| class _PreviewHostApiCodec extends StandardMessageCodec { |
| const _PreviewHostApiCodec(); |
| @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); |
| } |
| } |
| } |
| |
| class PreviewHostApi { |
| /// Constructor for [PreviewHostApi]. 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. |
| PreviewHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = _PreviewHostApiCodec(); |
| |
| Future<void> create(int arg_identifier, int? arg_rotation, |
| int? arg_resolutionSelectorId) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.PreviewHostApi.create', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel.send( |
| <Object?>[arg_identifier, arg_rotation, arg_resolutionSelectorId]) |
| as List<Object?>?; |
| 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<int> setSurfaceProvider(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.PreviewHostApi.setSurfaceProvider', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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<void> releaseFlutterSurfaceTexture() async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.PreviewHostApi.releaseFlutterSurfaceTexture', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel.send(null) as List<Object?>?; |
| 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<ResolutionInfo> getResolutionInfo(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.PreviewHostApi.getResolutionInfo', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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 ResolutionInfo?)!; |
| } |
| } |
| } |
| |
| class VideoCaptureHostApi { |
| /// Constructor for [VideoCaptureHostApi]. 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. |
| VideoCaptureHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<int> withOutput(int arg_videoOutputId) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.VideoCaptureHostApi.withOutput', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_videoOutputId]) as List<Object?>?; |
| 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<int> getOutput(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.VideoCaptureHostApi.getOutput', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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?)!; |
| } |
| } |
| } |
| |
| abstract class VideoCaptureFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier); |
| |
| static void setup(VideoCaptureFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.VideoCaptureFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.VideoCaptureFlutterApi.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.VideoCaptureFlutterApi.create was null, expected non-null int.'); |
| api.create(arg_identifier!); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| class RecorderHostApi { |
| /// Constructor for [RecorderHostApi]. 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. |
| RecorderHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<void> create( |
| int arg_identifier, int? arg_aspectRatio, int? arg_bitRate) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecorderHostApi.create', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel |
| .send(<Object?>[arg_identifier, arg_aspectRatio, arg_bitRate]) |
| as List<Object?>?; |
| 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<int> getAspectRatio(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecorderHostApi.getAspectRatio', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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<int> getTargetVideoEncodingBitRate(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecorderHostApi.getTargetVideoEncodingBitRate', |
| codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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<int> prepareRecording(int arg_identifier, String arg_path) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecorderHostApi.prepareRecording', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel |
| .send(<Object?>[arg_identifier, arg_path]) as List<Object?>?; |
| 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?)!; |
| } |
| } |
| } |
| |
| abstract class RecorderFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier, int? aspectRatio, int? bitRate); |
| |
| static void setup(RecorderFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecorderFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.RecorderFlutterApi.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.RecorderFlutterApi.create was null, expected non-null int.'); |
| final int? arg_aspectRatio = (args[1] as int?); |
| final int? arg_bitRate = (args[2] as int?); |
| api.create(arg_identifier!, arg_aspectRatio, arg_bitRate); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| class PendingRecordingHostApi { |
| /// Constructor for [PendingRecordingHostApi]. 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. |
| PendingRecordingHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<int> start(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.PendingRecordingHostApi.start', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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?)!; |
| } |
| } |
| } |
| |
| abstract class PendingRecordingFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier); |
| |
| static void setup(PendingRecordingFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.PendingRecordingFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.PendingRecordingFlutterApi.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.PendingRecordingFlutterApi.create was null, expected non-null int.'); |
| api.create(arg_identifier!); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| class RecordingHostApi { |
| /// Constructor for [RecordingHostApi]. 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. |
| RecordingHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<void> close(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecordingHostApi.close', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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<void> pause(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecordingHostApi.pause', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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<void> resume(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecordingHostApi.resume', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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<void> stop(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecordingHostApi.stop', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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; |
| } |
| } |
| } |
| |
| abstract class RecordingFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier); |
| |
| static void setup(RecordingFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.RecordingFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.RecordingFlutterApi.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.RecordingFlutterApi.create was null, expected non-null int.'); |
| api.create(arg_identifier!); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| class ImageCaptureHostApi { |
| /// Constructor for [ImageCaptureHostApi]. 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. |
| ImageCaptureHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<void> create(int arg_identifier, int? arg_flashMode, |
| int? arg_resolutionSelectorId) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageCaptureHostApi.create', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel.send( |
| <Object?>[arg_identifier, arg_flashMode, arg_resolutionSelectorId]) |
| as List<Object?>?; |
| 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<void> setFlashMode(int arg_identifier, int arg_flashMode) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageCaptureHostApi.setFlashMode', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel |
| .send(<Object?>[arg_identifier, arg_flashMode]) as List<Object?>?; |
| 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<String> takePicture(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageCaptureHostApi.takePicture', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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?)!; |
| } |
| } |
| } |
| |
| class _ResolutionStrategyHostApiCodec extends StandardMessageCodec { |
| const _ResolutionStrategyHostApiCodec(); |
| @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); |
| } |
| } |
| } |
| |
| class ResolutionStrategyHostApi { |
| /// Constructor for [ResolutionStrategyHostApi]. 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. |
| ResolutionStrategyHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = _ResolutionStrategyHostApiCodec(); |
| |
| Future<void> create(int arg_identifier, ResolutionInfo? arg_boundSize, |
| int? arg_fallbackRule) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ResolutionStrategyHostApi.create', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel |
| .send(<Object?>[arg_identifier, arg_boundSize, arg_fallbackRule]) |
| as List<Object?>?; |
| 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; |
| } |
| } |
| } |
| |
| class ResolutionSelectorHostApi { |
| /// Constructor for [ResolutionSelectorHostApi]. 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. |
| ResolutionSelectorHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<void> create(int arg_identifier, int? arg_resolutionStrategyIdentifier, |
| int? arg_aspectRatioStrategyIdentifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ResolutionSelectorHostApi.create', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel.send(<Object?>[ |
| arg_identifier, |
| arg_resolutionStrategyIdentifier, |
| arg_aspectRatioStrategyIdentifier |
| ]) as List<Object?>?; |
| 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; |
| } |
| } |
| } |
| |
| class AspectRatioStrategyHostApi { |
| /// Constructor for [AspectRatioStrategyHostApi]. 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. |
| AspectRatioStrategyHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<void> create(int arg_identifier, int arg_preferredAspectRatio, |
| int arg_fallbackRule) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.AspectRatioStrategyHostApi.create', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel.send(<Object?>[ |
| arg_identifier, |
| arg_preferredAspectRatio, |
| arg_fallbackRule |
| ]) as List<Object?>?; |
| 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; |
| } |
| } |
| } |
| |
| class _CameraStateFlutterApiCodec extends StandardMessageCodec { |
| const _CameraStateFlutterApiCodec(); |
| @override |
| void writeValue(WriteBuffer buffer, Object? value) { |
| if (value is CameraStateTypeData) { |
| buffer.putUint8(128); |
| writeValue(buffer, value.encode()); |
| } else { |
| super.writeValue(buffer, value); |
| } |
| } |
| |
| @override |
| Object? readValueOfType(int type, ReadBuffer buffer) { |
| switch (type) { |
| case 128: |
| return CameraStateTypeData.decode(readValue(buffer)!); |
| default: |
| return super.readValueOfType(type, buffer); |
| } |
| } |
| } |
| |
| abstract class CameraStateFlutterApi { |
| static const MessageCodec<Object?> codec = _CameraStateFlutterApiCodec(); |
| |
| void create(int identifier, CameraStateTypeData type, int? errorIdentifier); |
| |
| static void setup(CameraStateFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraStateFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.CameraStateFlutterApi.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.CameraStateFlutterApi.create was null, expected non-null int.'); |
| final CameraStateTypeData? arg_type = |
| (args[1] as CameraStateTypeData?); |
| assert(arg_type != null, |
| 'Argument for dev.flutter.pigeon.CameraStateFlutterApi.create was null, expected non-null CameraStateTypeData.'); |
| final int? arg_errorIdentifier = (args[2] as int?); |
| api.create(arg_identifier!, arg_type!, arg_errorIdentifier); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| class _ExposureStateFlutterApiCodec extends StandardMessageCodec { |
| const _ExposureStateFlutterApiCodec(); |
| @override |
| void writeValue(WriteBuffer buffer, Object? value) { |
| if (value is ExposureCompensationRange) { |
| buffer.putUint8(128); |
| writeValue(buffer, value.encode()); |
| } else { |
| super.writeValue(buffer, value); |
| } |
| } |
| |
| @override |
| Object? readValueOfType(int type, ReadBuffer buffer) { |
| switch (type) { |
| case 128: |
| return ExposureCompensationRange.decode(readValue(buffer)!); |
| default: |
| return super.readValueOfType(type, buffer); |
| } |
| } |
| } |
| |
| abstract class ExposureStateFlutterApi { |
| static const MessageCodec<Object?> codec = _ExposureStateFlutterApiCodec(); |
| |
| void create( |
| int identifier, |
| ExposureCompensationRange exposureCompensationRange, |
| double exposureCompensationStep); |
| |
| static void setup(ExposureStateFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ExposureStateFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ExposureStateFlutterApi.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.ExposureStateFlutterApi.create was null, expected non-null int.'); |
| final ExposureCompensationRange? arg_exposureCompensationRange = |
| (args[1] as ExposureCompensationRange?); |
| assert(arg_exposureCompensationRange != null, |
| 'Argument for dev.flutter.pigeon.ExposureStateFlutterApi.create was null, expected non-null ExposureCompensationRange.'); |
| final double? arg_exposureCompensationStep = (args[2] as double?); |
| assert(arg_exposureCompensationStep != null, |
| 'Argument for dev.flutter.pigeon.ExposureStateFlutterApi.create was null, expected non-null double.'); |
| api.create(arg_identifier!, arg_exposureCompensationRange!, |
| arg_exposureCompensationStep!); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class ZoomStateFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier, double minZoomRatio, double maxZoomRatio); |
| |
| static void setup(ZoomStateFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ZoomStateFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ZoomStateFlutterApi.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.ZoomStateFlutterApi.create was null, expected non-null int.'); |
| final double? arg_minZoomRatio = (args[1] as double?); |
| assert(arg_minZoomRatio != null, |
| 'Argument for dev.flutter.pigeon.ZoomStateFlutterApi.create was null, expected non-null double.'); |
| final double? arg_maxZoomRatio = (args[2] as double?); |
| assert(arg_maxZoomRatio != null, |
| 'Argument for dev.flutter.pigeon.ZoomStateFlutterApi.create was null, expected non-null double.'); |
| api.create(arg_identifier!, arg_minZoomRatio!, arg_maxZoomRatio!); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| class ImageAnalysisHostApi { |
| /// Constructor for [ImageAnalysisHostApi]. 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. |
| ImageAnalysisHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<void> create(int arg_identifier, int? arg_resolutionSelectorId) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageAnalysisHostApi.create', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier, arg_resolutionSelectorId]) |
| as List<Object?>?; |
| 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<void> setAnalyzer( |
| int arg_identifier, int arg_analyzerIdentifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageAnalysisHostApi.setAnalyzer', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier, arg_analyzerIdentifier]) |
| as List<Object?>?; |
| 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<void> clearAnalyzer(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageAnalysisHostApi.clearAnalyzer', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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; |
| } |
| } |
| } |
| |
| class AnalyzerHostApi { |
| /// Constructor for [AnalyzerHostApi]. 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. |
| AnalyzerHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<void> create(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.AnalyzerHostApi.create', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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; |
| } |
| } |
| } |
| |
| class ObserverHostApi { |
| /// Constructor for [ObserverHostApi]. 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. |
| ObserverHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<void> create(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ObserverHostApi.create', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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; |
| } |
| } |
| } |
| |
| abstract class ObserverFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void onChanged(int identifier, int valueIdentifier); |
| |
| static void setup(ObserverFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ObserverFlutterApi.onChanged', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ObserverFlutterApi.onChanged 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.ObserverFlutterApi.onChanged was null, expected non-null int.'); |
| final int? arg_valueIdentifier = (args[1] as int?); |
| assert(arg_valueIdentifier != null, |
| 'Argument for dev.flutter.pigeon.ObserverFlutterApi.onChanged was null, expected non-null int.'); |
| api.onChanged(arg_identifier!, arg_valueIdentifier!); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class CameraStateErrorFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier, int code); |
| |
| static void setup(CameraStateErrorFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.CameraStateErrorFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.CameraStateErrorFlutterApi.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.CameraStateErrorFlutterApi.create was null, expected non-null int.'); |
| final int? arg_code = (args[1] as int?); |
| assert(arg_code != null, |
| 'Argument for dev.flutter.pigeon.CameraStateErrorFlutterApi.create was null, expected non-null int.'); |
| api.create(arg_identifier!, arg_code!); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| class _LiveDataHostApiCodec extends StandardMessageCodec { |
| const _LiveDataHostApiCodec(); |
| @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); |
| } |
| } |
| } |
| |
| class LiveDataHostApi { |
| /// Constructor for [LiveDataHostApi]. 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. |
| LiveDataHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = _LiveDataHostApiCodec(); |
| |
| Future<void> observe(int arg_identifier, int arg_observerIdentifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.LiveDataHostApi.observe', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier, arg_observerIdentifier]) |
| as List<Object?>?; |
| 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<void> removeObservers(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.LiveDataHostApi.removeObservers', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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<int?> getValue( |
| int arg_identifier, LiveDataSupportedTypeData arg_type) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.LiveDataHostApi.getValue', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = await channel |
| .send(<Object?>[arg_identifier, arg_type]) as List<Object?>?; |
| 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 int?); |
| } |
| } |
| } |
| |
| class _LiveDataFlutterApiCodec extends StandardMessageCodec { |
| const _LiveDataFlutterApiCodec(); |
| @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 LiveDataFlutterApi { |
| static const MessageCodec<Object?> codec = _LiveDataFlutterApiCodec(); |
| |
| void create(int identifier, LiveDataSupportedTypeData type); |
| |
| static void setup(LiveDataFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.LiveDataFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.LiveDataFlutterApi.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.LiveDataFlutterApi.create was null, expected non-null int.'); |
| final LiveDataSupportedTypeData? arg_type = |
| (args[1] as LiveDataSupportedTypeData?); |
| assert(arg_type != null, |
| 'Argument for dev.flutter.pigeon.LiveDataFlutterApi.create was null, expected non-null LiveDataSupportedTypeData.'); |
| api.create(arg_identifier!, arg_type!); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class AnalyzerFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier); |
| |
| void analyze(int identifier, int imageProxyIdentifier); |
| |
| static void setup(AnalyzerFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.AnalyzerFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.AnalyzerFlutterApi.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.AnalyzerFlutterApi.create was null, expected non-null int.'); |
| api.create(arg_identifier!); |
| return; |
| }); |
| } |
| } |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.AnalyzerFlutterApi.analyze', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.AnalyzerFlutterApi.analyze 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.AnalyzerFlutterApi.analyze was null, expected non-null int.'); |
| final int? arg_imageProxyIdentifier = (args[1] as int?); |
| assert(arg_imageProxyIdentifier != null, |
| 'Argument for dev.flutter.pigeon.AnalyzerFlutterApi.analyze was null, expected non-null int.'); |
| api.analyze(arg_identifier!, arg_imageProxyIdentifier!); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| class ImageProxyHostApi { |
| /// Constructor for [ImageProxyHostApi]. 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. |
| ImageProxyHostApi({BinaryMessenger? binaryMessenger}) |
| : _binaryMessenger = binaryMessenger; |
| final BinaryMessenger? _binaryMessenger; |
| |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| Future<List<int?>> getPlanes(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageProxyHostApi.getPlanes', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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<Object?>?)!.cast<int?>(); |
| } |
| } |
| |
| Future<void> close(int arg_identifier) async { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageProxyHostApi.close', codec, |
| binaryMessenger: _binaryMessenger); |
| final List<Object?>? replyList = |
| await channel.send(<Object?>[arg_identifier]) as List<Object?>?; |
| 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; |
| } |
| } |
| } |
| |
| abstract class ImageProxyFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier, int format, int height, int width); |
| |
| static void setup(ImageProxyFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.ImageProxyFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.ImageProxyFlutterApi.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.ImageProxyFlutterApi.create was null, expected non-null int.'); |
| final int? arg_format = (args[1] as int?); |
| assert(arg_format != null, |
| 'Argument for dev.flutter.pigeon.ImageProxyFlutterApi.create was null, expected non-null int.'); |
| final int? arg_height = (args[2] as int?); |
| assert(arg_height != null, |
| 'Argument for dev.flutter.pigeon.ImageProxyFlutterApi.create was null, expected non-null int.'); |
| final int? arg_width = (args[3] as int?); |
| assert(arg_width != null, |
| 'Argument for dev.flutter.pigeon.ImageProxyFlutterApi.create was null, expected non-null int.'); |
| api.create(arg_identifier!, arg_format!, arg_height!, arg_width!); |
| return; |
| }); |
| } |
| } |
| } |
| } |
| |
| abstract class PlaneProxyFlutterApi { |
| static const MessageCodec<Object?> codec = StandardMessageCodec(); |
| |
| void create(int identifier, Uint8List buffer, int pixelStride, int rowStride); |
| |
| static void setup(PlaneProxyFlutterApi? api, |
| {BinaryMessenger? binaryMessenger}) { |
| { |
| final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>( |
| 'dev.flutter.pigeon.PlaneProxyFlutterApi.create', codec, |
| binaryMessenger: binaryMessenger); |
| if (api == null) { |
| channel.setMessageHandler(null); |
| } else { |
| channel.setMessageHandler((Object? message) async { |
| assert(message != null, |
| 'Argument for dev.flutter.pigeon.PlaneProxyFlutterApi.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.PlaneProxyFlutterApi.create was null, expected non-null int.'); |
| final Uint8List? arg_buffer = (args[1] as Uint8List?); |
| assert(arg_buffer != null, |
| 'Argument for dev.flutter.pigeon.PlaneProxyFlutterApi.create was null, expected non-null Uint8List.'); |
| final int? arg_pixelStride = (args[2] as int?); |
| assert(arg_pixelStride != null, |
| 'Argument for dev.flutter.pigeon.PlaneProxyFlutterApi.create was null, expected non-null int.'); |
| final int? arg_rowStride = (args[3] as int?); |
| assert(arg_rowStride != null, |
| 'Argument for dev.flutter.pigeon.PlaneProxyFlutterApi.create was null, expected non-null int.'); |
| api.create( |
| arg_identifier!, arg_buffer!, arg_pixelStride!, arg_rowStride!); |
| return; |
| }); |
| } |
| } |
| } |
| } |