ashutosh1211 / shared_preferences_desktop

Flutter plugin for desktop implementation of shared preferences for Windows and Linux
Apache License 2.0
6 stars 0 forks source link

sample #1

Open kitesoft opened 4 years ago

kitesoft commented 4 years ago

hi thank you for greate job can you provide a sample or dependencies configuration? thanks in advance

ashutosh1211 commented 4 years ago

I have tested this with the testbed application that comes with the source code of flutter-desktop-embedding.

Steps to use this Plugin:

  1. Clone the repo: https://github.com/google/flutter-desktop-embedding

  2. Copy the windows fde plugin code to this dir. ../flutter-desktop-embedding/plugins/flutter_plugins/

  3. Use this plugin in testbed application: ... shared_preferences: ^0.5.6+3 shared_preferences_fde: path: ../plugins/flutter_plugins/shared_preferences_fde ...

You are good to go. :)

atfa commented 4 years ago

When I build the app: flutter build windows I got this error when I exec: C:\Users\username\projects\projectname\windows\Flutter\ephemeral\.plugin_symlinks\shared_preferences_fde\windows\shared_preferences_plugin.cpp(254,7): . warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc

But it is ok when I just run it. flutter run -d windows

ashutosh1211 commented 4 years ago

Yeah, Please check you have latest code from flutter-desktop-embedding. Or you can set <TreatWarningAsError>false</TreatWarningAsError> in Runner.vcxproj file.

atfa commented 4 years ago

Yeah, Please check you have latest code from flutter-desktop-embedding. Or you can set <TreatWarningAsError>false</TreatWarningAsError> in Runner.vcxproj file.

Thanks. I modified the file flutter-desktop-embedding\plugins\file_chooser\windows\plugin.vcxproj and set <TreatWarningAsError>false</TreatWarningAsError>, Compile is ok.