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(); }