Skip to content

Commit

Permalink
fix: #138 migrate to flutterVsyncs instead of vsyncOverride
Browse files Browse the repository at this point in the history
  • Loading branch information
gadfly361 committed Nov 14, 2023
1 parent 3495cfd commit b9a437c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@

Kilian Schulte (schultek) - Creator & Lead Developer
Martin Jablečník (mjablecnik) - Contributor
Jeff Ward (fuzzybinary) - Contributor
Jeff Ward (fuzzybinary) - Contributor
Matthew Jaoudi (gadfly361) - Contributor
5 changes: 5 additions & 0 deletions packages/jaspr_riverpod/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Unreleased 0.3.8

- Upgrade `riverpod` to `v2.4.6`
- Update `jaspr_riverpod`'s dependency on `riverpod`'s `vsyncOverride` to `flutterVsyncs`

## 0.3.7

- Fixed bug with SyncProvider.
Expand Down
6 changes: 2 additions & 4 deletions packages/jaspr_riverpod/lib/src/framework.dart
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class _UncontrolledProviderScopeElement extends InheritedElement {
debugCanModifyProviders ??= _debugCanModifyProviders;
}

vsyncOverride ??= _jasprVsync;
flutterVsyncs.add(_jasprVsync);
super.mount(parent, prevSibling);
}

Expand Down Expand Up @@ -370,9 +370,7 @@ class _UncontrolledProviderScopeElement extends InheritedElement {
debugCanModifyProviders = null;
}

if (vsyncOverride == _jasprVsync) {
vsyncOverride = null;
}
flutterVsyncs.remove(_jasprVsync);
super.unmount();
}

Expand Down
2 changes: 1 addition & 1 deletion packages/jaspr_riverpod/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ environment:
dependencies:
jaspr: ^0.9.0
meta: ^1.9.1
riverpod: ^2.3.2
riverpod: ^2.4.6

dev_dependencies:
jaspr_test: '>=0.1.0 <1.0.0'
Expand Down

0 comments on commit b9a437c

Please sign in to comment.