feat: upgrade Riverpod 3, go_router 17, google_fonts 8, package_info_plus 9

Migrate StateNotifierProvider/StateNotifier → NotifierProvider/Notifier,
StateProvider → NotifierProvider with simple notifier, FamilyAsyncNotifier
removed in Riverpod 3 (replaced with constructor-arg pattern), and rename
.valueOrNull → .value throughout all providers and screens.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 06:21:17 -04:00
parent c8becd6afd
commit a687e3637f
12 changed files with 120 additions and 91 deletions
+3 -3
View File
@@ -25,7 +25,7 @@ class ProjectsNotifier extends AsyncNotifier<List<Project>> {
goal: goal,
color: color,
);
state = AsyncData([...state.valueOrNull ?? [], project]);
state = AsyncData([...state.value ?? [], project]);
return project;
}
@@ -33,7 +33,7 @@ class ProjectsNotifier extends AsyncNotifier<List<Project>> {
final updated =
await ref.read(projectsRepositoryProvider).update(id, fields);
state = AsyncData([
for (final p in state.valueOrNull ?? [])
for (final p in state.value ?? [])
if (p.id == id) updated else p,
]);
return updated;
@@ -42,7 +42,7 @@ class ProjectsNotifier extends AsyncNotifier<List<Project>> {
Future<void> delete(int id) async {
await ref.read(projectsRepositoryProvider).delete(id);
state = AsyncData([
for (final p in state.valueOrNull ?? [])
for (final p in state.value ?? [])
if (p.id != id) p,
]);
}