Sample repository to launch flutter app using vscode devcontainer.
You can connect to the host's Android emulator from the container by using the matsp/docker-flutter image.
- Visual Studio Code
- Android emulator
- Android SDK
- Open this project in vscode.
$ git clone [email protected]:saccho/flutter-container-sample.git && cd flutter-container-sample
$ code .
- Launch the Android emulator in your host PC.
# in your host PC
# check the avd list
$ emulator -list-avds
# launch any emulator
$ emulator -avd <avd-name>
- Execute the following command so that you can connect to the emulator via the network.
# in your host PC
$ adb tcpip 5555
# in your devcontainer
$ adb connect host.docker.internal:5555
- Start the app (or run debug
lib/main.dart
from vscode).
$ flutter run