Skip to main content

Microsoft releases guide to writing Surface Duo apps with Google’s Flutter SDK

Ahead of the Microsoft Build developer event next week, Microsoft has released a guide to developing apps for the Surface Duo using Google’s massively cross-platform Flutter SDK.

No matter how different it may seem, the Microsoft Surface Duo is an Android foldable, and as such, it needs to run Android apps, which developers may want to enhance for better usage on the Duo. To help ensure more apps are ready before the Surface Duo launches, Microsoft released the Surface Duo SDK to Android developers in January.

In 2020, though, there are many other ways to write Android apps beyond natively with Java and Kotlin, thanks especially to cross-platform frameworks like React Native and of course Google’s Flutter SDK. To that end, Microsoft has been releasing guides to getting developers of various frameworks onboarded with the Surface Duo SDK, including a new guide published yesterday for Flutter developers.

The guide walks you through the steps necessary to add the Surface Duo SDK to your Flutter app to learn about the hinge position and whether your app is spread across both screens. This process involves setting up a “platform channel” which acts as a bridge between the native library and your Flutter code.

From there, it’s left to your creativity to decide how to use that info to make your Flutter app better for use on the Surface Duo. For example, you may want to show a different UI when spread across the displays, or perhaps react to changes to the hinge’s position.

To get a better idea of some of the things that are possible, be sure to check out the demo of Google Maps running on the Surface Duo, from back in February.


Update 4:45pm: Tim Sneath, the product manager for Dart and Flutter, shared with us his enthusiasm for what Google and Microsoft have been able to do with foldables and specifically the Surface Duo.

We built Flutter as a portable toolkit for building beautiful experiences wherever you might want to paint pixels on the screen: phones, tablets, smart displays, desktop and now foldables. With Flutter, it takes only a few lines of code to support dual-screen, and it’s been good to partner with Microsoft to demonstrate this. More to come!

More on the Surface Duo:

FTC: We use income earning auto affiliate links. More.

You’re reading 9to5Google — experts who break news about Google and its surrounding ecosystem, day after day. Be sure to check out our homepage for all the latest news, and follow 9to5Google on Twitter, Facebook, and LinkedIn to stay in the loop. Don’t know where to start? Check out our exclusive stories, reviews, how-tos, and subscribe to our YouTube channel

Comments

Author

Avatar for Kyle Bradshaw Kyle Bradshaw

Kyle is an author and researcher for 9to5Google, with special interests in Made by Google products, Fuchsia, and uncovering new features.

Got a tip or want to chat? Twitter or Email. Kyle@9to5mac.com

Manage push notifications

notification icon
We would like to show you notifications for the latest news and updates.
notification icon
You are subscribed to notifications
notification icon
We would like to show you notifications for the latest news and updates.
notification icon
You are subscribed to notifications