Flutter taking an unexpectedly long time for connecting to browser
Try with flutter run -d web-server
, then open URL on Chrome manually.
- Remove all unused dependencies
flutter run -d web-server
The answer mentioned by @Giampaolo is a great workaround!
Same issue here. When trying the sample project, it works. I think the problem has something to do with dependencies, but have not figured out in detail.
Update: Could be related: https://github.com/flutter/flutter/issues/40876 and https://github.com/flutter/flutter/issues/39998
Update #2: I could reproduce the issue a described in https://github.com/flutter/flutter/issues/39998
1) Create fresh flutter project with web support -> works.
2) add import 'dart:io';
to main.dart -> blank screen