My Flutter app has successfully been deployed via Firebase. I can access to any laptop browsers
On Mobile Browsers, it is failing and not able to see any error messages.
What could be root cause of a flutter web not functioning on Mobiles web browser?
Related
I am developing a chat bot app in which i have used google dialog flow platform and integrated it to my flutter project, it is working and responding normally when running it on desktop but when i m creating it apk file and running it on mobile device then bot is not responding any question.
as I am getting responses here while running on desktop but it is not answering and question when running its apk file on mobile
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).
I have created a mobile application for my business using Flutter and it is published in PlayStore which is working fine.
Later I have converted the application to web-friendly and built it using Flutter Web and hosted it using Firebase Hosting. You can see the website here: https://youmenotes.com/immadekada/bambusa/#/
Now the problem which I am trying to resolve is, the website is loading as per expectation in desktop browsers, but if I try to open this URL using mobile phone browsers, it is stuck in a white screen. No clue on how to resolve it.
Please give me some light on the issue if anyone faced the same.
Thanks!
Note: I have another Flutter Web app (a demo app) that is hosted using the same way, and it is working perfectly alright on both PC and mobile browsers. The URL is this: https://youmenotes.com/immadekada/bambusa/game1/#/
This was happened to me-
step 1: check if it is running fine on local
for that run following command
flutter run -d web-server --web-port 8080 --web-hostname 0.0.0.0
and check form your mobile which is same network as your pc by
entering url <pc's ip address:8080/>
step 2: build web with canvaskit render which is more suitable for mobile brower,
command: flutter build web --web-renderer canvaskit --release and
release it.
Thanks, for spending your time to find a solution for the issue. Here I have found the solution.
It was a simple coding issue that caused the incorrect behavior in mobile browsers!
There were some mobile-only features in my application and which I handled using the following method:
bool isMobile() {
if (defaultTargetPlatform == TargetPlatform.iOS ||
defaultTargetPlatform == TargetPlatform.android) {
return true;
} else {
return false;
}
}
So it was working as expected when running from mobile as a mobile application, and running in a computer as a web application. But when it comes to running it from a Mobile device as a web application, the method returns true since the platform is Android/iOS. And that caused my business logic to misbehave.
I updated the if condition with a proper checking for the web by adding kIsWeb, and the method started to return values properly.
Now the URL is loading correctly in both web and mobile browsers.
https://youmenotes.com/immadekada/bambusa/#/
Thanks, for your time.
Update:
How did I identify the issue?
Using Remote Debugging on mobile devices.
You can navigate to this page on chrome by using the URL chrome://inspect/#devices
Thanks,
Midhun.
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.
Is it possible to build a http server in flutter mobile app but like Android service, a background process to work constantly?
I found a solution to add a http server to flutter app 1 but it is not as a background process.