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

preview_player
Показать описание
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

to deploy to firebase

firebase init
select your project

firebase deploy
Рекомендации по теме
Комментарии
Автор

Hello thanks for the video.
But i had a error when uploading its always stuck at 6/35
with this prompt:
⠧ hosting: uploading new files [6/35] (17%)
Error: Task failed: retries exhausted after 6 attempts, with error: TypeError: Converting circular structure to JSON
--> starting at object with constructor 'TLSSocket'
| property 'parser' -> object with constructor 'HTTPParser'
--- property 'socket' closes the circle
⠋ hosting: uploading new files [7/35] (20%)
HELP

nix_malone
Автор

Hi, i have a web app on flutter and hosted on firebase. When i open it the link given by firebase, i don't have the icon of my google sign in and some of the background images but i still have the logos which are in the same folder. Do you have any idea what could be the issue?

dongivafoc