Skip to content

Commit 7bac325

Browse files
committed
降级platform_info库,以支持最小sdk版本3.0
1 parent b96e5fd commit 7bac325

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

base/lib/src/storage/config/host.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class DefaultHostProviderV2 extends HostFreezer {
215215
() async => BucketRegionsQuery.create(
216216
bucketHosts: _bucketHosts,
217217
useHttps: _useHttps,
218-
persistentFilePath: platform.js // web端不要持久化到磁盘,内部自动使用内存缓存即可
218+
persistentFilePath: platform.isWeb // web端不要持久化到磁盘,内部自动使用内存缓存即可
219219
? null
220220
: join(
221221
Directory.systemTemp.path,

base/lib/src/storage/task/request_task.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ part 'request_task_controller.dart';
99
part 'request_task_manager.dart';
1010

1111
String _getDefaultUserAgent() {
12-
return platform.js
13-
? 'QiniuDart/v$currentVersion (Web)'
12+
return platform.isWeb
13+
? 'QiniuDart/v$currentVersion (Web;)'
1414
: 'QiniuDart/v$currentVersion (${SysInfo.kernelName} ${SysInfo.kernelVersion} ${SysInfo.kernelArchitecture}; ${SysInfo.operatingSystemName} ${SysInfo.operatingSystemVersion};)';
1515
}
1616

base/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
convert: ^3.1.1
2020
cache_provider: ^1.0.1
2121
singleflight: ^1.0.2
22-
platform_info: ^5.0.0
22+
platform_info: ^4.0.0
2323

2424
dev_dependencies:
2525
test: any

0 commit comments

Comments
 (0)