How to Deploy a Flutter Web App to Firebase Hosting | Free Web Hosting



How to Deploy a Flutter Web App to Firebase Hosting | Free Web Hosting

How to Deploy a Flutter Web App to Firebase Hosting | Free Web Hosting

Flutter is an open-source mobile application framework created by Google to build natively compiled apps for mobile, web, and desktop from a single codebase. In order to deploy our Flutter web application, we may use Firebase Hosting.

Firebase Hosting is a static and dynamic web hosting service that enables you to host websites and web applications. It provides fast and secure hosting for your web content, including HTML, CSS, JavaScript, and media files.

In this blog post, we will show you how you can deploy your Flutter web app to Firebase.

Creating Flutter Web App
You need to download Flutter SDK to create your Flutter app. Head over to Flutter’s Installation page and follow the instructions to install the Flutter framework. After you have installed the SDK, you can create your application. Open your terminal and run the following command

flutter create myweb

This command will create a project inside the myweb folder. Navigate to that folder by issuing the below command

cd myweb

We may run and debug our project in a Chrome browser by running the below command.

flutter run -d chrome

to build the web app

flutter build web –release

to run the flutter app locally

python -m http.server

to deploy to firebase

firebase init
select your project

firebase deploy