Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rrousselGit/riverpod
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.4
Choose a base ref
...
head repository: rrousselGit/riverpod
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: hooks_riverpod-v2.0.0
Choose a head ref

Commits on Dec 20, 2021

  1. Copy the full SHA
    09b844f View commit details

Commits on Dec 29, 2021

  1. Copy the full SHA
    ffc3f57 View commit details
  2. Copy the full SHA
    b7cabe7 View commit details
  3. Copy the full SHA
    14c6efd View commit details
  4. Copy the full SHA
    61c6640 View commit details

Commits on Dec 30, 2021

  1. Copy the full SHA
    d05f348 View commit details
  2. Copy the full SHA
    b89be95 View commit details

Commits on Dec 31, 2021

  1. Extract testing snippets

    rrousselGit committed Dec 31, 2021
    Copy the full SHA
    7074734 View commit details
  2. Copy the full SHA
    6467c7e View commit details
  3. Copy the full SHA
    b838f6a View commit details
  4. Copy the full SHA
    d9776b7 View commit details
  5. Copy the full SHA
    bee883d View commit details
  6. fix warning

    rrousselGit committed Dec 31, 2021
    Copy the full SHA
    ef479d0 View commit details
  7. Copy the full SHA
    52ab525 View commit details
  8. Adding isLoading, isError, isData and asError to AsyncValue.

    Those getters allow interacting with `AsyncValue` without having
    to rely on pattern matching.
    rrousselGit committed Dec 31, 2021
    Copy the full SHA
    3ee8307 View commit details
  9. Copy the full SHA
    77e1a24 View commit details

Commits on Jan 1, 2022

  1. Copy the full SHA
    f632dc6 View commit details
  2. Copy the full SHA
    cf74456 View commit details

Commits on Jan 2, 2022

  1. Copy the full SHA
    e71fd38 View commit details
  2. Add changelog

    rrousselGit committed Jan 2, 2022
    Copy the full SHA
    9009a40 View commit details
  3. Copy the full SHA
    707de78 View commit details
  4. changelog

    rrousselGit committed Jan 2, 2022
    Copy the full SHA
    6f6f677 View commit details

Commits on Jan 3, 2022

  1. Copy the full SHA
    e6724f8 View commit details

Commits on Jan 6, 2022

  1. Update reading.mdx (#1067)

    Fixes a minor spelling mistake.
    theyokohamalife authored Jan 6, 2022
    Copy the full SHA
    b4a0ff5 View commit details
  2. Fixed a grammatical typo (#1063)

    * Fixed a grammatical typo
    
    * Fixed a grammatical typo
    hamza-imran75 authored Jan 6, 2022
    Copy the full SHA
    e14bdfa View commit details
  3. Copy the full SHA
    223b546 View commit details

Commits on Jan 8, 2022

  1. Fix warning

    rrousselGit committed Jan 8, 2022
    Copy the full SHA
    89251d1 View commit details
  2. Move test

    rrousselGit committed Jan 8, 2022
    Copy the full SHA
    d60ead1 View commit details
  3. move more tests

    rrousselGit committed Jan 8, 2022
    Copy the full SHA
    27da4ac View commit details
  4. Copy the full SHA
    b37fb92 View commit details
  5. Add changelog

    rrousselGit committed Jan 8, 2022
    Copy the full SHA
    750a581 View commit details
  6. release 2.0.0-dev.0

    rrousselGit committed Jan 8, 2022
    Copy the full SHA
    a44757d View commit details
  7. Copy the full SHA
    5d5c2bd View commit details
  8. Update semantics

    fixes #1060
    rrousselGit committed Jan 8, 2022
    Copy the full SHA
    efb7725 View commit details
  9. Fixes invalid comments

    fixes #1062
    rrousselGit committed Jan 8, 2022
    Copy the full SHA
    5f70e9d View commit details

Commits on Jan 10, 2022

  1. Remove buy_me_coffee

    rrousselGit authored Jan 10, 2022
    Copy the full SHA
    751a5d9 View commit details

Commits on Jan 13, 2022

  1. Update family.mdx

    rrousselGit authored Jan 13, 2022
    Copy the full SHA
    a2cc7ee View commit details
  2. Update family.mdx

    rrousselGit authored Jan 13, 2022
    Copy the full SHA
    355d0cf View commit details

Commits on Jan 14, 2022

  1. Add provider.mdx

    rrousselGit committed Jan 14, 2022
    Copy the full SHA
    baeefb3 View commit details

Commits on Jan 15, 2022

  1. Bump shelljs from 0.8.4 to 0.8.5 in /website (#1090)

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 15, 2022
    Copy the full SHA
    03fc666 View commit details
  2. Bump follow-redirects from 1.14.4 to 1.14.7 in /website (#1091)

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 15, 2022
    Copy the full SHA
    01db98c View commit details
  3. Copy the full SHA
    5a4c9f1 View commit details
  4. Copy the full SHA
    5abc648 View commit details
  5. Copy the full SHA
    b76b1bc View commit details
  6. Remove dead file

    rrousselGit committed Jan 15, 2022
    Copy the full SHA
    8f02e0c View commit details
  7. Copy the full SHA
    367ce02 View commit details
  8. Make dependabot happy

    rrousselGit committed Jan 15, 2022
    Copy the full SHA
    332c11a View commit details
  9. upgrade docusaurus

    rrousselGit committed Jan 15, 2022
    Copy the full SHA
    29147d0 View commit details

Commits on Jan 16, 2022

  1. Copy the full SHA
    699ff04 View commit details
  2. Copy the full SHA
    ef5eb5b View commit details
Showing 792 changed files with 79,151 additions and 15,308 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: I have a problem and I need help
url: https://stackoverflow.com/questions/tagged/flutter
url: https://github.com/rrousselGit/riverpod/discussions
about: Pleast ask and answer questions here
7 changes: 7 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
enable-beta-ecosystems: true
updates:
- package-ecosystem: "pub"
directory: "/"
schedule:
interval: "weekly"
34 changes: 14 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: Build

on:
push:
pull_request:
paths-ignore:
- '**.md'
push:
branches:
- master
paths-ignore:
- '**.md'
schedule:
# runs the CI everyday at 10AM
- cron: "0 10 * * *"
@@ -14,13 +20,12 @@ jobs:
strategy:
matrix:
channel:
- dev
# - stable
- stable

steps:
- uses: actions/checkout@v2

- uses: subosito/flutter-action@v1
- uses: subosito/flutter-action@v2
with:
channel: ${{ matrix.channel }}

@@ -33,27 +38,16 @@ jobs:
- run: dart pub global activate melos

- name: Install dependencies
run: melos bootstrap

- name: Install cli fixtures
run: |
cd packages/riverpod_cli/fixtures/notifiers/input && flutter pub get && cd -
cd packages/riverpod_cli/fixtures/unified_syntax/input && flutter pub get && cd -
run: melos bootstrap --ignore "codemod_riverpod_*,riverpod_cli"

- name: Check format
run: flutter format --set-exit-if-changed .

- name: Generate (dart)
run: melos exec --depends-on="build_runner" --no-flutter -- "dart run build_runner build --delete-conflicting-outputs"
run: melos exec --ignore="website_snippets" -- "flutter format --set-exit-if-changed ."

- name: Generate (flutter)
run: |
cd examples/stackoverflow && flutter pub run build_runner build --delete-conflicting-outputs && cd -
cd examples/marvel && flutter pub run build_runner build --delete-conflicting-outputs && cd -
cd examples/todos && flutter pub run build_runner build --delete-conflicting-outputs
- name: Generate
run: melos exec --depends-on="build_runner" -- "dart run build_runner build --delete-conflicting-outputs"

- name: Analyze
run: melos exec --ignore="marvel" --ignore="codemod_riverpod_test*" -- "flutter analyze"
run: melos exec --ignore="codemod_riverpod_test*,riverpod_lint_flutter_test" -- "flutter analyze"

- name: Run tests
run: melos run test
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -5,14 +5,18 @@ pubspec.lock
*.freezed.dart
!packages/*/lib/**/*.freezed.dart

# Ignoring native folders of the example as they can be re-generated easily
# Ignoring native folders of the example as they can be re-generated easily using:
# flutter create --platforms=android,ios,web,windows,macos .
**/example/android/
**/example/ios/
**/example/web/
examples/**/android/
examples/**/ios/
examples/**/web/
examples/**/windows/
examples/**/macos/
# Include specific entitlements files which enable internet access
!examples/**/macos/Runner/DebugProfile.entitlements

# Miscellaneous
coverage/
@@ -53,3 +57,4 @@ lib/generated_plugin_registrant.dart

# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
.vscode/settings.json
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at darky12s@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
80 changes: 47 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<p align="center">
<a href="https://github.com/rrousselGit/river_pod/actions"><img src="https://github.com/rrousselGit/river_pod/workflows/Build/badge.svg" alt="Build Status"></a>
<a href="https://codecov.io/gh/rrousselgit/river_pod"><img src="https://codecov.io/gh/rrousselgit/river_pod/branch/master/graph/badge.svg" alt="codecov"></a>
<a href="https://github.com/rrousselgit/river_pod"><img src="https://img.shields.io/github/stars/rrousselgit/river_pod.svg?style=flat&logo=github&colorB=deeppink&label=stars" alt="Star on Github"></a>
<a href="https://github.com/rrousselGit/riverpod/actions"><img src="https://github.com/rrousselGit/riverpod/workflows/Build/badge.svg" alt="Build Status"></a>
<a href="https://codecov.io/gh/rrousselgit/riverpod"><img src="https://codecov.io/gh/rrousselgit/riverpod/branch/master/graph/badge.svg" alt="codecov"></a>
<a href="https://github.com/rrousselgit/riverpod"><img src="https://img.shields.io/github/stars/rrousselgit/riverpod.svg?style=flat&logo=github&colorB=deeppink&label=stars" alt="Star on Github"></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-purple.svg" alt="License: MIT"></a>
<a href="https://discord.gg/Bbumvej"><img src="https://img.shields.io/discord/765557403865186374.svg?logo=discord&color=blue" alt="Discord"></a>
<a href="https://www.buymeacoffee.com/remirousselet" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="25px"></a>

<p align="center">
<img src="https://github.com/rrousselGit/river_pod/blob/master/resources/icon/Facebook%20Cover%20A.png?raw=true" width="100%" alt="Riverpod" />
<a href="https://www.netlify.com">
<img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg" alt="Deploys by Netlify" />
</a>
</p>

<p align="center">
<img src="https://github.com/rrousselGit/riverpod/blob/master/resources/icon/Facebook%20Cover%20A.png?raw=true" width="100%" alt="Riverpod" />
</p>

</p>
@@ -65,9 +70,9 @@ See the [FAQ](#FAQ) if you have questions about what this means for [provider].

## Migration

With the release of the version 1.0.0, the syntax for interacting with providers changed.
With the release of version 1.0.0, the syntax for interacting with providers changed.

See [the migration guide](https://riverpod.dev/docs/migration/0.14.0_to_1.0.0/) for more informations
See [the migration guide](https://riverpod.dev/docs/migration/0.14.0_to_1.0.0/) for more information

## Index

@@ -76,10 +81,11 @@ See [the migration guide](https://riverpod.dev/docs/migration/0.14.0_to_1.0.0/)
- [Motivation](#motivation)
- [Contributing](#contributing)
- [FAQ](#faq)
- [Why another project when [provider] already exists?](#why-another-project-when-provider-already-exists)
- [Why another project when provider already exists?](#why-another-project-when-provider-already-exists)
- [Is it safe to use in production?](#is-it-safe-to-use-in-production)
- [Will this get merged with [provider] at some point?](#will-this-get-merged-with-provider-at-some-point)
- [Will [provider] be deprecated/stop being supported?](#will-provider-be-deprecatedstop-being-supported)
- [Will this get merged with provider at some point?](#will-this-get-merged-with-provider-at-some-point)
- [Will provider be deprecated/stop being supported?](#will-provider-be-deprecatedstop-being-supported)
- [Sponsors](#sponsors)

## Motivation

@@ -97,7 +103,7 @@ as an attempt to fix the common problems that [provider] face.
- Testable and composable
- Improve the readability of [InheritedWidget]s when we have multiple of them
(which would naturally lead to a deeply nested widget tree).
- Make apps more scalable with a unidirectional data-flow.
- Make apps more scalable with a unidirectional data flow.

From there, [Riverpod] goes a few steps beyond:

@@ -124,20 +130,21 @@ Here is a curated list of how you can help:

- Report bugs and scenarios that are difficult to implement
- Report parts of the documentation that are unclear
- Fix typos/grammar mistakes
- Update the documentation / add examples
- Implement new features by making a pull-request

## FAQ

### Why another project when [provider] already exists?
### Why another project when provider already exists?

While [provider] is largely used and well accepted by the community,
it is not perfect either.

People regularly file issues or ask questions about some problems they face, such as:

- Why do I have a `ProviderNotFoundException`?
- How can I make that my state automatically disposed of when not used anymore?
- How can I automatically dispose my state when not used anymore?
- How to make a provider that depends on other (potentially complex) providers?

These are legitimate problems, and I believe that something can be improved to fix
@@ -152,38 +159,45 @@ very similar usages, but we cannot create a lightbulb by improving our candle.

### Is it safe to use in production?

Yes, but with caution.
Yes.

[Riverpod] recently left its experimental status, but it isn't fully stable either.
The API may change slightly when more features are added, and some use-cases
may not be as simple as they could be.
[Riverpod] is stable and actively maintained.

But overall, you should be able to use [Riverpod] without trouble.
### Will this get merged with provider at some point?

### Will this get merged with [provider] at some point?
It is possible. Some experiments are being made that could make this
doable. But their outcome isn't clear yet.
(no link to an issue to avoid putting unnecessary pressure on the people
involved)

No. At least not until it is proven that the community likes [Riverpod]
and that it doesn't cause more problems than it solves.
If those experiments are successful (although unlikely), then Provider
and Riverpod could be fused.

While [provider] and this project have a lot in common, they do have some
major differences. Differences big enough that it would be a large breaking
change for users of [provider] to migrate [Riverpod].
### Will provider be deprecated/stop being supported?

Considering that, separating both projects initially sounds like a better
compromise.
Maybe.

### Will [provider] be deprecated/stop being supported?
Provider has numerous flaws that can't quite be fixed. At the same time,
Riverpod has proven to fix many of those.
As such, deprecating Provider is being considered.

Not in the short term, no.
The only inconvenience of Riverpod is the need for a "Consumer",
which Provider doesn't need.
But some alternatives are being investigated to maybe remove this constraint.

This project is still experimental and unpopular. While it is, in a way,
a [provider] 2.0, its worth has yet to be proven.
Whatever the decision is, a migration tool is planned to help assist
migration from provider to [Riverpod]. Along with whatever other tool necessary to help.

Until it is certain that [Riverpod] is a better way of doing things
and that the community likes it, [provider] will still be maintained.
## Sponsors

<p align="center">
<a href="https://raw.githubusercontent.com/rrousselGit/freezed/master/sponsorkit/sponsors.svg">
<img src='https://raw.githubusercontent.com/rrousselGit/freezed/master/sponsorkit/sponsors.svg'/>
</a>
</p>

[provider]: https://github.com/rrousselGit/provider
[riverpod]: https://github.com/rrousselGit/river_pod
[riverpod]: https://github.com/rrousselGit/riverpod
[flutter_hooks]: https://github.com/rrousselGit/flutter_hooks
[inheritedwidget]: https://api.flutter.dev/flutter/widgets/InheritedWidget-class.html
[hooks_riverpod]: https://pub.dev/packages/hooks_riverpod
9 changes: 5 additions & 4 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -48,11 +48,11 @@

- "unused_widget_parameter"
- "what caused a widget to rebuild?"
- Don't create providers inside `build` (https://github.com/rrousselGit/river_pod/issues/144#issuecomment-695361486)
- don't mutate other providers inside "create" (https://github.com/rrousselGit/river_pod/issues/144#issuecomment-695764973)
- Don't create providers inside `build` (https://github.com/rrousselGit/riverpod/issues/144#issuecomment-695361486)
- don't mutate other providers inside "create" (https://github.com/rrousselGit/riverpod/issues/144#issuecomment-695764973)
- wrap with `Consumer`
- No circular dependency
- warn about `ref.watch(autoDispose)` after an await (https://github.com/rrousselGit/river_pod/issues/243)
- No circular dependencies
- warn about `ref.watch(autoDispose)` after an await (https://github.com/rrousselGit/riverpod/issues/243)
- warn watch(autoDispose) in non-autoDispose provider
- `always_specify_name`
- `name_match_variable`
@@ -61,6 +61,7 @@

## Devtool:

- "what caused a widget to rebuild?"
- entire app state for the root `ProviderContainer`
- highlight state changes
- Show the number of widgets that rebuilt in the same frame than the state change
Loading