'Play base64 audio file in iOS devices using flutter

I'm trying to play audio files in a flutter app. I do have base64 audio files which AudioPlayers package can handle in android but is not working in iOS devices. Is there any means i can play base64 audio files in iOS devices using flutter? I have spent hours trying to figure it out but to no avail.



Solution 1:[1]

There is already a answer for this question in Stackoverflow

List<int> fileBytes = await file.readAsBytes();
String base64String = base64Encode(fileBytes);

Kindly refer this link for full info

or you can use this

import 'dart:convert';
import 'dart:io';

class FileConverter {
  static String getBase64FormateFile(String path) {
    File file = File(path);
    print('File is = ' + file.toString());
    List<int> fileInByte = file.readAsBytesSync();
    String fileInBase64 = base64Encode(fileInByte);
    return fileInBase64;
  }
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1