hasPreview static method

bool hasPreview({
  1. required String toolId,
  2. required Map<String, String> previewsById,
  3. required Map<String, String> rawBuffersById,
})

Implementation

static bool hasPreview({
  required String toolId,
  required Map<String, String> previewsById,
  required Map<String, String> rawBuffersById,
}) {
  if ((previewsById[toolId] ?? '').trim().isNotEmpty) return true;
  return (rawBuffersById[toolId] ?? '').trim().isNotEmpty;
}