getFileFromBase64 method
this function convert base64 to file with 3 inputs base64 string , name for comming file, and extension
Implementation
Future<File?> getFileFromBase64(
{required String base64string,
required String name,
required String extension}) async {
final decodedBytes = base64Decode(base64string);
Directory tempdirectory = await pp.getTemporaryDirectory();
File file = File("${tempdirectory.path}/${name}.${extension}");
file.writeAsBytes(decodedBytes);
return file;
}