title: How to solve Flutter error while trying to write in a file: "OS Error: Operation not permitted, errno = 1"?
body: <p>I am trying to write in a .txt file in my flutter program. I am using Permission_handler package and when I run the code (using <strong>mi 10</strong>) the app ask for permission to access to media and file and I hit allow, and the Debug console says <strong>&quot;I/flutter (15890): PermissionStatus.granted&quot;</strong> (I mean i did all the part about updating the AndroidManifest.xml or modification on &quot;gradle.properties&quot; , etc.). But when it comes to writing in the file, it throws this error:</p>
  <pre><code>E/flutter (15890): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: FileSystemException: Cannot open file, path = '/storage/emulated/0/Download/X.txt' (OS Error: Operation not permitted, errno = 1)
  </code></pre>
  <p>I really appreciate any thought on this.</p>