Skip to content

Instantly share code, notes, and snippets.

@Frankdroid7
Last active December 13, 2022 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Frankdroid7/f61aec3b74c651f722c69e82e17bb896 to your computer and use it in GitHub Desktop.
Save Frankdroid7/f61aec3b74c651f722c69e82e17bb896 to your computer and use it in GitHub Desktop.
Future storePdfBytesToFile(Uint8List bytes) async {
const filename = 'VueJs CheatSheet';
final dir = await getApplicationDocumentsDirectory();
final file = File('${dir.path}/$filename.pdf');
await file.writeAsBytes(bytes);
setState(() {
pdfPath = file.path;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment