Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Get Notifiers #24

wants to merge 1 commit into from

Conversation

zenled
Copy link
Contributor

@zenled zenled commented Jan 25, 2024

Converted Presenters to Notifiers, only for Notifiers that do get/read operations.
I will present different techniques for post/write operation on pub-beer.

Copy link
Member

@Truba Truba left a 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) {
Copy link
Member

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?

Copy link
Contributor Author

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(
Copy link
Member

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(
Copy link
Member

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?

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.

None yet

3 participants