resolveUnitOrLibraryAt method Null safety

Future<AnalysisResult> resolveUnitOrLibraryAt(
  1. Uri uri
)

Implementation

Future<AnalysisResult> resolveUnitOrLibraryAt(Uri uri) async {
  if (FileSystemEntity.isFileSync(
    uri.toFilePath(windows: Platform.isWindows),
  )) {
    return resolveUnitAt(uri);
  } else {
    return resolveLibraryAt(uri);
  }
}