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();
}
}