copyAssetToLocalStorageWithProgress method
Copies the asset assetName to targetName, emitting copy progress
as integers from 0 to 100.
Implementation
@override
Stream<int> copyAssetToLocalStorageWithProgress(
String assetName, String targetName) {
_getLocalFilePath(targetName).then(
(targetPath) =>
methodChannel.invokeMethod('copyAssetToLocalWithProgress', {
'assetName': 'assets/$assetName',
'targetPath': targetPath,
}),
);
return progressChannel
.receiveBroadcastStream()
.map((event) => event as int);
}