Get started with Flutter for Surface Duo
This article describes functionality and guidance that is in public preview and may be substantially modified before it's generally available. Microsoft makes no warranties, express or implied, with respect to the information provided here.
To get started, follow the instructions to download and install the Surface Duo dual-screen emulator on a machine that you have also setup for Flutter development. You can follow the Flutter Getting Started Guide if you don't have flutter installed.
Flutter Foldable Support
If you are interested only in MediaQuery support, you can consider switching to the Flutter
master channel, using the
flutter channel master command. If you also want to use TwoPane and dialogs, setting up requires using a custom version of Flutter.
- Clone the custom Flutter.
- Add the custom Flutter to your PATH.
These steps are explained in detail below.
Step 1. Clone the custom Flutter
Clone the repository of our Flutter Fork. The
foldable_support_complete branch contains all the above PRs.
git clone email@example.com:andreidiaconu/flutter.git
git branch foldable_support_complete
Step 2. Add the custom Flutter to your PATH
That's it! You now have a custom Flutter Framework fork on your machine that contain all the changes related to foldable support and are able to build your app using the new MediaQuery support, TwoPane widget and Hinge aware popup routes.