hasPreviewForToolName static method

bool hasPreviewForToolName({
  1. required String toolName,
  2. required Map<String, String> toolIdByName,
  3. required Map<String, String> previewsById,
  4. required Map<String, String> rawBuffersById,
})

Implementation

static bool hasPreviewForToolName({
  required String toolName,
  required Map<String, String> toolIdByName,
  required Map<String, String> previewsById,
  required Map<String, String> rawBuffersById,
}) {
  final String toolId = resolveToolIdByName(
    toolName: toolName,
    toolIdByName: toolIdByName,
  );
  if (toolId.isEmpty) return false;
  return hasPreview(
    toolId: toolId,
    previewsById: previewsById,
    rawBuffersById: rawBuffersById,
  );
}