[英]Editor Opens main.dart on Save
Have a flutter web project being developed using Android Studio and something has changed recently which is now causing Android Studio to open up the file main.dart
in the editor pane whenever a file is saved while the project is running in chrome. Have a flutter web project being developed using Android Studio and something has changed recently which is now causing Android Studio to open up the file main.dart
in the editor pane whenever a file is saved while the project is running in chrome.
Say the project is made up of two dart files: main.dart
and example.dart
and I have only the file example.dart
open in the editor. Say the project is made up of two dart files: main.dart
and example.dart
and I have only the file example.dart
open in the editor. I then click run 'main.dart
which causes the application to launch in chrome browser.然后我单击run 'main.dart
,这会导致应用程序在chrome浏览器中启动。 If I then make a change in example.dart
while the app is running and save the file, the main.dart
file is automatically opened in Android Studio's editor pane and gets the focus.如果我在应用程序运行时更改example.dart
并保存文件,则main.dart
文件会自动在 Android Studio 的编辑器窗格中打开并获得焦点。 This is forcing me to have to switch back to the example.dart
file each time I want to make another change to it.这迫使我每次想要对其进行另一次更改时都必须切换回example.dart
文件。
Not sure if it is Android Studio doing this or flutter itself as part of its hot reload functionality.不确定是 Android Studio 这样做还是 flutter 本身作为其热重载功能的一部分。 Or maybe something I clicked on by mistake making it do this?或者,也许我错误地点击了一些东西让它这样做?
Did a flutter upgrade and the issue has now gone away so maybe the problem was somewhere in flutter web's Hot Reload functionality.是否进行了 flutter 升级,问题现在已经消失,所以问题可能出在 flutter web 的热重载功能中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.