copyAssetToLocalStorageWithProgress method

  1. @override
Stream<int> copyAssetToLocalStorageWithProgress(
  1. String assetName,
  2. String targetName
)
override

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);
}