Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Flutter Bloc BoilerplateNew to Visual Studio Code? Get it now.
Flutter Bloc Boilerplate

Flutter Bloc Boilerplate

Dev Deshan

|
1 install
| (1) | Free
Generate Bloc or Cubit boilerplate with Equatable and common utilities.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

flutter-bloc-gen

Generate Bloc or Cubit boilerplate for Flutter with Equatable support and common utilities.


Features

  • Quickly generate Cubit or Bloc with state management boilerplate.
  • Includes Equatable for easy state comparisons.
  • Generates separate files for state, cubit/bloc, and event (for Bloc).
  • Includes common helper functions:
    • copyWith
    • resetState
    • API call simulation
    • Dialog showing function with context
  • Supports common data types (int, String, bool, List, DateTime, etc.)
  • Saves generated files in a folder with the chosen name.
  • Automatically copies all generated code to clipboard for easy pasting.

How to Use

  1. Open a Flutter project in VS Code.
  2. Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac) to open the Command Palette.
  3. Search and run Generate Bloc or Cubit Boilerplate.
  4. Choose either Cubit or Bloc.
  5. Enter a name for your Bloc/Cubit (e.g., AuthBloc or CounterCubit).
  6. Generated files will be saved in a folder named after your input and copied to the clipboard.

Example

Cubit:

Folder CounterCubit/ contains:

counter_cubit.dart counter_state.dart

Bloc:

Folder AuthBloc/ contains:

auth_bloc.dart auth_event.dart auth_state.dart

All files include ready-to-use Equatable boilerplate, copyWith, resetState, API simulation, and helper methods.


Requirements

  • Flutter & Dart installed.
  • VS Code with Flutter and Dart extensions.

Extension Settings

This extension currently does not have configurable settings.


Release Notes

0.0.1

  • Initial release
  • Bloc & Cubit boilerplate generator with Equatable support
  • Files copied to clipboard and saved to folder
  • Common helper methods included

For more information

  • Flutter Official Documentation
  • Bloc Package
  • Equatable Package
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft