copyAssetToFile method

Future<void> copyAssetToFile(
  1. String assetPath,
  2. String targetPath
)

Copies asset file directly to target path using LargeFileHandler This is the CORRECT way to handle large files

Implementation

Future<void> copyAssetToFile(String assetPath, String targetPath) async {
  try {
    await _handler.copyAssetToLocalStorage(
      assetName: assetPath,
      targetPath: targetPath,
    );
  } catch (e) {
    throw Exception('Failed to copy asset: $assetPath - $e');
  }
}