loadBytes method

Uint8List loadBytes(
  1. String path
)

loads an asset as a byte buffer.

Implementation

Uint8List loadBytes(String path) {
  final resolvedUri = waitForEx<Uri?>(
      Isolate.resolvePackageUri(Uri.file('lib/src/assets/templates')))!;

  print('resolved: ${resolvedUri.toFilePath()}');

  return File(_resolveAssetPath(path)).readAsBytesSync();
}