Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter SharedPreference plugin does not work in windows desktop app. #692

Closed
lodestar-sr opened this issue Mar 4, 2020 · 1 comment
Closed

Comments

@lodestar-sr
Copy link

@stuartmorgan Hello,
In testbed project, you used shared_preference plugin, but I don't think this plugin works on window desktop app.
While I am running windows flutter app, I got this message in the console.

Syncing files to device Windows...
Restarted application in 1,461ms.
[ERROR:c:\b\s\w\ir\cache\builder\src\flutter\lib\ui\ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences)
#0 Setting.getInstance (package:tiledmedia/data/models/setting.model.dart:21:43)
#1 _ProfilesState.initializeApp (package:tiledmedia/screens/profiles/profiles.dart:37:36)
#2 _ProfilesState.initState (package:tiledmedia/screens/profiles/profiles.dart:26:5)
#3 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4640:58)
#4 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4476:5)
#5 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3446:14)
#6 Element.updateChild (package:flutter/src/widgets/framework.dart:3214:18)
#7 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5804:14)
#8 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3446:14)
#9 Element.updateChild (package:flutter/src/widgets/framework.dart:3214:18)
#10 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4527:16)
#11 Element.rebuild (package:flutter/src/widgets/framework.dart:4218:5)
#12 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4481:5)
#13 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4476:5)
#14 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3446:14)
#15 Element.updateChild (package:flutter/src/widgets/framework.dart:3214:18)
#16 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5804:14)
#17 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3446:14)
#18 Element.updateChild (package:flutter/src/widgets/framework.dart:3214:18)
#19 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5804:14)
...

How can I use shared_preference plugin in windows?
Or what should I use to store data in windows flutter app?

@stuartmorgan
Copy link
Collaborator

In testbed project, you used shared_preference plugin

Only on macOS

Duplicate of #434

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants