createInstance method

  1. @override
$CapturePhotoSettings createInstance(
  1. TypeChannelMessenger messenger,
  2. List<Object?> arguments
)
override

Instantiates a new object with arguments.

Implementation

@override
$CapturePhotoSettings createInstance(
  TypeChannelMessenger messenger,
  List<Object?> arguments,
) {
  final String constructorName = arguments[0] as String;
  switch (constructorName) {
    case '':
      return $create$(
        messenger,
      );

    case 'photoSettingsWithFormat':
      return $create$photoSettingsWithFormat(
        messenger,
        arguments[1] as Map,
      );
  }

  throw ArgumentError.value(
    constructorName,
    'constructorName',
    'Unable to invoke constructor of',
  );
}