From 8b459b1170491e116ee04eef76360f83b5e82825 Mon Sep 17 00:00:00 2001 From: poojakhatawate Date: Mon, 20 May 2024 17:16:56 +0530 Subject: [PATCH] File Storage path for ios --- lib/ui_screen/ranking.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ui_screen/ranking.dart b/lib/ui_screen/ranking.dart index 1c9d5ff..9ac4e44 100644 --- a/lib/ui_screen/ranking.dart +++ b/lib/ui_screen/ranking.dart @@ -225,7 +225,12 @@ class _RankingState extends State { ..click(); } else { // final String path = (await getApplicationDocumentsDirectory()).path; - final directory = await getExternalStorageDirectory(); + //final directory = await getExternalStorageDirectory(); + + Directory? directory = Platform.isAndroid + ? await getExternalStorageDirectory() + : await getApplicationDocumentsDirectory(); + final path = directory!.path; print("IamPathh: $path");