Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>bloc-extendedNew to Visual Studio Code? Get it now.
bloc-extended

bloc-extended

SushanShakya

|
7,679 installs
| (1) | Free
Additional Features to bloc by FelixAngelov
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Bloc


All the credits for this projects go to Felangel

Original Extension by Felangel

This modification included added functionality to 'New Cubit' to reduce the boilerplate for get and post request

Overview

VSCode support for the Bloc Library and provides tools for effectively creating Blocs and Cubits for both Flutter and AngularDart apps.

Commands

Command Description
Bloc: New Bloc Generate a new Bloc
Cubit: New Cubit Generate a new Cubit

Extended Functionality of Cubit: New Cubit : Use _get with the cubit name to get extra code for HTTP get request User _post with the cubit name to get extra code for HTTP post request

You can activate the commands by launching the command palette (View -> Command Palette) and running entering the command name or you can right click on the directory in which you'd like to create the bloc/cubit and select the command from the context menu.

demo

Code Actions

Action Description
Wrap with BlocBuilder Wraps current widget in a BlocBuilder
Wrap with BlocListener Wraps current widget in a BlocListener
Wrap with BlocConsumer Wraps current widget in a BlocConsumer
Wrap with BlocProvider Wraps current widget in a BlocProvider
Wrap with RepositoryProvider Wraps current widget in a RepositoryProvider

demo

Snippets

Bloc

Shortcut Description
importbloc Imports package:bloc
importflutterbloc Imports package:flutter_bloc
importbloctest Imports package:bloc_test
bloc Creates a bloc class
cubit Creates a cubit class
blocobserver Creates a BlocObserver class
blocprovider Creates a BlocProvider widget
multiblocprovider Creates a MultiBlocProvider widget
repoprovider Creates a RepositoryProvider widget
multirepoprovider Creates a MultiRepositoryProvider widget
blocbuilder Creates a BlocBuilder widget
bloclistener Creates a BlocListener widget
multibloclistener Creates a MultiBlocListener widget
blocconsumer Creates a BlocConsumer widget
blocof Shortcut for BlocProvider.of()
repoof Shortcut for RepositoryProvider.of()
read Shortcut for context.read()
watch Shortcut for context.watch()
select Shortcut for context.select()
blocstate Creates a state class
blocevent Creates an event class
bloctest Creates a blocTest

Freezed Bloc

Shortcut Description
feventwhen Creates a map event to state function with freeze.when function
feventmap Creates a map event to state function with freeze.map function
fstate Creates a sub state
fevent Creates a sub event
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft