Ahmed Elsayed

Results 121 comments of Ahmed Elsayed
trafficstars

If you mean the transition to be the same as CupertinoModalPopup, then no.

This is similar to #2097 I had a proposal for this before at https://github.com/rrousselGit/riverpod/issues/2102#issuecomment-1398790433: ```dart state = AsyncValue.error('Dummy error', StackTrace.current, maintainPrevious: false); ``` But I'm not sure how this should...

He doesn’t care much about showing prev data during loading since he's throwing the exception directly after the loading state anyway: ```dart Future build() async { if (!ref.watch(isAuthenticatedProvider)) { throw...

I understand your point, but what I'm saying is that excluding `value/requireValue` during `reloading` is unrelated to what @trejdych needs. He needs `.value` to be null when in error state...

The default behavior of `.when` does **not** return the previous data when in an **error** state or while **reloading**. but, the other three APIs (`value`, `requireValue`, and `valueOrNull`) return the...

> I'm saying that we need a middle ground: Have value be a good default, and still offer a mean to check the old state. I don't think having another...

> I want the default behavior to be the most logical one. I agree on that. Maybe we can do that for `value`, but I don't see the point for...

Alright. That would make `requireValue` a bit harder to work with. In most of my scenarios where I use `requireValue`, the provider might reload. like in this case: ```dart @riverpod...

`productCategoryDetailsProvider` always comes after `productCategoriesProvider` is loaded. There are other, more conventional examples, but I think it’d be totally fine if we're going to have an option to require value...

> So just `valueOrPrevious` If there's no previous value, will that return null on error or rethrows the error? I think that's the diff between `value` and `valueOrNull`