extensions/intellij/README.md
Bloc plugin for IntelliJ and Android Studio with support for the Bloc Library and provides tools for effectively creating Blocs and Cubits for both Flutter and AngularDart apps.
You can find the plugin in the official IntelliJ and Android Studio marketplace:
Simply right click on the File Project view, go to New -> Bloc Class, give it a name, select if you want to use Equatable, and click on OK to see all the boilerplate generated.
Wrapping a widget is also possible with Alt + ENTER shortcut.
If you wish to disable this quick code action (Bloc) Wrap with you can do it so by going to
Settings - Editor - Intentions - Bloc.
Right click and use Generate -> Equatable Props to automatically generate the props override when using Equatable.
| 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 with build, act and expect |
mockbloc | Creates a class extenting MockBloc |
mockcubit | Creates a class extending MockCubit |
fake | Creates a class extending Fake |
| Shortcut | Description |
|---|---|
feventwhen | Creates an event handler with freeze.when function |
feventmap | Creates an event handler with freeze.map function |
fstate | Creates a sub state |
fevent | Creates a sub event |
Using Plugin Repository