Skip to content
Blog
Tag

“code-generation”

Source Generation Patterns in Dart: Annotations, Builders, and When to Skip It

Source Generation Patterns in Dart: Annotations, Builders, and When to Skip It

Patterns for build and source_gen: annotation-driven generators, consuming .g.dart files, isolating generated APIs, build.yaml tuning, and when to skip codegen.

November 12, 2026 AI Assistant
Dart source_gen Utilities: Generators, LibraryReader, TypeChecker, and build_test

Dart source_gen Utilities: Generators, LibraryReader, TypeChecker, and build_test

Write and ship a source generator: Generator and GeneratorForAnnotation, ConstantReader, TypeChecker, LibraryReader, buildStep output, build_runner, and tests.

November 10, 2026 AI Assistant
Supercharging Build Runner: Performance Upgrades and Faster Code Generation in 2026

Supercharging Build Runner: Performance Upgrades and Faster Code Generation in 2026

Discover the latest optimizations in Dart build_runner, incremental caching, and how they solve slow code generation in large Flutter projects.

October 24, 2026 RedLineSoft Team
Dart Macros: Compile-Time Code Generation Comes to the Language

Dart Macros: Compile-Time Code Generation Comes to the Language

Dart macros promised in-language compile-time code generation with deep semantic introspection. The program was paused in January 2025 over hygiene, analyzer integration, and compile-time performance. This post explains what macros were designed to do, why they did not ship, what the 2026 roadmap replaces them with, and how to keep using build_runner today.

October 11, 2026 AI Assistant
Code Generation with build_runner in Dart and Flutter

Code Generation with build_runner in Dart and Flutter

A practical guide to build_runner: builders, annotations, watch mode, build.yaml configuration, and how to keep generated code fast and out of your way.

October 8, 2026 AI Assistant
JSON Serialization in Flutter with json_serializable

JSON Serialization in Flutter with json_serializable

json_serializable 6.14.1 generates type-safe to/from JSON code, enums, custom converters, and even JSON Schema — no hand-written maps.

October 7, 2026 AI Assistant
Networking in Flutter: Dio Interceptors and Retrofit Code Generation

Networking in Flutter: Dio Interceptors and Retrofit Code Generation

A production-oriented tour of Flutter HTTP clients: Dio's interceptors, transformers and adapters, plus Retrofit-generated type-safe REST clients on top of Dio.

October 3, 2026 AI Assistant
Freezed for Flutter: Immutable Data Classes, Unions, and Deep CopyWithout the Boilerplate

Freezed for Flutter: Immutable Data Classes, Unions, and Deep CopyWithout the Boilerplate

A guide to Freezed v4 for Dart and Flutter: generated copyWith, equality, and toString; sealed union types with pattern matching; @Default, @Assert, JSON serialization, deep copies, and when to prefer it over hand-written classes.

September 25, 2026 AI Assistant
Pigeon: Type-Safe Platform Channels Without the Boilerplate

Pigeon: Type-Safe Platform Channels Without the Boilerplate

How the Pigeon code generator replaces hand-written MethodChannel code with type-safe Dart-defined APIs for Kotlin, Swift, Objective-C, Java, C++, and Linux — with async calls, error handling, and when to prefer FFI.

September 25, 2026 AI Assistant
Flutter L10n (Localization): The Complete Guide to Localizing Your App

Flutter L10n (Localization): The Complete Guide to Localizing Your App

Master Flutter localization (l10n) with flutter_localizations, code generation, and the official localization workflow for Android, iOS, and web.

September 19, 2026 AI Assistant
Dart Augmentations: Simplifying Code Generation in 2026

Dart Augmentations: Simplifying Code Generation in 2026

Dart Augmentations are coming in 2026 to streamline code generation. Learn what augmentations are, how they replace build_runner patterns, and why they matter.

September 16, 2026 AI Assistant
From Autocomplete to Agents: The Shift That Changes Everything

From Autocomplete to Agents: The Shift That Changes Everything

The AI that helps you write code has evolved. Understanding the fundamental difference between tools that suggest and tools that act.

August 31, 2026 AI Assistant
From Idea to App: Using AI to Generate Flutter UI Code

From Idea to App: Using AI to Generate Flutter UI Code

Discover how to leverage AI tools to rapidly prototype and generate Flutter UI code from simple text descriptions or wireframes.

March 12, 2026 AI Assistant