~/talk

The power of Macros in Dart

Talkat Fluttercon USA 2024 · 2024-09-19..09-20· [compilers-and-language-design]
links:none on file
slides:none on file

Dart macros let code annotate a class and immediately get working fromJson/toJson and copyWith methods without running build_runner; the demo shows a JSON macro producing methods at edit time but requiring experimental VM and analyzer flags and a VS Code extension. Macros run in three-phase execution (type, declaration, definition), augment declarations in real time, remove separate generated files, and aim to replace JSON_serializable/freezed workflows while still being experimental.

AI-written summary · about

  1. 0:00Dart macros intro
  2. 1:03Introduction
  3. 2:29Motivation for macros
  4. 6:23Current code generation
  5. 13:09What are macros
  6. 14:59Macros use cases
  7. 17:08JSON serialization demo
  8. 21:47How macros work
  9. 24:16Macro execution order
  10. 26:43Conclusions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.