0

I'm new in flutter and I want to build web application by flutter web,flutter build apk is worked for me, but when I run Flutter build web I have this error.

I followed up every step according to this document and use // @dart=2.9 top of all of my class that has error null check.

do you have any idea about this problem?!

Abbas Asadi
  • 163
  • 1
  • 10

2 Answers2

1

use these command--->

fluttter channel beta
flutter config --enable-web
flutter create .

After create you will found a web folder in you project

restart IDE or Editor if needed. Note: You must have google chrome

flutter devices

there you will be found your chrome then simply run or use command ->

flutter run -d chrome
Rasel Khan
  • 1,290
  • 11
  • 16
0

You must use the channel master for flutter in order to build web version, more details here.

In resume, do:

flutter channel master
flutter upgrade
flutter config --enable-web

After that, just run flutter build web and then, go in root_of_your_app/build/web and run a web server inside like python with python -m http.server 8000 and go to http://localhost:8000 to see your app on any browsers.

Tryliom
  • 805
  • 1
  • 10
  • 36