fix(flutter): apply Riverpod 3 NotifierProvider conversion missed in 14d7678

The previous fix-forward intended this change but the Edit didn't
make it into the commit (only the Go side landed). Re-applying the
StateProvider → NotifierProvider conversion so flutter analyze stops
failing on the undefined-function for StateProvider.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-10 20:02:29 -04:00
parent 14d7678624
commit f3378dd610
@@ -74,7 +74,18 @@ final clientUpdateProvider =
/// later release's banner re-appears even if the operator dismissed /// later release's banner re-appears even if the operator dismissed
/// the previous one. Not persisted — restart re-shows the banner, /// the previous one. Not persisted — restart re-shows the banner,
/// which is acceptable nudging for v1. /// which is acceptable nudging for v1.
final _dismissedVersionsProvider = StateProvider<Set<String>>((_) => <String>{}); class _DismissedVersionsNotifier extends Notifier<Set<String>> {
@override
Set<String> build() => <String>{};
void add(String version) {
state = {...state, version};
}
}
final _dismissedVersionsProvider =
NotifierProvider<_DismissedVersionsNotifier, Set<String>>(
_DismissedVersionsNotifier.new);
/// True when the update banner should render: an UpdateInfo is /// True when the update banner should render: an UpdateInfo is
/// available AND the operator hasn't dismissed this specific version. /// available AND the operator hasn't dismissed this specific version.
@@ -89,9 +100,8 @@ final shouldShowUpdateBannerProvider = Provider<UpdateInfo?>((ref) {
/// Dismiss controller: marks the given version as dismissed so the /// Dismiss controller: marks the given version as dismissed so the
/// banner stops showing for this session. /// banner stops showing for this session.
final dismissUpdateProvider = Provider<void Function(String)>((ref) { final dismissUpdateProvider = Provider<void Function(String)>((ref) {
return (version) { return (version) =>
ref.read(_dismissedVersionsProvider.notifier).update((s) => {...s, version}); ref.read(_dismissedVersionsProvider.notifier).add(version);
};
}); });
/// Installer provider — depends on dio so the install download uses /// Installer provider — depends on dio so the install download uses