This is a fully functional Flutter development environment packaged in a Docker container.
- Docker must be installed on your machine
- VSCode with the Remote Development Extension Pack
- Click on the Remote "Quick Access" status bar item
- Click on "Open folder in container..."
- Select the folder that includes the Dockerfile
- Wait for the container to be created (it may take a while, depending on your machine's power and your internet speed)
- Once the container is running, open a terminal inside VSCode and run
flutter doctor
, you should see that everything is ok but a couple of warning/errors about Chrome, Android Studio and connected devices. You can skip the first two, we're going to fix the latter in a while. - Move into the workspace folder and start creating your flutter projects with
flutter create <your_project_name>
I don't know if it's possible to do something similar with an iOS device, but if you own an android device you can run and debug your project remotely via wi-fi connection:
- Make sure your computer and your device are on the same wi-fi network
- Make sure your device has developer tools and usb debugging enabled (yes, it's needed although we're going to use wi-fi)
- Inside the container, open a terminal and run
adb connect <your_device_ip_address>:5555
That's all! Now if you run adb devices
you should see your phonw/tablet connected and from now on you can simply run flutter run
from the project directory inside the container's workspace directory and after a while the app should open on your device.