Skip to content

Commit

Permalink
Use path provider from ohos
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Jan 17, 2025
1 parent b6ad9f9 commit edbda9f
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
3 changes: 2 additions & 1 deletion ohos/entry/oh-package.json5
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"url_launcher_ohos": "file:../har/url_launcher_ohos.har",
"webview_flutter_ohos": "file:../har/webview_flutter_ohos.har",
"package_info_plus": "file:../har/package_info_plus.har",
"flutter_nfc_kit": "file:../har/flutter_nfc_kit.har"
"flutter_nfc_kit": "file:../har/flutter_nfc_kit.har",
"path_provider_ohos": "file:../har/path_provider_ohos.har"
}
}
2 changes: 2 additions & 0 deletions ohos/entry/src/main/ets/plugins/GeneratedPluginRegistrant.ets
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { FlutterEngine, Log } from '@ohos/flutter_ohos';
import FlutterNfcKitPlugin from 'flutter_nfc_kit';
import PackageInfoPlugin from 'package_info_plus';
import PathProviderPlugin from 'path_provider_ohos';
import UrlLauncherPlugin from 'url_launcher_ohos';
import WebViewFlutterPlugin from 'webview_flutter_ohos';

Expand All @@ -18,6 +19,7 @@ export class GeneratedPluginRegistrant {
try {
flutterEngine.getPlugins()?.add(new FlutterNfcKitPlugin());
flutterEngine.getPlugins()?.add(new PackageInfoPlugin());
flutterEngine.getPlugins()?.add(new PathProviderPlugin());
flutterEngine.getPlugins()?.add(new UrlLauncherPlugin());
flutterEngine.getPlugins()?.add(new WebViewFlutterPlugin());
} catch (e) {
Expand Down
3 changes: 2 additions & 1 deletion ohos/oh-package.json5
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"webview_flutter_ohos": "file:./har/webview_flutter_ohos.har",
"package_info_plus": "file:./har/package_info_plus.har",
"flutter_nfc_kit": "file:./har/flutter_nfc_kit.har",
"@ohos/flutter_module": "file:./entry"
"@ohos/flutter_module": "file:./entry",
"path_provider_ohos": "file:./har/path_provider_ohos.har"
}
}
20 changes: 15 additions & 5 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -472,11 +472,12 @@ packages:
path_provider:
dependency: "direct main"
description:
name: path_provider
sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa
url: "https://pub.dev"
source: hosted
version: "2.1.1"
path: "packages/path_provider/path_provider"
ref: HEAD
resolved-ref: "703a0783921a8db9ba299aa0d9a67f1abd46a873"
url: "https://gitee.com/openharmony-sig/flutter_packages.git"
source: git
version: "2.1.0"
path_provider_android:
dependency: transitive
description:
Expand All @@ -501,6 +502,15 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.1"
path_provider_ohos:
dependency: transitive
description:
path: "packages/path_provider/path_provider_ohos"
ref: HEAD
resolved-ref: "703a0783921a8db9ba299aa0d9a67f1abd46a873"
url: "https://gitee.com/openharmony-sig/flutter_packages.git"
source: git
version: "2.2.1"
path_provider_platform_interface:
dependency: transitive
description:
Expand Down
5 changes: 4 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ dependencies:
cupertino_icons: ^1.0.0
drift: ^2.0.0
sqlite3_flutter_libs: <=0.5.26
path_provider: ^2.0.0
path_provider:
git:
path: packages/path_provider/path_provider
url: https://gitee.com/openharmony-sig/flutter_packages.git
path: ^1.8.0
intl: ^0.17.0
url_launcher:
Expand Down

0 comments on commit edbda9f

Please sign in to comment.