diff --git a/README.md b/README.md index d8192a7..9c1692e 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,12 @@ Please report issues at the [go-flutter issue tracker](https://github.com/go-flu ## From [flutter/plugins](https://github.com/flutter/plugins) +Some plugins like `shared_preferences` have been implemented in pure Dart and don't need any work done on the go-flutter side. +You just need to add `shared_preferences_{linux,macos,windows}` to your dependencies in the `pubspec.yaml`. +(The respective go-flutter plugins have been deprecated and will eventually be removed, because they sometimes interfere with the official implementation and cause confusion). + - [image_picker](image_picker) - Select an image or video from storage. ([pub.dev](https://pub.dev/packages/image_picker)) -- [path_provider](path_provider) - Finding commonly used locations on the filesystem. ([pub.dev](https://pub.dev/packages/path_provider)) - [package_info](package_info) - Provides information about an application package. ([pub.dev](https://pub.dev/packages/package_info)) -- [shared_preferences](shared_preferences) - Provides a persistent store for simple data. ([pub.dev](https://pub.dev/packages/shared_preferences)) - [url_launcher](url_launcher) - Flutter plugin for launching a URL. ([pub.dev](https://pub.dev/packages/url_launcher)) - [video_player](video_player) - Flutter plugin for playing back video on a Widget surface. ([pub.dev](https://pub.dev/packages/video_player)) (:warning: work-in-progress, needs rewrite) diff --git a/path_provider/go.sum b/path_provider/go.sum index a467076..78829ff 100644 --- a/path_provider/go.sum +++ b/path_provider/go.sum @@ -32,7 +32,6 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20200802091954-4b90ce9b60b3 h1:qDJKu1y/1SjhWac4BQZjLljqvqiWUhjmDMnonmVGDAU= golang.org/x/sys v0.0.0-20200802091954-4b90ce9b60b3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= diff --git a/path_provider/plugin.go b/path_provider/plugin.go index 72f2e02..dd54774 100644 --- a/path_provider/plugin.go +++ b/path_provider/plugin.go @@ -1,6 +1,7 @@ package path_provider import ( + "fmt" "path/filepath" "github.com/adrg/xdg" @@ -29,6 +30,7 @@ var _ flutter.Plugin = &PathProviderPlugin{} // compile-time type check // InitPlugin initializes the path provider plugin. func (p *PathProviderPlugin) InitPlugin(messenger plugin.BinaryMessenger) error { + fmt.Println("The go-flutter 'path_provider' plugin has been deprecated in favor of the official pure Dart implementation. Please see https://github.com/go-flutter-desktop/plugins for more information") if p.VendorName == "" { // returned immediately because this is likely a programming error return errors.New("PathProviderPlugin.VendorName must be set") diff --git a/shared_preferences/plugin.go b/shared_preferences/plugin.go index 0f4ce01..3cb0873 100644 --- a/shared_preferences/plugin.go +++ b/shared_preferences/plugin.go @@ -1,6 +1,7 @@ package shared_preferences import ( + "fmt" "os" "path/filepath" @@ -34,6 +35,7 @@ var _ flutter.Plugin = &SharedPreferencesPlugin{} // compile-time type check // InitPlugin initializes the shared preferences plugin. func (p *SharedPreferencesPlugin) InitPlugin(messenger plugin.BinaryMessenger) error { + fmt.Println("The go-flutter 'shared_preferences' plugin has been deprecated in favor of the official pure Dart implementation. Please see https://github.com/go-flutter-desktop/plugins for more information") if p.VendorName == "" { // returned immediately because this is likely a programming error return errors.New("SharedPreferencesPlugin.VendorName must be set")