Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Flutter Clean Code & BLoC GeneratorNew to Visual Studio Code? Get it now.
Flutter Clean Code & BLoC Generator

Flutter Clean Code & BLoC Generator

Vishal Gole

|
3 installs
| (0) | Free
Generate Flutter Clean Architecture models, repositories and BLoC boilerplate from API JSON responses. Select only the fields you need, customize Dart names and preview generated files before writing them to your Flutter project. Fully local and AI-free.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Flutter Clean Architecture Generator

A production-quality Visual Studio Code extension that analyzes JSON API responses locally and generates complete Flutter Clean Architecture boilerplate code (Data Models, Repositories, BLoC, Event, and State).

Privacy & Offline Guarantee: API responses are processed locally within VS Code. The extension does not send API responses to external services and does not use AI.


Features

  • ⚡ 100% Local & Deterministic JSON Analyzer: Automatically detects Dart data types (int, double, String, bool, Object, List<T>, nullability, and nested sub-models).
  • 🏷️ Parameter Customization Workbench:
    • Checkbox inclusion toggles (☑ / ☐), Select All, and Clear All.
    • Parameter search filter.
    • Independent customization of Dart Property Names (e.g. cifNumber) and Display Labels (e.g. CIF Number) while strictly preserving exact JSON Keys (customer_id).
  • 🧱 Clean Architecture Code Generation:
    • Model: final nullable properties, fromJson, toJson, and sub-model files.
    • Repository: Domain Repository interface & Data Repository implementation with HTTP request logic.
    • BLoC Layer: BLoC, Event, State (supporting Initial, Loading, Loaded, Error), and copyable UI BlocListener snippet.
  • 👁️ In-Memory Code Preview & Overwrite Protection: Preview all generated files in memory before writing, with automatic file conflict detection.

Example Workflow

  1. Open a Flutter workspace in VS Code.
  2. Press Cmd+Shift+P (or Ctrl+Shift+P on Windows/Linux) to open the Command Palette.
  3. Search and execute: Flutter Clean Architecture: Generate Feature.
  4. Paste an API JSON response:
    {
      "customerId": 12345,
      "customerName": "John Doe",
      "balance": 25000.50,
      "address": {
        "city": "Pune",
        "state": "Maharashtra"
      }
    }
    
  5. Click Analyze Response, customize field names/labels if desired, and configure feature metadata.
  6. Click Preview to inspect generated Dart files in tabs without writing to disk.
  7. Click Generate Feature to safely write files into your project.

Generated Feature Architecture

lib/
└── features/
    └── customer/
        ├── data/
        │   ├── models/
        │   │   ├── customer_model.dart
        │   │   └── address_model.dart
        │   └── repositories/
        │       └── customer_repository_impl.dart
        │
        ├── domain/
        │   └── repositories/
        │       └── customer_repository.dart
        │
        └── presentation/
            └── bloc/
                ├── customer_bloc.dart
                ├── customer_event.dart
                └── customer_state.dart

Supported JSON Types

  • int & double (safely handled with num casts)
  • String
  • bool
  • null / dynamic
  • Object (nested sub-models)
  • List<Primitive> (e.g. List<String>, List<int>)
  • List<Object> (e.g. List<AccountModel>)

Limitations

  • State management pattern defaults to flutter_bloc.
  • Requires a JSON object or array of objects as root input (primitives like raw "John" or 123 are rejected).

License

MIT License

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft