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
40
votes
6 answers

"Browser or app may not be secure. Try using a different browser." error with Flutter Firebase Google Login

I am using flutter web and firebase authentication to build a web app. For that 1. Created Firebase app with Google signin as one of the sign in methods. 2. Added the dependencies as given in…
vzurd
  • 1,416
  • 2
  • 15
  • 37
38
votes
1 answer

How can I disable web support in Flutter?

I recently ran this command to try web support out in Flutter: flutter config --enable-web Now, every project I make has a web folder and inside is an index.html. Is there any way I can disable that for future projects and is it safe for me to just…
Benjamin
  • 5,783
  • 4
  • 25
  • 49
37
votes
6 answers

"$ flutter build web" is throwing the error "Missing index.html"?

When I run: $ flutter build web I'm getting the error Missing index.html. The flutter app is displaying in the browser, but in VS Code it reads "No Device." How can I debug, or fix this problem?
36
votes
10 answers

Flutter TextButton splashColor property

I was using FlatButton and passed the properties FlatButton( splashColor: Colors.transparent, highlightColor: Colors.transparent, child: ..., ) The documentation says that FlatButton will become obsolete, and to use TextButton…
user3808307
  • 2,270
  • 9
  • 45
  • 99
35
votes
11 answers

Flutter Web Firebase TypeError: dart.global.firebase.firestore is not a function

I'm trying to use Firebase in my flutter web project. But app can't be run with this message. TypeError: dart.global.firebase.firestore is not a function at Object.firestore$ [as firestore] My index.html looks like this.
Daibaku
  • 11,416
  • 22
  • 71
  • 108
35
votes
4 answers

How to build flutter web app in debug mode?

flutter build web will build my flutter app with obfuscation and minification. I want my error stack to be readable though. How should I modify the command?
polina-c
  • 6,245
  • 5
  • 25
  • 36
34
votes
6 answers

How to save to web local storage in flutter web

I have a web site built with flutter for web and currently, am trying to save to web local storage or cookie but can't seem to find any plugin or way to archive that.
ikben
  • 4,246
  • 4
  • 21
  • 27
33
votes
20 answers

Finished with error: Failed to establish connection with the application instance in Chrome

Finished with error: Failed to establish connection with the application instance in Chrome. This can happen if the websocket connection used by the web tooling is unabled to correctly establish a connection, for example due to a firewall. I…
Umair
  • 1,759
  • 6
  • 23
  • 44
32
votes
2 answers

How to apply flex in flutter

I am a beginner in a flutter, and I have learned how to handle the sizing and text rendering when the screen sizing changes from desktop to tablet to mobile. But I want to understand how can I change the sizing or flex the content when I am…
Unbreakable
  • 7,776
  • 24
  • 90
  • 171
32
votes
5 answers

How can you set title and icon for a flutter web app?

What I'm trying to do is build a flutter web app that, when displayed in the browser, the tab shows an icon and a title (as currently it only shows the world icon and the localhost... title). Actual Result : Desired Result : Edit: I can now add…
32
votes
8 answers

Flutter web create issue in existing flutter app

I already have the flutter app, now I am adding support to flutter Web following this doc. I am getting the error on flutter create . Ambiguous organization in existing files: {com.app.android.fluttermodule,com.app.android.flutterModule}. The --org…
Rahul Devanavar
  • 3,917
  • 4
  • 32
  • 61
31
votes
2 answers

Avoid using web-only libraries outside Flutter web plugin packages

I'm building a Flutter app that I am trying to make work on the web. Part of it contains some web specific code: import 'dart:html' as html; import 'package:flutter/foundation.dart'; class DownloadViewModel extends ChangeNotifier { static const…
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
31
votes
10 answers

XMLHttpRequest error in flutter web [Enabling CORS AWS API gateway]

Note: It turns out that this had nothing to do with flutter and everything to do with the fact that I had set the API gateway to a Lambda Proxy I am trying to hit an API endpoint from a Flutter web application, every time it errors out and gives me…
DrkStr
  • 1,752
  • 5
  • 38
  • 90
31
votes
5 answers

How to get current URL in Flutter Web App

How can I get the current URL in a Flutter Web App on which the user of the web app currently is? For example: app1.website.com app2.website.com According to the result of the current URL on which the user of the web app currently is, I want to show…
TheUniqueProgrammer
  • 605
  • 2
  • 6
  • 13
30
votes
3 answers

Flutter web website takes a long time to load initially

I am currently creating a flutter web application for a client, however, when the website is navigated to for the first time in the browser, the page loads to a blank screen and a few seconds later shows the actual homepage widgets. After the page…
bobdub
  • 341
  • 1
  • 4
  • 7