← All extensions

Riverpod Snippets

v0.0.1 · by Steeven Lopez · added 3 November 2026

Collection of Riverpod snippets for Flutter/Dart development on the Zed editor.

Snippets

How to install

With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.

You can also open the Extensions panel in the app and search for Riverpod Snippets. The extension's id is riverpod-dart-flutter-snippets.

Don't have Forge Super yet? Download it here.

README

From the extension's repository, written by its authors and not by Mentenaz. See the source.

Riverpod Snippets for Zed

A comprehensive collection of Riverpod snippets for Flutter development in the Zed editor. These snippets are designed to accelerate your Riverpod workflow and are only available in .dart files.

Installation

From Zed Extensions (Recommended)

  1. Open Zed
  2. Go to Extensions (Ctrl+Shift+X or Cmd+Shift+X)
  3. Search for "Riverpod Snippets"
  4. Click Install

Available Snippets

Code Generation (riverpod_generator)

PrefixDescription
riverpodPartPart statement for Riverpod code generation
riverpodBasic Provider with @riverpod annotation
riverpodKeepAliveNon-autodispose Provider with @Riverpod(keepAlive: true)
riverpodFutureFutureProvider with @riverpod
riverpodFutureKeepAliveNon-autodispose FutureProvider with @riverpod
riverpodStreamStreamProvider with @riverpod
riverpodStreamKeepAliveNon-autodispose StreamProvider with @riverpod
riverpodClassNotifier/NotifierProvider with @riverpod
riverpodClassKeepAliveNon-autodispose Notifier/NotifierProvider with @riverpod
riverpodAsyncClassAsyncNotifier/AsyncNotifierProvider with @riverpod
riverpodAsyncClassKeepAliveNon-autodispose AsyncNotifier/AsyncNotifierProvider with @riverpod
riverpodStreamClassStreamNotifier/StreamNotifierProvider with @riverpod
riverpodStreamClassKeepAliveNon-autodispose StreamNotifier/StreamNotifierProvider with @riverpod

Provider

PrefixDescription
providerAutodispose Provider
providerKeepAliveNon-autodispose Provider
providerFamilyAutodispose family Provider

FutureProvider

PrefixDescription
futureProviderAutodispose FutureProvider
futureProviderKeepAliveNon-autodispose FutureProvider
futureProviderFamilyAutodispose family FutureProvider

StreamProvider

PrefixDescription
streamProviderAutodispose StreamProvider
streamProviderKeepAliveNon-autodispose StreamProvider
streamProviderFamilyAutodispose family StreamProvider

Notifier Classes

PrefixDescription
notifierNotifier class
notifierFamilyParametrized Notifier class
asyncNotifierAsyncNotifier class
asyncNotifierFamilyParametrized AsyncNotifier class
streamNotifierStreamNotifier class
streamNotifierFamilyParametrized StreamNotifier class

NotifierProvider

PrefixDescription
notifierProviderAutodispose NotifierProvider
notifierProviderKeepAliveNon-autodispose NotifierProvider
notifierProviderFamilyAutodispose family NotifierProvider

AsyncNotifierProvider

PrefixDescription
asyncNotifierProviderAutodispose AsyncNotifierProvider
asyncNotifierProviderKeepAliveNon-autodispose AsyncNotifierProvider
asyncNotifierProviderFamilyAutodispose family AsyncNotifierProvider

StreamNotifierProvider

PrefixDescription
streamNotifierProviderAutodispose StreamNotifierProvider
streamNotifierProviderKeepAliveNon-autodispose StreamNotifierProvider
streamNotifierProviderFamilyAutodispose family StreamNotifierProvider

Consumer Widgets

PrefixDescription
consumerConsumer builder widget
statelessConsumerWidgetConsumerWidget
statefulConsumerWidgetConsumerStatefulWidget with State
statelessHookConsumerWidgetHookConsumerWidget (with Flutter Hooks)
statefulHookConsumerWidgetStatefulHookConsumerWidget (with Flutter Hooks)

Ref Methods

PrefixDescription
listen / reflistenref.listen()

Legacy (StateNotifier & StateProvider)

PrefixDescription
stateNotifierStateNotifier class
stateNotifierFamilyParametrized StateNotifier class
stateNotifierProviderAutodispose StateNotifierProvider
stateNotifierProviderKeepAliveNon-autodispose StateNotifierProvider
stateNotifierProviderFamilyAutodispose family StateNotifierProvider
stateProviderAutodispose StateProvider
stateProviderKeepAliveNon-autodispose StateProvider
stateProviderFamilyAutodispose family StateProvider

Usage

  1. Open a .dart file in Zed
  2. Type the snippet prefix (e.g., riverpod)
  3. Press Tab to expand the snippet
  4. Use Tab to navigate between placeholders
  5. Fill in the values and press Tab to move to the next placeholder

Examples

Creating a Provider with Code Generation

Type riverpod and press Tab:

@riverpod
String myProvider(Ref ref) {
  return 'Hello World';
}

Creating a Notifier with Code Generation

Type riverpodClass and press Tab:

@riverpod
class Counter extends _$Counter {
  @override
  int build() {
    return 0;
  }
}

Creating a Provider (without code generation)

Type provider and press Tab:

final myProvider = Provider.autoDispose<String>((ref) {
  return 'Hello World';
});

Creating a ConsumerWidget

Type statelessConsumerWidget and press Tab:

class MyWidget extends ConsumerWidget {
  const MyWidget({super.key});

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    return Container();
  }
}

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

Apache License 2.0 - see LICENSE for details.

Related

Acknowledgments

This extension was inspired by Robert Brunhage's Flutter Riverpod Snippets.