docs: add comprehensive Riverpod 3.0 migration documentation and Priority 1 implementation

Priority 1 (COMPLETE):
- Add riverpod_lint and custom_lint packages
- Update analysis_options.yaml with custom_lint plugin
- Update AGENTS.md with Riverpod 3.0 best practices
- Fix unsafe ref usage in modern_chat_input.dart
- All tests passing, zero breaking changes

Priority 2 (PLANNED):
- Complete migration plan for 39 providers (RIVERPOD_PRIORITY2_PLAN.md)
- Quick reference guide (RIVERPOD_PRIORITY2_QUICKREF.md)
- Progress tracker (RIVERPOD_PRIORITY2_TRACKER.md)
- Master documentation index (RIVERPOD_MIGRATION_INDEX.md)
- Analysis and summary documents

Documentation includes:
- Step-by-step migration examples
- 6-phase implementation plan (23-33 hours)
- Testing strategies and rollback procedures
- Risk assessment and mitigation
- Timeline and resource estimates
This commit is contained in:
cogwheel0
2025-09-30 14:27:50 +05:30
parent 3dfa5c6ec8
commit f18d378c3c
14 changed files with 4923 additions and 38 deletions

View File

@@ -141,9 +141,8 @@ class _ModernChatInputState extends ConsumerState<ModernChatInput>
@override
void dispose() {
try {
ref.read(composerHasFocusProvider.notifier).set(false);
} catch (_) {}
// Note: Avoid using ref in dispose as per Riverpod best practices
// The focus state will be naturally cleared when the widget is disposed
_controller.removeListener(_handleComposerChanged);
_controller.dispose();
_focusNode.dispose();