Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>CocopodNew to Visual Studio Code? Get it now.
Cocopod

Cocopod

Gaupestudio

|
2 installs
| (0) | Free
Enhance your Riverpod development with code snippets and refactoring tools.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Cocopod

A VSCode extension that makes working with Riverpod + Flutter faster.
It provides refactor actions (quick fixes) and snippets to save you from boilerplate.


✨ Features

🔧 Refactors

  • Convert StatefulWidget → ConsumerStatefulWidget
  • Convert ConsumerStatefulWidget → StatefulWidget
  • Automatically fixes:
    • The createState return type
    • The matching State class
    • Adds the Riverpod import if missing (for conversions to ConsumerStatefulWidget)

These appear as Quick Fixes (lightbulb) when your cursor is on a widget class.


📄 Snippets

Type a prefix and press Tab:

  • riverstate → Boilerplate for a ConsumerStatefulWidget
  • riverfreezed → Boilerplate for a NotifierProvider + Freezed state

Example (riverfreezed expands to):

// ignore_for_file: non_constant_identifier_names

import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

part 'feature.freezed.dart';

final featureStateProvider = NotifierProvider<FeatureProvider, FeatureState>(() {
  return FeatureProvider();
});

@freezed
class FeatureState with _$FeatureState {
  const factory FeatureState({
    @Default("") String hello_world,
  }) = _FeatureState;
}

class FeatureProvider extends Notifier<FeatureState> {
  @override
  FeatureState build() {
    // ignore: prefer_const_constructors
    return FeatureState();
  }
}

⚡ Requirements

  • Flutter with Riverpod.
  • For riverfreezed, you’ll also need freezed and build_runner.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft