mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Some documentation for running "flutter refresh" in the Gradle sample (#3201)
This commit is contained in:
parent
3cfa4d39c6
commit
4bcef2a340
@ -14,3 +14,24 @@ Then run:
|
||||
|
||||
* `gradle wrapper`
|
||||
* `./gradlew build`
|
||||
|
||||
## Updating the Dart code
|
||||
|
||||
You can push new Dart code to a Flutter app during development without performing
|
||||
a full rebuild of the Android app package.
|
||||
|
||||
The `flutter refresh` tool manages this process. `flutter refresh` will build
|
||||
a snapshot of an app's Dart code, copy it to an Android device, and send an
|
||||
intent instructing the Android app to load the snapshot.
|
||||
|
||||
To try this out:
|
||||
|
||||
* Install and run this app on your device
|
||||
* Edit the Dart code in `app/src/flutter/lib`
|
||||
* cd `app/src/flutter`
|
||||
* `flutter refresh --activity com.example.flutter/.ExampleActivity`
|
||||
|
||||
`flutter refresh` sends an `ACTION_RUN` intent with an extra containing the
|
||||
device filesystem path where the snapshot was copied. `ExampleActivity.java`
|
||||
shows how an activity can handle this intent and load the new snapshot into
|
||||
a Flutter view.
|
||||
|
Loading…
Reference in New Issue
Block a user