Why we rebuilt Dart DevTools from scratch in Flutter

By: Filip Hracek & Chris Sells

Today, we’re releasing a new version of Dart DevTools, our suite of tools for debugging and performance analysis for Dart and Flutter code. It has been rebuilt from scratch in Flutter. This version adds several improvements, such as updates to the performance and memory pages, and a completely new network page.

Many people know Flutter for its hot reload feature that lets you make changes to your mobile app while it’s running. …

Make your apps more stable and performant with Dart’s null safety

By: Filip Hracek & Michael Thomsen

Today is a major milestone for the Dart team with the tech preview of our null safety work. Null safety helps you avoid a class of bugs that are often hard to spot, and as an added bonus enables a range of performance improvements. We’re now releasing an early tech preview, and we’re looking forward to your feedback.

This post describes the Dart team’s plans for rolling out null safety. It also explains what we mean by sound null safety and why that’s different from approaches that many other languages take.

Why null safety?

Dart is a…

Last year, I got to record one of the episodes in the Flutter Animations series, and I thought I’d publish the same content for those who prefer text over video.

In the other episodes of the series, my colleagues talk about all the practical ways to build animations in Flutter. Not so in my episode. Here, you’ll learn how to implement animations in the least pragmatic way imaginable. (But, you’ll also learn some things along the way.)

Let’s start with something simple and lighthearted:

What is motion, really?

You see, motion is an illusion. Look at this:

A video of Filip waving his hand.

It’s a lie. What you’re actually…

[Emily Fortuna and Filip Hracek wrote this article together.]

A big part of what makes Flutter so delightful and productive is its community. We really want this to continue, and so we thought we’d share some of our observations about the current culture, and some ideas on how to preserve it.

Being open

There are three senses of the word open we’re thinking of here: open as in open minded, and open as in accessible, and open as in Open Source. While the Open Source angle is great (and makes our package system a veritable rainforest biome of abundance), culture-wise we’re thinking…

The Flutter framework does a good job being fast by default, but does that mean you don’t need to think about performance at all? No. It is absolutely possible to write Flutter apps that are slow. On the other hand, it is also possible to make the most of the framework, and make your apps not only fast, but also efficient, consuming less CPU time and battery.

This is what we want: a statistically significant result comparing two versions of your app on some meaningful metric. Read on to learn how to get this.

There are some general guidelines for performance optimization in Flutter:

  • Target as few widgets as possible when updating state.
  • Only update state when you must.
  • Keep computationally intensive tasks outside your build methods…

I recently bought a top-of-the-line gaming PC and thought I’ll spend time playing games like Far Cry: New Dawn or Battlefield V, with their multi-million-dollar graphics and ray tracing technology. Instead, I’m playing a game that looks like this:

This is Dusk, a 2018 first person shooter that tries to recreate the look and feel of 1990’s games like Doom, Quake and Rise of the Triad.

Ah, you think, nostalgia. Not so fast. This game is consistently reviewed in the top 10 of 2018 PC games. It’s number 4 on metacritic, with outstanding scores from both professional reviewers and regular…

Dart 2 is imminent. If you own a package on pub.dartlang.org, you might want to make sure it’s ready.

Take inventory

Head over to pub and search for packages associated with your email. If you’ve been around the Dart ecosystem for a while (like me), you might have forgotten about ever writing some of these.

If you go to pub.dartlang.org and search for email:your.email@example.com, you’ll see all the Dart packages you own.

Decide which ones are worth updating

Some packages are timeless, and some not so much. For example, my simple_preprocessor package for adding C-style macros can safely die in Dart 1 land. It was useful at some…

[ If you’re already convinced that you want to smoke-test your Flutter samples, you can skip to “Smoke-testing Flutter” below. What follows is a general guideline applicable to any technology. ]

When learning any new technology, sooner or later developers want to look at sample code. Not just a few lines, either. Often, they want to see a whole project and how it’s assembled.

That, by itself, means that any library, framework or SDK needs to maintain a number of sample apps. But there’s more.

Samples are most useful when they’re focused. A classic mistake is to ram everything-there-is-to-know into…

UPDATE (March 2019) — If you’re just starting to learn about Flutter and state management, I recommend you read the state management section at flutter.dev instead of this article. I wrote both this article and the section at flutter.dev, and I think the latter is more approachable and exhaustive. It is also newer.

At Google I/O, Matt and I gave a talk about state management called Build reactive mobile apps in Flutter. If you missed it, you can watch it below:

The code for the talk is on github:

This article is about the things that didn’t fit into…

Egamebook DevLog #2

An open world game needs to allow players to change the world. Destroy a bridge. Kill the king. Forge an alliance. World-changing actions can come in many varieties, but it’s helpful to talk about quests. Quests tie these actions into meaningful packages — with motivations, characters and stories. Without those elements, the open world can feel like a literal sandbox, where nothing really matters.

This article is about the design decisions I’m making in order for the quests in my next game not to suffer from combinatorial explosion. What do I mean by combinatorial explosion in relation to quests? …

Filip Hracek

Developer and manager working on Google’s Dart programming language and Flutter SDK; gamebooks enthusiast; https://filiph.net

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store