# Dart Macros for Flutter: A Guide to Compile-Time Code Generation

DevFeed: [Dart Macros for Flutter: A Guide to Compile-Time Code Generation](<https://devfeed.tech/articles/r-i-p-build-runner-a-deep-dive-into-macros-in-dart-flutter-23992.md>)

Original publisher: [Read original article](<https://quickbirdstudios.com/blog/macros-dart-flutter/>)

Author: Marvin März

Published: 2024-11-04T12:33:03Z

Content type: tutorial

Language: en

Sources: [QuickBird Studios Blog](<https://devfeed.tech/sources/quickbird-studios-blog.md>)

Topics: [Dart](<https://devfeed.tech/topics/dart.md>), [Flutter](<https://devfeed.tech/topics/flutter.md>), [Code generation](<https://devfeed.tech/topics/code-generation.md>), [build times](<https://devfeed.tech/topics/build-times.md>), [Development](<https://devfeed.tech/topics/development.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [beta-channel](<https://devfeed.tech/tags/beta-channel.md>), [build-times](<https://devfeed.tech/tags/build-times.md>), [code-generation](<https://devfeed.tech/tags/code-generation.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [dart](<https://devfeed.tech/tags/dart.md>), [development](<https://devfeed.tech/tags/development.md>), [examples](<https://devfeed.tech/tags/examples.md>), [flutter](<https://devfeed.tech/tags/flutter.md>), [guide](<https://devfeed.tech/tags/guide.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [language](<https://devfeed.tech/tags/language.md>), [post](<https://devfeed.tech/tags/post.md>), [terminal](<https://devfeed.tech/tags/terminal.md>), [vscode](<https://devfeed.tech/tags/vscode.md>)

## AI overview

A guide to Dart macros for Flutter that explains how they provide compile-time code generation as an alternative to build_runner. It covers setup, beta-channel requirements, Dart version configuration, JSON serialization, and the feature's current limitations and expected rollout.

## Source excerpt

Dart macros bring a whole new way to handle code generation for Flutter, offering a simpler, faster alternative to build_runner. No more slow builds or manual updates--macros generate code instantly during compilation, helping you save time and reduce repetitive code. In this guide, we'll show you how to set up and use macros, build custom examples, and understand their pros and cons, so you can make the most of this powerful new feature in your Flutter projects. The post R.I.P. build_runner: A Deep Dive Into Macros in Dart & Flutter appeared first on QuickBird Studios.