Deploying a Flutter website
Once you build your Flutter app for the web, you can deploy it to any web server. One of your options is using Firebase as your hosting platform.
In this recipe, you will deploy your project as a website to Firebase.
Getting ready
Before following this recipe, you should have completed the first recipe in this chapter, Creating a responsive app leveraging Flutter Web.
How to do it...
In order to deploy your web app to the Firebase hosting platform, please take the following steps:
- Open a Terminal window and move it to your project folder.
- Type the following command:
flutter build web --web-renderer html
- Open your browser and go to the Firebase console at this address: https://console.firebase.google.com/u/0/.
- Create a new Firebase project (you can also use an existing one).
For a refresher on Firebase projects, see the Configuring a Firebase app recipe in Chapter 13, Using Firebase...