Skip to content

chore(flame_riverpod): Stop using the deprecated container.exists - #4215

Merged
spydon merged 1 commit into
mainfrom
devkage/fix-riverpod-exists-deprecation
Nov 7, 2026
Merged

spydon merged 1 commit into
mainfrom
devkage/fix-riverpod-exists-deprecation

Conversation

@ufrshubham

Copy link
Copy Markdown
Member

Description

riverpod 3.5.0, released on 2026-11-06, deprecated ProviderContainer.exists. The ^3.0.3 constraint in flame_riverpod resolves to that release, and since CI analyzes with fatal-infos, the deprecation fails the required analyze and analyze-latest checks on every PR, regardless of what the PR changes.

  • RiverpodAwareGameWidgetState.exists now reads the new provider.exists listenable. The public exists method of flame_riverpod doesn't change.
  • The minimum riverpod and flutter_riverpod versions go up to 3.5.0, because that release added the getter. Users of flame_riverpod will need to be on 3.5.0 or newer.

The deprecation message says provider.exist, but the getter in 3.5.0 is named provider.exists.

Tested locally on Flutter 3.47.9: the analyzer is clean across the workspace, and melos run test:select --no-select passes for all 36 packages. The existing exists tests in flame_riverpod cover this change, so no new tests were added.

Checklist

  • I have followed the Contributor Guide when preparing my PR.
  • [-] I have updated/added tests for ALL new/updated/fixed functionality.
  • [-] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • [-] I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

riverpod 3.5.0 deprecated `ProviderContainer.exists` in favor of the new
`provider.exists` listenable. The `riverpod: ^3.0.3` constraint resolves
to that release, and since CI analyzes with `fatal-infos` the deprecation
fails the required `analyze` and `analyze-latest` checks on every PR.

Read `provider.exists` instead, and raise the minimum `riverpod` and
`flutter_riverpod` versions to 3.5.0, the release that added it.
@ufrshubham ufrshubham changed the title fix(flame_riverpod): Stop using the deprecated container.exists chore(flame_riverpod): Stop using the deprecated container.exists Nov 7, 2026
@ufrshubham
ufrshubham enabled auto-merge (squash) November 7, 2026 07:35
@spydon
spydon merged commit 649c3cc into main Nov 7, 2026
12 checks passed
@spydon
spydon deleted the devkage/fix-riverpod-exists-deprecation branch November 7, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants