DEV Community

Abrar Ahmed Abrar Ahmed
Abrar Ahmed Abrar Ahmed

Posted on

How I Built a 32K+ Flutter & Dart Code Repair Dataset for LLM Fine-Tuning

Most coding datasets focus on generating code.

But there is another problem that deserves more attention:

Can an AI model actually understand broken Flutter/Dart code and repair it correctly?

While working with Flutter development and LLM fine-tuning, I started building a dataset specifically around this problem.

The result is a 32K+ record Flutter & Dart Code Repair Dataset designed for supervised fine-tuning (SFT) and code-repair experiments.

What Is a Flutter & Dart Code Repair Dataset?

A code repair dataset contains examples where a model receives problematic code and needs to identify the issue and produce a corrected version.

This is different from ordinary code-generation datasets.

For example:

Code generation:

"Create a Flutter login screen."

The model generates new code.

Code repair:

"This Flutter code contains a Dart type error. Diagnose the problem and provide the corrected code."

The model needs to understand existing code, identify the cause of the problem, and modify the code without unnecessarily breaking the rest of the application.

That is the problem I wanted this dataset to focus on.

Why Flutter and Dart?

General programming datasets are useful, but frameworks have their own patterns and failure modes.

Flutter is a good example.

A model may understand basic Dart syntax but still struggle with:

Flutter widget trees
StatefulWidget and StatelessWidget
BuildContext
build() methods
Null safety
Widget properties
Dart type mismatches
Flutter-specific APIs
State-related problems
Dart analyzer errors

A model that performs well on general programming tasks does not automatically become good at repairing Flutter applications.

This is why I focused specifically on Dart and Flutter code repair.

Dataset Overview

The current dataset contains 32K+ supervised fine-tuning records focused on Flutter and Dart code diagnosis and repair.

The dataset is designed for developers and researchers experimenting with:

Large Language Models
Supervised Fine-Tuning
QLoRA
AI coding assistants
Automated code repair
Flutter/Dart developer tools

The records are structured for machine-learning workflows and focus on the relationship between:

Problem β†’ Diagnosis β†’ Corrected Code

What Types of Errors Are Covered?

The dataset covers multiple categories of Flutter and Dart programming problems.

Syntax Errors

Examples involving invalid Dart syntax, missing elements, malformed expressions, and related programming mistakes.

Type Errors

Problems where variables, expressions, function arguments, or return values have incompatible types.

Null-Safety Errors

Examples involving nullable and non-nullable values, null checks, null assertions, and related Dart null-safety behavior.

Flutter Widget Errors

Problems involving Flutter widgets, widget properties, widget composition, and incorrect widget usage.

Static Analysis Issues

Examples based around problems that can be identified through Dart and Flutter analysis.

The goal isn't simply to teach a model how to generate Dart code.

The goal is to help models become better at repairing existing Dart and Flutter code.

What Does a Training Example Look Like?

A simplified example of the training concept looks like this:

{
"instruction": "Fix the Dart/Flutter code.",
"input": "problematic Dart or Flutter code",
"output": "corrected Dart or Flutter code"
}

The actual dataset contains structured records designed for supervised fine-tuning workflows.

The important relationship is:

Problem β†’ Diagnosis β†’ Repair

This makes the dataset suitable for experiments involving models that need to repair code rather than only generate code.

Why Dataset Quality Matters

One of the biggest lessons I learned while building this dataset is that a large dataset isn't automatically a good dataset.

A dataset can contain thousands of examples and still produce poor training results if it contains:

Incorrect fixes
Unrealistic errors
Duplicate examples
Placeholder code
Broken corrections
Ambiguous problems
Code that does not actually work

For code repair, quality and verification matter just as much as quantity.

That is why I focused on validating the examples instead of simply generating a large number of records.

What Can You Build With This?

There are several possible applications.

AI Coding Assistants

Use the dataset as training data for experiments involving Flutter/Dart coding assistants.

Automated Code Repair

Train or fine-tune models to identify programming problems and generate corrected code.

Flutter Developer Tools

Use code-repair training data as part of an IDE plugin or developer assistant.

LLM Research

Experiment with:

SFT
QLoRA
Code intelligence
Automated program repair
LLM-based developer tools
Programming-focused language models
Who Is This Dataset For?

This dataset may be useful for:

Flutter developers building AI-powered developer tools.

ML researchers experimenting with programming-focused language models.

LLM developers looking for domain-specific SFT data.

AI coding assistant builders working on automated error diagnosis and repair.

Students and researchers studying code intelligence and automated program repair.

Explore the Project

I've made supporting resources available so developers can explore the project and understand how the dataset is structured.

GitHub

The GitHub repository contains project documentation and sample resources.

πŸ‘‰ https://github.com/AbrarAhmedDev/flutter-code-repair-dataset

Full Dataset

The complete dataset is available here:

πŸ‘‰ https://5220745837352.gumroad.com/l/flutter-code-repair-dataset

What Would You Add?

I'm interested in hearing from other developers and ML researchers.

If you were training an LLM specifically for Flutter/Dart code repair:

What type of errors would you want the training dataset to contain more of?

Would you focus more on:

Null-safety errors?
Flutter widget errors?
State management?
Type errors?
Multi-error files?
Larger real-world applications?

And in your experience, is code repair harder than code generation?

I'd love to hear your thoughts in the comments.

Final Thoughts

I started this project with a simple question:

Can smaller language models become significantly better at repairing Flutter and Dart code when they are trained on domain-specific code-repair data?

There is still a lot to experiment with.

Model size, training methodology, dataset quality, error complexity, and evaluation are all important parts of the problem.

I'm continuing to work on the dataset and Flutter/Dart code-repair models, and I'm interested in hearing from others working on similar problems.

If you're building something related to LLMs, code repair, Flutter, or developer AI, share what you're working on below.

Top comments (0)