top of page
FlutterCon_icon_turned.png
FlutterCon_logo.png

Daco Harkes

Software Engineer, Google
greg-fawson-foto.1024x1024 Kopie.jpg

Seamless interop between #Dart and native code.

Tree-Shaking Native Code and Assets with Link Hooks

Flutter is famous for its aggressive tree-shaking, but why stop at Dart code? Imagine a world where every single byte in your app is strictly necessary, from assets and translations to native binaries. In this session, we will dive into Link Hooks, the @RecordUse annotation, and the experimental data assets to discover how you can strip away unused native code and ship the leanest app possible.

In this session you'll learn

* how to use the @RecordUse() annotation to record uses of functions and classes in the Dart ahead-of-time compiler,
* how to use the recorded uses in a link hook to tree-shake native code with the native linker,
* how to use the data assets experiment to declare data assets in build hooks and tree shake them in link hooks, and
* some pirate language! Yarr!

bottom of page