blob: e5a0f5099206034e1f516e7f78104ab4a7f19aa2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import 'dart:io' show Directory, Platform;
import 'package:path_provider/path_provider.dart';
const String defaultLinuxDirectory = '.';
Future<String> defaultLogDirectory() async {
if (Platform.isAndroid) {
final dir = await getExternalStorageDirectory();
if (dir != null) return dir.path;
return (await getApplicationDocumentsDirectory()).path;
}
return Directory.current.path;
}
|