Skip to content

Commit

Permalink
dart: remove depedency of path_provider
Browse files Browse the repository at this point in the history
  • Loading branch information
dna2github committed Jan 30, 2024
1 parent 02018f3 commit 1fc22b8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 97 deletions.
7 changes: 3 additions & 4 deletions lib/util/fs.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:async';

import 'package:path_provider/path_provider.dart';
import 'package:archive/archive.dart';
import 'package:nodebase/util/api.dart';
import 'package:path/path.dart' as path;
import 'dart:io';
import 'dart:developer';
Expand All @@ -12,10 +12,9 @@ import 'dart:developer';
var _appPath_ = "";
Future<String> get _appPath async {
if (_appPath_ != "") return _appPath_;
var directory = await getApplicationDocumentsDirectory();
_appPath_ = directory.path;
_appPath_ = await NodeBaseApi.apiUtilGetWorkspacePath();
log("NodeBase [I] app path: $_appPath_");
return directory.path;
return _appPath_;
}

Future<File> fsGetAppFileReference(filepath) async {
Expand Down
2 changes: 0 additions & 2 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import FlutterMacOS
import Foundation

import path_provider_foundation

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
}
91 changes: 1 addition & 90 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ packages:
source: hosted
version: "3.1.1"
crypto:
dependency: transitive
dependency: "direct main"
description:
name: crypto
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
Expand All @@ -81,14 +81,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
flutter:
dependency: "direct main"
description: flutter
Expand Down Expand Up @@ -168,70 +160,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.3"
path_provider:
dependency: "direct main"
description:
name: path_provider
sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.2"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.2"
path_provider_foundation:
dependency: transitive
description:
name: path_provider_foundation
sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.3.2"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.1"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.2"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.1"
platform:
dependency: transitive
description:
name: platform
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.4"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.8"
pointycastle:
dependency: transitive
description:
Expand Down Expand Up @@ -317,22 +245,5 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.0"
win32:
dependency: transitive
description:
name: win32
sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
url: "https://pub.flutter-io.cn"
source: hosted
version: "5.2.0"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.4"
sdks:
dart: ">=3.2.4 <4.0.0"
flutter: ">=3.10.0"
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
path: ^1.8.3
path_provider: ^2.1.2
archive: ^3.4.10
flutter_localizations:
sdk: flutter
intl: any
crypto: ^3.0.3

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 1fc22b8

Please sign in to comment.