Building a package with assets
summary
Experimental package support builds native and data assets via build hooks that run during flutter/dart commands, compiling C or Rust toolchains into artifacts and generating FFI bindings with ffigen; a link hook runs postcompile and uses a record-use mechanism to tree-shake unused symbols (demo removed multiply from the dynamic library) so apps bundle only used images/strings or native symbols. Works today on Linux and in Dart with experimental flags; Flutter support and cross‑OS linker fixes are ongoing.
AI-written summary · about
chapters (13)
- 0:00Welcome
- 1:50Packages need assets
- 3:57Demo setup
- 5:48Build hooks for assets
- 9:04Dart tests with assets
- 10:10Flutter app demo
- 13:49Rust support via hooks
- 16:27Link hooks and tree shaking
- 19:20Usage recording
- 21:15Data assets
- 24:28Current status
- 26:14Future plans
- 27:39How to contribute
related talks
13mHow to design a Dart package with hooks
24mFearless Flutter Debugging: When All Else Fails, Hack the Tools!
32mcode generation productivity for Dart and Flutter
18mBuilding Your Very Own DevTools Extension
44mSwift Packages - Dependency Management of the Future
18mYour app deservers its own CLI: Try sidekick
27mBuilding with best practices in FlutterFlow
07mConversation with Keaty Gross, Software Engineer, Pivotal
