[MUSIC PLAYING]
TIM SNEATH: Welcome to Flutter Engage.
Today is a key milestone for Flutter
with the launch of Flutter 2.
The big news in Flutter 2 is that we've
broadened Flutter from a mobile framework
to a portable framework, unleashing your apps
to run on a wide variety of different platforms
with little or no change.
You can think of Flutter 2 as a free upgrade for your app.
With Flutter 2, your app can target
four additional platforms--
Windows, Mac OS, Linux, and the web.
We asked our friends at gskinner to create a demo app that
spans all these platforms.
SPEAKER 1: We decided to build a scrapbooking
app called Flutter Folio.
So I'd like to invite you to visit flutter.gskinner.com,
where you'll find more info, source
code, and links to the app.
Ultimately, we were able to build an app that runs great
and feels at home on three form factors, five OSs, and the web
while reusing over 95% of our code.
TIM SNEATH: Flutter isn't just being used outside Google.
Over a thousand engineers inside the company
are using Dart and Flutter to develop apps today.
One of the largest apps from Google using Flutter
is Google Pay.
PEEYUSH RANJAN: We decided to rewrite everything.
We ended up with a 35% smaller code base--
1.1 million lines compared to 1.7 million lines.
And at the same time, our tech debt
went down by 90% on a per engineer basis.
Now, once the rewrite was done, we also
found that our engineers were 20% more
productive in terms of features implemented
because of the rewrite.
We were able to take the iOS engineers and Android engineers
and get 50% engineering efficiency immediately
because they were all working on the same thing.
TIM SNEATH: Phones come in so many different shapes
and sizes.
And one of the latest trends is foldable phones.
One great example of this form factor
is the Surface Duo from Microsoft.
GUY MERIN: Today, we're happy to announce
that we are collaborating with Google
and bringing foldable support to Flutter.
We're contributing code to enable
Flutter apps to take advantage of these new opportunities
with devices like the Surface Duo,
but also enable it on other devices
from manufacturers like Samsung and others.
TIM SNEATH: So let's talk about portability.
Today, we're delighted to announce
that Flutter support for the web platform
has hit the Stable milestone.
DION ALMAER: Now, the web has many strengths,
including ubiquity and reach.
So if you're building a Flutter app,
you now get to reach users outside of app stores.
And with the power of URLs, users across operating systems
or device types could be directed
to any part of your app, from links
that are shared by friends, clicked on in search,
from an email, from anywhere.
TIM SNEATH: I want to show you one example of the kind of app
that shines really well on the web.
iRobot is the company behind the popular Roomba robot vacuums.
But they also have coding robots that
empower the next generation of innovators.
iRobot built their app with Flutter.
And today, they're launching the web version
of their experience.
So here, you can see the app running
in the browser using the same code as their tablet app.
Today, we're delighted to announce that we're also
opening up desktop to the stable channel of Flutter, enabled
with an early release flag.
This release lets you produce standalone executables
for each platform--
Mac OS, Linux, and Windows.
On Linux, Canonical has been a fantastic partner.
KEN VANDINE: We not only enabled Flutter for Linux,
we also worked with the Flutter team
to publish the Flutter SDK as a snap in the Snap Store, the app
store for Linux.
By publishing the Flutter SDK as a snap,
we've made it very easy to install
and set up your development environment
to build mobile, web, and desktop apps
with Flutter on Ubuntu.
Flutter is the default choice for future desktop
and mobile apps created by Canonical.
TIM SNEATH: There are even more screens out there
beyond the kind of operating system
that you might have on your phone or your PC.
Toyota are building Flutter right
into the heart of their core product.
DANIEL HALL: Today, we're excited to announce that Toyota
is partnering with Flutter to bring
a best-in-market digital experience to vehicles
by building infotainment systems powered by Flutter.
We see working with open-source software
as a positive investment towards our in-vehicle user
experiences, and we look forward to playing
a role in the open-source Flutter community.
TIM SNEATH: Let's now go one level deeper
and talk about Dart.
BOB NYSTROM: I'm very happy to tell you
that we have shipped Null Safety for Dart.
So now the type system helps you eliminate null reference bugs.
This is the biggest change to Dart
since we added sound static types in Dart 2.
With Null Safety, we didn't just add non-nullable types
to the type system, we also added
a slew of features like smarter flow analysis, late variables,
and required named parameters so that your Dart code isn't
just safe, but easy to write.
Dart gives you more than most other languages
with non-nullable types, too.
Null safety in Dart is sound.
That means that when your program is fully migrated,
the type system guarantees, like a mathematical proof,
that no non-nullable expression can ever evaluate to null.
A fast language is no use if you can't productively
write code in it.
So next, Kenzie's going to talk about developer tools.
KENZIE SCHMOLL: Now, I know what you're thinking.
Framework improvements are great and bring
all sorts of new and improved functionality to you.
But usually, they also come with some breaking changes
to your code.
Well, fear not, because what we've also
done as part of Flutter 2 is created
a tool called Flutter Fix.
This is a sample app that hasn't been updated in a couple years
now.
So now that I updated to Flutter 2,
there are some analysis errors to address.
You can see that it's using a couple deprecated APIs.
So let's click on one of these warnings
and see how we can solve the problem.
I can see the deprecated member here, as well as the Quick Fix
icon.
And the Quick Fix option allows me to automatically migrate
my code to the new API.
So now I can see my code has been updated,
and the warnings have gone away.
TIM SNEATH: Our developer tools are another example
of the unique flexibility of Flutter, built with Flutter,
for Flutter, and integrated into whatever tool you're running.
As of right now, there are over 15,000 packages
for Flutter and Dart from big companies
like Amazon, Microsoft, Adobe, Huawei, Alibaba,
eBay, and Square.
We're also today announcing a major update
to our Flutter plugins for several core Firebase
services--
authentication, cloud Firestore, cloud
functions, cloud messaging, cloud storage, and crashlytics.
We've updated all these packages to support sound null safety.
But there's another major package we're releasing today.
ZOEY FAN: We're excited to announce
an open beta for the Google Mobile Ads SDK for Flutter.
This is a brand new plugin that provides inline banner
and native ads, in addition to the existing overlay formats.
We've been piloting this plugin with some
of our early customers in a private beta program.
Sua Musica is one of them.
SPEAKER 2: We've had amazing metrics,
showing an increase of performance
since we made the change.
We saw a 350% increase on impressions,
we have a 43% increase on CTR, and 13% increase on our eCPM.
ZOEY FAN: The Google Mobile Ads SDK for Flutter
is available today for you to download from pub.dev.
TIM SNEATH: Flutter is the first UI
platform that is designed for an ambient computing world.
And this vision is unique to Flutter, a portable toolkit
for building beautiful, native, fast experiences wherever
you might want to paint pixels on the screen.
[MUSIC PLAYING]