potions / gun_dart

A Dart wrapper around the Gun JS library.
Other
2 stars 0 forks source link

Use on android and Ios #1

Open VittorioParagallo opened 1 year ago

VittorioParagallo commented 1 year ago

I write here because i couldn't add a pull request. Did you consider the possibility to use flutter_js, js_shims,jsparser or inject_js instead of js to have portability on all platforms? ...anyways, congratulations, great job!

LouisDISPA commented 1 year ago

Hi, Yes we looked to use a webview to execute the javascript on other platform especially flutter_js but we didn't go further because of time constraint. One big issue is that Gun need a storage solution and by default it uses the local_storage (if i remember correctly). I think the webview does not have local storage.

A solution would be to use a custom storage, on the Gun documentation they have an example with react-native using react-native's async storage which use a native storage on each platforms. Maybe flutter's localstorage can be used like the react-native example use async storage.

Thank you very much ! Sadly the student project is finished so don't expect new work on this repository apart from external contribution. Don't hesitate to open a pr if you want this support.