0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

FlutterからFirebase Hostingでwebにデプロイする方法メモ

Last updated at Posted at 2021-07-26

FlutterからFirebase Hostingでwebにデプロイする方法メモ

Flutter学び始めて3ヶ月、やっと2つほどウェブアプリのデプロイまで到達したので、やり方メモ:

ターミナルで以下のコマンドを入力
firebase login
firebase init
→Hostingを選択
build/web
flutter build web --web-renderer html
cd build/web
firebase deploy
→Project Console、Hosting URLが出ればデプロイ成功

ポイント:
ディレクトリの選択の質問「What do you want to use as your public directory?」で、デフォルトの「public」ではなく「build/web」を入力すること、
build/webにcdしてからfirebase deployをすること、
「flutter build web」では日本語のフォント等が崩れることがあるので「flutter build web --web-renderer html」でビルドすること、
この3つが大事、何度か忘れて時間を溶かしたのでメモ

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?