import 'package:path_provider/path_provider.dart';
import 'dart:io';
void createAppFolder() async {
final directory = await getExternalStorageDirectory();
final dirPath = '${directory.path}/some_name' ;
await new Directory(dirPath).create();
}
this whats I tried of course I set up the permission for writing to storage but this code creates a directory on this path /storage/emulated/0/Android/data/com.example.test_app/files/some_name
and whats I need is to be created on this path /storage/emulated/0/some_name
any idea of whats im doing wrong or they are another way to do thats ??
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…