getApplicationAssets method
dynamic
getApplicationAssets(
- String soundPath,
- String createPath
)
Implementation
getApplicationAssets(
String soundPath,
String createPath,
) async {
final byteData = await rootBundle.load('assets/$createPath');
Uint8List byteList = Uint8List.fromList(_byteUint8List(byteData));
final file =
File('${(await getApplicationDocumentsDirectory()).path}/$soundPath');
await file.writeAsBytes(byteList.buffer
.asUint8List(byteList.offsetInBytes, byteList.lengthInBytes));
return createPath;
}