Build a Flutter Web App and run the same web app in Flutter Desktop programs - flutter

I am new to flutter programming. I want to create a flutter web app which can be run in web view in a Flutter desktop application for all desktop platforms (Linux, Windows and MacOS). The web-app will be running on the main thread. And desktop specific tasks will be run on an isolate. The web app will be the UI and would mainly be using cloud firestore and mostly be listening to document or collection changes and communicate the changed data back to the isolate.
Is the web-app on a Flutter Desktop application possible to do ? And will I be needing to "hosting" the web page to used in a web_view ?
And will I be able to communicate with the web-app from the isolate with the usual Isolate communications ?

I want to create a flutter web app which can be run in web view in a Flutter desktop application for all desktop platforms
Currently Flutter doesn't have desktop support for platform views, which means you can't have an inline webview. You could use a full-window webview with no Flutter UI, but then it's not clear what value you would get from having the desktop host be a Flutter application.
And will I be able to communicate with the web-app from the isolate with the usual Isolate communications ?
If you are expecting to be able to communicate directly between the isolate of the Flutter desktop host and the Flutter web application, no. You would be subject to all of the standard limitations of using a webview, which means any communication in or out would have to go through JavaScript. The fact that the host app is a Flutter app would be essentially invisible to the web app, and similarly in the other direction, because you would be running two completely unrelated instances of the Flutter engine and Dart VM (one compiled to native code and one compiled to JS).

Related

how to migrate flutter existing app to web

I have designed a mobile application using flutter, I have seen that it is compatible with the web and I would like to know how to migrate my already designed application to the web environment, I know that I must take into account the compatibility with the dependencies that I have used and already reviewed.
At the moment I have carried out the following process, but all it does is create a folder with few elements that when executed, the browser opens with a blank page, the flutter logo and a blue appbar. What procedure am I missing?
flutter config --enable-web
flutter create.
flutter run -d chrome

Running Flutter App on to the Server without having access to internet

I am using Flutter Technology and running projects on Server but whenever i start running Flutter web Applications on to the Server, it doesn't load the Application and stucked there and giving a white screen output.
Is there any Solution how to execute flutter web App on to the Server without accessing internet.

How can I host my flutter web app in my local network?

What I need is to run a web app that can only be accessed from my local network.
I built my web app with flutter by typing:
flutter build web
but now I'm stuck because I don't know which web server should I use. I searched for tutorial but didn't find a solution.

Is there a way to import and run a Flutter app as a dependency of another package?

So, I'm thinking of creating a CLI application that could also be used with UI, developed in Flutter.
The idea is that there would be 3 different packages, one for the business logic, one for the CLI and one for the Flutter app. Is there a way to import the Flutter app as a dependency in my CLI package, so I could open the Flutter app from the CLI? If so, how would I do it?
Seems like you want to use 1 library containing the business logic for 2 different applications: Desktop CLI app and mobile app (android/iOS).
It's very much possible with flutter. By default flutter installs only the android and iOS platform supports but by changing few configurations in installed flutter SDK we can extend the same setup to Web and Desktop apps (Windows, MacOS or linux) as well.
Check this official doc for enabling desktop support
Check this official doc for enabling Web support
You can enable these settings in your existing application only.

Can I create Background Services on Android using Phonegap Build?

I have been developing a phonegap application (HTML/jQuery) for Android devices and packing it in Phonegap Build.
I have a demand of having a background service that keep sending data to our web services every 1 minute. As far as I heard, it's only possible developing the background service in Java and communicating with the UI somehow.
My background is in .NET, so my question is: Is there another way of doing that apart from Java? Any good tutorial?
If not, Can I still keep using PhoneGap Build to pack the UI and the Background Service? Or do I have to have the whole Phonegap SDK installed in my machine?
You can't do it by Phonegap Build!
You have to install the whole set of tools (eclipse, android sdk and cordova), and then develop the service in Java, adding your HTML assets into the project. So that you'll get able to generate the APK containg Background Service and Webapp.