0

I am building a web app using Flutter and Firebase. If I make a change and save it, Chrome will perform a hot restart (opposed to a hot reload). I could build it to Windows instead, so I could take advantage of the hot reload, but Firebase is not supported on Windows apps.

How can I use both Firebase and Hot Reload for my Flutter web app?

1

3 Answers 3

1

Flutter for Web does not support hot reload.

From the Flutter documentation on building for web:

Hot reload is not supported in a web browser. Currently, Flutter only supports hot restart, which restarts your app without refreshing the web page.

So regardless of Firebase, Flutter doesn't support hot-reload for web apps.

Sign up to request clarification or add additional context in comments.

Comments

0

As of Flutter 3.31 (beta channel) Flutter experimentally supports hot reload on web as well with a flag on run:

flutter run -d chrome --web-experimental-hot-reload

Comments

0

EDIT:

With the release of Flutter 3.35, Hot Reload is now available on the web without requiring an experimental flag. For more information, check out the official Hot Reload documentation. To enjoy this feature, upgrade to the latest version of Flutter using the command

flutter upgrade

or manage your versions with FVM.

original answer

Flutter just released a new stable version 3.32.0 in which hot reload is released as an experimental feature for web. Here is how to use it upgrade you flutter version to 3.32.0 by running the command

flutter upgrade

OR if you are using fvm

fvm install 3.32.0
fvm use 3.32.0

and run your project with --web-experimental-hot-reload flag like this:

flutter run -d chrome --web-experimental-hot-reload

When hot reload is enabled, you can reload your application by pressing “r” in the running terminal, or “R” to hot restart.

checkout the full What’s new in Flutter 3.32 blog

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.