init static method

FrameProcessorPluginRunner init(
  1. String name, [
  2. Map<String, Object?> options = const {}
])

Creates a runner for the plugin registered as name, instantiated with options on its own worker isolate. Throws ArgumentError for an unknown name (like vision-camera's "plugin not found" error).

Implementation

static FrameProcessorPluginRunner init(
  String name, [
  Map<String, Object?> options = const {},
]) {
  final factory = _registry[name];
  if (factory == null) {
    throw ArgumentError.value(
      name,
      'name',
      'No frame-processor plugin registered with this name. '
          'Registered: ${registeredNames.join(', ')}',
    );
  }
  return FrameProcessorPluginRunner._(name, factory, options);
}