use_notifier_suffix
v0.1.0 Warning Class Naming
This rule flags classes that extend Notifier (or AsyncNotifier) but don’t include the Notifier suffix in their name. Consistent naming makes it immediately clear which classes are Riverpod Notifiers when scanning through your codebase.
Why use this rule
Section titled “Why use this rule”Riverpod Notifiers have a specific lifecycle and behavior — they’re created by providers, have a build() method, and manage reactive state. When a class like CounterManager extends Notifier without the suffix, developers have to inspect the class to understand its role. The Notifier suffix makes the architectural intent obvious.
See also: Riverpod Notifier documentation
import 'package:riverpod/riverpod.dart';
// Missing 'Notifier' suffixclass CounterManager extends Notifier<int> { @override int build() => 0;
void increment() => state++;}import 'package:riverpod/riverpod.dart';
class CounterNotifier extends Notifier<int> { @override int build() => 0;
void increment() => state++;}Configuration
Section titled “Configuration”To disable this rule:
plugins: many_lints: diagnostics: use_notifier_suffix: false