-
Notifications
You must be signed in to change notification settings - Fork 28.5k
Include a flutter preview device with the Flutter SDK that supports hot reload #130277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@christopherfujino Is this a dupe of #85329? |
good catch, closed that in favor of this one, as it more closely reflects the steps I'm working on. |
Fixes #130277 This PR does two things: 1. introduce a hidden `flutter build _preview` command, that will build a debug windows desktop app and copy it into the SDK's binary cache. This command is only intended to be run during packaging. 2. introduce a new device type, called `PreviewDevice`, which relies on the prebuilt desktop debug app from step 1, copies it into the target app's assets build folder, and then hot reloads their dart code into it.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
…ter#136936) Part of flutter#130277 Without this, if a user runs an app that has plugins that call method channels with the `preview` device, the app will build successfully, however, they will get a runtime error when their dart code tries to call the method channel that does not exist in the native build (which was pre-built and thus does not include the plugin code). This change adds a validation when injecting plugins that will tool exit if the device-id is `preview` and their project contains plugins with method channels.
Use case
This would allow new Flutter developers to experience Flutter's hot reload developer experience before installing a native build toolchain (such as Xcode, or Visual Studio).
flutter build _preview
sub-command Flutter preview device #135639The text was updated successfully, but these errors were encountered: