fetchPubspecContent method

  1. @override
Future<String> fetchPubspecContent(
  1. Uri uri
)
override

Fetches the content of a file.yaml file given its URI.

Implementation

@override
Future<String> fetchPubspecContent(Uri uri) async {
  final file = File(uri.toFilePath());
  if (!file.existsSync()) {
    throw FileSystemException('File does not exist', uri.toFilePath());
  }
  return file.readAsString();
}