http 初始化

This commit is contained in:
guozhigq
2023-04-18 11:28:59 +08:00
parent aaccfe4542
commit 13aab2e20f
11 changed files with 385 additions and 1 deletions

16
lib/utils/utils.dart Normal file
View File

@ -0,0 +1,16 @@
// 工具函数
import 'dart:io';
import 'package:path_provider/path_provider.dart';
class Utils {
static Future<String> getCookiePath() async {
Directory tempDir = await getApplicationSupportDirectory();
String tempPath = "${tempDir.path}/.plpl/";
Directory dir = Directory(tempPath);
bool b = await dir.exists();
if (!b) {
dir.createSync(recursive: true);
}
return tempPath;
}
}