Skip to main content

Posts

New site for Dart news and articles

For the latest Dart news, visit our new blog at  https://medium.com/dartlang .

Sub-second reloads for mobile developers with Flutter and Dart

Developers inside and outside of Google have told us they are looking for a better way to build apps that delight all their users, without having to build the app twice. To help, we've been working closely with the Flutter team to build an open-source SDK that helps developers write beautiful UIs for all of mobile from a single codebase. Currently in technology preview, Flutter is being used by teams inside of Google. At the previous Dart Developer Summit, the Flutter team showed how they used Dart to render mobile graphics and spinning square. Fast-forward to today: the Flutter team demoed their near-complete implementation of material design and showed real apps built with Flutter running on iOS and Android. Flutter is different than other mobile SDKs. It's built with a best-in-class text rendering engine and the same 2D-to-GL library  that Chrome (and others) use, which means its lowest layers are battle-hardened and proven. Flutter does not use the OEM widge...

Dart in 2017 and beyond

We’re here at the Dart Developer Summit  in Munich, Germany. Over 250 developers from more than 50 companies from all over the world just finished watching the keynote. This is a summary of the topics we covered: Dart is the fastest growing programming language at Google, with a 3.5x increase in lines of code since last year. We like to think that this is because of our focus on developer productivity: teams report 25% to 100% increase in speed of development. Google has bet its biggest business on Dart — the web apps built on Dart bring over $70B per year. Google AdSense recently launched a ground-up redesign  of their web app, built with Dart. Earlier this year, we announced  that the next generation of AdWords is built with Dart. There are more exciting Dart products at Google that we’re looking forward to reveal. Outside Google, companies such as Wrike, Workiva, Soundtrap, Blossom, DG Logic, Sonar Design have all been using and enjoying Dart for years. ...

Good-bye symlinks

Dart 1.20 is now available. Get it now! Back in the Dart 1.19 release we introduced support for the .package file; our replacement for the /packages/ directory often filled with hundreds of symlinks. In 1.19 this support was opt-in via passing an option to pub get . Now that it has had time to mature, and based on favorable feedback, we have gone ahead and made it the default. If for some reason this causes issues, you can still get symlinks by using the pub get --packages-dir command; in such cases make sure to file an issue . One common question we have received is how to handle resource loading in a world without packages symlinks. The symlinks blog post covers this in detail. In summary you can either resolve a Uri to a resource using the new resolvePackageUri API (e.g., Uri actualURI =      await Isolate.resolvePackageUri(Uri.parse("package:foo/bar.txt")) ), or you can use the new package:resource that provides a more abstract API. Finally, the VM has b...

The new Google AdSense user interface: built with AngularDart

AdSense is a free, simple way to earn money by placing ads on your website. The team just launched a completely new version of their app for publishers. Read all about it here . We asked Daniel White, the tech lead for the project, some questions because the new UI happens to be built with Dart and Angular2. AdSense launched way back in 2003. How long is it since the last big redesign? Last big redesign was called ‘AdSense 3’ and launched about 6 years ago. It was written in Google Web Toolkit (GWT) and the UI has evolved through several iterations - but this is the first ground-up redesign in 6 years. There are a number of long-standing UX issues that we’ve taken the opportunity to solve. A big shout-out to our UX team who’ve been 100% behind this project. We couldn’t have done it without them! How many software engineers worked on the project? Purely on the AdSense applications, we have a team of close to 100. Around 25% of them write Dart. How many lines of code? We have a...

What’s your favorite Dart feature?

Earlier this year we had an ongoing thread where Googlers shared their favorite Dart feature—perhaps a less known one. We wanted to share these insights from some of our most engaged internal users more broadly. Hence this post. The names have been changed to protect the innocent, but the contents should constitute some fine reading. Here we go: What's your favorite "less known" (or undocumented) feature of Dart? Any particular syntax trick or library function? Java has loads of these, tricks ranging from the double-paren . init ( Map<String,String> {{ put("a", "1"); }}; ) to "sneaky throwing" ANY exception. Anything similar in Dart? Cheers, Agile Analyzer As a Java developer, my opinion of both of those is: this is clever, but don't do it in real code under any circumstances. -Bug Basher I'm not a fan of tricks, and from what I've seen so far Dart needs very few. There are some features of the ...

Dart Developer Summit announcements: AngularDart 2.0 and more

The Dart Developer Summit is only 5 weeks ahead, and we’re excited about its agenda: 17 talks, many demos, 25 speakers, plus a lightning talks session and a panel discussion. Expect the full program soon on the site, but here’s a teaser: Major improvements to the type system Much better interoperability with JavaScript Improved developer workflow AngularDart 2.0 And much more We will share more details as we approach the summit. Because the TypeScript flavor of Angular just released  version 2.0 last week, we think it’s a good opportunity to share more details about AngularDart 2.0. Besides the changes you’d expect, such as faster execution and reduced size (on which we’re already making a lot of progress ), we will also have a better template compiler and some nice surprises for you. The beta releases of AngularDart have been in production use at Google since January, in MLOC-sized apps. This has helped us to see what works well for large apps, and to improve...

Configuring Static Analysis using an Analysis Options File

Static analysis allows you to find problems before executing a single line of code. It’s a powerful tool used to prevent bugs and ensure that code conforms to style guidelines. With the help of the analyzer, you can find simple typos. For example, an accidental semicolon made its way into an if statement: The analyzer can also help you find more subtle problems. For example, perhaps you've forgotten to close a sink instance: In the Dart ecosystem, the Dart Analysis Server and other tools use the analyzer package to perform static analysis. You can configure the analyzer using an analysis options file. For more information, see our new page, Customize Static Analysis .