Starter template

The best Flutter boilerplate is one your AI agent understands

A boilerplate is only useful if the code it generates follows its conventions. Flutter Agent Kit pairs a production template with rules that keep AI agents disciplined.

What is a Flutter boilerplate?

A Flutter boilerplate is a starter project you clone or scaffold to skip the repetitive setup every new app needs. It gives you a directory structure, a state management choice, a routing setup, an HTTP layer and a set of conventions so you start building features instead of wiring infrastructure.

The goal is simple: the first hour of a new project should produce real product work, not a debate about Bloc vs Riverpod or where the services folder goes. A good boilerplate makes those decisions once and reuses them across every project.

Most Flutter boilerplates stop there. They give you the structure and leave you to enforce it. The moment you bring in an AI coding agent, that structure erodes. The agent invents its own patterns because no one told it which ones your boilerplate chose.

What makes the best Flutter boilerplate

The best Flutter boilerplate is not the one with the most files. It is the one that stays consistent as the project grows, even when an AI agent is writing most of the code. That requires three things:

  • A chosen stack: State management, routing, HTTP and models picked once and applied everywhere, so you never mix conventions mid project.
  • A feature-first layout: Code organized by feature, not by type, so each feature is self-contained and easy to grow without a refactor.
  • Agent-readable rules: A file the AI agent reads on every task, so generated code follows the same conventions as hand-written code.

Flutter Agent Kit is built around all three. The template fixes the stack, the layout is feature-first, and an AGENTS.md file tells Cursor, Claude Code, opencode and GitHub Copilot exactly how to write code for it.

What is included in the boilerplate

Flutter Agent Kit is a complete Flutter starter that you scaffold with a single command. It includes:

  • Scaffold command: One command generates a new Flutter project with the full template, ready to open in your editor.
  • Feature-first template: Built on Riverpod v3 with http and plain Dart models, not freezed or json_serializable.
  • AGENTS.md: A root file every AI agent reads before each task, covering architecture, data, services, UI, conventions, setup, git and process.
  • On-demand docs: Deep reference material for topics like authentication, routing and local database setup, pulled in only when the agent needs them.
  • Feature skills: Each skill is distilled from shipping a real app, so the agent follows a proven path instead of guessing.

The same template was used to ship BitPong, a Flutter app with 1000+ active users on the App Store. It is not a demo, it is a production-tested starting point.

The starter template in code

Structure claims are cheap. This is what the template actually puts on disk for one feature, and the four files an agent is told to write when you ask for it.

One feature, five files

lib/features/products/
  models/product.dart              Equatable, manual fromJson and toJson
  states/products_state.dart       immutable state, copyWith
  providers/products_provider.dart Notifier plus NotifierProvider
  services/products_service.dart   http client, injected and closed
  widgets/products_screen.dart     ConsumerWidget, reads state

State and notifier: no code generation, no @riverpod

class ProductsState extends Equatable {
  const ProductsState({
    this.items = const [],
    this.isLoading = false,
    this.error,
  });

  final List<Product> items;
  final bool isLoading;
  final String? error;

  ProductsState copyWith({
    List<Product>? items,
    bool? isLoading,
    String? error,
    bool clearError = false,
  }) {
    return ProductsState(
      items: items ?? this.items,
      isLoading: isLoading ?? this.isLoading,
      error: clearError ? null : (error ?? this.error),
    );
  }

  @override
  List<Object?> get props => [items, isLoading, error];
}

class ProductsNotifier extends Notifier<ProductsState> {
  @override
  ProductsState build() => const ProductsState();

  Future<void> load() async {
    state = state.copyWith(isLoading: true, clearError: true);
    try {
      final items = await ref.read(productsServiceProvider).fetchAll();
      state = ProductsState(items: items);
    } catch (e) {
      state = state.copyWith(isLoading: false, error: e.toString());
    }
  }
}

final productsProvider = NotifierProvider<ProductsNotifier, ProductsState>(
  ProductsNotifier.new,
);

Service behind the notifier, never inside the widget

class ProductsService {
  ProductsService(this._client);

  final http.Client _client;

  Future<List<Product>> fetchAll() async {
    final response = await _client.get(Uri.parse('https://api.example.com/products'));
    if (response.statusCode != 200) {
      throw ProductsException('Request failed');
    }
    final decoded = jsonDecode(response.body) as List<dynamic>;
    return decoded
        .map((item) => Product.fromJson(item as Map<String, dynamic>))
        .toList();
  }

  void close() => _client.close();
}

The point of showing code is the constraint it makes visible: every feature has the same five slots, and the agent has one place to put each kind of code. When a feature has no I/O, the services folder is simply absent, not filled with an empty class.

Flutter starter template compared

There are three ways to start a Flutter app: a free starter from GitHub, the kit, or wiring everything yourself. The difference that matters after week one is not the number of files you get, it is whether anything keeps the code consistent once an agent starts writing it.

Typical open source starter vs Flutter Agent Kit at a glance

What you get on day one, and what happens on day thirty.

 Typical open source starterFlutter Agent Kit
Starting structureWhatever the author needed for one appFeature-first template with fixed slots per feature
State managementUsually Bloc, Provider or GetX, sometimes mixedRiverpod v3, hand-written, everywhere
Code generationOften freezed and build_runnerNone: plain Dart models and manual JSON
Instructions for AI agentsNone, or a README the agent skimsAGENTS.md plus on-demand docs and feature skills
NavigationVaries, often Navigator with MaterialPageRouteGoRouter with hand-written routes
UpdatesDepends on the maintainerLifetime updates included
PriceFree€99.99 one-time

The price row is the honest one: a free starter costs nothing today and charges you in review cycles later, every time the agent invents a folder or picks a different state pattern. The kit charges once and removes that negotiation from the work.

Start from the template

The scaffold command gives you this structure in one step, with the rules already in place.

Why a boilerplate alone is not enough

A boilerplate gives your project a starting structure. It does nothing to keep that structure intact once an AI agent starts generating code. The agent falls back to its training data: it may reach for Bloc when your project uses Riverpod, freezed when your models are plain Dart, or a type-first folder layout when your project is feature-first.

Every mismatch creates review cycles. You read the generated code, ask the agent to rewrite it, it makes different mistakes. The boilerplate saved you an hour of setup and then cost you hours of correction.

Flutter Agent Kit closes that gap. The AGENTS.md file and the docs tell the agent which conventions the boilerplate chose, so the first generation is closer to what you want and the structure survives the agent.

The stack decisions the boilerplate makes for you

Choosing a stack is the slowest part of starting a Flutter app. The boilerplate makes those decisions once, based on what held up in production:

  • State management: Riverpod v3, not Bloc, not Provider, not GetX.
  • Models: Plain Dart classes with fromJson and toJson, not freezed or json_serializable.
  • Networking: HTTP calls go through service classes, never directly in widgets or providers.
  • Routing: GoRouter for navigation.
  • Layout: Feature-first directory structure, not type-first.

You can change any of these. The kit is a starting point, not a lock-in. But starting from a coherent set of choices beats assembling your own and then arguing with an agent about them.

Frequently asked questions

Is this a free open source Flutter boilerplate?

No. Flutter Agent Kit is a paid, one-time purchase. The reason is that the value is not the folder structure, which you could assemble yourself, but the AGENTS.md rules, the docs and the feature skills that took real shipped apps to produce. You get lifetime access and all future updates through the original purchase channel.

Is this a starter template or a full app?

A starter template. The scaffold generates the project structure, the theme tokens, the routing setup and the rules, with no feature code. You build the features, and the agent follows the conventions already in place.

What if I want clean architecture?

The template is feature-first with a service layer, which keeps the boundaries without the folder ceremony. If you want the full layered layout, the dedicated page explains how the kit maps to it.

Do I need to know Flutter to use the boilerplate?

No. The kit is aimed at developers who can code but are new to Flutter and work with an AI agent in an editor. AGENTS.md and the docs tell the agent what to do, which patterns to use and which to avoid, so the agent stays disciplined without you learning every Flutter convention first.

Can I use the boilerplate on multiple projects?

Yes. The license is perpetual, non-exclusive and non-transferable and covers any number of personal or commercial projects. You can modify the kit for your own use. Redistribution or reselling the kit itself is not allowed.

Which AI coding agents work with it?

Cursor, Claude Code, opencode, GitHub Copilot, Gemini, ChatGPT and Devin. Any agent that reads markdown instructions works. The kit installs a router file for Codex, Claude Code, Gemini and Cursor and routes opencode through the shared core instructions, and AGENTS.md is agent-agnostic.

What happens after I buy?

Checkout redirects back with your license key and a copy is emailed to you. Run the scaffold command it shows in your terminal, open the generated project in your editor and paste the kickoff prompt to start building features.

Get the boilerplate

Flutter Agent Kit is the best Flutter boilerplate for teams who build with AI agents. It gives you the production-tested template, the AGENTS.md rules, the on-demand docs and the feature skills in a one-time purchase with lifetime access and all future updates included.