From 807c89734f290e43a1244778df7cefb4b1df216d Mon Sep 17 00:00:00 2001 From: X Code Date: Thu, 15 Sep 2022 20:32:28 -0700 Subject: [PATCH] Update _onImagePaste --- example/lib/pages/home_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/lib/pages/home_page.dart b/example/lib/pages/home_page.dart index ec6523bf..a2a9660a 100644 --- a/example/lib/pages/home_page.dart +++ b/example/lib/pages/home_page.dart @@ -357,7 +357,7 @@ class _HomePageState extends State { final appDocDir = await getApplicationDocumentsDirectory(); final file = await File( '${appDocDir.path}/${basename('${DateTime.now().millisecondsSinceEpoch}.png')}') - .writeAsBytes(imageBytes); + .writeAsBytes(imageBytes, flush: true); return file.path.toString(); }