I have a flutter app, works well on mobile, am trying to have the same app on web. am using moor to sync and store data locally incase there is no internet and when internet is back it syncs with the server. Now when I try to run the same app on the web, moor is complaining
Error: MissingPluginException(No implementation found for method getDatabasesPath on channel com.tekartik.sqflite)
the plugin says it supports web, from here. Am not finding much information on how to resolve this, how can I configure moor to run on the web without that error?
The plugin moor you are using is built on top of sqlite, which itself is not supported on web, and at bottom of moor plugin page also it's mentioned that web support is experimental now.
Sqlite plugin doesn't has support for web yet, but it does support android, ios and Macos. I would suggest anyone facing this problem to use other databases or cloud based databases instead of sqlite if you are using flutter web. Hope the plugin gets supported on web also.
Update:
You can try this example to use sqlite on web, it might work.
Got the same error when first run the web app.
If you follow clean architecture you can easily provide the right "database" instance.
This is what I did:
Create a local data store interface
Check if web using kIsWeb
If kIsWeb it true I return an in memory cache otherwise I just return the mobile app database that you already implemented for you Android and iOS apps
Related
Good morning! I have a problem with the web flutter, when I run the application on a mobile it works well, but when it comes to the web it does not work, the problem is on the server side when I call a feature at the server level. Here is the land:
MissingPlugingException(No implementation found for method check on channel plugins.
flutter.io/connectivity)
connectivity plugin does not support web, use connectivity_plus instead.
Is there any way to use the firebase realtime db emulator with flutter web? I know is not yet available in FlutterFire but there might be some workaround.
As you've noticed the FlutterFire plugin for Firebase's Realtime Database does not currently support web clients.
I don't know of a workaround for that plugin, but typically use package:firebase/firebase.dart myself when accessing Realtime Database from Flutter Web. I'm not sure if that supports connecting to the emulator yet, but if not, it's probably worth filing a feature request on the repo or (even better) a PR for it.
I have searched but in vain for an answer to the question: Using sqflite and Flutter is it possible to create a central database which can be accessed by several different Flutter apps? Any suggestion appreciated!
In the case of Android, it is possible with a configuration in the manifest.
Share SQLite database between 2 android apps?
But in iOS, every app runs in a sandbox. Then, the same code won't run in both platforms.
In iOS, Using app group, and you can access shared space with
-[NSFileManagre containerURLForSecurityApplicationGroupIdentifier:] (ref)
you can put your sqflite in that path.
I have an existing flutter mobile application, which I want to convert into flutter web application. I used SQFlite as a local storage DB in mobile app, how can I use that for web application?
As far as i know, the web does not support sqlite in any acceptable ways (yes there are in memory solution but no
persistency, see https://github.com/tekartik/sqflite/issues/212).
Since there is no decent solution on the web, as of today, support is not planned.
IndexedDB or any solution on top of it should be considered for storage on the Web.
I am using firebase plugin to authentication with email and password in flutter web. I am done with this one.
Now I want to authenticate flutter web with phone_auth. I am using the same plugin and in this plugin, a future method which is called signInWithPhoneNumber(String phoneNumer, ApplicationVarifier verifier). I follow the rule on the firebase for application verifier. There, I learn about ReCaptchaVarifier which verifies the user with reCaptcha technique. But there is no way to integrate reCaptcha in flutter web.
If you solved my problem then it will be great opportunity for me to getting my job. Thanks I am waiting for your response
Flutter for Web is currently in development, therefore firebase support isn't yet ready... It may come in the near future. Good luck with your project!
As at now Flutter Web is not yet ready for Production and it does not support these yet.
You should consider using other dart frameworks.
And No, you can not write HTML code for flutter web.