AnalyzerResolvers.custom constructor
AnalyzerResolvers.custom({})
Lazily creates and manages a single AnalysisDriverForPackageBuild
,that
can be shared across BuildStep
s.
If no _analysisOptions
is provided, then an empty one is used.
If no sdkSummaryGenerator
is provided, a default one is used that only
works for typical pub
packages.
If no _packageConfig
is provided, then one is created from the current
Isolate.packageConfig.
NOTE: The _packageConfig
is not used for path resolution, it is
primarily used to get the language versions. Any other data (including
extra data), may be passed to the analyzer on an as needed basis.
Implementation
factory AnalyzerResolvers.custom({
AnalysisOptions? analysisOptions,
Future<String> Function()? sdkSummaryGenerator,
PackageConfig? packageConfig,
}) =>
AnalyzerResolvers._(
analysisOptions: analysisOptions,
sdkSummaryGenerator: sdkSummaryGenerator,
packageConfig: packageConfig,
// Custom resolvers get their own asset uri resolver, as there should
// always be a 1:1 relationship between them.
uriResolver: BuildAssetUriResolver());