Skip to content

Commit 1fc22b8

Browse files
committed
dart: remove depedency of path_provider
1 parent 02018f3 commit 1fc22b8

File tree

4 files changed

+5
-97
lines changed

4 files changed

+5
-97
lines changed

lib/util/fs.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'dart:async';
22

3-
import 'package:path_provider/path_provider.dart';
43
import 'package:archive/archive.dart';
4+
import 'package:nodebase/util/api.dart';
55
import 'package:path/path.dart' as path;
66
import 'dart:io';
77
import 'dart:developer';
@@ -12,10 +12,9 @@ import 'dart:developer';
1212
var _appPath_ = "";
1313
Future<String> get _appPath async {
1414
if (_appPath_ != "") return _appPath_;
15-
var directory = await getApplicationDocumentsDirectory();
16-
_appPath_ = directory.path;
15+
_appPath_ = await NodeBaseApi.apiUtilGetWorkspacePath();
1716
log("NodeBase [I] app path: $_appPath_");
18-
return directory.path;
17+
return _appPath_;
1918
}
2019

2120
Future<File> fsGetAppFileReference(filepath) async {

macos/Flutter/GeneratedPluginRegistrant.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import FlutterMacOS
66
import Foundation
77

8-
import path_provider_foundation
98

109
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
11-
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
1210
}

pubspec.lock

Lines changed: 1 addition & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ packages:
5858
source: hosted
5959
version: "3.1.1"
6060
crypto:
61-
dependency: transitive
61+
dependency: "direct main"
6262
description:
6363
name: crypto
6464
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
@@ -81,14 +81,6 @@ packages:
8181
url: "https://pub.flutter-io.cn"
8282
source: hosted
8383
version: "1.3.1"
84-
ffi:
85-
dependency: transitive
86-
description:
87-
name: ffi
88-
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
89-
url: "https://pub.flutter-io.cn"
90-
source: hosted
91-
version: "2.1.0"
9284
flutter:
9385
dependency: "direct main"
9486
description: flutter
@@ -168,70 +160,6 @@ packages:
168160
url: "https://pub.flutter-io.cn"
169161
source: hosted
170162
version: "1.8.3"
171-
path_provider:
172-
dependency: "direct main"
173-
description:
174-
name: path_provider
175-
sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
176-
url: "https://pub.flutter-io.cn"
177-
source: hosted
178-
version: "2.1.2"
179-
path_provider_android:
180-
dependency: transitive
181-
description:
182-
name: path_provider_android
183-
sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
184-
url: "https://pub.flutter-io.cn"
185-
source: hosted
186-
version: "2.2.2"
187-
path_provider_foundation:
188-
dependency: transitive
189-
description:
190-
name: path_provider_foundation
191-
sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f"
192-
url: "https://pub.flutter-io.cn"
193-
source: hosted
194-
version: "2.3.2"
195-
path_provider_linux:
196-
dependency: transitive
197-
description:
198-
name: path_provider_linux
199-
sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
200-
url: "https://pub.flutter-io.cn"
201-
source: hosted
202-
version: "2.2.1"
203-
path_provider_platform_interface:
204-
dependency: transitive
205-
description:
206-
name: path_provider_platform_interface
207-
sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
208-
url: "https://pub.flutter-io.cn"
209-
source: hosted
210-
version: "2.1.2"
211-
path_provider_windows:
212-
dependency: transitive
213-
description:
214-
name: path_provider_windows
215-
sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
216-
url: "https://pub.flutter-io.cn"
217-
source: hosted
218-
version: "2.2.1"
219-
platform:
220-
dependency: transitive
221-
description:
222-
name: platform
223-
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
224-
url: "https://pub.flutter-io.cn"
225-
source: hosted
226-
version: "3.1.4"
227-
plugin_platform_interface:
228-
dependency: transitive
229-
description:
230-
name: plugin_platform_interface
231-
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
232-
url: "https://pub.flutter-io.cn"
233-
source: hosted
234-
version: "2.1.8"
235163
pointycastle:
236164
dependency: transitive
237165
description:
@@ -317,22 +245,5 @@ packages:
317245
url: "https://pub.flutter-io.cn"
318246
source: hosted
319247
version: "0.3.0"
320-
win32:
321-
dependency: transitive
322-
description:
323-
name: win32
324-
sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
325-
url: "https://pub.flutter-io.cn"
326-
source: hosted
327-
version: "5.2.0"
328-
xdg_directories:
329-
dependency: transitive
330-
description:
331-
name: xdg_directories
332-
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
333-
url: "https://pub.flutter-io.cn"
334-
source: hosted
335-
version: "1.0.4"
336248
sdks:
337249
dart: ">=3.2.4 <4.0.0"
338-
flutter: ">=3.10.0"

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ dependencies:
3636
# Use with the CupertinoIcons class for iOS style icons.
3737
cupertino_icons: ^1.0.2
3838
path: ^1.8.3
39-
path_provider: ^2.1.2
4039
archive: ^3.4.10
4140
flutter_localizations:
4241
sdk: flutter
4342
intl: any
43+
crypto: ^3.0.3
4444

4545
dev_dependencies:
4646
flutter_test:

0 commit comments

Comments
 (0)