in my project I can press the save button to copy a file inside flutter in debug mode and every thing works fine (the file copied), but after build and open the release application I can't copy the file with no error message, just the button pressed and nothing happened.
I tried to run the release application as administrator, but it's the same problem.
Widget buildButton() {
final isFormValid = name.isNotEmpty && path.isNotEmpty;
return Padding(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 12),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
onPrimary: Colors.white,
primary: isFormValid ? null : Colors.grey.shade700,
),
onPressed: () async {
addOrUpdatePlan();
File PDF= File('assets/PDF/file.pdf');
File newPDF = await PDF.copy('$path/$name.pdf'); //////The Bug
},
child: Text(
'SAVE',
style: TextStyle(fontSize: 30),
),
),
);
}