createDirectory method

Future<Directory> createDirectory({
  1. required String name,
})

Implementation

Future<Directory> createDirectory({required String name}) async {
  final appDir = await getApplicationDocumentsDirectory();
  return Directory('${appDir.path}/$name')..createSync(recursive: true);
}