dwyl / learn-flutter

🦋 Learn how to use Flutter to Build Cross-platform Native Mobile Apps
https://flutter.dev
GNU General Public License v2.0
73 stars 8 forks source link

Flutter No devices available #14

Open nelsonic opened 4 years ago

nelsonic commented 4 years ago

While attempting to build a Flutter Web Application #9 on my Mac #13 I was unable to get the Google Chrome browser to be recognised as a device in Flutter ...

After a bit of googling I found: [Web] 'flutter devices' does not list chrome https://github.com/flutter/flutter/issues/40232 where @chenfei-io (Son Goku ;-) recommends the following steps: https://github.com/flutter/flutter/issues/40232#issuecomment-530324689

 flutter channel master
 flutter upgrade
 flutter config --enable-web
 cd <into project directory>
 flutter create .
 flutter run -d chrome

https://flutter.dev/docs/get-started/web

Another 200Mb ... 🙄 (this framework is really not for people who are bandwidth constrained!!) image

"learn-flutter" is not a valid Dart package name.

See https://dart.dev/tools/pub/pubspec#name for more information.

https://dart.dev/tools/pub/pubspec#name Fix: replace hyphens for underscores.

image

Now when I execute the command flutter run -d chrome I see: image

Screenshot 2020-01-11 at 14 57 04

Now when I run flutter devices I see:

3 connected devices:

Pixel 3    • 89HX09YMG  • android-arm64  • Android 10 (API 29)
Chrome     • chrome     • web-javascript • Google Chrome 79.0.3945.117
Web Server • web-server • web-javascript • Flutter Tools

🚀