Questions tagged [flutter-web]

Questions related to Flutter for web support – currently (as of January 2021) is available on the beta channel. Flutter supports the generation of web content rendered using standards-based web technologies: HTML, CSS and JavaScript. With web support, you can compile existing Flutter code written in Dart into a client experience that can be embedded in the browser and deployed to any web server.

Flutter for web is a code-compatible implementation of Flutter that is rendered using standards-based web technologies: HTML, CSS and JavaScript. With web support, you can compile existing Flutter code written in Dart into a client experience that can be embedded in the browser and deployed to any web server.

4374 questions
29
votes
5 answers

Flutter Web: Cannot scroll with mouse down (drag) (Flutter 2.5+)

[Update] I can confirm this issue happened in flutter above 2.5. Using 2.2.3 is fine. The question becomes why this feature been removed in 2.5 ? And how to enable it in flutter 2.5? [Origin Question] I'm using SingleChildScrollView on flutter web…
Josh Chiu
  • 832
  • 2
  • 7
  • 14
29
votes
2 answers

How to debug flutter web through stack trace?

When I moved from Flutter mobile to web, I noticed that logs printed on the console are not helpful because they do not target to the code in my IDE (Android Studio) On mobile: ======= Exception caught by widgets library…
TSR
  • 17,242
  • 27
  • 93
  • 197
29
votes
8 answers

IN Flutter Web getting 'XMLHttpRequest' error while making HTTP call

I am using XAMPP control panel and using a local server like Apache port no 80, but in flutter web getting XMLHttpRequest error and in mobile device. The same coding fetches data using API not getting any error. How to fetch data using API while app…
Darpit Patel
  • 291
  • 1
  • 3
  • 5
28
votes
5 answers

Flutter web does "hot restart" instead of "hot reload". Is "hot reload" supported on flutter web?

I have used flutter_web for a while now and never really questioned that it always restarted the whole application when pressing "hot reload" but since now flutter_web got merged to the main flutter channel I´m wondering if I might do something…
LP Square
  • 927
  • 1
  • 10
  • 17
27
votes
2 answers

How to access secrets when using flutter web with github actions

I have a flutter web app and for accessing the database I have hardcoded an APIKey in a secrets.dart file, And this works perfectly fine. I have added this file to .gitignore in order to prevent it from pushing it to version control. But when it…
Mahesh Jamdade
  • 17,235
  • 8
  • 110
  • 131
27
votes
8 answers

owner._debugCurrentBuildTarget == this , is not true

[on web] tried to fit some widgets inside a FittedBox like this : FittedBox( fit: BoxFit.scaleDown, child: AnimatedContainer(...) ) but screen and console show only this message : there's nothing else in the console what's the next step…
Leo Ma
  • 1,021
  • 3
  • 14
  • 16
27
votes
13 answers

Flutter web asset images not displaying when deployed to web server

I have created a flutter web project which uses network images and asset images, everything works fine when debugging on my pc but when I deploy it to a web server, the network images work fine but the asset images dont show at all. When I Inspect…
Norbert
  • 6,874
  • 14
  • 40
  • 65
27
votes
8 answers

Flutter web app progress indicator before loading app?

Hi I am a mobile app developer and not much familiar with web development, I was finding any approach to implement Progress Indicator before loading the flutter web app like Gmail loading screen. Flutter web is cool but it takes few moments before…
Shahzad Akram
  • 4,586
  • 6
  • 32
  • 65
26
votes
3 answers

404 Failed to load resource Deploying Flutter Web App to GitHub Pages

I am trying to deploy my Flutter app to GitHub Pages. App runs fine with flutter run -d chrome and builds successfully using flutter build web --release I push the code to my repository: https://github.com/learyjk/superpacecalcweb Deployment…
learyjk
  • 599
  • 1
  • 5
  • 14
26
votes
5 answers

How to save and download text file in Flutter web application

I am new to Flutter and working in a flutter web application, My requirement is to create and download a text file. like below. void getData() { List bytes = utf8.encode('this is the text file'); print(bytes); // Need to download this…
Chinnu
  • 556
  • 1
  • 5
  • 12
26
votes
4 answers

Flutter Web - How to reload currently Active Page

I am using Flutter for developing a website. Everything is working fine with Flutter except when it comes to reloading the page. When I press the refresh button in the browser, the whole web app gets reloaded. For example, if I have navigated to…
Ashfaq
  • 385
  • 1
  • 3
  • 10
26
votes
5 answers

How can I read and Write Files in Flutter Web?

I am working on flutter-web, I would like to do file operations(read and write) in flutter-web. For Android and IOS, I was using path_provider dependency. But in Flutter-web, it is not supported. Can anyone help me with this?
Yogesh
  • 273
  • 1
  • 3
  • 10
25
votes
3 answers

Should Flutter web use Wasm instead of dart2js

I spotted several articles about Wasm being faster then JS [1, 2] I see the topic has been touched in this old (closed) issues [3, 4] and this seemingly abandoned discussion on google groups [5]; the question is: why flutter web doesn't use Wasm…
Francesco Iapicca
  • 2,618
  • 5
  • 40
  • 85
25
votes
9 answers

Can't load Kernel binary: Invalid kernel binary format version. No active package webdev

After running webdev serve it gives "Can't load Kernel binary: Invalid kernel binary format version. No active package webdev." this error tried this and it added some dependencies flutter packages pub global activate webdev
Tushar Anchliya
  • 387
  • 1
  • 3
  • 7
24
votes
3 answers

Flutter Web submit form on enter key

Is there a way to call the submit button when a user hits the enter button when filling out a form. Here is my form code: @override Widget build(BuildContext context) { String _email; return AlertDialog( title: Text('Password…
DRing
  • 6,825
  • 6
  • 29
  • 45