New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get Notifiers #24
base: master
Are you sure you want to change the base?
Get Notifiers #24
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
part 'profile_tweets.g.dart'; | ||
|
||
@riverpod | ||
Future<List<Tweet>> profileTweets(ProfileTweetsRef ref) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume there is not, but just to check if there is an annotation we could use to rename profileTweetsProvider -> profileTweetsPresenter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not possible. Riverpod will always add the Provider
suffix.
We can change the suffix, but it will change it for all providers (issue).
We should definitively discuss the naming (should it be profileTweets
, profileTweetsPresenter
, profileTweetsNotifier
).
onRefresh: () => ref.refresh(feedProvider.future), | ||
tweets: value, | ||
), | ||
AsyncError(:final error, isLoading: false) => Column( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this is loading false matching, and then default to loading. Can we also mention this in handbook?
onRefresh: () => ref.refresh(feedProvider.future), | ||
tweets: value, | ||
), | ||
AsyncError(:final error, isLoading: false) => Column( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this is loading false matching, and then default to loading. Can we also mention this in handbook?
Converted
Presenters
toNotifiers
, only forNotifiers
that do get/read operations.I will present different techniques for post/write operation on pub-beer.