loadResource function
Load resource files from lib/res folder.
Implementation
Future<_GradleResource> loadResource({
required Uri uri,
required String filename,
required String targetRelativeToRoot,
}) =>
Isolate.resolvePackageUri(uri).then((pathToSource) {
return _GradleResource(
pathToSource: Platform.isWindows
? pathToSource!.path.replaceFirst("/", "")
: pathToSource!.path,
filename: filename,
targetRelativeToRoot: targetRelativeToRoot,
);
});