resolvePackageLocation function

Future<String> resolvePackageLocation(
  1. String path
)

get the file system location of the given path in package

Implementation

Future<String> resolvePackageLocation(String path) async {
  final uri = Uri.parse('package:dartbook/$path');
  final pkgUri = await Isolate.resolvePackageUri(uri);
  return pkgUri?.toFilePath() ?? '';
}