Deploying your first flutter website on firebase

Deploying your first flutter website on firebase

ยท

2 min read

Requirements - Gmail account, flutter website ready to be deployed

First step - Initialise Firebase

  • Open firebase.google.com image.png
  • Click on get started and then create a new project image.png
  • Fill in your website name and click on continue image.png

This is not a necessary step, if you want you can enable google analytics image.png

  • From the drop down menu select 'Default Account for Firebase', after select on create project it will take a few minutes. image.png

  • Next you will go on to the project overview page, where you can then add firebase to your app. image.png

Next step - Adding Firebase to your website

  • Click on web on the overview page image.png

  • Fill in the details and click on next image.png

  • On the last step, copy the firebase init command image.png

  • Paste the command in your website terminal image.png

  • Use the arrow keys to move up/down and use space bar to select 'Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys' and then press enter image.png

  • Enter on 'Using an existing project' image.png

  • Select the project you just created image.png

  • image.png

Last step - deploying your website

  • In your project terminal type flutter build web this will create a build of the website
  • Next type in firebase deploy after which you will get the link to your website image.png

When you decide to update your website repeat the last step to deploy the changes

ย