doc_import_cannot_have_configurations 진단: doc import에는 설정(if 절)을 쓸 수 없어요

doc_import_cannot_have_configurations 진단: doc import에는 설정(if 절)을 쓸 수 없어요

Dart 분석기가 내보내는 진단에는 이름이 있어요. doc_import_cannot_have_configurations문서 import(@docImport)에 if 절이 하나 이상 있을 때 분석기가 알려주는 컴파일 타임 진단이에요. 문서 import는 설정(configuration)할 수 없어요.

출처: doc_import_cannot_have_configurations

본문

설명

분석기는 문서 import에 if 절이 하나 이상 있을 때 이 진단을 만들어요.

문서 import는 설정할 수 없어요.

예시

다음 코드는 문서 import에 if 절이 있기 때문에 이 진단이 나와요.

/// @docImport 'package:meta/meta.dart' if (dart.library.io) 'dart:io';
library;

흔한 해결 방법

if 절을 제거해 주세요.

/// @docImport 'package:meta/meta.dart';
library;

더 알아보기