findForMode static method

ScannerPlugin? findForMode(
  1. ScanMode mode
)

Retrieves a registered plugin matching the specified ScanMode.

Implementation

static ScannerPlugin? findForMode(ScanMode mode) {
  for (final plugin in _registeredPlugins.values) {
    if (plugin.supportedMode == mode) {
      return plugin;
    }
  }
  return null;
}